RHESSI Eventlists

Eventlist FITS files contain an intermediate product derived from the Level-0 data files. When constructing visibilities, images, spectra, and other final products from the Level-0 data, the first step is always to make an eventlist. By writing the eventlist to a file and using that file as input, you save that extra step. If you plan to work extensively with one time interval, this is more efficient than starting from the Level-0 data each time. Although eventlist FITS files can be read by a standard FITS file reader, we recommend using these files only within the RHESSI IDL object software.

The RHESSI mission archive contains eventlist files for every flare in the RHESSI image archive. These eventlist files contain all photon events detected during the time interval of the flare between 3.0 and 310.0 keV.

To set an eventlist file as the input source for an image or spectrum object (instead of the Level-0 file), you can set the ev_filename parameter:

im_obj->set, ev_filename='your_ev_file.fits'
sp_obj->set, ev_filename='your_ev_file.fits'

The information stored in the eventlist file for each photon event detected is:

time - event time in binary microseconds (2^-20 s) relative to the reference time
a2d_index - values 0-27 indicating the detector and segment that detected the photon
channel - pulse-height analyzer channel number, 0-8193
coincid_mask - coincidence mask with value 0 or 1

Note: The reference time is in RHESSI spacecraft time format (seconds and binary microseconds) and can be retrieved in the image or spectrum object by getting the 'ev_ut_ref' parameter. To convert the eventlist reference time in RHESSI spacecraft time format to seconds since 1979/1/1, use hsi_sctime2any:

ev_ut_ref = im_obj->get(/ev_ut_ref)
ptim, hsi_sctime2any(ev_ut_ref)

The ev_ut_ref returned by the 'get' call will be a structure that looks like

{
"SECONDS": 1064915698,
"BMICRO": 416457
}

The ptim routine converts seconds since 1979/1/1 to ASCII in the 'VMS' time format, which in this example is 20-Feb-2002 09:54:57.997

To retrieve the eventlist from the image or spectrum object (or an eventlist object), use the getdata command. Each getdata reads a 'bunch' from the ev file. The number of bunches depends on the number of events in the file. Read each successive bunch using /first and /next and its reference time until done = 1 as follows:

im_obj = hsi_image()
im_obj->set,ev_file='your_ev_file.fits'
done = 0
; get ev data and ref time for first bunch
ev = im_obj->getdata( class='hsi_eventlist', /first, done = done )
ev_ut_ref = im_obj->get(/ev_ut_ref)
; get ev data and ref time for next bunch, until done=1
ev = im_obj->getdata( class='hsi_eventlist',/next, done = done )
ev_ut_ref = im_obj->get(/ev_ut_ref)

; to calculate the time of each event in a bunch:
ev_times = hsi_sctime2any(ev_ut_ref) + ev.time / 2.^20

To write an eventlist file, you can do the following:

  • From scratch:

    o = obj_new('hsi_eventlist')
    o->set, obs_time = '20-feb-2002 ' + ['09:55', '09:59']
    o->set, energy_band = [3,300]
    o->write

  • Or, if you have an image or spectrum object already set up with the time interval and energies you want:

    ev_obj = im_obj->get(/obj,class='hsi_eventlist')
    ev_obj->write