transit_tools.lightcurve

class transit_tools.lightcurve(*args, lc=None, obj=None, method='2min', sector=None, mission='TESS', find_knownpls=True, values='all', **kwargs)

Initialization function for all of transit_tools that defines the light curve to be used. This class wraps lightkurve.LightCurve and as such retains all functionality of that class with some additions. The light curve can either be user-defined with a lightkurve.LightCurve object or arrays of time, flux, and flux error or can be generated via a target name.

Parameters
  • lc (lightkurve.LightCurve or None) – lightkurve.LightCurve object. Mutually exclusive with *args and obj inputs. Default None.

  • *args – Up to three arguments specifying the time, flux, and flux error of the light curve. Mutually exclusive with lc and obj inputs.

  • obj (str or None) – Name of target to search MAST for a light curve. Mutually exclusive with lc and *args inputs. Default None.

  • method (str) – Method for acquiring a specified light curve through a search of MAST. Options are currently '2min', 'eleanor', and 'batman'. If 'batman' is provided, user will also need to pass **kwargs to the transit_tools.batman function. Default is '2min'.

  • sector (list or None) – List of sectors to include in final assembled light curve. If None is specified, all possible sectors will be included. Default None.

  • mission (str) – Current placeholder. Will eventually allow user to specify mission from which light curve will be assembled. At this point, only TESS is supported.

  • find_knownpls (bool) – Flag to control whether a query to the NASA Exoplanet Archive is searched for any known planets in the target system. Default True.

  • values (list or str) – Quantities to retrieve from the NASA Exoplanet Archive if find_knownpls is True. If set to 'all', all available quantities will be retrieved. Default 'all'.

  • **kwargs (dict) – Additional arguments to pass to lighturve.LightCurve initializer.

time

The timestamps of the light curve.

Type

np.array

flux

The flux at each timestamp in the light curve.

Type

np.array

flux_err

The flux error for each flux in the light curve.

Type

np.array

method

The method used to generate the light curve.

Type

str or None

sector

The list of sectors the generated light curve represents.

Type

list

name

The name of the target from the light curve query.

Type

str or None

tic

TIC ID of target, if it has one.

Type

int

known_pls

The known planets in the system, if any.

Type

np.array of dicts or None

star_params

A dictionary containing known star params if a query for such has been performed.

Type

dict

star_params_tls

The star params used for Transit Least Squares searches, if such a search has been run.

Type

dict

raw_lc

Nested lightcurve object with time, flux, and flux_err attributes of the original input lightcurve prior to processing or masking.

Type

object

trend

Trend of light curve based on the process method, if detrending was performed.

Type

np.array

mask_arr

Boolean array of equal length to the light curve mapping the masked data points.

Type

np.array

routine

The shape used by the most recent Transit Least Squares search on the light curve.

Type

str

sde_thresh

The Signal Detection Efficiency threshold for a significant detection specified in the most recent Transit Least Squares search.

Type

float

results

Output results of each iteration of transit searches from the most recent call of the signal_search method.

Type

np.array of dicts

cleanlc

Light curves with significant periodic signals from the most recent call of the signal_search method subtracted.

Type

list of objects

Results from the most recent call of signal_search that did not meet the specified sde_thresh value.

Type

dict

blsobjs

List of dicts containing the BLS periodogram objects produced by each BLS run in the most recent BLS run.

Type

list of dicts

__init__(*args, lc=None, obj=None, method='2min', sector=None, mission='TESS', find_knownpls=True, values='all', **kwargs)

Methods

Attributes