Init Files

Classes for setting up Alfred init files.

class alfred.init_class.InitFile(direc, name)

Super class for the other init file classes.

Initializes an InitFile object with a directory and a name.

Parameters:
  • direc (str) – A directory for alfred fitting in which to store the init file.

  • name (str) – The name of the init file. If it does not end in .txt, this is appended to the name.

from_file()

Loads an an InitFile table from a previously created file. This is stored in .table.

Returns:

The whole InitFile object is returned by this function.

Return type:

Self

save()

Saves the current table out to the directory and name of this object. Will overwrite an existing file of the same name.

rename(newname)

Renames this object to the new name. Appends .txt if it is not there.

Parameters:

newname (str) – The new name for this object and its file.

property table

The table storing the init file information.

class alfred.init_class.Init_lcs(direc, name='init_lcs.txt')

Class for creating, loading, and editing light curve initialization files. Inherits from InitFile. Contains information for loading light curve data, as well as information about each data set such as the filter or exposure time. Currently supports data in .fits, .npz, .csv, .dat, and .txt files, with the latter two assumed to be ascii tables with a header row. Each data set is given a nickname by the user for differentiating them during and after fitting.

Initializes an Init_lcs object with a directory and a name.

Parameters:
  • direc (str) – A directory for alfred fitting in which to store the init file.

  • name (str) – The name of the init file. If it does not end in .txt, this is appended to the name. The default is ‘init_lcs.txt’.

class alfred.init_class.Init_rv(direc, name='init_rv.txt')

Class for creating, loading, and editing RV data initialization files. Inherits from InitFile. Contains information for loading RV data. Currently supports data in .csv files or ascii tables with headers. Each data set is given a nickname by the user for differentiating them during and after fitting.

Initializes an Init_rv object with a directory and a name.

Parameters:
  • direc (str) – A directory for alfred fitting in which to store the init file.

  • name (str) – The name of the init file. If it does not end in .txt, this is appended to the name. The default is ‘init_rv.txt’.

class alfred.init_class.Init_star(direc, name='init_star.txt')

Class for creating, loading, and editing stellar parameter initialization files. Inherits from InitFile. Contains physical stellar parameters, such as the effective temperature, and measured parameters, such as the parallax or various photometric values. All of these are also supplied with uncertainties.

Initializes an Init_star object with a directory and a name.

Parameters:
  • direc (str) – A directory for alfred fitting in which to store the init file.

  • name (str) – The name of the init file. If it does not end in .txt, this is appended to the name. The default is ‘init_star.txt’.

from_file()

Loads an an Init_star table from a previously created file. This is stored in .table. If the load fails, trys again using the deprecated formatting and converts it to the current format.

Returns:

The whole Init_star object is returned by this function.

Return type:

Self

class alfred.init_class.Init_ld(direc, name='init_ld.txt')

Class for creating, loading, and editing limb darkening initialization files. Inherits from InitFile. Currently only supports quadratic limb darkening. Contains the two quadratic limb darkening parameters for this star in each assigned filter. These are only used when the limb darkening parameters are not being fit, and the stellar parameters are not being fit.

Initializes an Init_ld object with a directory and a name.

Parameters:
  • direc (str) – A directory for alfred fitting in which to store the init file.

  • name (str) – The name of the init file. If it does not end in .txt, this is appended to the name. The default is ‘init_ld.txt’.

class alfred.init_class.Init_planets(direc, name='init_planets.txt')

Class for creating, loading, and editing planet parameter initialization files. Inherits from InitFile. Contains information on what kinds of parameters to fit for the planet, as well as initial guess for the parameters. Planets are labeled during fitting as 1-indexed numbers from the ordering in this file.

Initializes an Init_planets object with a directory and a name.

Parameters:
  • direc (str) – A directory for alfred fitting in which to store the init file.

  • name (str) – The name of the init file. If it does not end in .txt, this is appended to the name. The default is ‘init_planets.txt’.

class alfred.init_class.Init_ttvs(direc, name='init_ttvs.txt')

Class for creating, loading, and editing TTV initialization files. Inherits from InitFile. Contains initial estimates for all of the transit times for each planet which is being fit for TTVs. These will only be utilized if the planet has fit TTVs set to true in the Init_planets file.

Initializes an Init_ttvs object with a directory and a name.

Parameters:
  • direc (str) – A directory for alfred fitting in which to store the init file.

  • name (str) – The name of the init file. If it does not end in .txt, this is appended to the name. The default is ‘init_ttvs.txt’.

from_file()

Loads an an Init_ttvs table from a previously created file. This is stored in .table. If the load fails, trys again using the deprecated formatting and converts it to the current format.

Returns:

The whole Init_ttvs object is returned by this function.

Return type:

Self

class alfred.init_class.Init_priors(direc, name='init_priors.txt')

Class for creating, loading, and editing prior initialization files. Inherits from InitFile. Contains any priors the user wishes to apply to the fit. Currently supported priors are Gaussian priors, uniform priors (essentially just hard upper and lower boundaries), fixed priors (fixing a parameter at a specific value so it is not fit), Jeffrey’s priors (uninformative prior independent of scale), and modified Jeffrey’s priors (becomes log uniform below the knee value). Priors can be set for a specific parameter (e.g. P 1, the period of planet 1) or for all instances of a type of parameter in the fit (e.g. P x, the periods of all planets).

Initializes an Init_priors object with a directory and a name.

Parameters:
  • direc (str) – A directory for alfred fitting in which to store the init file.

  • name (str) – The name of the init file. If it does not end in .txt, this is appended to the name. The default is ‘init_priors.txt’.

var_help()

Prints out all parameters which can have priors set on them, as well as descriptions of what they are and what units they should be in.

alfred.init_class.create_folder(direc)

Creates a new folder for an exoplanet system to fit with alfred. Helps you make the initialization files.

Parameters:

dir (str) – The absolute path to the new directory to create the folder for this system.