lc API¶
The lc subpackage gives tools to create light curves from proto-Lightspeed data.
- class lightspeedpy.lc.Lightcurve(edges, flux, exposures, nu, header0, header1, duration, errors=None)¶
Bases:
objectClass to store light curves and save them
- from_data_set(edges, flux, exposures, eph)¶
Create a light curve object from a data set
- Parameters:
data_set (DataSet) – Data set object
edges (array-like) – Edges of the phase bins of the light curve
fluxes (array-like) – Flux in each light curve bin. If edges has length N+1, fluxes should have length N
exposures (array-like) – Time in seconds spent in each bin
duration (array-like) – Duration of each frame, in seconds
eph (Ephemeris) – Target ephemeris
- load()¶
- save(filename, clobber=False, save_kwargs=None)¶
Save the light curve to a file
- Parameters:
filename (str) – The file name to which the light curve should be saved
clobber (bool, optional) – Set to True to allow overwriting
save_kwargs (dict, optional) – Dictionary of keywords to write to the light curve header
- lightspeedpy.lc.get_clipped_lc(data_set, n_bins, reg_file, ephemeris)¶
Get the light curve of a source by summing all the detected photons per frame, clipped to zero or 1
- Parameters:
- Returns:
The light curve object, corrected for quantum efficiency TODO
- Return type:
- lightspeedpy.lc.get_summed_lc(data_set, n_bins, reg_file, ephemeris)¶
Get the light curve of a source by summing all the detected photons per frame
- Parameters:
- Returns:
The light curve object, corrected for quantum efficiency TODO
- Return type: