jacscanomaly.Finder

class jacscanomaly.Finder(config=<factory>, fitter=None, plotter=None)[source]

Main entry point of jacscanomaly.

Finder orchestrates the full anomaly-search pipeline:

  1. Fit a single-lens microlensing model to the full light curve (PSPL / FSPL / ± annual parallax).

  2. Split the residual light curve into observing seasons.

  3. Perform grid scans on residuals within each season.

  4. Extract and merge statistically significant clusters.

  5. Select the best anomaly candidate, if any.

The choice of single-lens model is controlled by FinderConfig (via fitter_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 from config.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 x0 depends 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_deg and dec_deg must be provided in FinderConfig. If tref is not specified, the median observation time is used.

__init__(config=<factory>, fitter=None, plotter=None)
Parameters:
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

fitter

plotter

config