Open eslavichjgbot opened 4 years ago
Comment by Megan Sosey on JIRA:
are you working with the same simulated image set asin 373? The name makes me think so, in which case, edit the header information and change the filter from 444w to 335m and see if you get the detections, that's what worked for me.
Comment by Alicia Canipe on JIRA:
Okay thanks, I'll try that.
Comment by Alicia Canipe on JIRA:
I changed FILTER header to F335M and reran it. I still get the same error, though. All you did was change the header and extract_2D worked?
Same traceback:
2019-01-11 14:35:22,245 - stpipe.Spec2Pipeline - INFO - Processing product V54321001002P000000000110c_A5_F444W_FinalDispersedRamp_row_uncal
2019-01-11 14:35:22,245 - stpipe.Spec2Pipeline - INFO - Working on input V54321001002P000000000110c_A5_F444W_FinalDispersedRamp_row_uncal_rate_F335M.fits ...
2019-01-11 14:35:22,708 - stpipe.Spec2Pipeline.assign_wcs - INFO - Step assign_wcs running with args (<ImageModel(2048, 2048) from V54321001002P000000000110c_A5_F444W_FinalDispersedRamp_row_uncal_rate_F335M.fits>,).
2019-01-11 14:35:23,653 - stpipe.Spec2Pipeline.assign_wcs - INFO - COMPLETED assign_wcs
2019-01-11 14:35:23,664 - stpipe.Spec2Pipeline.assign_wcs - INFO - Step assign_wcs done
2019-01-11 14:35:23,746 - stpipe.Spec2Pipeline.bkg_subtract - INFO - Step bkg_subtract running with args (<ImageModel(2048, 2048) from V54321001002P000000000110c_A5_F444W_FinalDispersedRamp_row_uncal_rate_F335M.fits>, []).
2019-01-11 14:35:23,746 - stpipe.Spec2Pipeline.bkg_subtract - INFO - Step skipped.
2019-01-11 14:35:23,748 - stpipe.Spec2Pipeline.bkg_subtract - INFO - Step bkg_subtract done
2019-01-11 14:35:23,821 - stpipe.Spec2Pipeline.flat_field - INFO - Step flat_field running with args (<ImageModel(2048, 2048) from V54321001002P000000000110c_A5_F444W_FinalDispersedRamp_row_uncal_rate_F335M.fits>,).
2019-01-11 14:35:24,242 - stpipe.Spec2Pipeline.flat_field - INFO - Step flat_field done
2019-01-11 14:35:24,330 - stpipe.Spec2Pipeline.extract_2d - INFO - Step extract_2d running with args (<ImageModel(2048, 2048) from V54321001002P000000000110c_A5_F444W_FinalDispersedRamp_row_uncal_rate_F335M.fits>,).
2019-01-11 14:35:24,364 - stpipe.Spec2Pipeline.extract_2d - INFO - EXP_TYPE is NRC_WFSS
Traceback (most recent call last):
File "/ifs/jwst/wit/witserv/data7/nrc/acanipe/unittests/code/jwst/jwst/pipeline/calwebb_spec2.py", line 91, in process
asn.filename
File "/ifs/jwst/wit/witserv/data7/nrc/acanipe/unittests/code/jwst/jwst/pipeline/calwebb_spec2.py", line 232, in process_exposure_product
input = self.extract_2d(input)
File "/ifs/jwst/wit/witserv/data7/nrc/acanipe/unittests/code/jwst/jwst/stpipe/step.py", line 400, in run
step_result = self.process(*args)
File "/ifs/jwst/wit/witserv/data7/nrc/acanipe/unittests/code/jwst/jwst/extract_2d/extract_2d_step.py", line 38, in process
extract_height=self.extract_height)
File "/ifs/jwst/wit/witserv/data7/nrc/acanipe/unittests/code/jwst/jwst/extract_2d/extract_2d.py", line 90, in extract2d
mmag_extract=99.)
File "/ifs/jwst/wit/witserv/data7/nrc/acanipe/unittests/code/jwst/jwst/extract_2d/grisms.py", line 301, in extract_grism_objects
raise ValueError("No grism objects created from source catalog")
ValueError: No grism objects created from source catalog
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-29-e63f2af25f37> in <module>()
----> 1 spec2.run("spec2_3rdprimary_modA_asn.json")
/ifs/jwst/wit/witserv/data7/nrc/acanipe/unittests/code/jwst/jwst/stpipe/step.py in run(self, *args)
398 else:
399 try:
--> 400 step_result = self.process(*args)
401 except TypeError as e:
402 if "process() takes exactly" in str(e):
/ifs/jwst/wit/witserv/data7/nrc/acanipe/unittests/code/jwst/jwst/pipeline/calwebb_spec2.py in process(self, input)
105 if has_exceptions and self.fail_on_exception:
106 raise RuntimeError(
--> 107 'One or more products failed to process. Failing calibration.'
108 )
109
RuntimeError: One or more products failed to process. Failing calibration.
Comment by Megan Sosey on JIRA:
I changed meta.instrument.filter to 335M; you then need to make sure you run assign_wcs on the grism image again so that the correct WCS is created, the transform polynomials are filter dependent. Then you can run extract_2d and it should work, try that if you haven't already.
Comment by Alicia Canipe on JIRA:
In [3]: mod.meta.instrument.filter
Out[3]: 'F335M'```
And I re-ran assign_wcs (in the traceback above):
```java
2019-01-11 14:35:22,245 - stpipe.Spec2Pipeline - INFO - Processing product V54321001002P000000000110c_A5_F444W_FinalDispersedRamp_row_uncal
2019-01-11 14:35:22,245 - stpipe.Spec2Pipeline - INFO - Working on input V54321001002P000000000110c_A5_F444W_FinalDispersedRamp_row_uncal_rate_F335M.fits ...
2019-01-11 14:35:22,708 - stpipe.Spec2Pipeline.assign_wcs - INFO - Step assign_wcs running with args (<ImageModel(2048, 2048) from V54321001002P000000000110c_A5_F444W_FinalDispersedRamp_row_uncal_rate_F335M.fits>,).
2019-01-11 14:35:23,653 - stpipe.Spec2Pipeline.assign_wcs - INFO - COMPLETED assign_wcs
2019-01-11 14:35:23,664 - stpipe.Spec2Pipeline.assign_wcs - INFO - Step assign_wcs done```
But it still can't find any sources. I assume we have the same simulated data? Maybe mine is older?
Comment by Megan Sosey on JIRA:
I put an example notebook here: https://github.com/sosey/jwst-investigate/blob/master/nircam/NIRCAM-Object-finding-and-Extract-2D-Filter-update.ipynb
Comment by Alicia Canipe on JIRA:
Okay, thanks. I'll take a look and see if I can pinpoint the issue with my data.
Test comment going the other way...
Issue JP-502 was created on JIRA by Alicia Canipe:
I am running a set of simulated dithered grism exposures through the Spec2 pipeline, along with a catalog I created from the direct image. I was able to run these datasets through extract_2D previously to create the cutout images (Build 7.1 back in January or February 2018), but now extract_2D is not finding any of the sources in the catalog at all.
My files are here: ████████████████████████████████████████████████████████████
Old files from Build 7.1 testing are in the build7.1_files subdirectory, along with a notebook that has some images I used to check that the cutout boxes were reasonable based on the catalog. You can see the Build 7.1 pipeline output in ██████████████████████████████████████████████████████████████████████████████████████████████
I'm not sure if this is related to https://jira.stsci.edu/browse/JP-373?
The traceback is: