yt.extensions.volume_rendering.ColorTransferFunction

class yt.extensions.volume_rendering.ColorTransferFunction(x_bounds, nbins=256)

A complete set of transfer functions for standard color-mapping.

This is the best and easiest way to set up volume rendering. It creates field tables for all three colors, their alphas, and has support for sampling color maps and adding independent color values at all locations. It will correctly set up the MultiVariateTransferFunction.

Parameters :

x_bounds : tuple of floats

The min and max for the transfer function. Values below or above these values are discarded.

nbins : int

How many bins to calculate; in betwee, linear interpolation is used, so low values are typically fine.

Methods

add_field_table(table, field_id[, ...]) This accepts a table describing integration.
add_gaussian(location, width, height) Add a Gaussian distribution to the transfer function.
add_layers(N[, w, mi, ma, alpha, colormap]) Add a set of Gaussians based on an existing colormap.
add_step(start, stop, value) Adds a step function to the transfer function.
link_channels(table_id[, channels]) Link an image channel to a field table.
plot(filename) Save an image file of the transfer function.
sample_colormap(v, w[, alpha, colormap]) Add a Gaussian based on an existing colormap.

Previous topic

yt.extensions.volume_rendering.Camera.zoomin

Next topic

yt.extensions.volume_rendering.ColorTransferFunction.add_field_table

This Page