Closed DHekstra closed 11 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
0e2f5e2
) 92.39% compared to head (d25d7da
) 92.40%. Report is 3 commits behind head on main.:exclamation: Current head d25d7da differs from pull request most recent head f7f472e. Consider uploading reports for the commit f7f472e to get more accurate results
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I'm not certain that fw should really be applied to data with resolution shells that have negative average intensity. Silently clipping the values is not a good solution if it leads to the user unknowingly processing such data. If you want to merge a change like this, it needs to print a warning or better yet be implemented as an optional flag which is disabled by default.
That makes sense. In my single test, Sigma was negative for ~0.01% of reflections. I'll think some more about this when time permits.
When using
scale_merged_intensities
to perform French-Wilson scaling in theanisotropic
mode, the local Sigma is calculated by a local weighted average of observed intensities. As a consequence, Sigma can be negative. This leads to NaNs in the calculation of the logpdf used to calculate the posterior expected intensity. To remedy this, I propose clipping the observed intensities to be positive in (and only in) the calculation of Sigma inmean_intensity_by_miller_index(I, H, bandwidth)
.