Skip to content

Commit

Permalink
Merge pull request #673 from mihirtripathi97/bexvar-update
Browse files Browse the repository at this point in the history
Update bexvar docstrings
  • Loading branch information
abigailStev authored Oct 1, 2022
2 parents 91d7af6 + f9e2462 commit d943507
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
15 changes: 8 additions & 7 deletions stingray/bexvar.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ def prob(log_src_cr):
def _calculate_bexvar(log_src_crs_grid, pdfs):
"""
Assumes that the source count rate is log-normal distributed.
Returns posterior samples of the mean and standard deviation of that distribution.
Returns posterior samples of Bayesian excess varience(bexvar)
(i.e. standard deviation of that distribution).
Parameters
----------
Expand All @@ -153,8 +154,8 @@ def _calculate_bexvar(log_src_crs_grid, pdfs):
Returns
-------
log_sigma : iterable, `:class:numpy.array` of floats.
An array of posterior samples of log(standard deviation) or that of
log(Bayesian excess varience).
An array of posterior samples of Bayesian excess variance (bexvar).
"""

if not can_sample:
Expand Down Expand Up @@ -192,8 +193,9 @@ def loglike(params):

def bexvar(time, time_del, src_counts, bg_counts=None, bg_ratio=None, frac_exp=None):
"""
Given a light curve data, computes a Bayesian excess variance of count rate,
by estimating mean and variance of the log of the count rate.
Given a light curve data, computes posterier distribution samples of
Bayesian excess variance (bexvar), by estimating mean and variance of the
log of the count rates.
Parameters
----------
Expand Down Expand Up @@ -230,8 +232,7 @@ def bexvar(time, time_del, src_counts, bg_counts=None, bg_ratio=None, frac_exp=N
Returns
-------
posterior_log_sigma_src_cr : iterable, `:class:numpy.array` of floats
An array of posterior samples of log(Sigma on source count rates)
(i.e. log(Bayesian excess varience) of source count rates).
An array of posterior samples of Bayesian excess varience (bexvar).
"""

if not np.all(
Expand Down
5 changes: 2 additions & 3 deletions stingray/lightcurve.py
Original file line number Diff line number Diff line change
Expand Up @@ -1841,7 +1841,7 @@ def apply_gtis(self, inplace=True):

def bexvar(self):
"""
Finds Bayesian excess varience (bexvar) for the light curve.
Finds posterior samples of Bayesian excess varience (bexvar) for the light curve.
It requires source counts in ``counts`` and time intervals for each bin.
If the ``dt`` is an array then uses its elements as time intervals
for each bin. If ``dt`` is float, it calculates the time intervals by assuming
Expand All @@ -1850,8 +1850,7 @@ def bexvar(self):
Returns
-------
lc_bexvar : iterable, `:class:numpy.array` of floats
An array of posterior samples of log(Sigma on source count rates)
(i.e. log(Bayesian excess varience) or log(bexvar) of source count rates).
An array of posterior samples of Bayesian excess varience (bexvar).
"""

# calculate time intervals for each bin if not provided by user
Expand Down

0 comments on commit d943507

Please sign in to comment.