Inits

Classes derived from the Init class initialize the parameters of components. After creating an Init, it is applied to a component by calling it with the component and a filename as parameters. Therefore a derived class must implement both the constructor __init__() and __call__().

spexxy comes with a few pre-defined init classes:

  • InitFromCsv reads initial values from a CSV file.
  • InitFromPath looks for a file of the same name in a given path and reads the initial values from its FITS header.
  • InitFromValues takes initial values directly from its constructor.
  • InitFromVhelio takes coordinates and time from the FITS header, and calculates the heliocentric or baryiocentric correction, which then can be set as initial value for a component.

Init

InitFromCsv

InitFromPath

InitFromValues

InitFromVhelio