Skip to content

Commit f3f0595

Browse files
authored
FIX: Update Lo l2 map statistical uncertainty (IMAP-Science-Operations-Center#2610)
There was an error in the L2 statistical uncertainty.
1 parent 0f8ff74 commit f3f0595

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

imap_processing/lo/l2/lo_l2.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -948,8 +948,7 @@ def calculate_intensities(dataset: xr.Dataset) -> xr.Dataset:
948948
# the equation is for the variance
949949
dataset["ena_intensity_stat_uncert"] = np.sqrt(
950950
dataset["counts_over_eff_squared"]
951-
/ (dataset["geometric_factor"] * dataset["energy"] * dataset["exposure_factor"])
952-
)
951+
) / (dataset["geometric_factor"] * dataset["energy"] * dataset["exposure_factor"])
953952

954953
# Equation 5 from mapping document (systematic uncertainty)
955954
dataset["ena_intensity_sys_err"] = (

imap_processing/tests/lo/test_lo_l2.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,11 +1110,10 @@ def test_calculate_intensities_basic(self, sample_dataset_with_geometric_factors
11101110
# Check statistical uncertainty calculation
11111111
expected_stat_uncert = np.sqrt(
11121112
sample_dataset_with_geometric_factors["counts_over_eff_squared"]
1113-
/ (
1114-
sample_dataset_with_geometric_factors["geometric_factor"]
1115-
* sample_dataset_with_geometric_factors["energy"]
1116-
* sample_dataset_with_geometric_factors["exposure_factor"]
1117-
)
1113+
) / (
1114+
sample_dataset_with_geometric_factors["geometric_factor"]
1115+
* sample_dataset_with_geometric_factors["energy"]
1116+
* sample_dataset_with_geometric_factors["exposure_factor"]
11181117
)
11191118
xr.testing.assert_allclose(
11201119
result["ena_intensity_stat_uncert"], expected_stat_uncert

0 commit comments

Comments
 (0)