Skip to content

Commit

Permalink
docstring improved
Browse files Browse the repository at this point in the history
  • Loading branch information
mjmroz committed May 13, 2024
1 parent 71a02fb commit c7c558b
Showing 1 changed file with 18 additions and 28 deletions.
46 changes: 18 additions & 28 deletions examples/example_16/ulens_model_fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -1570,21 +1570,15 @@ def _parse_fit_constraints_prior(self):
self._priors = priors

def _get_no_of_dataset(self, label):
"""
"""
Returns the index of a dataset with a specific label.
Parameters
----------
label : str
Label of the dataset defined by MulensData.plot_properties['label']
:param label: Label of the dataset defined by MulensData.plot_properties['label']
or sequential index of the dataset
Returns
-------
int
Sequential index of the dataset from [0,1,...,n_datasets-1]
:type label: str
:return: Sequential index of the dataset from [0,1,...,n_datasets-1]
:rtype: int
"""

if '"' in label:
label = label.strip('"')

Expand Down Expand Up @@ -2214,23 +2208,19 @@ def _get_fluxes(self):
return fluxes

def _sumup_inside_prior(self, fluxes, key, inside, idx_plus):
"""Calculates the contribution to the ln_prior from specified color constraints
:param fluxes: Array with fluxes of the current model.
:type fluxes: array
:param key: constrain key
:type key: str
:param inside: ln_prior contribution
:type inside: float
:param idx_plus: For a single source, idx_plus=0; for a binary source, idx_plus=0 or 1.
:type idx_plus: int
:return: evaluated ln_prior contribution
:rtype: float
"""
Calculates the contribution to the ln_prior from specified color constraints
Parameters
----------
fluxes : array
Array with fluxes of the current model.
key : str
inside : float
idx_plus : int
For a single source, idx_plus=0;
for a binary source, idx_plus=0 or 1.
Returns
-------
inside : float
"""

settings = self._fit_constraints[key]
index1 = (settings[3])*self._n_fluxes_per_dataset + idx_plus
index2 = (settings[4])*self._n_fluxes_per_dataset + idx_plus
Expand Down

0 comments on commit c7c558b

Please sign in to comment.