Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RCAL-647 Update pipeline to include refpix step as default #890

Merged
merged 3 commits into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ ramp_fitting

- Fix opening mode for references to be read-only [#854]

refpix
------

- Update cal_step, add suffix and add to the exposure pipeline [#890]


0.12.0 (2023-08-18)
===================
Expand Down
2 changes: 2 additions & 0 deletions romancal/pipeline/exposure_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ def process(self, input):
"source_detection",
"dark",
"jump",
"refpix",
"linearity",
"ramp_fit",
]:
Expand All @@ -143,6 +144,7 @@ def process(self, input):
# Return fully saturated image file (stopping pipeline)
return results

result = self.refpix(result)
result = self.linearity(result)
result = self.dark_current(result)
result = self.jump(result)
Expand Down
10 changes: 9 additions & 1 deletion romancal/refpix/refpix_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,19 @@ def process(self, input):
with rdm.open(ref_file) as refs:
# Run the correction
log.debug("Running the reference pixel correction")
return refpix.run_steps(
output = refpix.run_steps(
datamodel,
refs,
self.remove_offset,
self.remove_trends,
self.cosine_interpolate,
self.fft_interpolate,
)
# Update the step status
output.meta.cal_step["refpix"] = "COMPLETE"
if self.save_results:
try:
self.suffix = "refpix"
except AttributeError:
self["suffix"] = "refpix"
return output
2 changes: 1 addition & 1 deletion romancal/regtest/test_refpix.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def test_refpix_step(rtdata, ignore_asdf_paths):
RomanStep.from_cmdline(args)

# Again I have no idea here
output = "r0000101001001001001_01101_0001_WFI01_refpixstep.asdf"
output = "r0000101001001001001_01101_0001_WFI01_refpix.asdf"
rtdata.output = output
rtdata.get_truth(f"truth/WFI/image/{output}")

Expand Down