GiftsLightcurve¶
- class gdt.missions.gifts.plot.GiftsLightcurve(trigdat: ~gdt.missions.gifts.trigdat.Trigdat, ttes: ~typing.List[~gdt.missions.gifts.tte.GiftsTte], bin_method: ~collections.abc.Callable = <function bin_by_time>, binning_times: ~typing.List[float] = <factory>, time_range: ~typing.Tuple[float, float] = None, energy_range: ~typing.Tuple[float, float] = None, steps: bool = True, errorbars: bool = False)[source]¶
Bases:
objectTemporally bin a set of TTEs, and generate a single lightcurve plot for all detectors.
Attributes Summary
Methods Summary
bin_method(dt[, tstart, tstop, time_ref])Bins unbinned data to a specified temporal bin width.
Attributes Documentation
- energy_range: Tuple[float, float] = None¶
- errorbars: bool = False¶
- steps: bool = True¶
- time_range: Tuple[float, float] = None¶
Methods Documentation
- bin_method(dt, tstart=None, tstop=None, time_ref=None)¶
Bins unbinned data to a specified temporal bin width.
- Parameters:
times (np.array) – The time of each event
dt (float) – The requested temporal bin width in seconds
tstart (float, optional) – The first bin edge time. Will use the first event time if omitted.
tstop – (float, optional): The last bin edge time. Will use the last event time if omitted.
time_ref (float, optional) – The reference time at which the binning will be based. If the set, the binning will proceed starting at
time_refand moving forward in time as well as starting attime_refand moving backward in time. If not set, the binning will start at the beginning of the data.
- Returns:
np.array – The edges of the binned data