From 7748907e2fa4d5726af8cd621dbd2919fbcbe61b Mon Sep 17 00:00:00 2001 From: Mihir Tripathi Date: Fri, 23 Sep 2022 22:03:02 +0530 Subject: [PATCH 1/3] Update docstrings in bexvar.py --- stingray/bexvar.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/stingray/bexvar.py b/stingray/bexvar.py index db1bc047b..f4d3f0f13 100644 --- a/stingray/bexvar.py +++ b/stingray/bexvar.py @@ -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 ---------- @@ -153,8 +154,7 @@ 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 varience(bexvar). """ if not can_sample: @@ -192,8 +192,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 ---------- @@ -230,8 +231,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( From 2d624af9bd56727e5515b5f00a16867d20448b74 Mon Sep 17 00:00:00 2001 From: Mihir Tripathi Date: Fri, 23 Sep 2022 22:12:13 +0530 Subject: [PATCH 2/3] Update docstrings in lightcurve.py --- stingray/lightcurve.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/stingray/lightcurve.py b/stingray/lightcurve.py index 804417bc1..448a76ef2 100644 --- a/stingray/lightcurve.py +++ b/stingray/lightcurve.py @@ -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 @@ -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 From f9e24627caf962361042dd5cf3777a6afdb34516 Mon Sep 17 00:00:00 2001 From: Matteo Bachetti Date: Thu, 29 Sep 2022 18:41:59 +0200 Subject: [PATCH 3/3] Update stingray/bexvar.py --- stingray/bexvar.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stingray/bexvar.py b/stingray/bexvar.py index f4d3f0f13..da1329012 100644 --- a/stingray/bexvar.py +++ b/stingray/bexvar.py @@ -154,7 +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 Bayesian excess varience(bexvar). + An array of posterior samples of Bayesian excess variance (bexvar). + """ if not can_sample: