Skip to content

Commit

Permalink
changed _alpha_Rs_or_kappa_s_bool to _is_normalization_alpha_Rs
Browse files Browse the repository at this point in the history
  • Loading branch information
williyamshoe committed Sep 13, 2024
1 parent 6e5e0f3 commit 20c2f76
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions hierarc/LensPosterior/kin_constraints_composite.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,18 +157,18 @@ def __init__(

if self._check_arrays(alpha_Rs_array, r_s_angle_array):
self._halo_normalization_array = alpha_Rs_array
self._alpha_Rs_or_kappa_s_bool = True
self._is_normalization_alpha_Rs = True
self._r_scale_angle_array = r_s_angle_array
elif self._check_arrays(kappa_s_array, r_s_angle_array):
self._halo_normalization_array = kappa_s_array
self._alpha_Rs_or_kappa_s_bool = False
self._is_normalization_alpha_Rs = False
self._r_scale_angle_array = r_s_angle_array
elif self._check_arrays(rho0_array, r_s_array):
kappa_s_array, self._r_scale_angle_array = self.get_kappa_s_r_s_angle(
rho0_array, r_s_array
)
self._halo_normalization_array = kappa_s_array
self._alpha_Rs_or_kappa_s_bool = False
self._is_normalization_alpha_Rs = False
else:
raise ValueError(
"Both alpha_Rs_array and r_s_angle_array, kappa_s_array and r_s_angle_array, or rho0_array and r_s_array must be arrays of the same length!"
Expand Down Expand Up @@ -317,7 +317,7 @@ def j_kin_draw_composite(
kwargs["sigma"] *= delta_r_eff

# Input is alpha_Rs
if self._alpha_Rs_or_kappa_s_bool:
if self._is_normalization_alpha_Rs:
alpha_Rs_draw = halo_normalization_draw
# Input is kappa_s
else:
Expand Down Expand Up @@ -375,7 +375,7 @@ def j_kin_draw_composite_m2l(self, kwargs_anisotropy, gamma_in, no_error=False):
kwargs["sigma"] *= delta_r_eff

# Input is alpha_Rs
if self._alpha_Rs_or_kappa_s_bool:
if self._is_normalization_alpha_Rs:
alpha_Rs_draw = halo_normalization_draw
# Input is kappa_s
else:
Expand Down

0 comments on commit 20c2f76

Please sign in to comment.