Using Eventlist Files
Last update: July 8, 2003
This memo describes how to create and use eventlist files. An eventlist file is used to speed up the accumulation of events. It contains a list of time tagged events in a format that does not require unpacking, in contrast to reading data from the Level-0 data files. The increased speed is mainly because we store the eventlist in the same streaming format that we use in the spectrogram process.
Furthermore, an additional speed increase comes from the second feature of the event list files. Events relevant for a specific analysis can be selected in advance and all others can be excluded. This reduces the number of photons that the software has to read for the analysis.
The following only refers to usage from the command line. The
ability to write and read eventlist files will be added to the HESSI GUI
soon.
Datagap Experts only:
Another personal choice is the value of the DP_CUTOFF
(currently 0.03 seconds by default). This is a parameter used for datagap
discrimination, datagaps shorter than this duration will not be stored
and not be considered when the file is used in the future.
o = hsi_eventlist()
s = hsi_spectrum()
s->set, ....
o = s->get(/source)
; this is required to get into the simulation mode:hsi_switch, /simo = hsi_eventlist(); here any simulation parameter can be set:
aa = o->getdata( sim_energy_band $
=[6.00, 100.0], sim_background=1.0 ); setting time_range and energy_band to [0,0]; is equivalent to selecting the whole range:o->write, 'hsi_0.fits', time_range $
=[0, 0], energy_band=[0, 0]; when done, destroy the object to free the memory obj_destroy, o
; switch to the flight modehsi_switch, /flight; create the eventlist objecto = hsi_eventlist(); set the observing time interval
o->set, obs_time = '2002/02/20' $
+ ['11:05', '11:15']; reset the time range to [0,0]. it is set to [0,4] as a default
; to avoid selecting an umanagable amount of data
; set some energy band
o->set, time_range = [0, 0]o->set, energy_band = [10,20]
; write the file. the default filename; is used when no filename is given.; here it would be : hsi_eventlist_20020220_1105_20020220_1115_0_0.fitso->write; when done:
obj_destroy, o
o = hsi_image( ev_filename $
= 'hsi_eventlist_20020220_1105 $
_20020220_1115_0_0.fits' )
o->set, time_range = [4, 8]
o->set, energy_band = [10,15]
o->set , xyoff = [-950,-220], $
image_dim =64, pixel_size =2
im = o->getdata()
The use of eventlist files containing simulated events is exactly the same, assuming however, that the simulation database files are used, i.e the command hsi_switch, /sim has been issued before.
Important note:
the file covers a predetermined time interval and energy interval.
If the energy or time range used for the event accumulation does not lie
within this given energy and time interval, the software goes along and
does the requested data product, considering the energies and times outside
the energy and time interval as without events. In the future the
software will issue a warning to the user that the requested data is outside
of the range stored in the file.
As an example consider the recent gamma ray line flare on 17 June 2003.
We prepared two eventlist files, the first including all possible photon
energies and the second only including the range from 400 keV to 2.5 MeV.
Accumulating a spectrum from 22:56:20 UT to 22:58:00 UT took 13.7 seconds
using the restricted energy range eventlist file, 30.1 seconds using the
unrestricted eventlist file, and 57 seconds using the Level 0 files.
In the best case, the speed increase more than a factor of 4 and at least
nearly a factor of 2. The eventlist file will provide a substantial
time savings when you make repeated accumulations from the same time and
energy range.
Andre Csillaghy
csillag@ssl.berkeley.edu
Richard Schwartz
richard.schwartz@gsfc.nasa.gov