eslavich / jirahub-sandbox

0 stars 0 forks source link

Extract_2D fail with simulated NIRCam exposures #18

Open eslavichjgbot opened 4 years ago

eslavichjgbot commented 4 years ago

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:

 

In [13]: spec2.run("spec2_3rdprimary_modA_asn.json")
2019-01-11 13:14:24,873 - stpipe.Spec2Pipeline - INFO - Step Spec2Pipeline running with args ('spec2_3rdprimary_modA_asn.json',).
2019-01-11 13:14:25,093 - stpipe.Spec2Pipeline - INFO - Prefetching reference files for dataset: 'old_V54321001002P0000000001109_A5_F444W_FinalDispersedRamp_row_uncal_rate.fits' reftypes = ['area', 'barshadow', 'camera', 'collimator', 'cubepar', 'dflat', 'disperser', 'distortion', 'drizpars', 'extract1d', 'fflat', 'filteroffset', 'flat', 'fore', 'fpa', 'fringe', 'ifufore', 'ifupost', 'ifuslicer', 'msa', 'msaoper', 'ote', 'pathloss', 'photom', 'regions', 'resol', 'sflat', 'specwcs', 'straymask', 'wavecorr', 'wavelengthrange', 'wfssbkg']
2019-01-11 13:14:25,100 - stpipe.Spec2Pipeline - INFO - Prefetch for AREA reference file is 'N/A'.
2019-01-11 13:14:25,100 - stpipe.Spec2Pipeline - INFO - Prefetch for BARSHADOW reference file is 'N/A'.
2019-01-11 13:14:25,100 - stpipe.Spec2Pipeline - INFO - Prefetch for CAMERA reference file is 'N/A'.
2019-01-11 13:14:25,100 - stpipe.Spec2Pipeline - INFO - Prefetch for COLLIMATOR reference file is 'N/A'.
2019-01-11 13:14:25,101 - stpipe.Spec2Pipeline - INFO - Prefetch for CUBEPAR reference file is 'N/A'.
2019-01-11 13:14:25,101 - stpipe.Spec2Pipeline - INFO - Prefetch for DFLAT reference file is 'N/A'.
2019-01-11 13:14:25,101 - stpipe.Spec2Pipeline - INFO - Prefetch for DISPERSER reference file is 'N/A'.
2019-01-11 13:14:25,101 - stpipe.Spec2Pipeline - INFO - Prefetch for DISTORTION reference file is '██████████████████████████████████████████████████████████████████
2019-01-11 13:14:25,101 - stpipe.Spec2Pipeline - INFO - Prefetch for DRIZPARS reference file is '████████████████████████████████████████████████████████████████
2019-01-11 13:14:25,102 - stpipe.Spec2Pipeline - INFO - Prefetch for EXTRACT1D reference file is 'N/A'.
2019-01-11 13:14:25,102 - stpipe.Spec2Pipeline - INFO - Prefetch for FFLAT reference file is 'N/A'.
2019-01-11 13:14:25,102 - stpipe.Spec2Pipeline - INFO - Prefetch for FILTEROFFSET reference file is 'N/A'.
2019-01-11 13:14:25,102 - stpipe.Spec2Pipeline - INFO - Prefetch for FLAT reference file is '████████████████████████████████████████████████████████████
2019-01-11 13:14:25,102 - stpipe.Spec2Pipeline - INFO - Prefetch for FORE reference file is 'N/A'.
2019-01-11 13:14:25,102 - stpipe.Spec2Pipeline - INFO - Prefetch for FPA reference file is 'N/A'.
2019-01-11 13:14:25,103 - stpipe.Spec2Pipeline - INFO - Prefetch for FRINGE reference file is 'N/A'.
2019-01-11 13:14:25,103 - stpipe.Spec2Pipeline - INFO - Prefetch for IFUFORE reference file is 'N/A'.
2019-01-11 13:14:25,103 - stpipe.Spec2Pipeline - INFO - Prefetch for IFUPOST reference file is 'N/A'.
2019-01-11 13:14:25,103 - stpipe.Spec2Pipeline - INFO - Prefetch for IFUSLICER reference file is 'N/A'.
2019-01-11 13:14:25,103 - stpipe.Spec2Pipeline - INFO - Prefetch for MSA reference file is 'N/A'.
2019-01-11 13:14:25,103 - stpipe.Spec2Pipeline - INFO - Prefetch for MSAOPER reference file is 'N/A'.
2019-01-11 13:14:25,103 - stpipe.Spec2Pipeline - INFO - Prefetch for OTE reference file is 'N/A'.
2019-01-11 13:14:25,103 - stpipe.Spec2Pipeline - INFO - Prefetch for PATHLOSS reference file is 'N/A'.
2019-01-11 13:14:25,103 - stpipe.Spec2Pipeline - INFO - Prefetch for PHOTOM reference file is '██████████████████████████████████████████████████████████████
2019-01-11 13:14:25,104 - stpipe.Spec2Pipeline - INFO - Prefetch for REGIONS reference file is 'N/A'.
2019-01-11 13:14:25,104 - stpipe.Spec2Pipeline - INFO - Prefetch for RESOL reference file is 'N/A'.
2019-01-11 13:14:25,104 - stpipe.Spec2Pipeline - INFO - Prefetch for SFLAT reference file is 'N/A'.
2019-01-11 13:14:25,104 - stpipe.Spec2Pipeline - INFO - Prefetch for SPECWCS reference file is '███████████████████████████████████████████████████████████████
2019-01-11 13:14:25,105 - stpipe.Spec2Pipeline - INFO - Prefetch for STRAYMASK reference file is 'N/A'.
2019-01-11 13:14:25,105 - stpipe.Spec2Pipeline - INFO - Prefetch for WAVECORR reference file is 'N/A'.
2019-01-11 13:14:25,105 - stpipe.Spec2Pipeline - INFO - Prefetch for WAVELENGTHRANGE reference file is '███████████████████████████████████████████████████████████████████████
2019-01-11 13:14:25,105 - stpipe.Spec2Pipeline - INFO - Prefetch for WFSSBKG reference file is '███████████████████████████████████████████████████████████████
201901111314:DEBUG:jwst.associations.association_io.load:Error unserializing: "Expecting value: line 1 column 1 (char 0)"
201901111314:DEBUG:jwst.associations.association_io.load:Error unserializing: "Expecting value: line 1 column 1 (char 0)"
201901111314:DEBUG:jwst.associations.association_io.load:Error unserializing: "Expecting value: line 1 column 1 (char 0)"
201901111314:DEBUG:jwst.associations.association_io.load:Error unserializing: "Expecting value: line 1 column 1 (char 0)"
201901111314:DEBUG:jwst.associations.association_io.load:Error unserializing: "Expecting value: line 1 column 1 (char 0)"
201901111314:DEBUG:jwst.associations.association_io.load:Error unserializing: "Expecting value: line 1 column 1 (char 0)"
201901111314:DEBUG:jwst.associations.association_io.load:Error unserializing: "Expecting value: line 1 column 1 (char 0)"
201901111314:DEBUG:jwst.associations.association_io.load:Error unserializing: "Expecting value: line 1 column 1 (char 0)"
201901111314:DEBUG:jwst.associations.association_io.load:Error unserializing: "Expecting value: line 1 column 1 (char 0)"
201901111314:DEBUG:jwst.associations.association_io.load:Error unserializing: "Expecting value: line 1 column 1 (char 0)"
201901111314:DEBUG:jwst.associations.association_io.load:Error unserializing: "Expecting value: line 1 column 1 (char 0)"
201901111314:DEBUG:jwst.associations.association_io.load:Error unserializing: "Expecting value: line 1 column 1 (char 0)"
201901111314:DEBUG:jwst.associations.association_io.load:Error unserializing: "Expecting value: line 1 column 1 (char 0)"
201901111314:DEBUG:jwst.associations.association_io.load:Error unserializing: "Expecting value: line 1 column 1 (char 0)"
201901111314:DEBUG:jwst.associations.association_io.load:Error unserializing: "Expecting value: line 1 column 1 (char 0)"
201901111314:DEBUG:jwst.associations.association_io.load:Error unserializing: "Expecting value: line 1 column 1 (char 0)"
201901111314:DEBUG:jwst.associations.association_io.load:Error unserializing: "Expecting value: line 1 column 1 (char 0)"
201901111314:DEBUG:jwst.associations.association_io.load:Error unserializing: "Expecting value: line 1 column 1 (char 0)"
201901111314:DEBUG:jwst.associations.association_io.load:Error unserializing: "Expecting value: line 1 column 1 (char 0)"
201901111314:DEBUG:jwst.associations.association_io.load:Error unserializing: "Expecting value: line 1 column 1 (char 0)"
201901111314:DEBUG:jwst.associations.association_io.load:Error unserializing: "Expecting value: line 1 column 1 (char 0)"
201901111315:DEBUG:jwst.associations.association_io.load:Error unserializing: "Expecting value: line 1 column 1 (char 0)"
201901111315:DEBUG:jwst.associations.association_io.load:Error unserializing: "Expecting value: line 1 column 1 (char 0)"
201901111315:DEBUG:jwst.associations.association_io.load:Error unserializing: "Expecting value: line 1 column 1 (char 0)"
201901111315:DEBUG:jwst.associations.association_io.load:Error unserializing: "Expecting value: line 1 column 1 (char 0)"
201901111315:DEBUG:jwst.associations.association_io.load:Error unserializing: "Expecting value: line 1 column 1 (char 0)"
2019-01-11 13:15:10,612 - stpipe.Spec2Pipeline - INFO - First argument spec2_3rdprimary_modA_asn.json does not appear to be a model
2019-01-11 13:15:10,612 - stpipe.Spec2Pipeline - INFO - Starting calwebb_spec2 ...
2019-01-11 13:15:10,624 - stpipe.Spec2Pipeline - INFO - Processing product old_V54321001002P0000000001109_A5_F444W_FinalDispersedRamp_row_uncal
2019-01-11 13:15:10,624 - stpipe.Spec2Pipeline - INFO - Working on input old_V54321001002P0000000001109_A5_F444W_FinalDispersedRamp_row_uncal_rate.fits ...
2019-01-11 13:15:10,886 - stpipe.Spec2Pipeline.assign_wcs - INFO - Step assign_wcs running with args (<ImageModel(2048, 2048) from old_V54321001002P0000000001109_A5_F444W_FinalDispersedRamp_row_uncal_rate.fits>,).
2019-01-11 13:15:11,328 - stpipe.Spec2Pipeline.assign_wcs - INFO - COMPLETED assign_wcs
2019-01-11 13:15:11,341 - stpipe.Spec2Pipeline.assign_wcs - INFO - Step assign_wcs done
2019-01-11 13:15:11,440 - stpipe.Spec2Pipeline.bkg_subtract - INFO - Step bkg_subtract running with args (<ImageModel(2048, 2048) from old_V54321001002P0000000001109_A5_F444W_FinalDispersedRamp_row_uncal_rate.fits>, []).
2019-01-11 13:15:11,441 - stpipe.Spec2Pipeline.bkg_subtract - INFO - Step skipped.
2019-01-11 13:15:11,442 - stpipe.Spec2Pipeline.bkg_subtract - INFO - Step bkg_subtract done
2019-01-11 13:15:11,509 - stpipe.Spec2Pipeline.flat_field - INFO - Step flat_field running with args (<ImageModel(2048, 2048) from old_V54321001002P0000000001109_A5_F444W_FinalDispersedRamp_row_uncal_rate.fits>,).
2019-01-11 13:15:12,003 - stpipe.Spec2Pipeline.flat_field - INFO - Step flat_field done
2019-01-11 13:15:12,083 - stpipe.Spec2Pipeline.extract_2d - INFO - Step extract_2d running with args (<ImageModel(2048, 2048) from old_V54321001002P0000000001109_A5_F444W_FinalDispersedRamp_row_uncal_rate.fits>,).
2019-01-11 13:15:12,116 - 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
2019-01-11 13:15:12,129 - stpipe.Spec2Pipeline - INFO - Processing product V54321001002P000000000110a_A5_F444W_FinalDispersedRamp_row_uncal
2019-01-11 13:15:12,129 - stpipe.Spec2Pipeline - INFO - Working on input V54321001002P000000000110a_A5_F444W_FinalDispersedRamp_row_uncal_rate.fits ...
2019-01-11 13:15:12,390 - stpipe.Spec2Pipeline.assign_wcs - INFO - Step assign_wcs running with args (<ImageModel(2048, 2048) from V54321001002P000000000110a_A5_F444W_FinalDispersedRamp_row_uncal_rate.fits>,).
2019-01-11 13:15:12,792 - stpipe.Spec2Pipeline.assign_wcs - INFO - COMPLETED assign_wcs
2019-01-11 13:15:12,803 - stpipe.Spec2Pipeline.assign_wcs - INFO - Step assign_wcs done
2019-01-11 13:15:12,882 - stpipe.Spec2Pipeline.bkg_subtract - INFO - Step bkg_subtract running with args (<ImageModel(2048, 2048) from V54321001002P000000000110a_A5_F444W_FinalDispersedRamp_row_uncal_rate.fits>, []).
2019-01-11 13:15:12,882 - stpipe.Spec2Pipeline.bkg_subtract - INFO - Step skipped.
2019-01-11 13:15:12,884 - stpipe.Spec2Pipeline.bkg_subtract - INFO - Step bkg_subtract done
2019-01-11 13:15:12,952 - stpipe.Spec2Pipeline.flat_field - INFO - Step flat_field running with args (<ImageModel(2048, 2048) from V54321001002P000000000110a_A5_F444W_FinalDispersedRamp_row_uncal_rate.fits>,).
2019-01-11 13:15:13,376 - stpipe.Spec2Pipeline.flat_field - INFO - Step flat_field done
2019-01-11 13:15:13,471 - stpipe.Spec2Pipeline.extract_2d - INFO - Step extract_2d running with args (<ImageModel(2048, 2048) from V54321001002P000000000110a_A5_F444W_FinalDispersedRamp_row_uncal_rate.fits>,).
2019-01-11 13:15:13,503 - 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
2019-01-11 13:15:13,504 - stpipe.Spec2Pipeline - INFO - Processing product V54321001002P000000000110b_A5_F444W_FinalDispersedRamp_row_uncal
2019-01-11 13:15:13,504 - stpipe.Spec2Pipeline - INFO - Working on input V54321001002P000000000110b_A5_F444W_FinalDispersedRamp_row_uncal_rate.fits ...
2019-01-11 13:15:13,765 - stpipe.Spec2Pipeline.assign_wcs - INFO - Step assign_wcs running with args (<ImageModel(2048, 2048) from V54321001002P000000000110b_A5_F444W_FinalDispersedRamp_row_uncal_rate.fits>,).
2019-01-11 13:15:14,180 - stpipe.Spec2Pipeline.assign_wcs - INFO - COMPLETED assign_wcs
2019-01-11 13:15:14,192 - stpipe.Spec2Pipeline.assign_wcs - INFO - Step assign_wcs done
2019-01-11 13:15:14,268 - stpipe.Spec2Pipeline.bkg_subtract - INFO - Step bkg_subtract running with args (<ImageModel(2048, 2048) from V54321001002P000000000110b_A5_F444W_FinalDispersedRamp_row_uncal_rate.fits>, []).
2019-01-11 13:15:14,269 - stpipe.Spec2Pipeline.bkg_subtract - INFO - Step skipped.
2019-01-11 13:15:14,270 - stpipe.Spec2Pipeline.bkg_subtract - INFO - Step bkg_subtract done
2019-01-11 13:15:14,339 - stpipe.Spec2Pipeline.flat_field - INFO - Step flat_field running with args (<ImageModel(2048, 2048) from V54321001002P000000000110b_A5_F444W_FinalDispersedRamp_row_uncal_rate.fits>,).
2019-01-11 13:15:14,788 - stpipe.Spec2Pipeline.flat_field - INFO - Step flat_field done
2019-01-11 13:15:14,881 - stpipe.Spec2Pipeline.extract_2d - INFO - Step extract_2d running with args (<ImageModel(2048, 2048) from V54321001002P000000000110b_A5_F444W_FinalDispersedRamp_row_uncal_rate.fits>,).
2019-01-11 13:15:14,918 - 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
2019-01-11 13:15:14,919 - stpipe.Spec2Pipeline - INFO - Processing product V54321001002P000000000110c_A5_F444W_FinalDispersedRamp_row_uncal
2019-01-11 13:15:14,919 - stpipe.Spec2Pipeline - INFO - Working on input V54321001002P000000000110c_A5_F444W_FinalDispersedRamp_row_uncal_rate.fits ...
2019-01-11 13:15:15,195 - stpipe.Spec2Pipeline.assign_wcs - INFO - Step assign_wcs running with args (<ImageModel(2048, 2048) from V54321001002P000000000110c_A5_F444W_FinalDispersedRamp_row_uncal_rate.fits>,).
2019-01-11 13:15:15,581 - stpipe.Spec2Pipeline.assign_wcs - INFO - COMPLETED assign_wcs
2019-01-11 13:15:15,591 - stpipe.Spec2Pipeline.assign_wcs - INFO - Step assign_wcs done
2019-01-11 13:15:15,666 - stpipe.Spec2Pipeline.bkg_subtract - INFO - Step bkg_subtract running with args (<ImageModel(2048, 2048) from V54321001002P000000000110c_A5_F444W_FinalDispersedRamp_row_uncal_rate.fits>, []).
2019-01-11 13:15:15,666 - stpipe.Spec2Pipeline.bkg_subtract - INFO - Step skipped.
2019-01-11 13:15:15,667 - stpipe.Spec2Pipeline.bkg_subtract - INFO - Step bkg_subtract done
2019-01-11 13:15:15,735 - stpipe.Spec2Pipeline.flat_field - INFO - Step flat_field running with args (<ImageModel(2048, 2048) from V54321001002P000000000110c_A5_F444W_FinalDispersedRamp_row_uncal_rate.fits>,).
2019-01-11 13:15:16,182 - stpipe.Spec2Pipeline.flat_field - INFO - Step flat_field done
2019-01-11 13:15:16,272 - stpipe.Spec2Pipeline.extract_2d - INFO - Step extract_2d running with args (<ImageModel(2048, 2048) from V54321001002P000000000110c_A5_F444W_FinalDispersedRamp_row_uncal_rate.fits>,).
2019-01-11 13:15:16,305 - 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-13-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.

 

eslavichjgbot commented 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.

eslavichjgbot commented 4 years ago

Comment by Alicia Canipe on JIRA:

Okay thanks, I'll try that.

eslavichjgbot commented 4 years ago

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.

 

eslavichjgbot commented 4 years ago

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.

eslavichjgbot commented 4 years ago

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?
eslavichjgbot commented 4 years ago

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

eslavichjgbot commented 4 years ago

Comment by Alicia Canipe on JIRA:

Okay, thanks. I'll take a look and see if I can pinpoint the issue with my data.

eslavich commented 4 years ago

Test comment going the other way...