Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
mdoucet committed Jul 16, 2024
1 parent 6d24046 commit db803f8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions reduction/lr_reduction/event_reduction.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,15 +351,18 @@ def specular_unweighted(self, q_summing=False, normalize=True):
refl[db_bins] = refl[db_bins]/norm[db_bins]
d_refl[db_bins] = np.sqrt(d_refl[db_bins]**2 / norm[db_bins]**2 + refl[db_bins]**2 * d_norm[db_bins]**2 / norm[db_bins]**4)

# Hold on to normalization to be able to diagnose issues later
self.norm = norm[db_bins]
self.d_norm = d_norm[db_bins]

# Clean up points where we have no direct beam
zero_db = [not v for v in db_bins]
refl[zero_db] = 0
d_refl[zero_db] = 0

self.refl = refl
self.d_refl = d_refl
self.norm = norm[db_bins]
self.d_norm = d_norm[db_bins]

return self.q_bins, refl, d_refl

def specular_weighted(self, q_summing=True, bck_in_q=False):
Expand Down

0 comments on commit db803f8

Please sign in to comment.