# Presentation: 767499

## Introduction to RHESSI Data Analysis

**Documentation**
**Data Products**
**Access to Data**
**SSW**
**Analysis Modes**
**RHESSI GUI**
**Combining GUI and Command Line**
**RHESSI Objects**
- _[Details and Links for these topics](http://hesperia.gsfc.nasa.gov/~kim/intro_to_rhessi_data_analysis.htm)_

## Documentation

**  **_[RHESSI Data and Software Center ](http://hesperia.gsfc.nasa.gov/rhessidatacenter/)_**Web Page**
**  **_[Getting Started ](http://hesperia.gsfc.nasa.gov/~kim/getting_started.htm)_**– Lots of links to basic information**
**  **_[Data Access Guide ](http://hesperia.gsfc.nasa.gov/ssw/hessi/doc/hessi_data_access.htm)_**– Overview of data and access**
**  **_[Installation Guide ](http://hesperia.gsfc.nasa.gov/rhessidatacenter/software/installation.html)_**– Install SSW and set up for RHESSI**
**  **_[FAQ](http://hesperia.gsfc.nasa.gov/ssw/hessi/doc/faq.html)_** – installation of SSW, RHESSI setup, using RHESSI s/w and data**
**  **_[Software Change History ](http://hesperia.gsfc.nasa.gov/~kim/sw_changes.html)_**– Reverse chronology of major changes**
** **

## Data Products

**Data Products**
**All Stored on RHESSI Data Archive at GSFC and ETH**
**Flare Catalog**
**  ****ASCII and FITS files**
**  ****Numbered by ymmddnn**
**  ****Flares detected automatically**
**Quicklook Plots**
**  ****Summary Count Rate, Quicklook Images, Spectra (soon), Monitor Rates, State of Health**
**  ****Browser tool for each type of plot**
**  ****Huge number of processed images, spectra at HEDC**
**Observing Summary **
**  ****Pre-binned Count Rate Data for fast access**
**  ****Also has monitor rates, ephemeris, pointing, roll, flags**
**  ****Stored in daily FITS files**
**Level-0**
**  ****All processing starts here**
**  ****Need RHESSI Software to read/interpret**
**  ****Record of the time and energy of every count seen by detectors**

## HESSI Flare List  (generated 14-Oct-2004 12:22)

- Total # flares: 13258  Time range: 12-Feb-2002 01:54:04.000 - 11-Oct-2004 20:00:12.000
- 8 flares found that meet the following requirements:
- Overall Time Limits: 23-Dec-2003 00:00:00.000 to 24-Dec-2003 00:00:00.000
-   Flare     Start time        Peak      End      Dur   Peak     Total      Energy X Pos Y Pos Radial   AR     Flags
-                                                    s    c/s    Counts         keV  asec  asec   asec
- 3122302 23-Dec-2003 01:20:48 01:24:06 01:29:40   532     16     29368      50-100     0     0      0    0  ? A0 NS a0
- 3122303 23-Dec-2003 02:32:08 02:36:34 02:44:32   744    261    416148       25-50     0     0      0    0  ? A0 a0
- 3122306 23-Dec-2003 05:37:20 05:37:42 05:41:04   224     22     19392     300-800     0     0      0    0  ? A0 NS a0
- 3122308 23-Dec-2003 07:30:32 07:31:02 07:33:28   176     20     12148       25-50   200   200    282    0  ? A0 P1 a0 a1
- 3122312 23-Dec-2003 15:00:12 15:00:14 15:00:24    12      6       408       12-25  -264   184    321    0  ? A0 P1 a0
- 3122317 23-Dec-2003 22:06:20 22:06:22 22:06:56    36      6      1152       12-25     0     0      0    0  ? A0 NS a0
- 3122318 23-Dec-2003 23:22:12 23:22:38 23:22:44    32      8      1372       12-25   376   216    433    0  ? A0 P1 a0
- 3122319 23-Dec-2003 07:35:40 07:35:58 07:36:12    32      7      1176       12-25     0     0      0    0  ? A1 a1
- Notes:
-   Peak Rate:  peak counts/second in energy range 12-25 keV, averaged over active collimators, including background.
-   Total Counts:  counts in energy range 12-25 keV integrated over duration of flare summed over all subcollimators,
-     including background.
-   Energy:  the highest energy band in which the flare was observed.
-   Radial Distance:  distance from Sun center
- Flare Flag Codes:
-   a0 - In attenuator state 0 (None) sometime during flare
-   a1 - In attenuator state 1 (Thin) sometime during flare
-   a2 - In attenuator state 2 (Thick) sometime during flare
-   a3 - In attenuator state 3 (Both) sometime during flare
-   An - Attenuator state (0=None, 1=Thin, 2=Thick, 3=Both) at peak of flare
-   DF - Front segment counts were decimated sometime during flare
-   DR - Rear segment counts were decimated sometime during flare
-   ED - Spacecraft eclipse (night) sometime during flare
-   EE - Flare ended in spacecraft eclipse (night)
-   ES - Flare started in spacecraft eclipse (night)
-   FE - Flare ongoing at end of file
-   FR - In Fast Rate Mode
-   FS - Flare ongoing at start of file
-   GD - Data gap during flare
-   GE - Flare ended in data gap
-   GS - Flare started in data gap
-   MR - Spacecraft in high-latitude zone during flare
-   NS - Non-solar event
-   PE - Particle event
-   Pn - Position quality code
-   Qn - Data quality code
-   SD - Spacecraft was in SAA sometime during flare
-   SE - Flare ended when spacecraft was in SAA
-   SS - Flare started when spacecraft was in SAA

## Slide 5

## Slide 6

## Access to Data

**Access to Data**
**  ****Define HSI_DATA_ARCHIVE and** **HSI_DATA_USER** **in your customized setup file ($SSW/site/setup/setup.hessi_env)**
**RHESSI software looks for data files in this order:**
- HSI_DATA_ARCHIVE
- HSI_DATA_USER
- If search_network is enabled, it searches on server at GSFC, SSL, or HEDC
**  ****HSI_DATA_ARCHIVE points to data directory**
- on your computer, e.g. setenv HSI_DATA_ARCHIVE C:\hessidata
- on server,  e.g. setenv HSI_DATA_ARCHIVE _[\\hesperia.gsfc.nasa.gov\data1\hessidata\](file://hesperia.gsfc.nasa.gov/data1/hessidata/)_
**  ****HSI_DATA_USER points to data directory on your computer**
- Automatically copied via search_network or
- Manually copied
- Example:  setenv HSI_DATA_USER C:\hessidata_user
**RHESSI software should find data automatically**

## SSW

**  ****SSW = SolarSoftWare, IDL software library for Solar Physics**
**  ****RHESSI is one of many instruments in SSW**
**  ****RHESSI requires SSW installation, plus specific RHESSI setup steps**
**  ****RHESSI requires IDL Version 5.6 or greater**
**  ****SSW is a dynamic environment, always changing**
**  ‘****GEN’ directories in SSW have ****many**** useful tools**
**  ****Documentation:**
**  ****Each procedure has documentation header**
**  **_[XCAT ](http://orpheus.nascom.nasa.gov/~zarro/xcat/)_**– Web Interface to find and display procedures**
**  ****xdoc – IDL interface to find and displays procedures**
**  ****doc_library – IDL interface to show header documentation**

## Analysis Modes

**  ****IDL Command Line**
**  ****Requires IDL, SSW, and access to Level-0 FITS files**
**  ****Allows for complete analysis**
**  ****Requires knowledge of IDL and RHESSI software calls**** **
**  ****Graphical User Interface (GUI)**
**Requires IDL, SSW, and access to Level-0 FITS files**
**Simple to use**
**Limited in capabilities**
**  ****Combination of GUI and Command Line **
**Mix and match, and get the best of both**
**  ****HEDC**
**  ****Requires browser, does NOT require IDL or SSW**
**  ****Many prepared plots to browse through**
**  ****Allows you to initiate batch jobs to retrieve and plot data**
**  ****Runs IDL on the HEDC server to handle batch jobs**

## Slide 10

## Slide 11

## RHESSI GUI

**  ****Type hessi in SSW IDL to start**
**  ****Buttons to generate**
**  ****Observing Summary Plots**
**  ****Images**
**  ****Lightcurves**
**  ****Spectra**
**  ****Synoptic Data, GOES Plots**
**  ****Remembers all plots for quick retrieval / stacking / overlays**
**  ****Interactive manipulation of plots**
**  ****Output options**
**  ****Write script **
**  ****Print plots or write plot files (PNG,PS,JPEG,TIFF)**
**  ****Write Image or Spectrum FITS files**
**  ****Save and Restore Object**
**  ****Show movie**

## Combining GUI and Command Line (CLI)

**  ****Share Object Between GUI and CLI**
**  ****Pass an existing object into GUI via hessi,object**
**  ****Extract object from GUI via hessi_data, e.g. hessi_data, image=o**
**  ****Same object in both, not a copy**
**  ****Write a CLI script from GUI**
**  ****Use plotman method from CLI**
**  ****Write image FITS file and restore into GUI or CLI**
**  ****Save and restore objects in GUI and CLI**

## RHESSI Objects

**Object – package for holding data and operations**
**RHESSI objects include these data:**
- Control Parameters
- Info Parameters
- Data Product
**All RHESSI objects have some standard operations (methods):**
- GET - get control or info parameters
- SET - set control parameters
- GETDATA - get data product
- PLOT - plot data product
- PLOTMAN - plot data product in interactive widget
**Methods are like subroutines, but called with -> (arrow)**
**Instantiate (create) an image object by  o = hsi_image()**
**Control parameters are set to defaults.  User changes only a few.**

## RHESSI Objects (cont)

**  ****RHESSI objects are chains of connected objects**
**  ****Main RHESSI objects:**
**  ****hsi_image**
**  ****hsi_lightcurve**
**  ****hsi_spectrum**
**  ****hsi_obs_summary**
**  ****Below each, is chain of all intermediate data objects necessary to produce an image, lightcurve, spectrum, etc.**
**  ****Each object in chain remembers its state and data**
**  ****Changes in control parameters force reprocessing only when necessary**
**Example:**
- o = hsi_spectrum()
- o -> set, obs_time_interval = ['12-feb-2004 00:20', '12-feb-2004 00:22']
- o -> set, sp_time_interval = 4.
- spectrum = o -> getdata()
- o -> plotman, sp_data_unit='flux' 	; won’t require reprocessing
- o -> plotman, sp_energy_binning=1	; will require some reprocessing

## Slide 16

## EXAMPLES

- Flare Catalog Utilities:
- flares = hsi_read_flarelist()	; structure with all flare info
- flare = hsi_getflare(2090203)	; structure with info for flare 2090203
- hsi_flarecat, list=list, /structure	; widget to select flares
- Observing Summary:
- o = hsi_obs_summary(obs_time_interval='21-apr-2002 ' + ['00:00', '02:00'])
- o -> plotman, /ylog, plotman_obj=p, /multi
- o -> plotman, /ylog, plotman_obj=p, /corrected
- o -> plotman, plotman_obj=p, class='hsi_ephemeris‘
- data = o -> getdata()
- times = o -> getaxis(/ut)
- flags = o -> changes()	; structure with times and states of all flag changes in interval
- help, flags.attenuator_state, /st