diff --git a/CHANGES.rst b/CHANGES.rst index 09c0200ab..ce0e65a8f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -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) =================== diff --git a/romancal/outlier_detection/outlier_detection.py b/romancal/outlier_detection/outlier_detection.py index e84bca95f..61989d75d 100644 --- a/romancal/outlier_detection/outlier_detection.py +++ b/romancal/outlier_detection/outlier_detection.py @@ -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) diff --git a/romancal/resample/resample.py b/romancal/resample/resample.py index c4f182013..5040c8424 100644 --- a/romancal/resample/resample.py +++ b/romancal/resample/resample.py @@ -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( @@ -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 @@ -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 diff --git a/romancal/resample/tests/test_resample.py b/romancal/resample/tests/test_resample.py index 98c91caf4..408c1841c 100644 --- a/romancal/resample/tests/test_resample.py +++ b/romancal/resample/tests/test_resample.py @@ -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)