SpectrumPlotter

class whampy.SpectrumPlotter(image_ax, line, data=None, over_data=None, over_line=None, average_beam=False, radius=None)[source]

Bases: object

Class to interactivly plot spectra from WHAM maps Click on a point on a map and a spectrum will be extracted cooresponding to the closest point on the Sky

Parameters:
image_ax: ‘axes`

containing the image / map’

line: ‘matplotlib.line.Line2D’

line that will be updated to match clicked spectra

data: ‘SkySurvey’, optional, must be keyword

WHAM data

over_data: ‘SkySurvey’ or ‘str’ or ‘spectral_cube.SpectralCube’, optional, must be keyword

Extra data to over plot spectra from if SkySurvey, assumed to be WHAM observations, perhaps at another wavelength if ‘str’, assumed to be a 3D FITS Data cube filename to be loaded as SpectralCube if ‘SpectralCube’, defaults to extracting closest spectra to click

over_line: matplotlib.line.Line2D’, optional, must be keyword

if over_data, must be provided line that will be udpated to match clicked spectra from over_data

average_beam: ‘bool’, optional, must be keyword

if True, instead over plots average spectrum from over_data within nearest WHAM beam

radius: ‘Quantity’ or ‘number’, optional, must be keyword

beam radius to average beam over if avreage_beam is True default is 0.5 degrees (WHAM beam)

Methods Summary

on_click(event)

Methods Documentation

on_click(event)[source]