Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Mar 8, 2024
1 parent d953ae0 commit a42188a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/roman_datamodels/maker_utils/_common_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ def mk_mosaic_meta(**kwargs):
"""

meta = mk_basic_meta(**kwargs)
meta['basic'] = mk_mosaic_basic(**kwargs.get("basic", {}))
meta["basic"] = mk_mosaic_basic(**kwargs.get("basic", {}))
meta["asn"] = mk_mosaic_associations(**kwargs.get("asn", {}))
# meta["basic"] = mk_mosaic_basic(**kwargs.get("basic", {}))
meta["cal_step"] = mk_cal_step(**kwargs.get("cal_step", {}))
Expand Down
5 changes: 2 additions & 3 deletions src/roman_datamodels/maker_utils/_datamodels.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
from roman_datamodels import stnode

from ._base import MESSAGE, save_node
from ._common_meta import (mk_common_meta, mk_guidewindow_meta, mk_mosaic_meta,
mk_msos_stack_meta, mk_photometry_meta, mk_wcs, mk_mosaic_basic)
from ._common_meta import mk_common_meta, mk_guidewindow_meta, mk_mosaic_meta, mk_msos_stack_meta, mk_photometry_meta, mk_wcs
from ._tagged_nodes import mk_cal_logs


Expand Down Expand Up @@ -175,7 +174,7 @@ def mk_level3_mosaic(*, shape=(4088, 4088), n_images=2, filepath=None, **kwargs)

wfi_mosaic = stnode.WfiMosaic()
wfi_mosaic["meta"] = mk_mosaic_meta(**kwargs.get("meta", {}))
#wfi_mosaic["meta"]['basic'] = mk_mosaic_basic(**kwargs.get("meta", {}))
# wfi_mosaic["meta"]['basic'] = mk_mosaic_basic(**kwargs.get("meta", {}))

wfi_mosaic["data"] = kwargs.get("data", u.Quantity(np.zeros(shape, dtype=np.float32), u.MJy / u.sr, dtype=np.float32))
wfi_mosaic["err"] = kwargs.get("err", u.Quantity(np.zeros(shape, dtype=np.float32), u.MJy / u.sr, dtype=np.float32))
Expand Down
6 changes: 3 additions & 3 deletions tests/test_stnode.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,18 +356,18 @@ def test_node_representation(model):
"time_mean_mjd": -999999,
"max_exposure_time": -999999,
"mean_exposure_time": -999999,
#"model_type": "MosaicModel",
# "model_type": "MosaicModel",
"visit": -999999,
"segment": -999999,
"pass": -999999,
"program": "dummy value",
"survey": "dummy value",
"optical_element": "F158",
"instrument": "WFI",
#"telescope": "ROMAN",
# "telescope": "ROMAN",
"location_name": "dummy value",
"product_type": "dummy value",
#"filename": "dummy value",
# "filename": "dummy value",
}
)
assert mdl.meta.model_type == "MosaicModel"
Expand Down

0 comments on commit a42188a

Please sign in to comment.