yt.extensions.volume_rendering.ColorTransferFunction.add_field_table

ColorTransferFunction.add_field_table(table, field_id, weight_field_id=-1, weight_table_id=-1)

This accepts a table describing integration.

A “field table” is a tabulated set of values that govern the integration through a given field. These are defined not only by the transmission coefficient, interpolated from the table itself, but the field_id that describes which of several fields the integration coefficient is to be calculated from.

Parameters :

table : TransferFunction

The integration table to be added to the set of tables used during the integration.

field_id : int

Each volume has an associated set of fields. This identifies which of those fields will be used to calculate the integration coefficient from this table.

weight_field_id : int, optional

If specified, the value of the field this identifies will be multiplied against the integration coefficient.

weight_table_id : int, optional

If specified, the value from the table this identifies will be multiplied against the integration coefficient.

Notes

This can be rather complicated. It’s recommended that if you are interested in manipulating this in detail that you examine the source code, specifically the function FIT_get_value in yt/_amr_utils/VolumeIntegrator.pyx.

Examples

This example shows how to link a new transfer function against field 0. Note that this by itself does not link a channel for integration against a field. This is because the weighting system does not mandate that all tables contribute to a channel, only that they contribute a value which may be used by other field tables.

>>> mv = MultiVariateTransferFunction()
>>> tf = TransferFunction( (-10.0, -5.0) )
>>> tf.add_gaussian( -7.0, 0.01, 1.0)
>>> mv.add_field_table(tf, 0)

Previous topic

yt.extensions.volume_rendering.ColorTransferFunction

Next topic

yt.extensions.volume_rendering.ColorTransferFunction.add_gaussian

This Page