amr package
amr.AmrOpal module
- class amr.AmrOpal.AmrOpal[source]
Bases:
object
Plotter class for AMR data comming from OPAL.
- line_plot(axis, field, **kwargs)[source]
Plot a line plot of 3D data along an axis
- Parameters:
axis (str) – Take a line cut along this axis (‘x’, ‘y’, ‘z’)
unit (str, optional) – Unit of y-axis
figsize ((int, int), optional) – Size of the figure, default: (12, 9)
dpi (int, optional) – Resolution
- load_file(dirname, showme=False)[source]
- Parameters:
dirname (list) – Directory name that contains a Header file and Level_x (x = 0, 1, 2, …) directories.
showme (str, optional) – Print fields and derived fields in dataset
- particle_phase_space_plot(axis, **kwargs)[source]
Plot particle phase spaces etc of 3D data
10. March 2018 http://yt-project.org/doc/reference/api/yt.visualization.particle_plots.html#yt.visualization.particle_plots.ParticlePlot
- Parameters:
axis (str) – ‘x’, ‘y’ or ‘z’
coordinate_unit (str, optional) –
momentum_unit (str, optional) –
color (str, optional) –
deposition (str, optional) –
fontsize (int, optional) –
- particle_plot(x_field, y_field, z_field=None, **kwargs)[source]
Plot particle phase spaces etc of 3D data
10. March 2018 http://yt-project.org/doc/reference/api/yt.visualization.particle_plots.html#yt.visualization.particle_plots.ParticlePlot
- Parameters:
x_field (str) – Particle field plotted on x-axis
y_field (str) – Particle field plotted on y-axis
z_field (str, optional) – Field to be displayed on the colorbar
x_unit (str, optional) –
y_unit (str, optional) –
z_unit (str, optional) –
z_log (bool, optional) –
color (str, optional) –
fontsize (int, optional) –
deposition (str, optional) –
- projection_plot(axis, field, **kwargs)[source]
Plot a projection of 3D data
- Parameters:
axis (str) – Is the direction ‘x’, ‘y’ or ‘z’
field (str) – Quantity to plot
unit (str, optional) – The data should be converted to (otherwise it takes the default given by the data)
zoom (float) – Is the zoom factor (default: 1, i.e. no zoom)
color (str, optional) – Is the color for the time stamp and scale annotation
origin (str, optional) – Location of the origin of the plot coordinate system
method (str, optional) –
- Method of projection (‘mip’, ‘sum’, ‘integrate’)
’mip’: maximum of field in the line of sight
’sum’: summation of the field along the given axis
’integrate’: integrate the requested field along the line of sight
overlay_particles (bool, optional) –
time (bool, optional) –
gridcmap (str, optional) –
grids (bool, optional) –
- slice_plot(normal, field, **kwargs)[source]
Plot a slice through 3D data
- Parameters:
normal (str) – Is the direction ‘x’, ‘y’ or ‘z’ (normal)
field (str) – Quantity to plot
unit (str, optional) – The data should be converted to (otherwise it takes the default given by the data)
zoom (float, optional) – Is the zoom factor (default: 1, i.e. no zoom)
color (str, optional) – Is the color for the time stamp and scale annotation
origin (str, optional) – Location of the origin of the plot coordinate system
overlay_particles (bool, optional) –
time (bool, optional) –
gridcmap (str, optional) –
grids (bool, optional) –