kepler.py - Main mission routines

Implements several routines specific to the Kepler mission.

Todo

This mission is not yet supported.

everest.missions.kepler.kepler.Setup()

Called when the code is installed.

everest.missions.kepler.kepler.Season(ID, **kwargs)

Returns the season number for a given target.

everest.missions.kepler.kepler.Breakpoints(ID, cadence='lc', **kwargs)

Returns the location of the breakpoints for a given target.

Parameters:
  • ID (int) – The target ID number
  • cadence (str) – The light curve cadence. Default lc

Note

The number corresponding to a given breakpoint is the number of cadences since the beginning of the campaign.

everest.missions.kepler.kepler.GetData(ID, season=None, cadence='lc', clobber=False, delete_raw=False, aperture_name=None, saturated_aperture_name=None, max_pixels=None, download_only=False, saturation_tolerance=None, bad_bits=None, **kwargs)

Returns a DataContainer instance with the raw data for the target.

Parameters:
  • ID (int) – The target ID number
  • season (int) – The observing season. Default None
  • cadence (str) – The light curve cadence. Default lc
  • clobber (bool) – Overwrite existing files? Default False
  • delete_raw (bool) – Delete the FITS TPF after processing it? Default False
  • aperture_name (str) – The name of the aperture to use. Select custom to call GetCustomAperture(). Default None
  • saturated_aperture_name (str) – The name of the aperture to use if the target is saturated. Default None
  • max_pixels (int) – Maximum number of pixels in the TPF. Default None
  • download_only (bool) – Download raw TPF and return? Default False
  • saturation_tolerance (float) – Target is considered saturated if flux is within this fraction of the pixel well depth. Default None
  • bad_bits (array_like) – Flagged :py:obj`QUALITY` bits to consider outliers when computing the model. Default None
everest.missions.kepler.kepler.GetNeighbors(ID, model=None, neighbors=None, mag_range=None, cdpp_range=None, aperture_name=None, cadence='lc', **kwargs)

Return neighbors random bright stars on the same module as EPIC.

Parameters:
  • ID (int) – The target ID number
  • model (str) – The everest model name. Only used when imposing CDPP bounds. Default None
  • neighbors (int) – Number of neighbors to return. Default None
  • aperture_name (str) – The name of the aperture to use. Select custom to call GetCustomAperture(). Default None
  • cadence (str) – The light curve cadence. Default lc
  • mag_range (tuple) – (low, high) values for the Kepler magnitude. Default None
  • cdpp_range (tuple) – (low, high) values for the de-trended CDPP. Default None
everest.missions.kepler.kepler.Statistics(*args, **kwargs)

Computes and plots the CDPP statistics comparison between model and compare_to for all long cadence light curves in a given campaign

everest.missions.kepler.kepler.TargetDirectory(ID, season, relative=False, **kwargs)

Returns the location of the everest data on disk for a given target.

Parameters:
  • ID – The target ID
  • season (int) – The target season number
  • relative (bool) – Relative path? Default False
everest.missions.kepler.kepler.HasShortCadence(ID, season=None)

Returns True if short cadence data is available for this target.

Parameters:
  • ID (int) – The target ID number
  • season (int) – The season number. Default None
everest.missions.kepler.kepler.InjectionStatistics(*args, **kwargs)

Computes and plots the statistics for injection/recovery tests.

everest.missions.kepler.kepler.HDUCards(headers, hdu=0)

Generates HDU cards for inclusion in the de-trended light curve FITS file. Used internally.

everest.missions.kepler.kepler.FITSFile(ID, season, cadence='lc')

Returns the name of the FITS file for a given target.

Parameters:
  • ID – The target ID
  • season (int) – The target season number
  • cadence (str) – The cadence type. Default lc
everest.missions.kepler.kepler.FITSUrl(ID, season)

Returns the online path to the FITS file for a given target.

Parameters:
  • ID – The target ID
  • season (int) – The target season number
everest.missions.kepler.kepler.CDPP(flux, mask=[], cadence='lc')

Compute the CDPP metric for a given timeseries.

Parameters:
  • flux (array_like) – The flux array to compute the CDPP for
  • mask (array_like) – The indices to be masked
  • cadence (str) – The light curve cadence. Default lc
everest.missions.kepler.kepler.GetTargetCBVs(model)

Returns the design matrix of CBVs for the given target.

Parameters:model – An instance of the everest model for the target
everest.missions.kepler.kepler.FitCBVs(model)

Fits the CBV design matrix to the de-trended flux of a given target. This is called internally whenever the user accesses the fcor attribute.

Parameters:model – An instance of the everest model for the target
everest.missions.kepler.kepler.PlanetStatistics(*args, **kwargs)

Computes and plots the CDPP statistics comparison between model and compare_to for all known planets.