Skip to content

Commit

Permalink
warns when provide params for profile method
Browse files Browse the repository at this point in the history
  • Loading branch information
wcxve committed Jan 3, 2025
1 parent 3e1ea79 commit 200f331
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/elisa/infer/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -973,6 +973,9 @@ def _(p):
fn_dic = {d: factory(d) for d in mapping.values()}

if method == 'profile':
if params is not None:
warnings.warn('params is ignored when using profile method')

# use log transform to stabilize the profile likelihood
def transform(f):
def _(p):
Expand Down Expand Up @@ -1808,7 +1811,8 @@ def flux(
Whether to use logarithmically regular energy grid. The default is
True.
params : dict, optional
Parameters dict to overwrite the fitted parameters.
Parameters dict to overwrite the fitted parameters. Ignored when
`method` is ``'profile'``.
Returns
-------
Expand Down Expand Up @@ -1876,7 +1880,8 @@ def lumin(
Whether to use logarithmically regular energy grid. The default is
True.
params : dict, optional
Parameters dict to overwrite the fitted parameters.
Parameters dict to overwrite the fitted parameters. Ignored when
`method` is ``'profile'``.
cosmo : LambdaCDM, optional
Cosmology model used to calculate luminosity. The default is
Planck18.
Expand Down Expand Up @@ -1960,7 +1965,8 @@ def eiso(
Whether to use logarithmically regular energy grid. The default
is True.
params : dict, optional
Parameters dict to overwrite the fitted parameters.
Parameters dict to overwrite the fitted parameters. Ignored when
`method` is ``'profile'``.
cosmo : LambdaCDM, optional
Cosmology model used to calculate luminosity. The default is
Planck18.
Expand Down

0 comments on commit 200f331

Please sign in to comment.