yt.data_objects.selection_data_containers.YTDiskBase

class yt.data_objects.selection_data_containers.YTDiskBase(center, normal, radius, height, fields=None, ds=None, field_parameters=None, data_source=None)[source]

By providing a center, a normal, a radius and a height we can define a cylinder of any proportion. Only cells whose centers are within the cylinder will be selected.

Parameters:

center : array_like

coordinate to which the normal, radius, and height all reference

normal : array_like

the normal vector defining the direction of lengthwise part of the cylinder

radius : float

the radius of the cylinder

height : float

the distance from the midplane of the cylinder to the top and bottom planes

fields : array of fields, optional

any fields to be pre-loaded in the cylinder object

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

Examples

>>> import yt
>>> ds = yt.load("RedshiftOutput0005")
>>> c = [0.5,0.5,0.5]
>>> disk = ds.disk(c, [1,0,0], (1, 'kpc'), (10, 'kpc'))

Attributes

Methods