This document describes Release 0 of the HESSI data analysis software package. All routines are coded in IDL, level 5.0 or above. It is assumed that this will be part of the Solar Software package (SSW, see http://www.space.lockheed.com/EIT/ssw_setup.html) , thus the routines will make use of the general routines already contained in SSW. A more complete description of the software package can be found at http://sprg.ssl.berkeley.edu/~jimm/hessi/swicd_current.html) .
The different programs in Level 0 are ordered as follows: The highest level is the Task level; these are routines designed to do one specific HESSI task (such as imaging or spectroscopy). There are no Release 0 Integrated Task level routines. The next level down is the Sub-task level; sub-tasks are routines used by tasks and integrated tasks, but which also should be expected to be used alone in a data analysis session. The next level down is the Module level; module level routines are used by higher level routines, and are expected to be used alone rarely. Below the module level is the Utility level; these are general routines that are the building blocks of the higher-level routines. Each task and sub-task will also have specialized utilities, which will reside in the same directory as the upper level routines for that task.
A diagram of the individual tasks, sub tasks, modules and other routines is provided in Figure 1, here the arrows point away from the calling routine/task. The individual software elements are described in the next sections.
The annotations below each element in the box are the initials of the people who are expected to be responsible for those elements.
JM - J. McTiernan
RS - R. Schwartz
KT - K. Tolbert
GH - G. Hurford
ES - E. Schmahl
DS - D. Smith
i) Imaging
NAME: Hessi_Image
PURPOSE: Images, using various algorithms
INPUT: event lists, aspect data or solutions, grid model data, time intervals, energy bands, image algorithm identifier, image control parameters All inputs can be selected interactively or passed in.
OUTPUT: images.
ii) Flare Simulation
NAME: Hessi_model_2_score
PRUPOSE: takes simulated images, generates simulated event lists.
INPUT: sets of images, with different time and spectral dependences, Simulated aspect data or solutions, grid model data
OUTPUT: Simulated event lists
i) Parameter Selection Tool
NAME: Hessi_parameter_sel
PURPOSE: A routine which can be used to select the parameters used to run a given HESSI task. Parameters can be passed in or chosen interactively.
INPUT: event lists or light curves in different energy bands, time intervals, energy bands, background intervals or spectra, task_id, image algorithm identifier, image control parameters, spectral model identifier, spectral control parameters.
All inputs can be selected interactively or passed in.
OUTPUT: time intervals, energy bands, background intervals or spectra, task_id, image algorithm identifier, image control parameters, spectral model identifier, spectral control parameters
i) Event List Generator
NAME: Hessi_event_list_gen
PURPOSE: Obtains an event list from Level 0 data for given energy bands
INPUT: Level 0 data, time intervals, energy bands
OUTPUT: Event list
ii) Event List Calibrator
NAME: Hessi_event_list_cal
PURPOSE: Calibrates an event list, incorporating aspect solution, dead time correction, gain calibration, for input into image algorithms.
INPUT: event list, time intervals, energy bands, aspect data or solution.
OUTPUT: Calibrated Event list
iii) File Handler
NAME: Hessi_file_handler
PURPOSE: Handles File IO for Hessi, finds or creates the appropriate files then inputs or outputs, also deletes temporary files
INPUT: File type, input-output flag, append flag, temporary/permanent flag, filename, output data if applicable
OUTPUT: input data if applicable
iv) SRM Builder
NAME: Hessi_build_srm
PURPOSE: Provides spectral response matrix (SRM) for use in spectral fitting
INPUT: energy bands, energy bins, detector response data, grid response data, aspect solution or data
OUTPUT: The spectral response matrix
v) Imaging Algorithms
These will be instrument-independent algorithms; in principle, the appropriate data from any detector can be passed in, and an image is returned
NAME: Hessi_"algorithm name"
PURPOSE: Reconstruct a single image
INPUT:
cal_event_list = calibrated event list, in a structure, or file variable, (in the case of a file, the calling program will decide the form of cal_event_list, the algorithm will not need to know; a routine to access the appropriate event list will then be used).
grid_resp_matrix = The grid response matrix, for the collimators to be used in the image reconstruction
image_control_par = image control parameters, such as field of view or the max number of iterations, a chi-squared limit, or a max likelyhood limit, in an anonymous structure
OUTPUT:
Image = a structure, containing the image, the image control parameters, and the fit parameters, generated by the algorithm program. Here is a sample, arrived at from Yohkoh HXT data, and using Dominic Zarro's MAKE_MAP Remember, that this is only an example...
image.data = fltarr(64,64), the image
image.xc, image.yc = X and Y positions of the image center
image.dx, image.dy = pixel sizes
image.time = image accumulation start time
image.dur = image accumulation duration
image.id = identifies the type of data, e.g., 'HXT-LO' for LO channel (13-23 keV) HXT data
image.units = distance units for image e.g., 'arcsec'
image.bkgd_time = background accumulation start time
image.bkgd_dur = background accumulation duration
image.method = Identifies the Algorithm. e. g. 'MEM'
image.control_par = The control parameter structure, may be different for each algorithm
control_par.chilim = Chi-squared limit
control_par.lambda_max = Max value of the MEM lambda parameter
control_par.laminc = initial increment the MEM lambda parameter
control_par.lnorm = normalization factor of lambda
control_par.iter_max = Max number of iterations allowed for a given lambda
control_par.perr = estimated mod. pattern phase error
control_par.aerr = estimated mod. pattern amplitude error
control_par.delta_max = max value of delta allowed for final image, where delta = total((image - old_image)^2)/total(image^2) for each iteration
control_par.gamma0 = the initial value of gamma, the iteration gain
image.fit_pars = The fit parameter structure, contains data obtianed during reconstruction
fit_pars.chi2 = chi-squared
fit_pars.lambda = final value of lambda
fit_pars.delta = final value of delta
fit_pars.cnts_p_cm2 = total counts per cm^2 in an image
fit_pars.max_bright = Max. brightness in image
fit_pars.x_max, fit_pars.y_max = the x-y position of the brightest pixel
NAME: Hessi_File_Locator
PURPOSE: Given time and data type, find the file to be read
INPUT: the time interval for the data desired, the type of file to be searched for.
OUTPUT: the file(s) which contain the data, a roadmap that points to the data in the individual files.
NAME: Hessi_Data_Extractor
PURPOSE: Extracts data from individual files
INPUT: the file(s) which contain the data, and the roadmap that points to the data in the individual files.
OUTPUT: the data (format:TBD)
NAME: Hessi_Time_Extractor
PURPOSE:
INPUT: Telemetry Packet(s) or Packet_pointer
OUTPUT: Time associated with every Telem Word in the Packet(s)
NAME: Hessi_Time_Converter
PURPOSE:
INPUT: Telemetry Packet(s) or Packet_pointer
OUTPUT: Time associated with every Telem Word in the Packet(s)
NAME: Hessi_Event_Selector
INPUT: Telemetry Packet(s), Time Window Constraints, Detector Mask, Segment Mask, Coincidence Mask, Energy Range.
OUTPUT: Indices of valid structures.
NAME: Hessi_Lt_curve_generator
PURPOSE: Takes an event list, and produces light curves, for a given time resolution, for each collimator, or for a set of collimators
INPUT: event list, time resolution, energy bands
OUTPUT: light curves
NAME: Hessi_File_Writer
PURPOSE: Writes data to files
INPUT: data, data type, filenames can be set
OUTPUT: files are written, filenames are returned
NAME: Hessi_Structure_Builder
PURPOSE: Builds Hessi data structures
INPUT: data type
OUTPUT: structure
NAME: Hessi_Model_2_counts
PURPOSE: Given a trial image, obtain the expected counts in each detector
INPUT: image, modulation pattern info
OUTPUT: the expected number of counts from the input image
Includes specialized Self-calibration routines, and routines used for time series analysis, flare statistics, astrophysical, polarization, and other desired data analysis tasks.
NAME: Hessi_Score_2_level0
PURPOSE: Generates a level 0 event list from a series of images at different times an energies
INPUT: images, image times and photon energies
OUTPUT: level 0 data, ideal for testing.
Comments to: jimm@ssl.berkeley.edu