From 61ced5ce6a8877fe527f7fa32eba9fa405ea9ec5 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 6 Dec 2024 16:47:58 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- romancal/flatfield/flat_field.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/romancal/flatfield/flat_field.py b/romancal/flatfield/flat_field.py index 9a7f8ac16..44c899c65 100644 --- a/romancal/flatfield/flat_field.py +++ b/romancal/flatfield/flat_field.py @@ -117,18 +117,17 @@ def apply_flat_field(science, flat, include_var_flat=False): # Update the variances using BASELINE algorithm. For guider data, it has # not gone through ramp fitting so there is no Poisson noise or readnoise - flat_data_squared = flat_data ** 2 + flat_data_squared = flat_data**2 science.var_poisson /= flat_data_squared science.var_rnoise /= flat_data_squared total_var = science.var_poisson + science.var_rnoise if include_var_flat: - var_flat = science.data ** 2 / flat_data_squared * flat_err ** 2 + var_flat = science.data**2 / flat_data_squared * flat_err**2 try: science.var_flat = var_flat except AttributeError: - science["var_flat"] = np.zeros( - shape=science.data.shape, dtype=np.float32) + science["var_flat"] = np.zeros(shape=science.data.shape, dtype=np.float32) science.var_flat = var_flat total_var += science.var_flat