jacscanomaly.AnomalyResult

class jacscanomaly.AnomalyResult(time, flux, ferr, fit, residual, model_flux, chi2_dof, seasons, clusters_all, grid_metrics_all, best)[source]

Output of scanomaly.finder.Finder.run().

This object is designed to be convenient for plotting and downstream analysis. Arrays are stored on CPU as NumPy arrays.

Parameters:
  • time (np.ndarray)

  • flux (np.ndarray)

  • ferr (np.ndarray)

  • fit (SingleLensFitResult)

  • residual (np.ndarray)

  • model_flux (np.ndarray)

  • chi2_dof (float)

  • seasons (List[SeasonSummary])

  • clusters_all (np.ndarray)

  • grid_metrics_all (np.ndarray)

  • best (Optional[BestCandidate])

time, flux, ferr

Input light curve arrays (1D).

Type:

np.ndarray

fit

PSPL fitting result (contains params, fs, fb, chi2, model_flux, residual, etc.).

Type:

SingleLensFitResult

residual

Flux residuals on CPU: flux - model_flux.

Type:

np.ndarray

model_flux

PSPL model flux on CPU.

Type:

np.ndarray

chi2_dof

Reduced chi-square of the PSPL fit.

Type:

float

seasons

Per-season summaries including clusters.

Type:

list[SeasonSummary]

clusters_all

Flattened clusters across all seasons, shape (N, 3) with rows [t0, teff, dchi2].

Type:

np.ndarray

grid_metrics_all

Flattened per-grid diagnostics, shape (M, 9), columns: [t0, teff, dchi2, n_window, n_contrib, n_eff, peak_frac, rho1, longest_run].

Type:

np.ndarray

best

Best candidate over all clusters, or None if no candidate exists.

Type:

BestCandidate | None

__init__(time, flux, ferr, fit, residual, model_flux, chi2_dof, seasons, clusters_all, grid_metrics_all, best)
Parameters:
  • time (np.ndarray)

  • flux (np.ndarray)

  • ferr (np.ndarray)

  • fit (SingleLensFitResult)

  • residual (np.ndarray)

  • model_flux (np.ndarray)

  • chi2_dof (float)

  • seasons (List[SeasonSummary])

  • clusters_all (np.ndarray)

  • grid_metrics_all (np.ndarray)

  • best (Optional[BestCandidate])

Return type:

None

Methods

__init__(time, flux, ferr, fit, residual, ...)

print_summary()

Print a CLI-friendly summary.

summary_dict()

Return a compact summary dictionary suitable for logging/serialization.

summary_table()

Return a notebook-friendly single-row table.

summary_text()

Return a CLI-friendly multi-line summary.

Attributes

time

flux

ferr

fit

residual

model_flux

chi2_dof

seasons

clusters_all

grid_metrics_all

best