viscid.calculator.topology module

I don’t know if this is worth keeping as its own module, TOPOLOGY_* is copied here so that one can import this module without needing to have built the cython module streamline.pyx

viscid.calculator.topology.topology2color(topology, topo_style='msphere', bad_color=None)[source]

Determine RGB from topology value

Parameters:
  • topology (int, list, ndarray) – some value in calculator.streamline.TOPOLOGY_*
  • topo_style (string) – msphere, or a dict with its own mapping
  • bad_color (tuple) – rgb color for invalid topologies
Returns:

Nx3 array of rgb data or (R, G, B) tuple if topology is a single value