Pload Module
- class pysunrunner.pload.pload(ns, w_dir=None, datatype=None, level=0, x1range=None, x2range=None, x3range=None)[source]
Bases:
object- DataScan(fp, n1, n2, n3, endian, dtype, off=None)[source]
Scans the data files in all formats. Inputs:
fp – Data file pointer
n1 – No. of points in X1 direction
n2 – No. of points in X2 direction
n3 – No. of points in X3 direction
endian – Endianess of the data
dtype – datatype, eg : dbl, flt, vtk, hdf5
off – offset (for avoiding staggered B fields)
- Output:
Dictionary consisting of variable names as keys and its values.
- DataScanHDF5(fp, myvars, ilev)[source]
Scans the Chombo HDF5 data files for AMR in PLUTO. Inputs:
fp – Data file pointer
myvars – Names of the variables to read
ilev – required AMR level
- Output:
Dictionary consisting of variable names as keys and its values.
- Note:
Due to the particularity of AMR, the grid arrays loaded in ReadGridFile are overwritten here.
- DataScanVTK(fp, n1, n2, n3, endian, dtype)[source]
Scans the VTK data files.
Inputs: fp – Data file pointer
n1 – No. of points in X1 direction
n2 – No. of points in X2 direction
n3 – No. of points in X3 direction
endian – Endianess of the data
dtype – datatype Output:
Dictionary consisting of variable names as keys and its values.
- ReadDataFile(num)[source]
Reads the data file generated from PLUTO code. Inputs:
num – Data file number in form of an Integer.
- Outputs:
Dictionary that contains all information about Grid, Time and variables.
- ReadGridFile(gridfile)[source]
Read grid values from the grid.out file. Inputs:
gridfile – name of the grid.out file which has information about the grid.
- ReadMultipleFiles(nstr, dataext, myvars, n1, n2, n3, endian, dtype, ddict)[source]
Reads a multiple data files, varname.****.dataext. Inputs:
nstr – File number in form of a string
dataext – Data type of the file, e.g., ‘dbl’, ‘flt’ or ‘vtk’
myvars – List of variable names to be read
n1 – No. of points in X1 direction
n2 – No. of points in X2 direction
n3 – No. of points in X3 direction
endian – Endianess of the data
dtype – datatype
ddict – Dictionary containing Grid and Time Information which is updated.
- Output:
Updated Dictionary consisting of variable names as keys and its values.
- ReadSingleFile(datafilename, myvars, n1, n2, n3, endian, dtype, ddict)[source]
Reads a single data file, data.****.dtype. Inputs:
datafilename – Data file name
myvars – List of variable names to be read
n1 – No. of points in X1 direction
n2 – No. of points in X2 direction
n3 – No. of points in X3 direction
endian – Endianess of the data
dtype – datatype
ddict – Dictionary containing Grid and Time Information which is updated
- Output:
Updated Dictionary consisting of variable names as keys and its values.