qsospec.FitResult

class qsospec.FitResult(success, status, message, theta, param_names, param_values, chi2, dof, reduced_chi2, model, residual, wave_rest_fit, flux_fit, err_fit, wave_rest_window=<factory>, flux_window=<factory>, err_window=<factory>, model_window=<factory>, residual_window=<factory>, fit_used_window=<factory>, component_models=<factory>, component_models_window=<factory>, warnings=<factory>, metadata=<factory>, optimizer_result=None)[source]

Bases: object

Result of a qsospec optimization.

Parameters:
__init__(success, status, message, theta, param_names, param_values, chi2, dof, reduced_chi2, model, residual, wave_rest_fit, flux_fit, err_fit, wave_rest_window=<factory>, flux_window=<factory>, err_window=<factory>, model_window=<factory>, residual_window=<factory>, fit_used_window=<factory>, component_models=<factory>, component_models_window=<factory>, warnings=<factory>, metadata=<factory>, optimizer_result=None)
Parameters:
Return type:

None

Methods

__init__(success, status, message, theta, ...)

failed(message[, warnings, metadata])

Create a failed result for validation-level failures.

summary()

Return a compact result summary.

to_dict()

Return a JSON-friendly summary dictionary.

to_table()

Return Gaussian line measurements as a pandas DataFrame when available.

warning_codes()

Return warning codes attached to this result.

Attributes

optimizer_result

success

status

message

theta

param_names

param_values

chi2

dof

reduced_chi2

model

residual

wave_rest_fit

flux_fit

err_fit

wave_rest_window

flux_window

err_window

model_window

residual_window

fit_used_window

component_models

component_models_window

warnings

metadata

chi2: float
component_models: Dict[str, ndarray]
component_models_window: Dict[str, ndarray]
dof: int
err_fit: ndarray
err_window: ndarray
classmethod failed(message, warnings=None, metadata=None)[source]

Create a failed result for validation-level failures.

Parameters:
Return type:

FitResult

fit_used_window: ndarray
flux_fit: ndarray
flux_window: ndarray
message: str
metadata: Dict[str, Any]
model: ndarray
model_window: ndarray
optimizer_result: Any | None = None
param_names: List[str]
param_values: Dict[str, float]
reduced_chi2: float
residual: ndarray
residual_window: ndarray
status: int
success: bool
summary()[source]

Return a compact result summary.

Return type:

Dict[str, Any]

theta: ndarray
to_dict()[source]

Return a JSON-friendly summary dictionary.

Return type:

Dict[str, Any]

to_table()[source]

Return Gaussian line measurements as a pandas DataFrame when available.

warning_codes()[source]

Return warning codes attached to this result.

Return type:

List[str]

warnings: List[FitWarning]
wave_rest_fit: ndarray
wave_rest_window: ndarray