spw_intersect

spw_intersect(spw_range, line_regions)[source]

This utility function takes a frequency range (as numbers with arbitrary but common units) and computes the intersection with a list of frequency ranges defining the regions of spectral lines. It returns the remaining ranges excluding the line frequency ranges.

Parameters:
  • spw_range (list[float]) -- List of two numbers defining the spw frequency range

  • line_regions (list[list[float]]) -- List of lists of pairs of numbers defining frequency ranges to be excluded

Returns:

List of lists of pairs of numbers defining the remaining frequency ranges

Return type:

list[list[float]]