Demonstration of "end-to-end" analysis of a RHESSI flare.
Objectives:
- Plot quicklook and customized lightcurves.
- Obtain a count-rate spectrum near the peak of the flare
- Obtain an image at the same time.
- Overlay a TRACE image near the same time.
Introduction
Use the HESSI GUI or the command-line interface (CLI).
Choose flare starting at 00:40 UT on 21 April 2002.
Procedures
Getting a Quicklook Lightcurve
- Start IDL, version 5.6 or later, using batch file to initialize all
required environment variables, put SSW and all procedures in the path, and
anything else it needs to do.
- Type "hessi" in the command line and hit return to start the GUI.
- Click File/Set Observation Time Interval to bring up the Observation
Time Interval Selection widget.
- Click Flare Selection button to bring up the Flare Select and List
widget.
- Click on Set Range... for flare start time and enter "21-apr-2002" for
the Start and "22-apr-2002" for the end.
- Click Select Flares button to display flares in range. Select flare
2042101 (YMMDDNN) and click "Accept" and then "Accept and Close" in
the Flare Select and List widget.
- We want to display the whole orbit including night time before and after
the flare to get background information.
Click "Start..." and enter "2002 APR 21 00:20:00" or type this directly in
the "Start..." box.
Type "4800" in the "Duration (s)" box or "2002 APR 21 01:40:00" in the
"End..." box.
- Note that "Count Rate" is the option in the "Select Data To Plot" box
and that all the flags will be shown.
- Click the "Plot Observing Summary Data" button to get the following
plot:

Note that the lines at the top indicate that the plot starts at night
and ends at night and in the SAA. The large steps and spikes in the low energy
light curves are the result of the thin attenuators moving into and out of the
detector fields of view. You can remove them by selecting "Corrected Count Rate"
in the "Select Data To Plot" box and produce the following plot:

Note that you have considerable flexibility in how this plot is displayed by
clicking on Plot_Control/XY Plot Display Options in the GUI "Main Window." For
example, you can produce the following plot of just the flare up to 300 keV with
no night time data:

You can plot a more customized light curve from the "Light Curve..." or
Spectrum..." options under "File" then "Retrieve/Process Data" in the GUI Main
Window. However, this takes considerably longer than obtaining these quicklook
light curves since the data for each photon must be separately included from the
data base.
Finally, click on the "Set Obs Time and Close" button in the "Observation
Time Interval Selection" widget and return to the GUI Main Window.
Obtaining a Count Rate Spectrum
- In the GUI Main Window, select "File" then "Retrieve/Process Data," and
"Spectrum..."
- You can choose one of the default energy bin sets by selecting a
"Binning Code" (click on "Show Binning Codes" to see available sets). We
will click on "Define Bins manually..." and define customized bins - 0.3333
keV wide bins from 3 - 15 keV, 1 keV from 15 to 100 keV, and 5 keV from 100
to 300 keV.
- Near the bottom of the resulting "Select Energy Interval(s)" widget, set
the "Energy Range (keV) Low:" box to 3.0 and the "High" to 15.1 (note the
".1"!!!). Choose "Divide this energy range in bins of width D" in the pull
down option list. Set "D(keV) to 0.333333333333 and click on the "Replace
List" button. Repeat this process to add (click on "Add to List" button) 1
keV wide bins from 15 to 100 keV and 5 keV wide bins from 100 to 300 keV. If
you do it correctly, you should get 161 energy intervals. Click on "Save
Current Intervals to File" once you
are happy with the energy bins, and then click on "Accept" to return to the
"Spectra" widget.
- Note that the observation time interval is automatically divided into 80
1-minute intervals. This will take too long to run for this demonstration so
for now we will just choose one time interval near a hard X-ray peak at
01:15 UT fo making images and a spectrum. The way to select just one of the
80 time intervals is to first click on the "Define Bins Manually" button
next to the "Time Bin Width (s)" box. Then click on the "Edit intervals..."
button and delete all time intervals except 01:15:00 to 01:16:00 in the
resulting test editing box. Click on "Accept" once you have selected the one
and only time interval.
- Note that all detector front segments are selected by default.
Since detectors 2 and 7 have poorer resolution and higher thresholds than
the others, deselect them by clicking on the "Change" button.
- Pulse Pile-up correction is disabled by default. It can be enabled by
clicking on the "Change" button and checking the resulting box.
- Finally, click on the "Plot Spectrum" button and the following plot
should appear after a minute or two. Remember that the data about every
individual photon must be extracted from the raw data base so it takes a
while. The following plot will appear after minute or so:

The basic power-law fall off of the spectrum above about 15 keV reflects the
power-law photon spectrum typically seen for flares. Note the fall off in
counts below a peak at about 11 keV resulting from the absorption of the
thin shutters and the other material between the detectors and the Sun. The
iron-line complex at ~6.7 keV from the hot thermal plasma can also be
clearly seen as a resolution-broadened Gaussian peak
- The steps at 15 and 100 keV result from the changes in energy bin
widths. These are easily removed by selecting "count rate" or "count flux"
rather than "counts" next to "Units:" in the SPECTRA widget. Also, clicking
the "Semi-calibrated" check box nultiplies the count flux spectrum by
the diagonal elements of the spectrometer response matrix (SRM) to produce
the following photon spectrum:

Note that this photon spectrum is very approximate and should not be used
for scientific analysis. No background has been subtracted and this becomes
an increasing contributor at higher energies; the spectrometer off-diagonal
elements of the SRM have not been taken into account and this is most
important at low energies, where K-escape is a significant factor. Use OSPEX
to carry out more accurate spectral analysis.
- You can write the results out for future analysis with OSPEX by clicking
on the "Write output file..." This writes the spectrum for each time
interval to a fits file and also writes the spectrometer response matrix for
all the active attenuators states into a separate file.
- You should also write out an IDL script by clicking on the "Write
Script" button. This writes out an IDL
procedure that, when executed from the command line, returns the
parameters exactly as they were set when the script file was written. This
is very instructive to see how all of the GUI capabilities and more can be
obtained from the CLI. Perhaps more importantly, it allows you to quickly
and easily repeat the same analysis or, by simple edits of the script, carry
out similar analysis on the same or different flares.
- Finally, close the SPECTRA widget by clicking on the "Close" button.
Make Images
- Choose "Image..." from "File" and then "Retrieve/Process Data" options
in the GUI Main Window.
- We will produce an image for the same time interval so click the
"Change" button next to the "Time Interval" box in the IMAGING widget.
Click on "Edit Interval.." and change the XTEXTEDIT window to read "Interval
1, 21-Apr-2002 01:15:00.000 to 01:16:00.000." Click on "Finish Editing" and
then on "Accept" to get nback to the IMAGING widget.
- Initially, we will accept all of the remaining default settings. Click
on the "Make Image(s) and Send to:" button. In a minute or so the following
image should appear:

Not very impressive but it can be considerably improved.
- The easiest way to make it look better is to click on "Plot_Control" and
then "Image Colors." Select your favorite color Table. My favorite is
"4-BLUE/GREEN/RED/YELLOW." Gordon Hurford prefers "41 - HESSI color" since
it maintains separate colors for equal positive and negative ranges. Click
"Accept."
- More substantive improvements are made by choosing "Clean" in the "Image
Algorithm" box. Click on the "Set parameters..." button and set the "Max #
of iterations to 100.
- Click "Make Image(s) and Send to:" button again to produce the following
image:

- Repeat the same procedure to obtain an image from 25 - 50 keV. Note that
you can now use detector #2 since this is well above its threshold. You
should get the following image:

Overlay on TRACE Image
- You can most easily retrieve TRACE images using the synoptic data base
set up by Dominic Zarro. Select "Synoptic"File" then "Retrieve/Process Data"
options in the GUI Main Window.
- Type the time interval of interest in the Start Time and Stop Time boxes
and click the "Search" button.
- After a while, if you are connected to the synoptic data base correctly,
you should see a bunch of TRACE files listed. Select the one called
trac_195____a2_20020421_0115223.fits
and click on the "Download" button.
- After a minute or less, this file name should appear in the bottom area
of the "SHOW SYNOP" window. Select it and click on the "Plot" button.
- The following image should appear in the GUI Main Window:

- Close the "SHOW SYNOP" widget.
- To overlay the RHESSI image onto this TRACE image, first zoom in on the
bright region in the TRACE image by drawing a box over it with the left
mouse button held down.
- Select "Plot_Control" from the HESSI GUI and then "Image Display
options."
- Select "HESSI Image, Clean ... 12 - 25 keV" for "Overlay #1."
- Select ""HESSI Image, Clean ... 25 - 50 keV" for "Overlay #2."
- Choose the contour levels, color, and thickness to your liking after
clicking the "Contour Options" button for both overlays.
- Following Gallagher et al., type -2.5 in the "Translate X" box and 4.3
in the 'Y:" box to correct for the TRACE aspect error.
- Click on "Accept and Close" and choose "Apply to this plot only."
- Finally, you should see an image that looks something like the
following. This was made by selecting "File" then "Create Plot File" and
then "Create ps file" to get a postscript version. Note that the contour
line thicknesses need to be set to 5 to get them to show up well for a
postscript plot.

This composite image shows the 25 - 50 keV hard X-ray emission from the two
ribbons seen in the TRACE 195Å image and the 12 -
25 keV emission from the corona above the limb.
The last thing that remains to be done is to write an
image script file to allow the
same image settings to be recovered at a later time. It is instructive to review
the image and the spectrum script files to begin to see how commands are
configured to control the objects used in the analysis software. More on this
later in the week.