Skip to content

Commit

Permalink
clip I for Sigma calc
Browse files Browse the repository at this point in the history
  • Loading branch information
Doeke Hekstra committed Dec 13, 2023
1 parent a4c97e4 commit 63d3e22
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions reciprocalspaceship/algorithms/scale_merged_intensities.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ def _french_wilson_posterior_quad(Iobs, SigIobs, Sigma, centric, npoints=100):
return mean, np.sqrt(variance), mean_F, np.sqrt(variance_F)



def mean_intensity_by_miller_index(I, H, bandwidth):
"""
Use a gaussian kernel smoother to compute mean intensities as a function of miller index.
Expand All @@ -115,6 +116,7 @@ def mean_intensity_by_miller_index(I, H, bandwidth):
"""
H = np.array(H, dtype=np.float32)
I = np.array(I, dtype=np.float32)
I = np.clip(I, a_min=0,a_max=1e20)
bandwidth = np.float32(bandwidth) ** 2.0
n = len(I)

Expand Down

0 comments on commit 63d3e22

Please sign in to comment.