Usage¶
Command-line interface¶
| Option | Description |
|---|---|
-v, --verbose |
Enable verbose console output |
-o, --outdir |
Output directory name (default: out) |
Examples¶
Python API¶
import yaml
from timer.fit import TransitFit
sys_params = yaml.load(open('sys.yaml'), Loader=yaml.FullLoader)
fit_params = yaml.load(open('fit.yaml'), Loader=yaml.FullLoader)
fit = TransitFit(sys_params, fit_params, wd='.')
fit.build_model()
fit.clip_outliers()
fit.sample()
fit.plot_corner()
fit.save_results()
Loading saved results¶
Pipeline¶
The timer-fit CLI runs the following steps in order:
- Load data -- read light curve files, bin, detrend
- Build model -- construct PyMC model with priors, optimize for MAP solution
- Clip outliers -- sigma-clip residuals (if
clip: truein data config) - Re-fit -- rebuild model with outlier mask applied
- Sample -- MCMC sampling with PyMC
- Plot -- light curve fits, corner plots, trace plots, limb darkening
- Save -- summary statistics, transit times, posterior samples, corrected light curves
Outputs¶
All outputs are saved to the out/ directory (or custom --outdir):
| File | Description |
|---|---|
fit.png |
Light curve fit with residuals |
corner.png |
Corner plot of posterior distributions |
trace.png |
MCMC trace plot |
summary.csv |
Parameter summary statistics |
tc.txt |
Fitted transit center times |
ic.txt |
Information criteria (BIC, AIC, AICc) |
posterior_samples.csv.gz |
Full posterior samples |
*-cor.csv |
Corrected (detrended) light curves |
timer-fit.log |
Full log file |
fit.yaml, sys.yaml |
Copies of input configuration |