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
  • Loading branch information
pre-commit-ci[bot] committed Dec 4, 2023
1 parent c48ba00 commit ca34f8d
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions hierarc/Likelihood/hierarchy_likelihood.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,9 @@ def log_likelihood_single(
kappa_ext=kappa_ext,
mag_source=mag_source,
)
scaling_param_array = self.draw_scaling_params(kwargs_lens=kwargs_lens,
**kwargs_kin)
scaling_param_array = self.draw_scaling_params(
kwargs_lens=kwargs_lens, **kwargs_kin
)
kin_scaling = self.param_scaling(scaling_param_array)

lnlikelihood = self.log_likelihood(
Expand All @@ -274,7 +275,8 @@ def draw_scaling_params(self, kwargs_lens=None, **kwargs_kin):
else:
return ani_param

def draw_lens_scaling_params(self,
def draw_lens_scaling_params(
self,
lambda_mst=1,
lambda_mst_sigma=0,
kappa_ext=0,
Expand All @@ -289,7 +291,8 @@ def draw_lens_scaling_params(self,
alpha_gamma_in=0,
m2l=1,
m2l_sigma=0,
alpha_m2l=0,):
alpha_m2l=0,
):
"""Draws a realization of the anisotropy parameter scaling from the
distribution.
Expand Down Expand Up @@ -319,10 +322,11 @@ def draw_lens_scaling_params(self,
if self._gamma_in_array is not None and self._m2l_array is not None:
gamma_in_draw = np.random.normal(
gamma_in + alpha_gamma_in * self._lambda_scaling_property,
gamma_in_sigma)
gamma_in_sigma,
)
m2l_draw = np.random.normal(
m2l + alpha_m2l * self._lambda_scaling_property,
m2l_sigma)
m2l + alpha_m2l * self._lambda_scaling_property, m2l_sigma
)
return gamma_in_draw, m2l_draw
else:
return None, None
Expand Down

0 comments on commit ca34f8d

Please sign in to comment.