-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JP-3784 Fix Pixel replace and cube_build output file names #8979
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8979 +/- ##
==========================================
- Coverage 64.53% 64.51% -0.03%
==========================================
Files 375 375
Lines 38728 38744 +16
==========================================
+ Hits 24993 24995 +2
- Misses 13735 13749 +14 ☔ View full report in Codecov by Sentry. |
@melanieclarke @emolter 024-11-27 07:10:50,422 - stpipe.PixelReplaceStep - INFO - Saved model in jw01267003001_02105_00001_mirifushort_pixelreplacestep.fits So the step is working just fine but I can not seem to access the output filenames when it is called from a container. |
85fa531
to
5756f31
Compare
@melanieclarke I got this step to work by including the 'invariant_filenames' routine that is from cal spec3 and it manages filenames. I just copied the routine and suck in pixel_replace_step.py. I tried to import it from: But that gets circular and I get an error because calwebb_spec3 is importing pixel_replace. |
The I didn't review this in detail yet but I don't see anything wrong with the current solution. For unit testing, instead of checking the |
We could move that function to a library and import it in both places - maybe in lib/pipe_utils.py. I'm not sure I understand why that's working, though. |
At risk of nit-picking, since |
Testing locally, it looks like this solution does work for the case we were trying to fix, where container is made from a list of filenames: But it now un-fixes the calwebb_spec3 case. Calling like this: |
@melanieclarke @emolter I do have a question about a unit test that saves the output to disk. Is that allowed ? It writes out files to the test directory ? @melanieclarke I need to understand your test better. In your s3.json file what is the output name set to ? I have a set of tests (in a Jupyter notebook) that I have developed to test the various filenames of pixel_replace and cube_build. When I run calspec3 and save the pixel_replace output. ALL the filenames have the correct format. spec3_asn = 'test.json' in the association the name is set to 'test_miri' and there are 4 input files. and the output from cube_build is: |
@melanieclarke Forget last message. I was on a wrong branch. Let me check what is going on with cube_build and I will update |
If you're passing in e.g. the |
Resolves JP-3784
Closes #8904
This PR addresses fixes the names of the output from pixel_replacement when called using a ModelContainer. In addition, it fixes the output names of cube_build when a single file is input to cube_build.
Tasks
Build 11.3
(use the latest build if not sure)no-changelog-entry-needed
)changes/
:echo "changed something" > changes/<PR#>.<changetype>.rst
(see below for change types)docs/
pageokify_regtests
to update the truth filesnews fragment change types...
changes/<PR#>.general.rst
: infrastructure or miscellaneous changechanges/<PR#>.docs.rst
changes/<PR#>.stpipe.rst
changes/<PR#>.datamodels.rst
changes/<PR#>.scripts.rst
changes/<PR#>.fits_generator.rst
changes/<PR#>.set_telescope_pointing.rst
changes/<PR#>.pipeline.rst
stage 1
changes/<PR#>.group_scale.rst
changes/<PR#>.dq_init.rst
changes/<PR#>.emicorr.rst
changes/<PR#>.saturation.rst
changes/<PR#>.ipc.rst
changes/<PR#>.firstframe.rst
changes/<PR#>.lastframe.rst
changes/<PR#>.reset.rst
changes/<PR#>.superbias.rst
changes/<PR#>.refpix.rst
changes/<PR#>.linearity.rst
changes/<PR#>.rscd.rst
changes/<PR#>.persistence.rst
changes/<PR#>.dark_current.rst
changes/<PR#>.charge_migration.rst
changes/<PR#>.jump.rst
changes/<PR#>.clean_flicker_noise.rst
changes/<PR#>.ramp_fitting.rst
changes/<PR#>.gain_scale.rst
stage 2
changes/<PR#>.assign_wcs.rst
changes/<PR#>.badpix_selfcal.rst
changes/<PR#>.msaflagopen.rst
changes/<PR#>.nsclean.rst
changes/<PR#>.imprint.rst
changes/<PR#>.background.rst
changes/<PR#>.extract_2d.rst
changes/<PR#>.master_background.rst
changes/<PR#>.wavecorr.rst
changes/<PR#>.srctype.rst
changes/<PR#>.straylight.rst
changes/<PR#>.wfss_contam.rst
changes/<PR#>.flatfield.rst
changes/<PR#>.fringe.rst
changes/<PR#>.pathloss.rst
changes/<PR#>.barshadow.rst
changes/<PR#>.photom.rst
changes/<PR#>.pixel_replace.rst
changes/<PR#>.resample_spec.rst
changes/<PR#>.residual_fringe.rst
changes/<PR#>.cube_build.rst
changes/<PR#>.extract_1d.rst
changes/<PR#>.resample.rst
stage 3
changes/<PR#>.assign_mtwcs.rst
changes/<PR#>.mrs_imatch.rst
changes/<PR#>.tweakreg.rst
changes/<PR#>.skymatch.rst
changes/<PR#>.exp_to_source.rst
changes/<PR#>.outlier_detection.rst
changes/<PR#>.tso_photometry.rst
changes/<PR#>.stack_refs.rst
changes/<PR#>.align_refs.rst
changes/<PR#>.klip.rst
changes/<PR#>.spectral_leak.rst
changes/<PR#>.source_catalog.rst
changes/<PR#>.combine_1d.rst
changes/<PR#>.ami.rst
other
changes/<PR#>.wfs_combine.rst
changes/<PR#>.white_light.rst
changes/<PR#>.cube_skymatch.rst
changes/<PR#>.engdb_tools.rst
changes/<PR#>.guider_cds.rst