threeML.utils.time_series.event_list module

class threeML.utils.time_series.event_list.EventList(arrival_times, measurement, n_channels, start_time=None, stop_time=None, native_quality=None, first_channel=0, ra=None, dec=None, mission=None, instrument=None, verbose=True, edges=None)[source]

Bases: TimeSeries

property arrival_times
bin_by_bayesian_blocks(start, stop, p0, use_background=False)[source]
bin_by_constant(start, stop, dt=1)[source]

Interface to the temporal binner’s constant binning mode

Parameters:
  • start – start time of the bins

  • stop – stop time of the bins

  • dt – temporal spacing of the bins

Returns:

bin_by_custom(start, stop)[source]

Interface to temporal binner’s custom bin mode

Parameters:
  • start – start times of the bins

  • stop – stop times of the bins

Returns:

bin_by_significance(start, stop, sigma, mask=None, min_counts=1)[source]

Interface to the temporal binner’s significance binning model

param start:

start of the interval to bin on

param stop:

stop of the interval ot bin on

param sigma:

sigma-level of the bins

param mask:

(bool) use the energy mask to decide on ,significance

param min_counts:

minimum number of counts per bin

return:

property bins
count_per_channel_over_interval(start, stop)[source]
Parameters:
  • start

  • stop

Returns:

counts_over_interval(start, stop)[source]

return the number of counts in the selected interval :param start: start of interval :param stop: stop of interval :return:

property measurement
property n_events
set_active_time_intervals(*args)[source]

Set the time interval(s) to be used during the analysis.

Specified as ‘tmin-tmax’. Intervals are in seconds. Example:

set_active_time_intervals(“0.0-10.0”)

which will set the energy range 0-10. seconds.

view_lightcurve()[source]
Parameters:
  • start

  • stop

  • dt

  • use_binner

class threeML.utils.time_series.event_list.EventListWithDeadTime(arrival_times, measurement, n_channels, start_time=None, stop_time=None, dead_time=None, first_channel=0, quality=None, ra=None, dec=None, mission=None, instrument=None, verbose=True, edges=None)[source]

Bases: EventList

exposure_over_interval(start, stop)[source]

calculate the exposure over the given interval

Parameters:
  • start – start time

  • stop – stop time

Returns:

class threeML.utils.time_series.event_list.EventListWithDeadTimeFraction(arrival_times, measurement, n_channels, start_time=None, stop_time=None, dead_time_fraction=None, first_channel=0, quality=None, ra=None, dec=None, mission=None, instrument=None, verbose=True, edges=None)[source]

Bases: EventList

exposure_over_interval(start, stop)[source]

calculate the exposure over the given interval

Parameters:
  • start – start time

  • stop – stop time

Returns:

class threeML.utils.time_series.event_list.EventListWithLiveTime(arrival_times, measurement, n_channels, live_time, live_time_starts, live_time_stops, start_time=None, stop_time=None, quality=None, first_channel=0, rsp_file=None, ra=None, dec=None, mission=None, instrument=None, verbose=True, edges=None)[source]

Bases: EventList

exposure_over_interval(start, stop)[source]
Parameters:
  • start – start time of interval

  • stop – stop time of interval

Returns:

exposure

exception threeML.utils.time_series.event_list.OverLappingIntervals[source]

Bases: RuntimeError

exception threeML.utils.time_series.event_list.ReducingNumberOfSteps[source]

Bases: Warning

exception threeML.utils.time_series.event_list.ReducingNumberOfThreads[source]

Bases: Warning

threeML.utils.time_series.event_list.ceildiv(a, b)[source]