jacscanomaly.Finder
- class jacscanomaly.Finder(config=<factory>, fitter=None, plotter=None)[source]
Main entry point of jacscanomaly.
Finder orchestrates the full anomaly-search pipeline:
Fit a single-lens microlensing model to the full light curve (PSPL / FSPL / ± annual parallax).
Split the residual light curve into observing seasons.
Perform grid scans on residuals within each season.
Extract and merge statistically significant clusters.
Select the best anomaly candidate, if any.
The choice of single-lens model is controlled by
FinderConfig(viafitter_kind), or by explicitly injecting a fitter instance.- Parameters:
config (FinderConfig, optional) – Configuration object controlling fitting, season splitting, grid scanning, and candidate selection.
fitter (optional) –
A single-lens fitter instance. If
None, a default fitter is constructed fromconfig.fitter_kind. Any object implementing:fit(time, flux, ferr, x0) -> SingleLensFitResult
is acceptable.
plotter (AnomalyPlotter, optional) – Plotting helper used by the
plot_*convenience methods.
Notes
The dimensionality of the initial parameter vector
x0depends on the selected fitter:Model
x0 parameters
PSPL
(t0, tE, u0)
FSPL
(t0, tE, u0, logrho)
PSPL + parallax
(t0, tE, u0, piEN, piEE)
FSPL + parallax
(t0, tE, u0, logrho, piEN, piEE)
For parallax models,
ra_deganddec_degmust be provided inFinderConfig. Iftrefis not specified, the median observation time is used.
- __init__(config=<factory>, fitter=None, plotter=None)
- Parameters:
config (FinderConfig)
fitter (object | None)
plotter (AnomalyPlotter | None)
- Return type:
None
Methods
__init__([config, fitter, plotter])fit_single_lens(time, flux, ferr[, x0])Run only the single-lens fit selected by the current configuration.
plot_anomaly_window(**kwargs)Plot residuals around the best anomaly window.
plot_lc(**kwargs)Plot light curve with single lens model using the last result.
plot_residual(**kwargs)Plot residuals using the last result.
plot_result(**kwargs)Full 3-panel diagnostic plot.
plot_template_free(**kwargs)Plot the last template-free anomaly search result.
run(time, flux, ferr[, x0, verbose, log])Run the full anomaly-search pipeline.
run_template_free(time, flux, ferr[, x0, ...])Run a template-free anomaly search on single-lens residuals.
Attributes
fitterplotterconfig