pyPetal Output
Each module run in pyPetal has its own output, most of which are dictionaries with a variety of keys. These keys lead to the different output data from each module. Here we provide an in-depth description of all output and how to access them.
Firstly, the output from the pipeline itself (i.e. from pyPetal.pipeline.run_pipeline) will be a dictionary, containing the output dictionaries for each module run in pyPetal (except the detrending module) - DRW-based outlier rejection, pyCCF, pyZDCF, PyROA.
The key referencing each output will be labeled (name)_res, where (name) is the name of the module, in addition to the output from PLIKE (if it is run). Therefore, the possible keys for the pyPetal output are:
drw_rej_respyccf_respyzdcf_resplike_res
In addition, pypetal_jav.pipeline.run_pipeline will output a dictionary of results. The weighting module pypetal.pipeline.run_weighting will also output a dictionary.
Module: DRW Rejection
The output dictionary from this module differs from the other modules. Each value (except reject_data) in the dictionary is a list of outputs, one for each line in which reject_data=True. These will be in the same order as the input light curves.
Key |
Description |
Type |
|---|---|---|
|
The DRW rejection mask, where |
list of |
|
A copy of the input |
list of |
|
A list of the MCMC samples for \(\tau_{\rm DRW}\). |
list of |
|
A list of the MCMC samples for \(\sigma_{\rm DRW}\). |
list of |
|
A list of the MCMC samples for the jitter term \(\sigma_n\). If the argument |
list of |
Module: PyCCF
The output pyCCF module will be a list of dictionaries, one for each line, with the line specified in each dictionary. These will be in the same order as the input light curves.
Key |
Description |
Type |
|---|---|---|
|
The output cross-correlation function. |
list of |
|
The lags corresponding to the CCF. |
list of |
|
The median of the CCCD. |
|
|
The lower error on the centroid. |
|
|
The upper error on the centroid. |
|
|
The median of the CCPD. |
|
|
The lower error on the peak. |
|
|
The upper error on the peak. |
|
|
The lags corresponding to the CCCD. |
list of |
|
The lags corresponding to the CCPD. |
list of |
|
The name of the line. |
|
Module: pyZDCF
The pyZDCF can have one or two outputs, depending on the value of run_plike. If run_plike=True, there will be a pyZDCF output and a PLIKE output in the output dictionary.
The pyZDCF output will be a list of pandas.DataFrame objects, which are output from pyZDCF itself. These will be in the same order as the input light curves. These DataFrame objects have the following columns:
Column |
Description |
Type |
|---|---|---|
|
The time lag. |
|
|
The lower error on the time lag. |
|
|
The upper error on the time lag. |
|
|
The ZDCF value at that lag. |
|
|
The lower error on the ZDCF value. |
|
|
The upper error on the ZDCF value. |
|
|
The number of points in the given \(tau\) bin. |
|
The PLIKE output will be a list of dictionaries, one for each line. Each dictionary will contain an astropy.table.Table object under the output, which contain the output from PLIKE, read from the output file. Each table will have the following columns:
Column |
Description |
Type |
|---|---|---|
|
The time lag. |
|
|
The ZDCF value at that lag. |
|
|
The lower error on the ZDCF. |
|
|
The upper error on the ZDCF. |
|
|
The likelihood value at that lag. |
|
Each dictionary will have the following keys:
Key |
Description |
Type |
|---|---|---|
|
The output from PLIKE. |
|
|
The maximum likelihood lag. |
|
|
The lower error on the maximum likelihood lag. |
|
|
The upper error on the maximum likelihood lag. |
|
Module: PyROA
Normally, the PyROA code outputs a PyROA.PyROA.Fit object which contain its results. However, due to threading issues, this cannot be done in pyPetal. To circumvent this, pyPetal has a similar class called MyFit, which contains some of the attributes of the original Fit class (see below).
In general, the PyROA module’s output will be dependent on the input value of the together argument. If together=False, there will be a list of MyFit objects, one for each line. If together=True, there will only be one MyFit object.
The MyFit object will have the following attributes:
Attribute |
Description |
Type |
|---|---|---|
|
The MCMC samples. |
list of |
|
The flattened MCMC samples. |
list of |
|
The ROA model fit (times, values, and errors) for each light curve. |
list of |
|
The time for the driving light curve model fit. |
list of |
|
The driving light curve model fit. |
list of |
|
The error in the driving light curve model fit. |
list of |
Module: MICA2
The MICA2 module’s output will be a list of pymica.gmodel objects output from MICA2 itself, in the order of the line names input into pyPetal.
Module: JAVELIN
The JAVELIN module’s output will have a different structure depending on the value of together. If together=False, there will be a list of dictionaries for each line, in the order of the light curves given. If together=True, there will only be one output dictionary. However, in both cases, the keys will be the same.
The output dictionary(ies) will have the following keys:
Key |
Description |
Type |
|---|---|---|
|
The highest posterior density (HPD) interval for the initial continuum fit. If both DRW parameters are fixed, this will be None. The first column corresponds to \(\sigma_{\rm DRW}\), and the second corresponds to \(\tau_{\rm DRW}\). |
list of |
|
The list of MCMC samples for \(\tau_{\rm DRW}\). |
list of |
|
The list of MCMC samples for \(\sigma_{\rm DRW}\). |
list of |
|
The list of MCMC samples for the tophat parameters. These tophat parameters will be ordered in the same way as the input light curves. |
list of |
|
The HPD interval for the combined fit. The first column corresponds to \(\sigma_{\rm DRW}\), the second corresponds to \(\tau_{\rm DRW}\), and the rest are the tophat parameters, in the same order as described in |
list of |
|
The output |
|
|
The output |
|
|
The continuum light curve in a |
|
|
All light curves (continuum +lines) in a |
|
|
The |
|
Note
If both of the DRW parameters (i.e. the first two parameters) are fixed, the continuum will not be fit to get an estimate on \(\sigma_{\rm DRW}\) and \(\tau_{\rm DRW}\). In this case, the cont_hpd and cont_model keys will be None.
Note
If rm_type="spec", then the rmap_model key will be a javelin.lcmodel.Rmap_Model object. If rm_type="phot", then the rmap_model key will be a javelin.lcmodel.Pmap_Model object.
Module: Weighting
The weighting module output dictionary will contain three dictionaries within it, for the three modules (with keys pyccf, javelin, and pyroa). Each of these two dictionaries will have similar data, representing the results from the weighting. If any of these modules aren’t run, then the value corresponding to its key will be None.
Similar to the DRW Rejection module, the values for the keys will be lists of results, one for each line, in the order of the input liht curves.
Most of the keys for each of the three dictionaries will be the same:
Key |
Description |
Type |
|---|---|---|
|
The bounds and lag value of the primary peak, given as [lower bound, peak, upper bound]. |
list of |
|
The ACF of the continuum light curve. |
list of |
|
The lags that the weighting distributions are computed on. |
list of |
|
The weight distribution \(w(\tau)\) |
list of |
|
The smoothed \(w(\tau)\). |
list of |
|
The number of overlapping points at a given lag \(N(\tau)\). |
list of |
|
The fraction of the original CCCD rejected when downsampling. |
list of |
The three modules differ with these keys:
Module |
Key |
Description |
Type |
|---|---|---|---|
pyCCF |
|
The median of the downsampled CCCD and its uncertainties, given as [lower error, value, upper error]. |
list of |
pyCCF |
|
The downsampled CCCD. |
list of |
pyCCF |
|
The maximum value of the downsampled CCCD. |
list of |
JAVELIN |
|
The median of the downsampled distribution for the JAVELIN tophat peak. |
list of |
JAVELIN |
|
The downsampled distribution for the JAVELIN tophat peak. |
list of |
JAVELIN |
|
The maximum value of the CCCD within \(\pm 1\sigma\) of the median tophat lag. |
list of |
PyROA |
|
The median of the downsampled distribution for the PyROA time delay. |
list of |
PyROA |
|
The downsampled distribution for the PyROA time delay. |
list of |
PyROA |
|
The maximum value of the CCCD within \(\pm 1\sigma\) of the median PyROA time delay. |
list of |
Note
If pyCCF isn’t run, all rmax_(module) values will be NaN.
In addition, the weighting module will output an array of dictionaries representing the data in the weighting summary files (weighting_summary.fits) for each line. The keys and values for the entries in these dictionaries can be found in the pyPetal output files API.