Spectrogram Display and Analysis Software

Reading and Plotting the Dynamic Spectra

RSTO data can be analyzed in IDL in Python or with our LabView GUI. In the FITS archive you will find a directory listing of YYYYMMDD, please note that the current day fits files are found in a folder named 'realtime'. In each folder you will find a 'fts' directory, containing the sub directories low_freq (10-100 MHz), mid_freq (100-200 MHz), high_freq (200 - 400 MHz). Each directory contains fits files named with the follwing key BIR_YYYYMMDD_HHMMSS_XX.fit. The first three characters are the site identifier (Birr Castle in this case), followed by the year, month, day and hour, minute, second labels. The XX numerals are an identifier for our own purposes and have no physical meaning. Please download the data of your choice. 

The following instructions assumes the user has a recent version of IDL and an up-to-date SolarSoft (SSW) package, with the 'radio' branch installed. If you need to update your SSW package please do so at http://www.lmsal.com/solarsoft/ 

To read in the fits data, use the command 

IDL> radio_spectro_fits_read,'BIR_YYYYMMDD_HHMMSS_XX.fit',data,time,freq 

data contains the dynamic spectra. In the case of the RSTO CALLISTO fits, it will be an array with dimensions [3600, 200]. You can confirm this with a simple 'help,data' command. The dimensions indicate 200 frequency channels, and 3600 sweeps in time; all channels are sweeped every 0.25 seconds, giving 3600 sweeps in the 15 minute fits file. time contains the time tags for each of the 3600 columns in data, and freq contains the frequencies of the 200 rows in data. 

To plot the data into your current graphics device use the following command 

IDL> spectro_plot,data,time,freq 

The usual plotting keywords are also optional with the spectro_plot command. Use xrange=[t1,t2] for plotting specific times, where t1 and t2 are in UT, and yrange=[f1,f2] to chose a frequency range, where f1 and f2 are in the same units contained in the freq array (see above). Note that the commands stated above are specific for dynamic spectra. However, the more common readfits and tvscl, tvim, or plot_image tools may also be used to read and plot the data. 

To follow an example of the read and plot process, please download BIR_20110922_103000_01.fit and BIR_20110922_104459_01.fit, from the RSTO archives. Read in as follows 

IDL> radio_spectro_fits_read,'BIR_20110922_103000_01.fit',data0,time0,freq
IDL> radio_spectro_fits_read,'BIR_20110922_104459_01.fit',data1,time1,freq

Plotting data0 and data1 seperately using the following commands 

IDL> !p.multi=[0,2,1]
IDL> spectro_plot,data0,time0,freq
IDL> spectro_plot,data1,time1,freq 

should produce the following

   Figure 1. Default plot for data1 and data2. Note the default does not display the frequency axis,
    or fill the array with available plot space. The radio bursts are not very discernable.

Insert the two spectrograms and time arrays into respective master arrays in order to view the two as a whole spectrogram, and replot

IDL> !p.multi=[0,1,1] 
IDL> data=[data0,data1]
IDL> time=[time0,time1]
IDL> spectro_plot,data,time,freq

 Figure 2. Default plot for data1 and data2 stacked together into single spectrogram

The plotting procedure can use the usual keyowrds for better data display. Choose preferred colour chart, force the spectrogram to fill the window, and add appropriate axes labels and names. Choosing appropriate time and frequency ranges can allow a more detailed view of the burst structure.

IDL> loadct,9
IDL> !p.color=255
IDL> !p.background=0
IDL> stretch,255,40
IDL> spectro_plot,data,time,freq,/xs,/ys,charsize=1.5,title='RSTO low CALLISTO receiver',$
      ytitle='Frequency [MHz]',yr=[100,10],ytickv=[100,80,60,40,20,10],yticks=5,yminor=4,$
      xrange='2011-sep-22 '+['10:39:00','10:45:00']

To save the plot in the current graphics device use the simple command 

IDL> x2jpeg,'RSTO_Type_II.jpeg'

The above should produce a jpeg with the following dynamic spectra in Figure 3. 

      Figure 3. Dynamic spectra from RSTO 'low' CALLISTO receiver, covering the frequency range of 10-100 MHz. 
        This is a type II event associated with and X1.4 class flare on 2011 Sepetember 22, at ~10:30 UT .

Dynamic Spectra Background Subtraction

Radio frequency measurements are almost always subject to some level of radio frequency interference (RFI) or background noise. For example Figure 3 shows quite clearly a type II radio burst, however there is also other signals in the spectra such as FM commercial radio broadcast that can be seen between 90-100 MHz as well as continuous strong bands of interference such as the dark line at ~22 MHz. RFI may also be discrete in time, having small duty cycle such as the 'blips' at ~70 MHz between 10:39:20 UT - 10:40:20 UT. There are many software packages available within SolarSoft that employ various methods of background subtraction. More sophisticated technqiues may be required to remove short duty cycle RFI or other unwanted discrete signals in the dynamic spectra. The following is a guide to some simple techniques of background subtraction. 

A standard background subtraction function is to use constbacksub.pro, applied as follows 

IDL> data_bg = constbacksub(data,/auto)

This function firstly computes the average of each frequency channel in time and subtracts this from the original spectrogram. It then computes the standard deviation of each timestep. The timesteps containing a radioburst should have the largest standard deviation, while those without a burst will have small standard deviation. If the '/auto' keyword is selected, it choose the lowest 5% of the these standard deviation time steps, averages them over time, and creates a background with this average that is the size of the input array. It then subtracts this background from the original array.

For the result of the process plot the spectrogram as above. Results are in Figure 4.

IDL> spectro_plot,data_bg,time,freq,/xs,/ys,charsize=1.5,ytitle='Frequency [MHz]',$
      title='RSTO low CALLISTO receiver',yr=[100,10],ytickv=[100,80,60,40,20,10],yticks=5,yminor=4,$
      xrange='2011-sep-22 '+['10:39:00','10:45:00']

      Figure 4. Dynamic spectra from RSTO 'low' CALLISTO receiver, covering the frequency range of 10-100 MHz. 
        This is the same dynamic spectra as above, but with a standard background subtraction to remove some of the RFI.

The process works quite well provided the RFI is contant over time. The commercial FM radio band has been eliminated, as has the RFI in channels below 40 MHz. As mentioned this background technique is innefective at removing short duty cycle RFI spikes in the data. The removal of such signals requires more sophisticated techniques. Another example of simple background subtraction can be found in Figure 3, showing a seperate type of radio activity from above. 

      Figure 5. Dynamic spectra from RSTO 'low' CALLISTO receiver, covering the frequency range of 10-100 MHz. 
        These plots show herrigbone structure from activity associated with the same event as the type II above. The 
        upper panel is the raw data, the lower panel shows the background subtracted data. The lower panel reveals 
        fainterburst with postive slopes moving towards lower frequencies, which are otherwise obscurred in the raw data.

constbacksub.pro is part of a number of similar background subtraction procedures which employ similar techniques such as glidbacksub.pro, the implementation of which can also be used interactively using the ragview GUI. 

More information on similar techniques to those described above can also be found at ETH Zurich's software pages. 

Spectral Overviews

The system at RSTO produces a spectra of its radio environment every day to monitor any significant sources of RFI. For the latest spectral overviews please see the following: 10-100 MHz, 100-200 MHz, 200-400 MHz 

-Windows 32/64 software for viewing these spectral overviews can be downloaded in the following zip: 
-Sky Spectral Overview data file for demonstrating this software: OVS_BIRR_20090629_133954(Sky).prn. 
-Reference spectral oveview: OVS_BIRR_20090629_134047(Ref).prn.

For any comments or queries regarding the information set out on this page please see the RSTO contacts page

We would appreciate if users of our data would include the following acknowledgment "Callisto data supplied courtesy of Trinity College Dublin".