Spectrogram Software

From EOVSA Wiki
Revision as of 01:43, 27 September 2016 by Sshaik (talk | contribs)
Jump to navigation Jump to search

EOVSA Python Spectrogram Object (v0.1)

The module spectrogram.py defines a Spectrogram class that allows the creation of an object for reading, displaying, and gaining access to the EOVSA total power data from the “interim” Miriad data files. Because the object directly accesses these files, it will work only when logged in and running from the dpp computer, although this may change with further development of the code.

Minimal Use of Object

As a short example of the use the module from the dpp, start ipython and at the prompt type: import spectrogram as sp from util import Time trange = Time(['2015-05-05 22:00:00','2015-05-05 22:30:00']) s = sp.Spectrogram(trange) s.explore() This will find the files corresponding to the half-hour period indicated by the timerange trange, read the data, apply calibration and background subtraction, and display the data in three separate panels: as a spectrogram (dynamic spectrum), instantaneous spectrum, and lightcurve for a single frequency. By clicking and dragging the mouse in the dynamic spectrum panel, one can control which frequency is displayed in the lightcurve panel, and which time is displayed in the spectrum panel. One can use the usual plot control icons to zoom, pan, select, print, etc. In the instantaneous spectrum panel, a fit of the Stähli function is overplotted on the spectral points. Figure 1 shows the result of the above commands.


n this example the default settings are used, which includes performing total power calibration, background subtraction, and taking the median over all antennas and the two polarizations. It also defaults to displaying the entire time range, and only the frequencies between 2.5 and 18 GHz (frequency indexes 116:448). Each of these is controlled by setting the corresponding values as follows: s.docal = True (apply calibration) s.bidx = [0, 100] (develop background spectrum as median over range 0:100 – default) s.dosub = True (perform background subtraction over range specified in s.bidx) s.showants = range(nants) (display/select data for this list of antennas) s.domedian = True (calculate median over all antennas in s.showants list) Once the spectrogram has been displayed, s.ax (handle to matplotlib axis on which the plot is displayed) can be used to manipulate the plot, e.g. for adding text (s.ax.set_text()) or plot labels (s.ax.set_xlabel()), etc.

Selecting Data for Plotting/Retrieving