yt.data_objects.selection_data_containers.YTCuttingPlaneBase

class yt.data_objects.selection_data_containers.YTCuttingPlaneBase(normal, center, north_vector=None, ds=None, field_parameters=None, data_source=None)[source]

This is a data object corresponding to an oblique slice through the simulation domain.

This object is typically accessed through the cutting object that hangs off of index objects. A cutting plane is an oblique plane through the data, defined by a normal vector and a coordinate. It attempts to guess an ‘north’ vector, which can be overridden, and then it pixelizes the appropriate data onto the plane without interpolation.

Parameters:

normal : array_like

The vector that defines the desired plane. For instance, the angular momentum of a sphere.

center : array_like

The center of the cutting plane, where the normal vector is anchored.

north_vector: array_like, optional :

An optional vector to describe the north-facing direction in the resulting plane.

ds: Dataset, optional :

An optional dataset to use rather than self.ds

field_parameters : dictionary

A dictionary of field parameters than can be accessed by derived fields.

data_source: optional :

Draw the selection from the provided data source rather than all data associated with the data_set

Notes

This data object in particular can be somewhat expensive to create. It’s also important to note that unlike the other 2D data objects, this object provides px, py, pz, as some cells may have a height from the plane.

Examples

>>> import yt
>>> ds = yt.load("RedshiftOutput0005")
>>> cp = ds.cutting([0.1, 0.2, -0.9], [0.5, 0.42, 0.6])
>>> print cp["Density"]

Attributes

Methods