yt.visualization.volume_rendering.camera.Camera.snapshot

Camera.snapshot(fn=None, clip_ratio=None, double_check=False, num_threads=0, transparent=False)[source]

Ray-cast the camera.

This method instructs the camera to take a snapshot – i.e., call the ray caster – based on its current settings.

Parameters:

fn : string, optional

If supplied, the image will be saved out to this before being returned. Scaling will be to the maximum value.

clip_ratio : float, optional

If supplied, the ‘max_val’ argument to write_bitmap will be handed clip_ratio * image.std()

double_check : bool, optional

Optionally makes sure that the data contains only valid entries. Used for debugging.

num_threads : int, optional

If supplied, will use ‘num_threads’ number of OpenMP threads during the rendering. Defaults to 0, which uses the environment variable OMP_NUM_THREADS.

transparent: bool, optional :

Optionally saves out the 4-channel rgba image, which can appear empty if the alpha channel is low everywhere. Default: False

Returns:

image : array

An (N,M,3) array of the final returned values, in float64 form.