API Reference
- pygyre.read_output(file, format='auto')
Read GYRE output data from a file.
- Parameters:
file (str) – The name of the file.
format (str, optional) – The format of the file.
- Returns:
Data read from the file. Array values are stored in table columns, and scalar values in the table meta attribute.
- Return type:
- Raises:
ValueError – If format does not correspond to a recognized format.
Notes
Valid formats are ‘HDF’, ‘TXT’ or ‘auto’ (autodetect).
- pygyre.read_model(file, format='auto')
Read stellar model data from a file.
- Parameters:
file (str) – The name of the file.
format (str, optional) – The format of the file.
- Returns:
Data read from the file. Array values are stored in table columns, and scalar values in the table meta attribute.
- Return type:
- Raises:
ValueError – If format does not correspond to a recognized format.
Notes
Valid formats are ‘GSM’, ‘MESA’, ‘POLY’ or ‘auto’ (autodetect).
- pygyre.write_model(filename, model_table)
Creates a stellar model file in the MESA v1.20 format from an astropy table that can be read by GYRE as input
- Parameters:
filename (str) – The name of the file to write to
model_table (astropy.table.Table) – model data as would be produced from calling read_model() on a MESA file
- Raises:
ValueError – If model_table does not match expected format