read_metallicity_file¶
- cosmic.utils.read_metallicity_file(met_file_path)[source]¶
Read a metallicity namelist
- Parameters:
- met_file_pathstr or Path
Path to the metallicity file (*.in).
- Returns:
- met_dictdict
Dictionary containing metallicity options, e.g., ‘eep_tracks_dir’, ‘Z_files’, ‘format_file’, etc. Paths are converted to Path objects.
Notes
Booleans (.true./.false.) are converted to Python True/False.
Fortran-style scientific notation with ‘d’ (e.g., 1.23d-04) is converted to float.
Strings in quotes are stripped of the quotes.
Stops parsing at the Fortran namelist terminator ‘/’.