The yt Project 3.2
  • How to get help
  • Quickstart notebooks
  • Cookbook
  • Site
      • Getting and Installing yt
        • Getting yt
        • Testing Your Installation
        • Switching between yt-2.x and yt-3.x
      • yt Quickstart
        • Introduction
        • Data Inspection
        • Simple Visualization
        • Data Objects and Time Series
        • Derived Fields and Profiles
        • Volume Rendering
      • What’s New and Different in yt 3.0?
        • Updating to yt 3.0 from Old Versions (and going back)
        • Converting Old Scripts to Work with yt 3.0
        • Cool New Things
        • API Changes
      • The Cookbook
        • Getting the Sample Data
        • Example Scripts
        • Example Notebooks
      • Visualizing Data
        • How to Make Plots
        • Plot Modifications: Overplotting Contours, Velocities, Particles, and More
        • Using the Manual Plotting Interface
        • Volume Rendering: Making 3D Photorealistic Isocontoured Images
        • Hardware Volume Rendering on NVidia Graphics cards
        • 3D Surfaces and Sketchfab
        • Mapserver - A Google-Maps-like Interface to your Data
        • Streamlines: Tracking the Trajectories of Tracers in your Data
        • Colormaps
        • Writing FITS Images
      • General Data Analysis
        • Fields in yt
        • Creating Derived Fields
        • Data Objects
        • Symbolic Units
        • Filtering your Dataset
        • Generating Processed Data
        • Time Series Analysis
        • Parallel Computation With yt
      • Topic-Specific Analysis Modules
        • Halo Analysis
        • Synthetic Observation
        • Exporting to External Radiation Transport Codes
        • Two Point Functions
        • Clump Finding
        • Particle Trajectories
        • Halo Ellipsoid Analysis
      • Loading and Examining Data
        • Loading Data
        • Loading Generic Array Data
        • Loading Generic Particle Data
        • Loading Spherical Data
        • Low-Level Data Inspection: Accessing Raw Data
      • Developing in yt
        • Getting Involved
        • How to Develop yt
        • Documentation
        • Testing
        • Debugging yt
        • Creating Data Objects
        • Creating Derived Fields
        • Creating Derived Quantities
        • Creating A New Code Frontend
        • Using yt with External Analysis Tools
      • Reference Materials
        • Code Support
        • Command-Line Usage
        • API Reference
        • Customizing yt: The Configuration and Plugin Files
        • Field List
        • ChangeLog
      • Frequently Asked Questions
        • Version & Installation
        • Code Errors and Failures
        • Units
        • Fields
        • Data Objects
        • Developing
        • Miscellaneous
      • Getting Help
        • Don’t panic and don’t give up
        • Update to the latest version
        • Search the documentation, FAQ, and mailing lists
        • Look at the source code
        • Isolate and document your problem
        • Go on IRC to ask a question
        • Ask the mailing list
        • Submit a bug report
        • Special Issues
      • About yt
        • What is yt?
        • Who is yt?
        • History of yt
        • How do I contact yt?
        • How do I cite yt?
  • Page
      • yt.visualization.volume_rendering.transfer_functions.ProjectionTransferFunction.link_channels

yt.visualization.volume_rendering.transfer_functions.ProjectionTransferFunction.link_channels¶

ProjectionTransferFunction.link_channels(table_id, channels=0)¶

Link an image channel to a field table.

Once a field table has been added, it can be linked against a channel (any one of the six – red, green, blue, red absorption, green absorption, blue absorption) and then the value calculated for that field table will be added to the integration for that channel. Not all tables must be linked against channels.

Parameters:

table_id : int

The 0-indexed table to link.

channels : int or list of ints

The channel or channels to link with this table’s calculated value.

Examples

This example shows how to link a new transfer function against field 0, and then link that table against all three RGB channels. Typically an absorption (or ‘alpha’) channel is also linked.

>>> mv = MultiVariateTransferFunction()
>>> tf = TransferFunction( (-10.0, -5.0) )
>>> tf.add_gaussian( -7.0, 0.01, 1.0)
>>> mv.add_field_table(tf, 0)
>>> mv.link_channels(0, [0,1,2])
© Copyright 2013, the yt Project. Created using Sphinx 1.3.1.