eslavich / jirahub-sandbox

0 stars 0 forks source link

NIRSpec: calwebb_spec2 crashes with IFU data at msa_flagging step #25

Open eslavichjgbot opened 4 years ago

eslavichjgbot commented 4 years ago

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

We were attempting to test cube_build but the cal web_spec2 pipeline crashes with simulated IFU data at the msa_flagging step. The failure message is copied below.

The file we used for testing can be located at:

████████████████████████████████████

ditherunity_CLEAR_PRISM_M1_m1_noiseless_NRS1_modified_updatedHDR_fixintarget.fits

 

Traceback:

2019-01-17 23:18:53,668 - stpipe.Spec2Pipeline.assign_wcs - INFO - Step assign_wcs done

2019-01-17 23:18:53,797 - stpipe.Spec2Pipeline.msa_flagging - INFO - Step msa_flagging running with args (<IFUImageModel(2040, 2040) from ditherunity_CLEAR_PRISM_M1_m1_noiseless_NRS1_modified_updatedHDR_fixintarget.fits>,).

2019-01-17 23:18:54,131 - stpipe.Spec2Pipeline.msa_flagging - INFO - Using reference file ██████████████████████████████████████████████████████████████

2019-01-17 23:18:54,132 - stpipe.Step - INFO - Step instance created.

2019-01-17 23:18:56,103 - stpipe.Spec2Pipeline.msa_flagging - INFO - gwa_ytilt is 0.1346436440944672 deg

2019-01-17 23:18:56,103 - stpipe.Spec2Pipeline.msa_flagging - INFO - gwa_xtilt is 0.3622055649757385 deg

2019-01-17 23:18:56,104 - stpipe.Spec2Pipeline.msa_flagging - INFO - theta_y correction: -0.030260896022953843 deg

2019-01-17 23:18:56,104 - stpipe.Spec2Pipeline.msa_flagging - INFO - theta_x correction: 0.0 deg

2019-01-17 23:18:56,273 - stpipe.Spec2Pipeline.msa_flagging - INFO - SPORDER= 0, wrange=[6e-07, 5.3e-06]

2019-01-17 23:18:59,869 - stpipe.Spec2Pipeline.msa_flagging - INFO - There are 5 open slits in quadrant 1

2019-01-17 23:19:00,425 - stpipe.Spec2Pipeline.msa_flagging - INFO - There are 3 open slits in quadrant 2

2019-01-17 23:19:00,814 - stpipe.Spec2Pipeline.msa_flagging - INFO - There are 9 open slits in quadrant 3

2019-01-17 23:19:02,270 - stpipe.Spec2Pipeline.msa_flagging - INFO - There are 3 open slits in quadrant 4

2019-01-17 23:19:02,717 - stpipe.Spec2Pipeline.msa_flagging - INFO - There are 0 open slits in quadrant 5

Traceback (most recent call last):

  File "/Users/sargent/anaconda/envs/jwst72/lib/python3.6/site-packages/jwst-0.12.2-py3.6-macosx-10.7-x86_64.egg/jwst/pipeline/calwebb_spec2.py", line 91, in process

    asn.filename

  File "/Users/sargent/anaconda/envs/jwst72/lib/python3.6/site-packages/jwst-0.12.2-py3.6-macosx-10.7-x86_64.egg/jwst/pipeline/calwebb_spec2.py", line 225, in process_exposure_product

    input = self.msa_flagging(input)

  File "/Users/sargent/anaconda/envs/jwst72/lib/python3.6/site-packages/jwst-0.12.2-py3.6-macosx-10.7-x86_64.egg/jwst/stpipe/step.py", line 400, in run

    step_result = self.process(*args)

  File "/Users/sargent/anaconda/envs/jwst72/lib/python3.6/site-packages/jwst-0.12.2-py3.6-macosx-10.7-x86_64.egg/jwst/msaflagopen/msaflagopen_step.py", line 42, in process

    wcs_reffile_names)

  File "/Users/sargent/anaconda/envs/jwst72/lib/python3.6/site-packages/jwst-0.12.2-py3.6-macosx-10.7-x86_64.egg/jwst/msaflagopen/msaflag_open.py", line 51, in do_correction

    output_model = flag(input_model, failed_slitlets, wcs_refnames)

  File "/Users/sargent/anaconda/envs/jwst72/lib/python3.6/site-packages/jwst-0.12.2-py3.6-macosx-10.7-x86_64.egg/jwst/msaflagopen/msaflag_open.py", line 106, in flag

    y_indices, x_indices = np.mgrid[ymin:ymax, xmin:xmax]

  File "/Users/sargent/anaconda/envs/jwst72/lib/python3.6/site-packages/numpy/lib/index_tricks.py", line 187, in getitem

    nn = _nx.indices(size, typ)

  File "/Users/sargent/anaconda/envs/jwst72/lib/python3.6/site-packages/numpy/core/numeric.py", line 1863, in indices

    res = empty((N,)+dimensions, dtype=dtype)

ValueError: negative dimensions are not allowed


ERROR RUNNING STEP 'Spec2Pipeline':

    One or more products failed to process. Failing calibration.

Traceback (most recent call last):

  File "/Users/sargent/anaconda/envs/jwst72/lib/python3.6/site-packages/jwst-0.12.2-py3.6-macosx-10.7-x86_64.egg/jwst/stpipe/cmdline.py", line 297, in step_from_cmdline

    step.run(*positional)

  File "/Users/sargent/anaconda/envs/jwst72/lib/python3.6/site-packages/jwst-0.12.2-py3.6-macosx-10.7-x86_64.egg/jwst/stpipe/step.py", line 400, in run

    step_result = self.process(*args)

  File "/Users/sargent/anaconda/envs/jwst72/lib/python3.6/site-packages/jwst-0.12.2-py3.6-macosx-10.7-x86_64.egg/jwst/pipeline/calwebb_spec2.py", line 107, in process

    'One or more products failed to process. Failing calibration.'

RuntimeError: One or more products failed to process. Failing calibration.

 


Traceback (most recent call last):

  File "/Users/sargent/anaconda/envs/jwst72/lib/python3.6/site-packages/jwst-0.12.2-py3.6-macosx-10.7-x86_64.egg/EGG-INFO/scripts/strun", line 26, in

    step = Step.from_cmdline(sys.argv[1:])

  File "/Users/sargent/anaconda/envs/jwst72/lib/python3.6/site-packages/jwst-0.12.2-py3.6-macosx-10.7-x86_64.egg/jwst/stpipe/step.py", line 162, in from_cmdline

    return cmdline.step_from_cmdline(args)

  File "/Users/sargent/anaconda/envs/jwst72/lib/python3.6/site-packages/jwst-0.12.2-py3.6-macosx-10.7-x86_64.egg/jwst/stpipe/cmdline.py", line 297, in step_from_cmdline

    step.run(*positional)

  File "/Users/sargent/anaconda/envs/jwst72/lib/python3.6/site-packages/jwst-0.12.2-py3.6-macosx-10.7-x86_64.egg/jwst/stpipe/step.py", line 400, in run

    step_result = self.process(*args)

  File "/Users/sargent/anaconda/envs/jwst72/lib/python3.6/site-packages/jwst-0.12.2-py3.6-macosx-10.7-x86_64.egg/jwst/pipeline/calwebb_spec2.py", line 107, in process

    'One or more products failed to process. Failing calibration.'

RuntimeError: One or more products failed to process. Failing calibration.

eslavichjgbot commented 4 years ago

Comment by Beth Sargent on JIRA:

Nadia, Howard,

I added 4 rows/columns of zero-valued-pixels to the borders of the SCI, DQ, and ERR planes of the simulations I was working with, so that they are now 2048x2048 instead of 2040x2040.  I ran these modified simulations (with the header keyword changes of strings to Boolean values from Phil's suggestions in JP-505) just now, and the pipeline no longer crashed on the msa_flagging step.  It made it all the way through to the end of the calwebb_spec2.cfg script (including cube_build) without problems.