Skip to content

Commit 1e9288d

Browse files
authored
remove roman_datamodels.maker_utils usage (#3703)
1 parent c4059f2 commit 1e9288d

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

jdaviz/configs/imviz/tests/utils.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -270,11 +270,9 @@ def create_wfi_image_model(image_shape=(20, 10), **kwargs):
270270
271271
""" # noqa: E501
272272
from roman_datamodels import datamodels as rdd
273-
from roman_datamodels.maker_utils import mk_level2_image
274273

275-
wfi_image = mk_level2_image(shape=image_shape, **kwargs)
274+
model = rdd.ImageModel.create_fake_data(shape=image_shape, defaults=kwargs)
276275

277276
# introduce synthetic gwcs:
278-
wfi_image["meta"]["wcs"] = create_example_gwcs(image_shape)
279-
280-
return rdd.ImageModel(wfi_image)
277+
model.meta.wcs = create_example_gwcs(image_shape)
278+
return model

jdaviz/conftest.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,11 @@ def deconfigged_helper():
6565

6666
@pytest.fixture
6767
def roman_level_1_ramp():
68-
from roman_datamodels.maker_utils import mk_datamodel
6968
from roman_datamodels.datamodels import RampModel
7069
rng = np.random.default_rng(seed=42)
7170

7271
shape = (10, 25, 25)
73-
data_model = mk_datamodel(RampModel, shape=shape, dq=False)
72+
data_model = RampModel.create_fake_data(shape=shape)
7473

7574
data_model.data = 100 + 3 * np.cumsum(rng.uniform(size=shape), axis=0)
7675
return data_model

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ docs = [
8484
"sphinx_design"
8585
]
8686
roman = [
87-
"roman_datamodels>=0.22.0",
87+
"roman_datamodels>=0.26.0",
8888
]
8989
strauss = [
9090
"strauss",

0 commit comments

Comments
 (0)