From 73b799450405be75bd46cb8173533ed1f8ad2f7a Mon Sep 17 00:00:00 2001 From: "Brett M. Morris" Date: Tue, 12 Sep 2023 12:22:35 -0400 Subject: [PATCH] PSF fitting random seed fix (#862) --- CHANGES.rst | 2 ++ romancal/lib/tests/test_psf.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index cd7771199..42197678b 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -6,6 +6,8 @@ general - Fix bug with ``ModelContainer.get_crds_parameters`` being a property not a method [#846] +- Fix random seed bug in PSF fitting methods [#862] + ramp_fitting ------------ diff --git a/romancal/lib/tests/test_psf.py b/romancal/lib/tests/test_psf.py index 23f18012a..29a412360 100644 --- a/romancal/lib/tests/test_psf.py +++ b/romancal/lib/tests/test_psf.py @@ -90,7 +90,7 @@ def add_synthetic_sources( model_data = fit_model(xx, yy) * image_model.data.unit model_err = np.sqrt(model_data.value) * model_data.unit synth_image[slc_lg] += ( - np.random.normal( + rng.normal( model_data.to_value(image_model.data.unit), model_err.to_value(image_model.data.unit), size=model_data.shape,