The utils module

Some utils functions.

netsalt.utils.from_complex(freq)[source]

Convert mode array to complex number.

netsalt.utils.get_scan_grid(graph)[source]

Return arrays of values to scan in complex plane from graph parameters.

graph (graph): graph with wavenumber scan parameters

netsalt.utils.linewidth(k, k_center, width)[source]

Linewidth function.

Parameters
  • k (float) – wavenumber

  • k_center (float) – wavenumber for center of linewidth

  • width (float) – width of linewidth

netsalt.utils.lorentzian(k, graph)[source]

Lorentzian function using linewidth.

Parameters
  • k (float) – wavenumber

  • graph (graph) – graph with linewidth parameters k_a and gamma_perp

netsalt.utils.order_edges_by(graph, order_by_values)[source]

Order edges by using values in a list.

netsalt.utils.remove_pixel(graph, center, size)[source]

Create the pump with missing pixel and add corresponding nodes on the graph.

netsalt.utils.to_complex(mode)[source]

Convert mode array to complex number.