Data handling#
The spectroscopic light curves are given to ExoIris as a TSData (Transmission Spectroscopy Data) or TSDataGroup
object. TSData is a utility class that provides methods for data cleanup, binning, and cropping, and uncertainty
estimation, while TSDataGroup is a container class that can hold multiple TSData objects and provides aggregate
properties and methods. Two TSData objects can be combined into a TSDataGroup with the + operator, and
further data sets can be added to the group the same way.
Broadband light curves are stored as BBData objects, a TSData subclass described in
Broadband photometry.
Main classes#
|
|
|
|
Data wrangling#
|
Bin the data along the wavelength and/or time axes. |
|
Bin the data along the wavelength axis. |
|
Bin the data along the time axis. |
|
Crop the data to include only the wavelength range between lmin and lmax. |
|
Crop the data to include only the time range between lmin and lmax. |
|
Mask outliers along the wavelength axis. |
|
Drop wavelength rows and time columns that are fully masked. |
Normalize the light curves to the median flux of the given slice along the time axis. |
|
|
Normalize the baseline flux for each spectroscopic light curve. |
|
Partition the data into n segments defined by tlims. |
Uncertainty estimation#
Estimate the per-wavelength average flux uncertainties. |
Masking#
Each TSData object carries two masks. The data mask, TSData.mask, is a 2D boolean array that marks the valid
flux values, and is updated by the methods that mask or remove data. The transit mask, TSData.transit_mask, is a
1D boolean array that marks the out-of-transit exposures, and is created by TSData.mask_transit from the
ephemeris. Wavelengths and exposures without any valid data can be dropped with TSData.remove_fully_masked.
|
Create a transit mask based on a given ephemeris or exposure index limits. |
Transit ephemeris. |
|
|
White light curve#
|
Create a white light curve. |
Data set properties#
Wavelength bounds of the bounding box. |
|
Time bounds of the bounding box. |
TSDataGroup gives access to the data and the grouping of all its data sets as lists with one element per data
set.
Number of data sets. |
|
List of data set names. |
|
List of 1D time arrays. |
|
List of 1D wavelength arrays. |
|
List of 2D flux arrays. |
|
List of 2D error arrays. |
|
Array of noise groups. |
|
Number of noise groups. |
|
List of epoch groups. |
|
List of offset groups. |
|
Number of baseline coefficients for each data set. |
I/O#
A TSData or TSDataGroup object can be saved to a FITS file with its save method and read back with
load. The file stores the fluxes, uncertainties, masks, baseline covariates, and group assignments, so data
that has been cleaned and binned once can be reused without repeating the preparation. The export_fits and
import_fits methods do the same for an HDUList, and are what ExoIris uses to embed the data
in a model file.
|
Save the data set to a FITS file. |
|
Load a data set from a FITS file. |
|
Save all the data sets to a single FITS file. |
|
Load data from a FITS file. |
Generate a |
|
|
Import a data set from a |
Export the dataset along with its metadata to a FITS HDU list. |
|
|
Import all the data from a FITS HDU list. |
Plotting#
|
Plot the spectroscopic light curves as a 2D image. |
|
Plot a white light curve. |
|
Plot the out-of-transit spectroscopic light curves before and after the normalization. |
|
Plot the mean flux uncertainty as a function of wavelength. |
|
Plot all the data sets. |
|
Plot the white light curves. |