Helper functions for reading and modifying flash output files. For more infromation on using this module to make figures with matplotlib and yt, please refer to the following presentation: http://flash.uchicago.edu/site/flashcode/user_support/yt_flash_informal.pdf
Grabs the slice of a certain field (parameter, data) from the flash output file pf. This slice is performed at the coord along the axis.
This function requires both scipy and yt and returns x, y, and z data that is suitable for plotting with matplotlib.imshow().
Parameters : | axis : int
coord : float
field : str
pf : str or yt.data_objects.static_output
bounds : len-4 sequence of floats or None, optional
resolution : int or len-2 sequence of ints, optional
method : str, optional
kwargs : optional
|
---|---|
Returns : | xdat : 2d numpy array
ydat : 2d numpy array
zdat : 2d numpy array
|
Grabs the gradient of a slice of a certain field (parameter, data) from the flash output file pf. This slice is performed at the coord along the axis.
This function requires both scipy and yt and returns x, y, and z data that is suitable for plotting with matplotlib.imshow().
Parameters : | axis : int
coord : float
field : str
pf : str or yt.data_objects.static_output
bounds : len-4 sequence of floats or None, optional
resolution : int or len-2 sequence of ints, optional
method : str, optional
kwargs : optional
|
---|---|
Returns : | adat : 2d numpy array
bdat : 2d numpy array
dfdadat : 2d numpy array
dfdbdat : 2d numpy array
magdat : 2d numpy array
|
Grabs a line out (ray) of a certain field (parameter, data) from the flash output file pf.
This function requires both scipy and yt and returns x, y, z and value data that is suitable for plotting with matplotlib.plot().
Parameters : | p1 : three-tuple of floats
p2 : three-tuple of floats
field : str
pf : str or yt.data_objects.static_output
kwargs : optional
|
---|---|
Returns : | x : 1D numpy array
y : 1D numpy array
z : 1D numpy array
v : 1D numpy array
|
Finds the shock of a certain field (parameter, data) along a line out (ray) in a flash output file pf. Currently this assumes that p1 is closer to the center of the shock than p2. Moreover the geometry from the FLASH simulation must be cartesian or 2D cylindrical (rz).
Parameters : | p1 : three-tuple of floats
p2 : three-tuple of floats
field : str
pf : str or yt.data_objects.static_output
threshold : float, optional
min_threshold : float, optional
kwargs : optional
|
---|---|
Returns : | shock_p : three-tuple of floats
shock_v : field type (float)
|
See also
Reads in a LaserEnergyProfile.dat file as a numpy structured array.
Parameters : | filename : str or file-like
|
||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns : | dat : ndarray
|