mnoptical.visualize_topo

This File creates a Topology visualization using the Network object using Dash which builts upon react.js and flask

Requirements:

pip install dash pip install dash-cytoscape

Use the import statement

from mnoptical.visualize_topo import visualize_topology

Call the function visualize_topology(<Network class>)

Open http://127.0.0.1:8050 in the browser after calling the function

Module Contents

Functions

extract_power(component[, mode])

:param component : Component (Amplifiers, ROADM) for which power needs to be extracted

visualize_topology(net)

param net:

Network Object

visualize(net)

param net:

Network Object

mnoptical.visualize_topo.extract_power(component, mode='in')

:param component : Component (Amplifiers, ROADM) for which power needs to be extracted :param mode: The power values to extracted from input or output mode :return signal_index: Returns signal_index (channel index used for transmission) :return power: Returns power (power values at the port in transmission)

mnoptical.visualize_topo.visualize_topology(net)
Parameters:

net – Network Object

Returns:

Calls the Network Visualization function in a separate thread

mnoptical.visualize_topo.visualize(net)
Parameters:

net – Network Object

Returns:

Creates a server accessible at http://127.0.0.1:8050 with Network Topology