API - Viewing results
After running an instance of the Erebus
pipeline, a folder of results files are generated. These can be loaded in later in order to plot and otherwise visualize your results.
IndividualFitResults
individual_fit_results.IndividualFitResults
Bases:
erebus.utility.h5_serializable_file.H5Serializable
Class containing the results of an individual fit run
config = fit.config
instance-attribute
The config file used to create this run
config_hash = fit.config_hash
instance-attribute
The unique hash of the config file. Used for naming cache files.
eigenvalues = fit.eigenvalues
instance-attribute
For each principal component, the eigenvalue. The first 5 are used as the FN-PCA systematic model.
eigenvectors = fit.eigenvectors
instance-attribute
For each principal component, this is its eigenimage.
flux_model = fit.fit_method(fit.time, *res_nominal_values)
instance-attribute
The best fit detrended lightcurve.
frames = fit.photometry_data.normalized_frames
instance-attribute
The frames which aperture photometry was performed on for the fit.
order = fit.order
instance-attribute
If there were other visits observed, this is the numerical ordering they occuring in.
pca_variance_ratios = fit.pca_variance_ratios
instance-attribute
For each principal component, how much of the variance does it explain.
planet = fit.planet
instance-attribute
The planet config file used to create this run
planet_name = fit.planet_name
instance-attribute
The name of the planet observed
predicted_t_sec = fit.predicted_t_sec
instance-attribute
The predicted 0.5 phase eclipse time
raw_flux = fit.raw_flux
instance-attribute
Light curve that is not yet detrended.
results = fit.results
instance-attribute
A dictionary of results for the fit parameters (e.g., eclipse depth)
start_time = fit.start_time
instance-attribute
The BJD date the observation started on.
systematic_factor = fit.systematic_model(fit.time, *systematic_params)
instance-attribute
The systematic factor which was divided out of the raw lightcurve to get the detrended one.
time = fit.time
instance-attribute
The time values that the model was fit on. Starts at 0.
visit_name = fit.visit_name
instance-attribute
The unique visit name as read on MAST.
load(path: str)
staticmethod
After running an Erebus instance, the results file can be loaded later using this method.
JointFitResults
joint_fit_results.JointFitResults
Bases:
erebus.utility.h5_serializable_file.H5Serializable
Class containing the results of an individual fit run
config = fit.config
instance-attribute
The config file used to create this run
config_hash = fit.config_hash
instance-attribute
The unique hash of the config file. Used for naming cache files.
detrended_flux_per_visit = []
instance-attribute
A list containing the detrended lightcurves of each visit.
joint_eigenvalues = fit.joint_eigenvalues
instance-attribute
A list of eigenvalue lists per visit. Index first by vist number than by principal component number.
joint_eigenvectors = fit.joint_eigenvectors
instance-attribute
A list of eigenvector lists per visit. Index first by vist number than by principal component number.
model_flux_per_visit = []
instance-attribute
The best fit detrended lightcurves per visit.
model_time_per_visit = []
instance-attribute
A list containing the time values corresponding to model_flux_per_visit
pca_variance_ratios = fit.pca_variance_ratios
instance-attribute
A list of PCA explained variance ratio lists per visit. Index first by vist number than by principal component number.
planet = fit.planet
instance-attribute
The planet config file used to create this run
planet_name = fit.planet_name
instance-attribute
The name of the planet observed
predicted_t_secs = fit.predicted_t_secs
instance-attribute
Predicted 0.5 eclipse time for each visit
raw_flux = fit.raw_flux
instance-attribute
A list containing the raw (not yet detrended) lightcurves of each visit.
relative_time_per_visit = []
instance-attribute
A list containing the time values corresponding to detrended_flux_per_visit
results = fit.results
instance-attribute
A dictionary of results for the fit parameters (e.g., eclipse depth)
time = fit.time
instance-attribute
A list of time values for each visit.
load(path: str)
staticmethod
After running an Erebus instance, the results file can be loaded later using this method.
Plotting helper methods
plotting
chain_plot(mcmc: WrappedMCMC, save_to_path: str = None, show: bool = False)
Call this on an MCMC model after it has run in order to show and optionally save a chain plot.
corner_plot(mcmc: WrappedMCMC, save_to_path: str = None, show: bool = False)
Call this on an MCMC model after it has run in order to show and optionally save a corner plot.
plot_eigenvectors(individual_fit: IndividualFit, save_to_directory: str = None)
Plots the 5 highest ranked eigenimages to a given folder (if provided).
plot_fnpca_individual_fit(individual_fit: IndividualFit | IndividualFitResults, save_to_directory: str = None, show: bool = False)
Creates an informative plot for an individual fit. Will save both a png and a pdf. Expects the individual fit to be done with fnpca/exponential and a linear component.
plot_joint_fit(joint_fit: JointFit | JointFitResults, save_to_directory: str = None, show: bool = False)
Creates an informative plot for the joint fit results. Saves as a png and a pdf.
File name starts with planet name, then visit name, then unique hash of config file settings.