LightCurve¶
-
class
gammapy.time.LightCurve(data=None, masked=None, names=None, dtype=None, meta=None, copy=True, rows=None, copy_indices=True, **kwargs)[source]¶ Bases:
astropy.table.QTableLightCurve class.
Contains all data in the tabular form with columns tstart, tstop, flux, flux error, time bin (opt). Possesses functions allowing plotting data, saving as txt and elementary stats like mean & std dev.
TODO: specification of format is work in progress See https://github.com/open-gamma-ray-astro/gamma-astro-data-formats/pull/61
Methods Summary
compute_chisq()Calculate the chi-square test for LightCurve.compute_fvar()Calculate the fractional excess variance. plot([ax])Plot flux versus time. simulate_example()Simulate an example LightCurve.Methods Documentation
-
compute_chisq()[source]¶ Calculate the chi-square test for
LightCurve.Chisquare test is a variability estimator. It computes deviations from the expected value here mean value
Returns: ChiSq, P-value : tuple of float or
ndarrayTuple of Chi-square and P-value
-
compute_fvar()[source]¶ Calculate the fractional excess variance.
This method accesses the the
FLUXandFLUX_ERRcolumns from the lightcurve data.The fractional excess variance \(F_{var}\), an intrinsic variability estimator, is given by
\[F_{var} = \sqrt{\frac{S^{2} - \bar{\sigma^{2}}}{\bar{x}^{2}}}.\]It is the excess variance after accounting for the measurement errors on the light curve \(\sigma\). \(S\) is the variance.
Returns: fvar, fvar_err :
numpy.arrayFractional excess variance.
References
[Vaughan2003] “On characterizing the variability properties of X-ray light curves from active galaxies”, Vaughan et al. (2003) http://adsabs.harvard.edu/abs/2003MNRAS.345.1271V
-
plot(ax=None)[source]¶ Plot flux versus time.
Parameters: ax :
Axesor None, optional.Returns: ax :
Axesor None, optional.
-
classmethod
simulate_example()[source]¶ Simulate an example
LightCurve.TODO: add options to simulate some more interesting lightcurves.
-