Glue Logo
stable
  • Installing and running glue
  • Getting started
  • Advanced User Interface Guide
  • Using the IPython terminal in Glue
  • Working with Data objects
  • Starting Glue from Python
  • Working with non-glue data objects
  • Visualizing Astronomical Dendrograms
  • Introduction to customizing/extending glue
  • List of available plugins
  • Configuring Glue via a startup file
  • Customizing your Glue environment
  • Distributing your own plugin package
  • Customizing the coordinate system of a data object
  • Programmatically configuring viewers
  • Writing a simple custom data viewer
  • Watching data for changes
  • Custom fitting plugins
  • Unit conversion in glue
  • Writing a custom viewer for glue
  • Writing a custom viewer for glue with Qt
  • Writing a custom viewer for glue with Qt and Matplotlib
  • Custom tools for viewers and custom toolbars
  • Defining your own data objects
  • Demo Videos
  • Frequently Asked Questions
  • Getting Help with Glue
  • Known issues and solutions
  • The selection/subset framework
  • The communication framework
  • The linking framework
  • Developer Guide
  • API
    • Core Data
      • glue.core.component Module
      • glue.core.component_id Module
      • glue.core.component_link Module
        • Classes
      • glue.core.coordinates Module
      • glue.core.data Module
      • glue.core.data_collection Module
      • glue.core.hub Module
      • glue.core.subset Module
      • glue.core.subset_group Module
      • glue.core.roi Module
      • glue.core.link_helpers Module
      • glue.core.data_factories Package
      • glue.core.fitters Module
      • glue.core.state_objects Module
      • glue.core.exceptions Module
      • glue.core.session Module
    • User Interface
    • Utilities
    • Plugins
Glue
  • API
  • BinaryComponentLink
  • Edit on GitHub

BinaryComponentLink¶

class glue.core.component_link.BinaryComponentLink(left, right, op)[source]¶

Bases: ComponentLink

A ComponentLink that combines two inputs with a binary function

Parameters:
leftComponentID, ComponentLink, or number

The first input argument.

rightComponentID, ComponentLink, or number

The second input argument.

opfunc

A function with two inputs that works on numpy arrays.

The ComponentLink represents the logic of applying `op` to the
data associated with the inputs `left` and `right`.

Methods Summary

compute(data[, view])

For a given data set, compute the component comp_to given the data associated with each comp_from and the using function

replace_ids(old, new)

Replace all references to an old ComponentID with references to new.

Methods Documentation

compute(data, view=None)[source]¶

For a given data set, compute the component comp_to given the data associated with each comp_from and the using function

This raises an glue.core.exceptions.IncompatibleAttribute if the data set doesn’t have all the ComponentIDs needed for the transformation

Parameters:
data~glue.core.data.Data

The data set to use.

viewslice or tuple, optional

Optional view (e.g. slice) through the data to use.

Returns:
result

The data associated with comp_to component

replace_ids(old, new)[source]¶

Replace all references to an old ComponentID with references to new.

Parameters:
oldComponentID

ComponentID to replace.

newComponentID

ComponentID to replace with.

Previous Next

© Copyright 2012-2019, Chris Beaumont, Thomas Robitaille, Michelle Borkin. Revision 1481b7f8.

Built with Sphinx using a theme provided by Read the Docs.
Read the Docs v: stable
Versions
latest
stable
v0.8.x
v0.8.0
v0.7.2
v0.7.1
v0.7.x
v0.7.0
rtd
main
Downloads
On Read the Docs
Project Home
Builds