Fit Result

class eddington.fitting_result.FittingResult(a0: Union[List[float], <sphinx.ext.autodoc.importer._MockObject object at 0x7f36c2ce6950>], a: Union[List[float], <sphinx.ext.autodoc.importer._MockObject object at 0x7f36c2ce6a10>], aerr: Union[List[float], <sphinx.ext.autodoc.importer._MockObject object at 0x7f36c2ce6ad0>], acov: Union[List[List[float]], <sphinx.ext.autodoc.importer._MockObject object at 0x7f36c2ce6d90>], degrees_of_freedom: int, chi2: float, precision: int = 3)

Dataclass that contains the relevant parameters returned by a fitting algorithm.

Parameters:
  • a0 – The initial guess for the fitting function parameters.
  • a – The result for the fitting parameters.
  • aerr – Estimated errors of a.
  • arerr – Estimated relative errors of a (equivalent to aerr/a).
  • acov – Covariance matrix of a.
  • degrees_of_freedom – How many degrees of freedom of the fittings.
  • chi2 – Optimization evaluation for the fit.
  • chi2_reduced – Reduced chi2.
  • p_probability – P-probability (p-value) of the fitting, evaluated from chi2_reduced.
precision = 3
pretty_string

Pretty representation string.

save_json(file_path: Union[str, pathlib.Path]) → None

Write the result to a json file.

Parameters:file_path (str or Path) – Path to write the result in. if None, prints to console.
save_txt(file_path: Union[str, pathlib.Path]) → None

Write the result to a text file.

Parameters:file_path (str or Path) – Path to write the result in. if None, prints to console.