yt.data_objects.selection_data_containers.YTEllipsoidBase

class yt.data_objects.selection_data_containers.YTEllipsoidBase(center, A, B, C, e0, tilt, fields=None, ds=None, field_parameters=None, data_source=None)[source]

By providing a center,*A*,*B*,*C*,*e0*,*tilt* we can define a ellipsoid of any proportion. Only cells whose centers are within the ellipsoid will be selected.

Parameters:

center : array_like

The center of the ellipsoid.

A : float

The magnitude of the largest axis (semi-major) of the ellipsoid.

B : float

The magnitude of the medium axis (semi-medium) of the ellipsoid.

C : float

The magnitude of the smallest axis (semi-minor) of the ellipsoid.

e0 : array_like (automatically normalized)

the direction of the largest semi-major axis of the ellipsoid

tilt : float

After the rotation about the z-axis to allign e0 to x in the x-y plane, and then rotating about the y-axis to align e0 completely to the x-axis, tilt is the angle in radians remaining to rotate about the x-axis to align both e1 to the y-axis and e2 to the z-axis.

Examples :

——– :

>>> import yt :

>>> ds = yt.load(“RedshiftOutput0005”) :

>>> c = [0.5,0.5,0.5] :

>>> ell = ds.ellipsoid(c, 0.1, 0.1, 0.1, np.array([0.1, 0.1, 0.1]), 0.2) :

Attributes

Methods