read_muram_header

PlasmaCalcs.hookups.muram.muram_io_tools.read_muram_header(filename)

Parse Muram Header.NNN file into a dictionary, containing:

‘order’: 3-tuple containing 0,1,2 in same order as layout.order file
‘N0’, ‘N1’, ‘N2’: number of cells in 0th, 1st, 2nd dimensions in data files.
‘Nx’, ‘Ny’, ‘Nz’: number of cells in x, y, z dimensions
‘dx’, ‘dy’, ‘dz’: cell width in each dimension
‘t’: time of this snapshot, in ‘raw’ units.
‘snap_s’: snap number as a string, e.g. ‘004321’
‘dirname’: directory containing the header file.
Header file should contain at least 7 numbers, separated by whitespace:
size0 size1 size2 ds0 ds1 ds2 time
telling the number of cells (sizex) and cell width (dsx) in each dimension x=0,1,2,
and the time t of this snapshot.
params are mapped to x,y,z via the ‘layout.order’ file (in same dir as Header.NNN file).
‘layout.order’ should contain only:
0 1 2
in any order, separated by whitespace.
then e.g. the x size will be [size0, size1, size2][order[0]].
(for y use order[1]; for z use order[2].)
The dimensions in memmap files correspond to the order here;
MuramCalculator.load_direct() handles transposing appropriately.