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: object

Class 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