API Reference
Python implementation of KYLIE.
PyKYLIE provides a set of routines that allow a simple Python re-implementation of the KYLIE pulsating-star spectral synthesis code.
- pykylie.read_bruce_model(file_name)
Read BRUCE model data from a file.
- Parameters:
file_name (str) – Name of file.
- Returns:
Model data. Array values are stored in table columns, and scalar values in the table meta attribute.
- Return type:
- pykylie.parse_comm_file(file_name, check_against=None)
Read and parse a BRUCE/KYLIE command file.
- Parameters:
file_name (str) – Name of file.
check_against (dict, optional) – Grammar rules to check against.
- Returns:
Nested data structure with commands as the top-level keys. Indexing is dict[comm][i][param], where comm is the command, i is the index (to handle multiple commands with the same name), and param is the parameter.
- Return type:
dict
- pykylie.spec_irradiance(tbl, specgrid, lam, d=10, limb_u=None, x_add=None)
Evaluate the spectroscopic irradiance
- Parameters:
tbl (astropy.table.Table) – Table of BRUCE model data returned by
read_bruce_model().specgrid (pymsg.SpecGrid) – Grid of spectroscopic intensity data.
lam (numpy.ndarray) – Wavelength abscissa (Å).
d (float, optional) – Distance (pc).
limb_u (float, optional) – Linear limb-darkening parameter.
x_add (dict, optional) – Additional photospheric parameters (e.g., [Fe/H]) passed on to pymsg.
- Returns:
Spectroscopic irradiance (erg/cm^2/s/Å) in bins delineated by lam; length len(lam)-1.
- Return type:
- pykylie.phot_irradiance(tbl, photgrid, d=10, limb_u=None, x_add=None)
Evaluate the photometric irradiance
- Parameters:
tbl (astropy.table.Table) – Table of BRUCE model data returned by
read_bruce_model().photgrid (pymsg.PhotGrid) – Grid of spectroscopic intensity data.
d (float, optional) – Distance (pc).
limb_u (float, optional) – Linear limb-darkening parameter.
x_add (dict, optional) – Additional photospheric parameters (e.g., [Fe/H]) passed on to pymsg.
- Returns:
Photometric irradiance
- Return type:
- pykylie.run_kylie(file_name)
Perform a KYLIE run.
- Parameters:
file_name (str) – Name of KYLIE input file.