osirispy module
Module methods
Module classes
- class osirispy.os_data(datatype)[source]
Bases:
object
A class to represent a generic OSIRIS output data object.
- Parameters
datatype (str) – The type of OSIRIS data (‘grid’, ‘particles’ our ‘tracks’)
- property datatype
- class osirispy.grid(fname)[source]
Bases:
os_data
A class used to represent a grid data object
- Parameters
dims (int) – A formatted string to print out what the animal says
axis (list of
axis
) – A list of axis objects containg the spatial limits of the griddata (
np.array
) – The grid datalabel (str) – The label of the quantity in the grid
time_s (
np.float
) – The timestamp of the grid file
- class osirispy.axis(nx, lims, label)[source]
Bases:
object
A class used to represent an axis object
:param nx : The number of points along the axis :type nx: int :param ax_arr : The array containing the axis poins :type ax_arr :
np.array
:param label: The axis label :type label : str
- class osirispy.raw(fname, req_quants)[source]
Bases:
os_data
A class used to represent a particles data object
- Parameters
data (dict of (str,np.arrays)) – a dictionary containing the required quantities
label (dict of (str,str)) – a dictionary containing the labels of required quantities
time_s (np.float) – the timestamp of the grid file
- __init__(fname, req_quants)[source]
Constructs all the necessary attributes for the raw object. Loads the required quantities (if available) into a dictionary of np.arrays whose keys are the requeired quantities.
- Parameters
fname (str) – The path to the osiris data file
req_quants (list of str) – A list containing the required quantities
- Raises
KeyError – If a required quantity is not available on the file
- class osirispy.track(fname, req_quants)[source]
Bases:
os_data
A class used to represent a tracks data object
- Parameters
data (dict of (str,list of np.arrays)) – a dictionary containing the required quantities for each particle
label (dict of (str,str)) – a dictionary containing the labels of required quantities
- __init__(fname, req_quants)[source]
Constructs all the necessary attributes for the tracks object. Reads fname and loads the required quantities (if available) into a dictionary of lists np.arrays whose keys are the requeired quantities.
- Parameters
fname (str) – The path to the osiris data file
req_quants (list of str) – A list containing the required quantities
- Raises
KeyError – If a required quantity is not available on the file