pynbody.sph.renderers.ImageGeometry#
- class pynbody.sph.renderers.ImageGeometry[source]#
Bases:
objectA class to store the geometry of an image to be rendered.
- Attributes:
- width
Methods
copy()Return a copy of this geometry object.
Restrict the z range to the same as the x range
set_camera_z(z)Set the z position of the camera for the image to be rendered.
set_nside(nside)Set the nside of the healpix image to be rendered.
set_resolution(resolution)Set the resolution of the image to be rendered, in pixels.
set_width(width)Set the width of the image to be rendered.
- copy() ImageGeometry[source]#
Return a copy of this geometry object.
- set_camera_z(z: float)[source]#
Set the z position of the camera for the image to be rendered.
A perspective image will be rendered with the camera at this z position, looking at the z_plane. The frustrum is defined by the x1, x2, y1, y2 values, which are at z=0.
- set_nside(nside: int)[source]#
Set the nside of the healpix image to be rendered.
Note that this only has any effect for spherical healpix images.
- set_width(width: float)[source]#
Set the width of the image to be rendered. The image will be centered on the origin.
You probably want to access this via the
ImageRenderer.set_width()method of the renderer, which can accept and convert units as needed.