Skip to content

Conversation

@hbushouse
Copy link
Collaborator

@hbushouse hbushouse commented Aug 16, 2023

Resolves JP-3232

Closes #7730

This PR adds an override for the construction of the level-3 product name for NIRCam coronagraphic associations that are to be processed as regular imaging, i.e. through the image3 pipeline. The data are also processed as a coron3 ASN, which previously resulted in identical "i2d" level-3 product names being created: one from coron3 and one from image3. This update breaks the file name degeneracy by simply adding the additional suffix "-image3" to the optical element field of the product name for the data processed as regular imaging.

Checklist for maintainers

  • added entry in CHANGES.rst within the relevant release section
  • updated or added relevant tests
  • updated relevant documentation
  • added relevant milestone
  • added relevant label(s)
  • ran regression tests, post a link to the Jenkins job below.
    How to run regression tests on a PR
  • Make sure the JIRA ticket is resolved properly

# Check and continue initialization.
super(Asn_Lv3NRCCoronImage, self).__init__(*args, **kwargs)

@property
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For reviewers, this just adds an override for the regular "dms_product_name" function, to be used by only this particular ASN class.

return product_name.lower()


def dms_product_name_coronimage(asn):
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a line-for-line copy of the regular "dms_product_name" function, but with the addition of the "-image3" suffix to the end of the optical element field(s).

@codecov
Copy link

codecov bot commented Aug 16, 2023

Codecov Report

Patch coverage: 17.64% and project coverage change: -0.03% ⚠️

Comparison is base (e66f365) 76.54% compared to head (985c6d1) 76.52%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7826      +/-   ##
==========================================
- Coverage   76.54%   76.52%   -0.03%     
==========================================
  Files         456      456              
  Lines       36947    36964      +17     
==========================================
+ Hits        28282    28285       +3     
- Misses       8665     8679      +14     
Flag Coverage Δ *Carryforward flag
nightly 77.39% <ø> (ø) Carriedforward from e66f365

*This pull request uses carry forward flags. Click here to find out more.

Files Changed Coverage Δ
jwst/associations/lib/rules_level3_base.py 89.39% <7.14%> (-4.29%) ⬇️
jwst/associations/lib/rules_level3.py 96.34% <66.66%> (-0.56%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@hbushouse
Copy link
Collaborator Author

For the record, when the generator is run on pool "jw00016_20230331t130733_pool.csv" it creates the level-3 ASN's "jw00016-c1002_coron3_00001_asn.json" and "jw00016-c1002_image3_00001_asn.json". Before this rule change, the product name in both of those ASN's was "jw00016-c1002_t004_nircam_f210m-maskbar". With this change, the coron3 ASN still has that original product name, but the image3 ASN now uses the product name "jw00016-c1002_t004_nircam_f210m-maskbar-image3". All other aspects of the ASN's are unchanged.

@hbushouse
Copy link
Collaborator Author

@hbushouse
Copy link
Collaborator Author

@stscieisenhamer We already have the jw00016 pool included in our association regtests, which will check which asn's are created. But the only thing that changes as a result of this PR is the product name listed inside of one asn file, so I'm guessing that won't show up as a difference, right? The tests only check which asn files were created and not their content, right?

@stscieisenhamer
Copy link
Collaborator

If there are pools in the artifactory area, the tests themselves should see the change and report failure, along the lines of different/extra/missing products. If the changes are the expected ones, okifying will rectify the changes.

@hbushouse
Copy link
Collaborator Author

If there are pools in the artifactory area, the tests themselves should see the change and report failure, along the lines of different/extra/missing products. If the changes are the expected ones, okifying will rectify the changes.

The jw00016 is in the associations/sdp/pools/ directory on artifactory, which I believe is the input area for all the tests based on sdp-generated pools, but I also see a directory /truth/sdp/pools/ that contains a lot of pool files. 1) Why would there be pool files in a truth area, and 2) if they're necessary, do I need to put a copy of the jw00016 pool in there too?

@stscieisenhamer
Copy link
Collaborator

That is unfortunate. The tests should be fully self-contained under assocations. The semi-duplicate under truth/associations should not be there. I'll double verify/repair artifactory.

For your purposes, it is only the top level associations folder that is of concern. Note that if the pool already exists, the okify script will handle fixing, so there should be no manual intervention on your part. If you wish to add new pools, they go into associations/sdp/pools. For new pools, run the regtests, then okify.

@hbushouse
Copy link
Collaborator Author

Regtests are clean.

@hbushouse hbushouse merged commit 589917d into spacetelescope:master Aug 16, 2023
@hbushouse hbushouse deleted the jp-3232 branch August 16, 2023 20:03
mairanteodoro pushed a commit to mairanteodoro/jwst that referenced this pull request Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Level 3 NIRCam Coronagraphic products have conflicting names

3 participants