PlasmaCalcs.hookups.bifrost.bifrost_io_tools.read_bifrost_snap_idl
- PlasmaCalcs.hookups.bifrost.bifrost_io_tools.read_bifrost_snap_idl(filename, *, eval=True, strip_strs=True)
- Parse Bifrost snapname_NNN.idl file into a dictionary.
- filename: string
- file to read from.
- eval: bool, default True
- whether to attempt to evaluate the values,using ast.literal_eval (safer but less flexible than eval).False –> values will remain as strings.True –> try to evaluate values but use strings if evaluation fails.Also convert ‘.true.’ and ‘.false.’ to True and False, case-insensitively.
- strip_strs: bool, default True
- whether to strip whitespace from all string values in result, after eval.
File formatting notes:- semicolons (;) are used for comments. (idl format)- ignore blank lines & lines that don’t assign a variable (missing ‘=’)- ignores all leading & trailing whitespace in vars & values.- might use ‘.true.’ and ‘.false.’ for booleans.