File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ def compute_reference_intensity(
5757 with the experiment parameters (such as sample rotation).
5858 Therefore it can be used to normalize sample measurements.
5959 """
60- b = da .bins . concat ( set (da .dims ) - set (da .coords ["z_index" ].dims )). bin ( wavelength = wb )
60+ b = da .bin ( wavelength = wb , dim = set (da .dims ) - set (da .coords ["z_index" ].dims ))
6161 h = b .hist ()
6262 h .masks ["too_few_events" ] = h .data < sc .scalar (1 , unit = "counts" )
6363 # Add a Q coordinate to each bin, the Q is not completely unique in every bin,
Original file line number Diff line number Diff line change @@ -43,8 +43,7 @@ def normalization_factor(
4343
4444 """
4545 sample_q = (
46- da .bins .concat (set (da .dims ) - set (da .coords ["z_index" ].dims ))
47- .bin (wavelength = wbins )
46+ da .bin (wavelength = wbins , dim = set (da .dims ) - set (da .coords ["z_index" ].dims ))
4847 .bins .coords ["Q" ]
4948 .bins .mean ()
5049 )
@@ -112,7 +111,7 @@ def reflectivity_over_q(
112111 Reflectivity as a function of Q
113112 """
114113 return NormalizedIofQ (
115- da .bins . concat (). bin (Q = qbins ) / sc .values (n .flatten ( to = "Q" ). hist (Q = qbins ))
114+ da .bin (Q = qbins , dim = da . dims ) / sc .values (n .hist (Q = qbins , dim = n . dims ))
116115 )
117116
118117
You can’t perform that action at this time.
0 commit comments