suncasa.dspec.sources.eovsa
Functions
|
Read EOVSA Dynamic Spectrum FITS file <filename> and return a spectrogram dictionary. |
Module Contents
- suncasa.dspec.sources.eovsa.get_dspec(filename, doplot=False, vmax=None, vmin=None, norm=None, cmap=None)[source]
Read EOVSA Dynamic Spectrum FITS file <filename> and return a spectrogram dictionary. Optionally show an overview plot if doplot switch is set.
Example:
>>> from suncasa.eovsa import eovsa_dspec as ds >>> from astropy.time import Time >>> from matplotlib.colors import LogNorm ## Read EOVSA Dynamic Spectrum FITS file <filename> >>> filename = 'EOVSA_TPall_20170713.fts' >>> s = ds.get_dspec(filename, doplot=True, cmap='gist_heat', norm=LogNorm(vmax=2.1e3, vmin=40)) ## To access the data in the spectrogram object, use >>> spec = s['spectrogram'] ## (Array of amplitudes in SFU, of size nfreq,ntimes) >>> fghz = s['spectrum_axis'] ## (Array of frequencies in GHz, of size nfreq) >>> tim = Time(s['time_axis'], format='mjd') ## (Array of UT times in astropy.time object, of size ntimes)
- param filename:
- type filename:
filename of the spectrogram fits file
- param doplot:
- type doplot:
Boolean, optional
- param vmin:
- type vmin:
scalar, optional
- param vmax:
- type vmax:
scalar, optional
- param When using scalar data and no explicit norm:
- param vmin and vmax:
- param define the data range that the colormap covers. By default:
:param : :param the colormap covers the complete value range of the supplied data.: :param vmin: :param vmax are ignored if the norm parameter is used.: :param norm: :type norm: matplotib.colors Normalization object or str, optional :param The Normalize instance used to scale scalar data to the [0: :param 1]: :param range before mapping to colors using cmap. By default: :param a linear: :param scaling mapping the lowest value to 0 and the highest to 1 is used.: :param This parameter is ignored for RGB(A) data.: :param cmap: :type cmap: matplotib.colors.Colormap or str :param A colormap instance or the name of a registered colormap.:
- returns:
spectrogram
- rtype:
dictionary