yt.visualization.volume_rendering.camera.allsky_projection

yt.visualization.volume_rendering.camera.allsky_projection(ds, center, radius, nside, field, weight=None, inner_radius=10, rotation=None, data_source=None)[source]

Project through a dataset, through an allsky-method decomposition from HEALpix, and return the image plane.

This function will accept the necessary items to integrate through a volume over 4pi and return the integrated field of view to the user. Note that if a weight is supplied, it will multiply the pre-interpolated values together.

Parameters:

ds : ~yt.data_objects.api.Dataset

This is the dataset to volume render.

center : array_like

The current “center” of the view port – the focal point for the camera.

radius : float or list of floats

The radius to integrate out to of the image.

nside : int

The HEALpix degree. The number of rays integrated is 12*(Nside**2) Must be a power of two!

field : string

The field to project through the volume

weight : optional, default None

If supplied, the field will be pre-multiplied by this, then divided by the integrated value of this field. This returns an average rather than a sum.

inner_radius : optional, float, defaults to 0.05

The radius of the inner clipping plane, in units of the dx at the point at which the volume rendering is centered. This avoids unphysical effects of nearby cells.

rotation : optional, 3x3 array

If supplied, the vectors will be rotated by this. You can construct this by, for instance, calling np.array([v1,v2,v3]) where those are the three reference planes of an orthogonal frame (see ortho_find).

data_source : data container, default None

If this is supplied, this gives the data source from which the all sky projection pulls its data from.

Returns:

image : array

An ((Nside**2)*12,1,3) array of the final integrated values, in float64 form.

Examples

>>> image = allsky_projection(ds, [0.5, 0.5, 0.5], 1.0/ds['mpc'],
                  32, "temperature", "density")
>>> plot_allsky_healpix(image, 32, "healpix.png")