Parameter Parsing¶
Parse and handle parameters. These functions exist primarily to standardize reading simulation parameters from a number of sources, and name them ~generally the same things.
-
pyharm.parameters.fix(params)¶ Fix a bunch of common problems and omissions in parameters dictionaries. Already called by both parameter parsing functions.
-
pyharm.parameters.parse_iharm3d_dat(params, fname)¶ Parse the iharm3d params.dat file format to produce a Python dict. The params.dat format is:
[tag] name = value
Where tag is in {dbl, float, int, str} corresponding to desired datatype. All lines not in this format are ignored, though conventionally comments begin with ‘# ‘
-
pyharm.parameters.parse_parthenon_dat(string)¶ Parse the Parthenon/KHARMA params.dat format to produce a Python dict. The run.par format is:
<header/subheader>name = valueAll lines not in this format are ignored, though conventionally comments begin with ‘# ‘. This implementation does not distinguish packages (<>), nor line continuations (&) correctly.