Skip to content

Commit 7fa55f8

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent ab84a40 commit 7fa55f8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/simweights/_weighter.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def effective_area(
212212
hist_val_variance, _, _ = np.histogram2d(
213213
cos_zen[maska],
214214
energy[maska],
215-
weights=(weights[maska])**2,
215+
weights=(weights[maska]) ** 2,
216216
bins=[cos_zenith_bins, energy_bins],
217217
)
218218

@@ -234,7 +234,10 @@ def effective_area(
234234
raise TypeError(mesg)
235235
e_int, z_int = np.meshgrid(flux_integrals, np.ediff1d(czbin))
236236
if return_stddev:
237-
output = np.asarray(cm2_to_m2 * hist_val / (e_int * 2 * np.pi * z_int), dtype=np.float64), np.asarray(cm2_to_m2 * np.sqrt(hist_val_variance) / (e_int * 2 * np.pi * z_int), dtype=np.float64)
237+
output = (
238+
np.asarray(cm2_to_m2 * hist_val / (e_int * 2 * np.pi * z_int), dtype=np.float64),
239+
np.asarray(cm2_to_m2 * np.sqrt(hist_val_variance) / (e_int * 2 * np.pi * z_int), dtype=np.float64),
240+
)
238241
else:
239242
output = np.asarray(cm2_to_m2 * hist_val / (e_int * 2 * np.pi * z_int), dtype=np.float64)
240243
return output

0 commit comments

Comments
 (0)