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 Jul 25, 2024
1 parent 66b3999 commit 6560565
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions RefRed/calculations/lr_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,12 @@ def __init__(
# Calculate the TOF range to select
if use_emission_delay:
# We cut 5% on each side compared to the case without correction to avoid the shoulders
tmin = (self.dMD*(self.lambda_requested - wl_half_width * 0.95) / H_OVER_M_NEUTRON * 1e-4 + t_off) / (1 - t_mult / 1000)
tmax = (self.dMD*(self.lambda_requested + wl_half_width * 0.95) / H_OVER_M_NEUTRON * 1e-4 + t_off) / (1 - t_mult / 1000)
tmin = (self.dMD * (self.lambda_requested - wl_half_width * 0.95) / H_OVER_M_NEUTRON * 1e-4 + t_off) / (
1 - t_mult / 1000
)
tmax = (self.dMD * (self.lambda_requested + wl_half_width * 0.95) / H_OVER_M_NEUTRON * 1e-4 + t_off) / (
1 - t_mult / 1000
)
else:
tmin = self.dMD / H_OVER_M_NEUTRON * (self.lambda_requested - wl_half_width) * 1e-4
tmax = self.dMD / H_OVER_M_NEUTRON * (self.lambda_requested + wl_half_width) * 1e-4
Expand All @@ -163,7 +167,7 @@ def __init__(
# Widen the range to show the entire TOF range in the plots
delta_t = self.dMD / H_OVER_M_NEUTRON * wl_delta_full_range * 1e-4
tmin -= delta_t
if tmin < 0:
if tmin < 0:
tmin = 0
tmax += delta_t

Expand Down

0 comments on commit 6560565

Please sign in to comment.