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 catalogDVS()
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:
-
everest.user.
DownloadFile
(ID, season=None, mission='k2', cadence='lc', filename=None, clobber=False)¶ Download a given
everest
file from MAST.Parameters:
-
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 currenteverest
FITS file for the requested target and populates the class instance with the light curve data and attributes. Many of the methods are inherited fromeverest.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? DefaultFalse
- cadence (str) – The light curve cadence. Default lc
- clobber (bool) – If
True
, download and overwrite existing files. DefaultFalse
-
compute
()¶ Re-compute the
everest
model for the given value oflambda
. 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 aroundeverest.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
andkwargs
are passed directly to thepipelines.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:
-
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. Seeeverest.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
. IfFalse
, plots the de-trended but uncorrected light curve.
- show (bool) – Show the plot or return the (fig, ax) instance? Default
-
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 usingcompute()
.Parameters:
-
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
andkwargs
are passed directly to thepipelines.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 ofeverest.transit.TransitModel
.Parameters:
-
reset
()¶ Re-loads the FITS file from disk.
-
everest.user.
Search
(ID, mission='k2')¶ Why is my target not in the EVEREST database?