pysep.atm.kur package

Submodules

pysep.atm.kur.utils module

Author: Thomas M. Boudreaux

Created: March 2022

Last Modified: March 2022

Utilities for handeling Kuruze Model Atmospheres

Examples

If there was some Kuruze model atmosphere in the local directory called atmk1990p00.tab then you could read this in with an [Fe/H] = 0.0

>>> from pysep.atm.kur import load
>>> kur = load("atmk1990p00.tab")
>>> print(kur['lz'])
Out[1]: 0.0

If you wanted to print out the pressure array

>>> print(kur['logp'])
pysep.atm.kur.utils.load(path: str) dict

Read in a Kuruze/ATLAS model atmosphere file as a numpy array. Primarly this is intened to be useful for merging Kuruze/ATLAS model atmospheres onto the ends of other models, such as marcs.

Parameters

path (str) – path to Kuruze/ATLAS model atmosphere to read in

Returns

castBlocks – dictionary containng the log abundance, teff, logg, and log pressure data. These are keyed as lz, logt, logg, and logp respectivly. The nd array for pressure is of shape len(teff) x len(logg).

Return type

dict of nd arrays

Raises

RuntimeError: – If any of the following patterns do not show up in the file at PATH - LOG ABUND - LOG TEFF: - LOG G: - LOG PRESSURE:

pysep.atm.kur.utils.load_as_dsep_style(path: str) numpy.ndarray

Load and transform Kur model atmopsphers into the form that dsep can understand. Note that this is just a properly formatted array, not the fully formated file

Parameters

path (str) – path to the kur model atmosphere

Returns

parray – properlly formated array for dsep to read in atmospheric boundary conditions from. This means that the array is formated with n rows, where each row corresponds to one effective temperature. Each row consisnts of m+1 columns. The first column in each row is the effective temperature (in linear space) for that row. Subsequent columns are the pressures at that effective temperature for a variety of log gravity values.

Return type

np.ndarray

Module contents

Kurz model atmospher boundary conditions