yt.visualization.volume_rendering.camera.
off_axis_projection
(ds, center, normal_vector, width, resolution, field, weight=None, volume=None, no_ghost=False, interpolated=False, north_vector=None, method='integrate')[source]¶Project through a dataset, off-axis, and return the image plane.
This function will accept the necessary items to integrate through a volume at an arbitrary angle 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, then create cell-centered values, then interpolate within the cell to conduct the integration.
Parameters: | ds : ~yt.data_objects.api.Dataset
center : array_like
normal_vector : array_like
width : float or list of floats
resolution : int or list of ints
field : string
weight : optional, default None
volume : yt.extensions.volume_rendering.AMRKDTree, optional
no_ghost: bool, optional :
interpolated : optional, default False
method : string
|
---|---|
Returns: | image : array
|
Examples
>>> image = off_axis_projection(ds, [0.5, 0.5, 0.5], [0.2,0.3,0.4],
0.2, N, "temperature", "density")
>>> write_image(np.log10(image), "offaxis.png")