pynbody.sph.render_spherical_image

pynbody.sph.render_spherical_image#

pynbody.sph.render_spherical_image(snap, qty='rho', nside=8, distance=10.0, kernel=<pynbody.sph.Kernel object>, kstep=0.5, denoise=None, out_units=None, threaded=None)[source]#

Render an SPH image on a spherical surface. Requires healpy libraries.

Keyword arguments:

qty (‘rho’): The name of the simulation array to render

nside (8): The healpix nside resolution to use (must be power of 2)

distance (10.0): The distance of the shell (for 3D kernels) or maximum distance

of the skewers (2D kernels)

kernel: The Kernel object to use (defaults to 3D spline kernel)

kstep (0.5): The sampling distance when projecting onto the spherical surface in units of the

smoothing length

denoise (False): if True, divide through by an estimate of the discreteness noise.

The returned image is then not strictly an SPH estimate, but this option can be useful to reduce noise.

threaded: if False, render on a single core. Otherwise, the number of threads to use.

Defaults to a value specified in your configuration files. Currently multi-threaded rendering is slower than single-threaded because healpy does not release the gil.