ell1fit¶
- ell1fit.pipeline.ell1fit(files, parfiles, nsteps=100, nharm=1, tolerance=1e-08, energy_range=None, fit_parameters=['F0'], minimize_first=False, general_outroot=None, likelihood_func=<function pletsch_clarke_likelihood>, use_weight=False, use_pi=False, ignore_uncertainties=False, template_iterations=1, priors=None, sampler='emcee', nlive=1000, dlogz=0.1, workers=0)[source]¶
Fit spin and ELL1 orbital parameters from one or more event files.
This is the high-level pipeline used by the CLI:
Load timing models and event files.
Fold events and build pulse templates (optionally energy-weighted).
Build priors and parameter scaling.
Perform posterior optimization and MCMC sampling.
Save ECSV summaries, diagnostic plots, and updated
.parfiles.
- Parameters:
- fileslist of str
Event files to analyze.
- parfileslist of str
PINT-compatible ELL1 parameter files, one per event file.
- nstepsint, optional
Maximum MCMC steps.
- nharmint, optional
Number of harmonics used to model pulse profiles.
- tolerancefloat, optional
Deorbiting tolerance in seconds.
- energy_rangetuple or None, optional
Energy selection
(emin, emax)applied to events.- fit_parameterslist of str, optional
Parameters to fit (e.g.
["F0", "F1", "PB"]).- minimize_firstbool, optional
If True, run a local minimization before MCMC.
- general_outrootstr or None, optional
Base output root; otherwise inferred from input filename.
- likelihood_funccallable, optional
Likelihood/statistic function evaluated on phases.
- use_weightbool, optional
If True, apply energy-dependent event weighting.
- use_pibool, optional
If True, base that weighting on PI channels instead of calibrated energy. Has no effect unless
use_weightis also True; theenergy_rangeselection above is always applied in calibrated energy regardless of this flag.- ignore_uncertaintiesbool, optional
If True, ignore uncertainties from input parfiles when building priors.
- template_iterationsint, optional
Maximum passes of template refinement. The template is initially built by folding with the input parfile’s solution; if that solution is imperfect the fold is smeared and, because orbital errors produce structured rather than random phase residuals, the template comes out skewed. Refolding with the improved solution and rebuilding removes that.
1(the default) disables refinement entirely and is bit-identical to not having the feature. Seeell1fit.refinement.- priorslist, optional
Prior overrides, each either a
"NAME:SHAPE:ARGS"string or an already-parsedell1fit.priors.PriorSpec. Each one replaces the ruleell1fit.priors.assign_logpriors()would otherwise apply, and also sets that parameter’s local scale when it is the tighter of the two. Seeell1fit.priors.parse_prior_spec()for the syntax.- sampler{“emcee”, “nuts”, “nested”}, optional
Posterior-exploration backend – see
ell1fit.fitting.optimize_solution().- nlive, dlogz, workersoptional
Only consulted when
sampler="nested"– seeell1fit.fitting.optimize_solution().
- Returns:
- str
Path to the combined output ECSV file.