Skip to content

Commit

Permalink
Update metric_logger and fix bug with meta.resample.members.
Browse files Browse the repository at this point in the history
  • Loading branch information
mairanteodoro committed Nov 14, 2023
1 parent ff4ffe0 commit a3ac437
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
13 changes: 10 additions & 3 deletions romancal/regtest/test_resample.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ def create_asn_file(
return asn_file_path


@metrics_logger(
"DMS342"
) # got DMS342 from here: https://jira.stsci.edu/browse/RSUBREQ-1051
@metrics_logger("DMS342", "DMS343", "DMS344", "DMS345")
@pytest.mark.bigdata
def test_resample_single_file(rtdata, ignore_asdf_paths):
input_data = [
Expand Down Expand Up @@ -88,6 +86,15 @@ def test_resample_single_file(rtdata, ignore_asdf_paths):
)
assert hasattr(resample_out.meta, "resample")

step.log.info(
f"""DMS342 MSG: Was ICRS used as the mosaic astrometric reference frame? :\
{
resample_out.meta.coordinates.reference_frame == "ICRS"
}
"""
)
assert resample_out.meta.coordinates.reference_frame == "ICRS"

step.log.info(
f"""DMS343 MSG: ResampleStep created new attribute data quality information? :\
{
Expand Down
2 changes: 1 addition & 1 deletion romancal/resample/resample.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ def resample_many_to_one(self):
ymax=ymax,
)
del data, inwht
output_model.meta.resample.members.append(img.meta.filename)
output_model.meta.resample.members.append(str(img.meta.filename))

# Resample variances array in self.input_models to output_model
self.resample_variance_array("var_rnoise", output_model)
Expand Down

0 comments on commit a3ac437

Please sign in to comment.