Create a fixed resolution cutting plane, from that a plot, and add it to the current collection.
A cutting plane is an oblique slice through the simulation volume, oriented by a specified normal vector that is perpendicular to the image plane. This function will slice through, but instead of retaining all the data necessary to rescale the cutting plane at any width, it only retains the pixels for a single width. This function will generate a yt.lagos.AMRFixedResCuttingPlaneBase from the given parameters. This image buffer then gets passed to a yt.raven.FixedResolutionPlot, and the resultant plot is added to the current collection. Various parameters allow control of the way the slice is displayed, as well as how the plane is generated.
Parameters : | field : string
normal : array_like
width : float
res : int
center : array_like, optional
use_colorbar : bool, optional
figure : matplotlib.figure.Figure, optional
axes : matplotlib.axes.Axes, optional
fig_size : tuple of floats
obj : AMRCuttingPlaneBase, optional
field_parameters : dict, optional
|
---|---|
Returns : | plot : yt.raven.FixedResolutionPlot
|
See also
Examples
Here’s a simple mechanism for getting the angular momentum of a collapsing cloud and generating a cutting plane aligned with the angular momentum vector.
>>> pf = load("RD0005-mine/RedshiftOutput0005")
>>> v, c = pf.h.find_max("Density")
>>> sp = pf.h.sphere(c, 1000.0/pf['au'])
>>> L = sp.quantities["AngularMomentumVector"]()
>>> pc = PlotCollection(pf)
>>> p = pc.add_fixed_res_cutting_plane("Density", L, 1000.0/pf['au'])