Skip to content

Commit

Permalink
JP-3665: fix calwebb_tso3 failures for SOSS data in FULL subarray (sp…
Browse files Browse the repository at this point in the history
  • Loading branch information
emolter authored Jun 24, 2024
2 parents 4bdf14f + 23fb5cd commit 29046fc
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,9 @@ pipeline

- Added a hook to skip ``photom`` step when the ``extract_1d`` step was skipped
for NIRISS SOSS data [#8575].

- Added hook to the ``calwebb_tso3`` pipeline to skip all subsequent steps
if the ``extract_1d`` step is skipped. [#8583]

pixel_replace
-------------
Expand Down
26 changes: 16 additions & 10 deletions jwst/pipeline/calwebb_tso3.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,25 +154,31 @@ def process(self, input):
x1d_result.int_times[row[0] - 1] = row

# SOSS F277W may return None - don't bother with that
if result is not None:
if input_exptype == 'NIS_SOSS':
# SOSS data have yet to be photometrically calibrated
# Calibrate 1D spectra here.
result = self.photom(result)
if (result is None) or (result.meta.cal_step.extract_1d == "SKIPPED"):
continue

x1d_result.spec.extend(result.spec)
if input_exptype == 'NIS_SOSS':
# SOSS data have yet to be photometrically calibrated
# Calibrate 1D spectra here.
result = self.photom(result)

# perform white-light photometry on 1d extracted data
self.log.info("Performing white-light photometry ...")
phot_result_list.append(self.white_light(result))
x1d_result.spec.extend(result.spec)

# perform white-light photometry on 1d extracted data
self.log.info("Performing white-light photometry ...")
phot_result_list.append(self.white_light(result))

# Update some metadata from the association
x1d_result.meta.asn.pool_name = input_models.meta.asn_table.asn_pool
x1d_result.meta.asn.table_name = op.basename(input)

# Save the final x1d Multispec model
x1d_result.meta.cal_step.pixel_replace = state
self.save_model(x1d_result, suffix='x1dints')
if len(x1d_result.spec) == 0:
self.log.warning("extract_1d step could not be completed for any integrations")
self.log.warning("x1dints products will not be created.")
else:
self.save_model(x1d_result, suffix='x1dints')

# Done with all the inputs
input_models.close()
Expand Down

0 comments on commit 29046fc

Please sign in to comment.