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

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:
  • data_set (DataSet) – The data set of the observation

  • n_bins (int) – Number of light curve bins to use

  • reg_file (str) – The ciao-format, physical coordinate region file containing the source

  • ephemeris (Ephemeris) – The source ephemeris

Returns:

The light curve object, corrected for quantum efficiency TODO

Return type:

Lightcurve

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:
  • data_set (DataSet) – The data set of the observation

  • n_bins (int) – Number of light curve bins to use

  • reg_file (str) – The ciao-format, physical coordinate region file containing the source

  • ephemeris (Ephemeris) – The source ephemeris

Returns:

The light curve object, corrected for quantum efficiency TODO

Return type:

Lightcurve