user.py - User Python routines

This is the gateway to the everest catalog, containing all of the user-facing code.

  • Everest is the main user-facing class for interfacing with the catalog
  • DVS() downloads and plots the data validation summary for a given target

Instantiating an Everest class automatically downloads the light curve from the online MAST catalog. So, to get started, all you need to do is run

import everest
star = everest.Everest(201367065)
everest.user.DVS(ID, season=None, mission='k2', clobber=False, cadence='lc', model='nPLD')

Show the data validation summary (DVS) for a given target.

Parameters:
  • mission (str) – The mission name. Default k2
  • cadence (str) – The light curve cadence. Default lc
  • clobber (bool) – If True, download and overwrite existing files. Default False
everest.user.DownloadFile(ID, season=None, mission='k2', cadence='lc', filename=None, clobber=False)

Download a given everest file from MAST.

Parameters:
  • mission (str) – The mission name. Default k2
  • cadence (str) – The light curve cadence. Default lc
  • filename (str) – The name of the file to download. Default None, in which case the default FITS file is retrieved.
  • clobber (bool) – If True, download and overwrite existing files. Default False
class everest.user.Everest(ID, season=None, mission='k2', quiet=False, clobber=False, cadence='lc', **kwargs)

The main user-accessible everest class for interfacing with the light curves stored on MAST. Instantiating this class downloads the current everest FITS file for the requested target and populates the class instance with the light curve data and attributes. Many of the methods are inherited from everest.Basecamp.

Parameters:
  • ID (int) – The target ID. For k2, this is the EPIC number of the star.
  • mission (str) – The mission name. Default k2
  • quiet (bool) – Suppress stdout messages? Default False
  • cadence (str) – The light curve cadence. Default lc
  • clobber (bool) – If True, download and overwrite existing files. Default False
compute()

Re-compute the everest model for the given value of lambda. For long cadence k2 light curves, this should take several seconds. For short cadence k2 light curves, it may take a few minutes. Note that this is a simple wrapper around everest.Basecamp.compute().

dvs()

Shows the data validation summary (DVS) for the target.

get_pipeline(*args, **kwargs)

Returns the time and flux arrays for the target obtained by a given pipeline.

Options args and kwargs are passed directly to the pipelines.get() function of the mission.

load_fits()

Load the FITS file from disk and populate the class instance with its data.

mask_planet(t0, period, dur=0.2)

Mask all of the transits/eclipses of a given planet/EB. After calling this method, you must re-compute the model by calling compute() in order for the mask to take effect.

Parameters:
  • t0 (float) – The time of first transit (same units as light curve)
  • period (float) – The period of the planet in days
  • dur (foat) – The transit duration in days. Default 0.2
name

Returns the name of the everest model used to generate this light curve.

optimize(piter=3, pmaxf=300, ppert=0.1)

Runs pPLD on the target in an attempt to further optimize the values of the PLD priors. See everest.detrender.pPLD.

plot(show=True, plot_raw=True, plot_gp=True, plot_bad=True, plot_out=True, plot_cbv=True, simple=False)

Plots the final de-trended light curve.

Parameters:
  • show (bool) – Show the plot or return the (fig, ax) instance? Default True
  • plot_raw (bool) – Show the raw light curve? Default True
  • plot_gp (bool) – Show the GP model prediction? Default True
  • plot_bad (bool) – Show and indicate the bad data points? Default True
  • plot_out (bool) – Show and indicate the outliers? Default True
  • plot_cbv (bool) – Plot the CBV-corrected light curve? Default True. If False, plots the de-trended but uncorrected light curve.
plot_aperture(show=True)

Plot sample postage stamps for the target with the aperture outline marked, as well as a high-res target image (if available).

Parameters:show (bool) – Show the plot or return the (fig, ax) instance? Default True
plot_folded(t0, period, dur=0.2)

Plot the light curve folded on a given period and centered at t0. When plotting folded transits, please mask them using mask_planet() and re-compute the model using compute().

Parameters:
  • t0 (float) – The time at which to center the plot (same units as light curve)
  • period (float) – The period of the folding operation
  • dur (float) – The transit duration in days. Default 0.2
plot_pipeline(pipeline, *args, **kwargs)

Plots the light curve for the target de-trended with a given pipeline.

Parameters:pipeline (str) – The name of the pipeline (lowercase). Options are ‘everest2’, ‘everest1’, and other mission-specific pipelines. For K2, the available pipelines are ‘k2sff’ and ‘k2sc’.

Additional args and kwargs are passed directly to the pipelines.plot() function of the mission.

plot_transit_model(show=True, fold=None, ax=None)

Plot the light curve de-trended with a join instrumental + transit model with the best fit transit model overlaid. The transit model should be specified using the transit_model attribute and should be an instance or list of instances of everest.transit.TransitModel.

Parameters:
  • show (bool) – Show the plot, or return the fig, ax instances? Default True
  • fold (str) – The name of the planet/transit model on which to fold. If only one model is present, can be set to True. Default False (does not fold the data).
  • ax – A matplotlib axis instance to use for plotting. Default None
reset()

Re-loads the FITS file from disk.

everest.user.Search(ID, mission='k2')

Why is my target not in the EVEREST database?