From 6560565662a6dd0453862a08cfb1bfb932214d5b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 25 Jul 2024 17:57:55 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- RefRed/calculations/lr_data.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/RefRed/calculations/lr_data.py b/RefRed/calculations/lr_data.py index 7120d5c7..25851fe8 100644 --- a/RefRed/calculations/lr_data.py +++ b/RefRed/calculations/lr_data.py @@ -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 @@ -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