spacetelescope / jwst

Python library for science observations from the James Webb Space Telescope
https://jwst-pipeline.readthedocs.io/en/latest/
Other
554 stars 161 forks source link

Spec3 step mrs_imatch crashing #8538

Open stscijgbot-jp opened 2 months ago

stscijgbot-jp commented 2 months ago

Issue JP-3649 was created on JIRA by Maria Pena-Guerrero:

The mrs_imatch step is skipped by default for data with USEAFTER 2022-05-01. I used the test set that is currently in artifactory for regression tests for MIRI MRS. When it runs it crashes with the following traceback:

Traceback (most recent call last):   File "/Users/pena/Documents/SCSB/analysis_tools/analysis_tools/src/run_st_pipes.py", line 713, in run_st_pipes     run_spec3(asn_json, outdir, save_stps_lst=save_stps_lst,   File "/Users/pena/Documents/SCSB/analysis_tools/analysis_tools/src/run_st_pipes.py", line 418, in run_spec3     spec3.call(asn_json, output_dir=output_dir, steps=parameter_dict, save_results=True)   File "/Users/pena/Documents/SCSB/stpipe/stpipe/src/stpipe/step.py", line 686, in call     return instance.run(args)            ^^^^^^^^^^^^^^^^^^^   File "/Users/pena/Documents/SCSB/stpipe/stpipe/src/stpipe/step.py", line 509, in run     step_result = self.process(args)                   ^^^^^^^^^^^^^^^^^^^   File "/Users/pena/Documents/SCSB/jwst/jwst/jwst/pipeline/calwebb_spec3.py", line 221, in process     result = self.mrs_imatch(result)              ^^^^^^^^^^^^^^^^^^^^^^^   File "/Users/pena/Documents/SCSB/stpipe/stpipe/src/stpipe/step.py", line 509, in run     step_result = self.process(*args)                   ^^^^^^^^^^^^^^^^^^^   File "/Users/pena/Documents/SCSB/jwst/jwst/jwst/mrs_imatch/mrs_imatch_step.py", line 85, in process     _match_models(single_ch[c], channel=str(c), degree=degree)   File "/Users/pena/Documents/SCSB/jwst/jwst/jwst/mrs_imatch/mrs_imatch_step.py", line 266, in _match_models     cube_models = cbs.process(models)                   ^^^^^^^^^^^^^^^^^^^   File "/Users/pena/Documents/SCSB/jwst/jwst/jwst/cube_build/cube_build_step.py", line 369, in process     cube_container = thiscube.build_ifucube_single()                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^   File "/Users/pena/Documents/SCSB/jwst/jwst/jwst/cube_build/ifu_cube.py", line 827, in build_ifucube_single     coord1, coord2, corner_coord, wave, dwave, flux, err, slice_no, \ ValueError: too many values to unpack (expected 13) None

stscijgbot-jp commented 2 months ago

Comment by David Law on JIRA:

I think it's useful to know that this step is now crashing, but fixing that isn't a priority at the moment as the step is now quite outdated and not recommended for any users.  Setting to 'On Hold'.

stscijgbot-jp commented 1 month ago

Comment by Maria Pena-Guerrero on JIRA:

Just for reference, here is a Help Desk ticket that reports this bug as well: https://stsci.service-now.com/nav_to.do?uri=%2Fincident.do%3Fsys_id%3Df3c557dd831642545d629da6feaad3e6%26sysparm_domain%3Dnull%26sysparm_domain_scope%3Dnull%26sysparm_view%3DJWST%26sysparm_view_forced%3Dtrue

stscijgbot-jp commented 3 days ago

Comment by Jane Morrison on JIRA:

David Law Tyler Pauly Melanie Clarke 

I fixed cube_build so that when mrs_imatch is called there is not an error The mrs_imatch step uses the 'single' type IFU cubes. As updates have been made to normal IFU cube building the single type got forgotten about. I do not know of a cases where these single type cubes are used in the pipeline.  I have added a deprecation warning to mrs_imatch. I can set the step to skip never allow it to be run.  But I am not sure that is what I should do.

This became an issue when a user used the .run method rather than .call for calwebb_spec3 - so mrs_imatch was called.  Should I always skip mrs_imatch or just use the deprecation warning ?

 

stscijgbot-jp commented 3 days ago

Comment by David Law on JIRA:

Jane Morrison Let's leave it as a deprecation warning for now.  I'd rather we look back at this when possible and remove the step than having a step in the pipeline that's impossible to run.

stscijgbot-jp commented 3 days ago

Comment by Melanie Clarke on JIRA:

I think it's probably still a good idea to default to skip = True in the spec for the step, so that it doesn't run by default when a user calls it via .run.  They will still be able to run it if they manually set skip = False.

stscijgbot-jp commented 3 days ago

Comment by David Law on JIRA:

Agreed.