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

Rad-155 #1131

Merged
merged 6 commits into from
Mar 12, 2024
Merged

Rad-155 #1131

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
11 changes: 10 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,22 @@ dq_init
- Copy reference pixels during ``dq_init`` to avoid larger files in later
processing steps [#1121]

resample
--------

- Update location of ``basic`` attributes. [#1131]

outlier_detection
-----------------

- Update location of ``basic`` attributes. [#1131]

ramp_fitting
------------

- Changed image units from e/s to DN/s (and added support for MJy/sr). Added gain reduction to convert to these units. [#1128]



0.14.0 (2024-02-12)
===================

Expand Down
4 changes: 1 addition & 3 deletions romancal/outlier_detection/outlier_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,7 @@ def do_detection(self):
self.create_median(drizzled_models), unit=median_model.data.unit
)
median_model_output_path = self.make_output_path(
basepath=median_model.meta.basic.filename.replace(
self.resample_suffix, ".asdf"
),
basepath=median_model.meta.filename.replace(self.resample_suffix, ".asdf"),
suffix="median",
)
median_model.save(median_model_output_path)
Expand Down
5 changes: 2 additions & 3 deletions romancal/resample/resample.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def resample_many_to_many(self):
output_root = "_".join(
exposure[0].meta.filename.replace(output_type, "").split("_")[:-1]
)
output_model.meta.basic.filename = f"{output_root}_outlier_i2d{output_type}"
output_model.meta.filename = f"{output_root}_outlier_i2d{output_type}"

# Initialize the output with the wcs
driz = gwcs_drizzle.GWCSDrizzle(
Expand Down Expand Up @@ -260,7 +260,7 @@ def resample_many_to_one(self):
Used for level 3 resampling
"""
output_model = self.blank_output.copy()
output_model.meta.basic.filename = self.output_filename
output_model.meta.filename = self.output_filename
output_model.meta["resample"] = maker_utils.mk_resample()
output_model.meta.resample["members"] = []
output_model.meta.resample.weight_type = self.weight_type
Expand Down Expand Up @@ -703,7 +703,6 @@ def l2_into_l3_meta(l3_meta, l2_meta):
l3_meta.basic.survey = l2_meta.observation.survey
l3_meta.basic.optical_element = l2_meta.instrument.optical_element
l3_meta.basic.instrument = l2_meta.instrument.name
l3_meta.basic.telescope = l2_meta.telescope
l3_meta.coordinates = l2_meta.coordinates
l3_meta.program = l2_meta.program

Expand Down
2 changes: 1 addition & 1 deletion romancal/resample/tests/test_resample.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ def test_resampledata_do_drizzle_many_to_one_single_input_model(wfi_sca1):

# Assert
assert len(output_models) == 1
assert output_models[0].meta.basic.filename == resample_data.output_filename
assert output_models[0].meta.filename == resample_data.output_filename
np.testing.assert_allclose(flat_1, flat_2)


Expand Down
Loading