Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 21, 2023
1 parent 9339461 commit ca49796
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions reciprocalspaceship/algorithms/scale_merged_intensities.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def scale_merged_intensities(
parameter controls the distance that each reflection impacts in
reciprocal space. Only affects output if mean_intensity_method is
\"anisotropic\".
minimum_sigma : float
minimum_sigma : float
Minimum value imposed on Sigma (default: -np.inf, that is: no minimum).
Expand Down Expand Up @@ -285,15 +285,9 @@ def scale_merged_intensities(
I, Sig = ds[intensity_key].to_numpy(), ds[sigma_key].to_numpy()
if mean_intensity_method == "isotropic":
dHKL = ds["dHKL"].to_numpy(dtype=np.float64)
Sigma = (
mean_intensity_by_resolution(I / multiplicity, dHKL, bins)
)
Sigma = mean_intensity_by_resolution(I / multiplicity, dHKL, bins)
elif mean_intensity_method == "anisotropic":
Sigma = (
mean_intensity_by_miller_index(
I / multiplicity, ds.get_hkls(), bw
)
)
Sigma = mean_intensity_by_miller_index(I / multiplicity, ds.get_hkls(), bw)
Sigma = np.clip(Sigma, a_min=minimum_sigma, a_max=np.inf)
Sigma = Sigma * multiplicity

Expand Down

0 comments on commit ca49796

Please sign in to comment.