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 Oct 7, 2024
1 parent 6d17786 commit 2fab0d0
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
5 changes: 3 additions & 2 deletions hierarc/Diagnostics/goodness_of_fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ def __init__(self, kwargs_likelihood_list, kwargs_model):

def reduced_chi2(self, cosmo, kwargs_lens, kwargs_kin):
"""Reduced chi^2 of fit."""
logL = self._sample_likelihood.log_likelihood(cosmo=cosmo, kwargs_lens=kwargs_lens, kwargs_kin=kwargs_kin,
verbose=False)
logL = self._sample_likelihood.log_likelihood(
cosmo=cosmo, kwargs_lens=kwargs_lens, kwargs_kin=kwargs_kin, verbose=False
)
num_data = self._sample_likelihood.num_data()
return -logL * 2 / num_data

Expand Down
3 changes: 1 addition & 2 deletions hierarc/Likelihood/LensLikelihood/double_source_plane.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ def num_data(self):


def beta_double_source_plane(z_lens, z_source_1, z_source_2, cosmo):
"""Model prediction of ratio of scaled
deflection angles.
"""Model prediction of ratio of scaled deflection angles.
:param z_lens: lens redshift
:param z_source_1: source_1 redshift
Expand Down
3 changes: 1 addition & 2 deletions hierarc/Likelihood/cosmo_likelihood.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,7 @@ def cosmo_instance(self, kwargs_cosmo):
return cosmo

def info(self):
"""
prints information about the likelihood object
"""Prints information about the likelihood object.
:return: print statements
"""
Expand Down
3 changes: 1 addition & 2 deletions hierarc/Likelihood/hierarchy_likelihood.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,7 @@ def __init__(
self._prior = PriorLikelihood(prior_list=prior_list)

def info(self):
"""
information about the lens
"""Information about the lens.
:return: print statement
"""
Expand Down
5 changes: 4 additions & 1 deletion hierarc/Likelihood/kin_scaling.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ def __init__(self, param_grid_axes, j_kin_scaling_grid):

if self._dim_scaling == 1:
self._f_ani = interp1d(
param_grid_axes[0], j_kin_scaling_grid, kind="linear", fill_value="extrapolate"
param_grid_axes[0],
j_kin_scaling_grid,
kind="linear",
fill_value="extrapolate",
)
elif self._dim_scaling == 2:
self._f_ani = interp2d(
Expand Down

0 comments on commit 2fab0d0

Please sign in to comment.