LightCurveEstimator

class gammapy.estimators.LightCurveEstimator(time_intervals=None, source=0, energy_range=<Quantity [ 1., 10.] TeV>, atol='1e-6 s', norm_min=0.2, norm_max=5, norm_n_values=11, norm_values=None, sigma=1, sigma_ul=2, reoptimize=False)[source]

Bases: gammapy.estimators.flux.FluxEstimator

Compute light curve.

The estimator will fit the source model component to datasets in each of the time intervals provided.

If no time intervals are provided, the estimator will use the time intervals defined by the datasets GTIs.

To be included in the estimation, the dataset must have their GTI fully overlapping a time interval.

Parameters
time_intervalslist of astropy.time.Time

Start and stop time for each interval to compute the LC

sourcestr

For which source in the model to compute the flux points. Default is 0

energy_rangetuple of Quantity

Energy range on which to compute the flux. Default is 1-10 TeV

atolQuantity

Tolerance value for time comparison with different scale. Default 1e-6 sec.

norm_minfloat

Minimum value for the norm used for the fit statistic profile evaluation.

norm_maxfloat

Maximum value for the norm used for the fit statistic profile evaluation.

norm_n_valuesint

Number of norm values used for the fit statistic profile.

norm_valuesnumpy.ndarray

Array of norm values to be used for the fit statistic profile.

sigmaint

Sigma to use for asymmetric error computation.

sigma_ulint

Sigma to use for upper limit computation.

reoptimizebool

reoptimize other parameters during fit statistic scan?

Attributes Summary

e_ref

energy_range

Methods Summary

estimate_time_bin_flux(self, datasets, …)

Estimate flux point for a single energy group.

run(self, datasets[, steps])

Run light curve extraction.

Attributes Documentation

e_ref
energy_range

Methods Documentation

estimate_time_bin_flux(self, datasets, time_interval, steps='all')[source]

Estimate flux point for a single energy group.

Parameters
datasetsDatasets

the list of dataset object

time_intervalastropy.time.Time`

Start and stop time for each interval

stepslist of str

Which steps to execute. Available options are:

  • “err”: estimate symmetric error.

  • “errn-errp”: estimate asymmetric errors.

  • “ul”: estimate upper limits.

  • “ts”: estimate ts and sqrt(ts) values.

  • “norm-scan”: estimate likelihood profiles.

By default all steps are executed.

Returns
resultdict

Dict with results for the flux point.

run(self, datasets, steps='all')[source]

Run light curve extraction.

Normalize integral and energy flux between emin and emax.

Parameters
datasetslist of SpectrumDataset or MapDataset

Spectrum or Map datasets.

stepslist of str

Which steps to execute. Available options are:

  • “err”: estimate symmetric error.

  • “errn-errp”: estimate asymmetric errors.

  • “ul”: estimate upper limits.

  • “ts”: estimate ts and sqrt(ts) values.

  • “norm-scan”: estimate fit statistic profiles.

By default all steps are executed.

Returns
lightcurveLightCurve

the Light Curve object