HESSI Objects Reference Manual
This document:
(1) Presents the class diagram of the HESSI data analysis Software; (2)
Describes the object classes used in run-time configurations of the data
analysis software; (3) Describes the object accessor methods available to
retrieve data from the objects; (4) Describes control parameters and keywords
allowing to modify the contents of the objects; (5) Describes data structures
used by the classes. This document needs not to be read for analyzing HESSI
data. Instead, users of the data analysis software might want to look at the HESSI Imaging Overview describing the
command-line user interface or by using the hessi graphical user interface
(type hessi at the prompt). Furthermore, you may
also read the utility quick reference guide for an introduction to HESSI
object classes. This manual is intended to developers who need to understand
all low-level details. It is assumed that you have installed both IDL
version 5.3, as well as the Solar Soft Tree with at least the
HESSI, SPEX and XRAY branches of the tree.
Classes that are usually accessed by users are written in boldface. Other classes are internal steps used by collaborating classes.
Name
|
Purpose
|
Data type
|
Control parameters |
Info parameters |
|
Generic
abstract data analysis class |
Defined in
concrete class |
Defined in
concrete class |
Defined in concrete
class |
|
|
Binned event
lists |
Array
of{hsi_binned_event} |
front_segment,
rear_segment, det_index_mask,
time_bin_def, time_bin_min |
||
|
Back projection |
Image of
dimension rmap_dim |
none |
||
|
Abstract
class for the back projection methods |
N/A |
N/A |
|
|
|
Back
projection annular sector strategy |
Image of
dimension rmap_dim |
none |
||
|
Calibrated
event list |
Array of {hsi_calib_event} |
Tba |
tba |
|
|
CLEAN
algorithm |
2D array |
Tba |
tba |
|
|
Event list |
Array of {hsi_event} |
none |
||
|
Event lists
from telemetry packets |
Array of {hsi_event} |
same as HSI_Eventlist_Strategy |
same as HSI_Eventlist_Strategy |
|
|
Event lists
from simulations |
Array of {hsi_event} |
same as HSI_Eventlist_Strategy |
same as HSI_Eventlist_Strategy |
|
|
Parent class
of |
Array of {hsi_event} |
|||
|
FITS file
handler |
tba |
Tba |
tba |
|
|
Ground
Support Equipment file handler |
{hsi_gse_data} |
Tba |
tba |
|
|
Images |
FltArr( image_dim[0],
image_dim[1] ) |
image_algorithm |
tbd |
|
|
Abstract
class for imaging algorithms |
Through
concrete class |
Through
concrete class |
Through
concrete class |
|
|
Generation
and access of light curves |
FltArr(
n_time_bins, n_energy_bands, n_a2ds, coincdences ) |
ltc_energy_band, ltc_time_range,
ltc_time_resolution, all control parameters
from hsi_spectrogram |
none |
|
|
Maximum
entropy algorithm |
2D arrray |
Tba |
tba |
|
|
Modulation
patterns |
3D arrray |
Tba |
tba |
|
|
Monitor rate
reader |
||||
|
Unpacked
telemetry packet |
{hsi_packet_source} |
File_type,
app_id |
n_record |
|
|
Point Spread
Function |
fltarr(image_dim[0],
image_dim[1]) |
xy_pixel |
tbd |
|
|
Simulations |
Replicate(
{hsi_event}, n_event ) |
|
sim_out_time_unit,
sim_ref_time |
|
|
Spectrogram
abstract class |
FltArr(
n_channel_bins or n_energy_bins, n_time_intervals, n_a2ds, n_coincidences ) |
poisson,
seed, coincidence_flag, sum_flag |
binning |
|
|
Generates
count rate spectra |
FltArr(
n_energy_bins or n_channel_bins, n_time_intervals, n_a2ds, coincidence_flag+1
) |
sp_time_interval,
sp_time_range, sp_chan_binning, sp_data_unit, sp_energy_binning |
tbd |
|
|
Allows
keeping track of selected elements in a list |
N/A |
N/A |
N/A |
|
|
Grouping of
related classes |
[abstract] |
N/A |
N/A |
|
|
As above, but
checks source for strategy |
[abstract] |
N/A |
N/A |
|
|
Manages
setting and getting values from data structures |
N/A |
N/A |
N/A |
Each control parameter name is associated with a keyword that allows to set its value using the procedure Set. Similarly, each name of an infor parameter is associated with a keyword that allows to get its value using the function Get(). Control parameters can be set with any method. Once a control parameter is set, its value is kept in the object’s internal memory, i.e. calls to Set are needed only when the value of a parameter changes.
There
are two types of parameters: control parameters and information
parameters.Control parameters inluence the way individual classes process data.
Information parameters provide (output) values associated with the processing
of the data. The default value of a keyword is the value used in the object
when the keyword is not used.
|
Name |
Purpose |
Control or Info
|
Default |
Range |
Defined in the class |
|
Mask for the selection of a2ds. |
Control |
BytArr( 27 ) + 1B |
0 or 1 |
||
|
Binning scheme for spectrograms |
Info |
N/A |
Structure |
||
|
Flags for selecting detectors |
Control |
[0,0,0,1,1,1,1,1,0] |
0 or 1 |
||
|
? |
Info |
? |
? |
||
|
Minimum and maximum energy value
of the analysis interval |
Control |
[12,25] keV |
3..15000 |
||
|
strategy used by getdata to get
event lists |
Info |
HSI_EVENTLIST_PACKET |
HSI_EVENTLIST_PACKET HSI_EVENTLIST_SIMULATION |
||
|
The name(s) of the
level-0/telemetry data file(s) |
Control |
“ |
Valid filename |
||
|
The type of the level-0 data
files |
Control |
‘fits’ |
fits, gse, smex, raw |
||
|
? |
Control |
1 |
0 or 1 |
||
|
Use detector front segments |
Control |
1 |
0 or 1 |
||
|
Time interval for which monitor
rates are requested |
Control |
[0D,0D] sec. |
0...100 |
||
|
Energy band(s) for the
lightcurves |
Control |
[3.,15000.] keV |
3...15000. |
||
|
Time range for the light curve |
Control |
[0D,0D] sec. |
0...1e9, |
||
|
Size of the time bins for
lightcurves |
Control |
0.1sec |
0.001...1sec |
||
|
Number of bins for each detector
and harmonics |
Info |
Tbd |
Tbd |
||
|
Number of cycles available in
the monitor rate packets selected |
Info |
Tbd |
Tbd |
||
|
Controls which gain is used for
channel-energy correspondance |
Control |
1 |
0 or 1 |
||
|
Use detector rear segments |
Control |
1 |
0 or 1 |
||
|
If 1 assumes a perefect aspect
solution |
Control |
0 |
0 or 1 |
||
|
Defines the channel binning |
Control |
0 |
0 .. 8192 |
||
|
Defines the energy binning |
Control |
7 (# of table) |
0 ... ? |
||
|
Semi-calibrate the count rates |
Control |
0 |
0 or 1 |
||
|
Defines the time interval for
spectra |
Control |
60sec |
>0 ... ? |
||
|
Factors multipling time_bin_min
for the definition of the detector-dependent time bin size |
Control |
[1,1,2,4,8,8,16,32,64] |
2^0 ... 2^6 |
||
|
The minimum time binning |
Control |
1024 binary microsec. (= 2^-20
sec) |
2^0 ... 2^7 |
||
|
Time range of the analysis
interval |
Control |
[0,4] sec. |
0...100 |
||
|
Time unit used in the event list
time tags |
Control |
16 binary microseconds |
1...32 |
A procedure method is
called by obj->proc_name where proc_name is the name of the method. A
function method is called by result = obj->func_name whereby result is any IDL variable name and func_name is the name of the method.
Methods and functions accept any keyword parameters of type “Set” as defined in
the section Keywords
below.
|
Name |
Purpose |
Keywords |
Used in |
|
Creates an instance of a
strategy |
|
Instances of Strategy_Hoder |
|
|
Retrieves control or info
parameters |
ADMIN_ONLY, CLASS_NAME, /CONTROL_ONLY, FOUND, /SOURCE_ONLY, /THIS_CLASS_ONLY,
/THIS_OBJECT_ONLY,
/INFO_ONLY, /NO_DEREFERENCE,
/NOSINGLE, /POINTER, /OBJECT_REFERENCE,
/ALL_STRATEGIES |
Any |
|
|
Retrieves primary data |
/ALL, CLASS_NAME, DONE, THIS_A2D_INDEX,
THIS_INDEX, NEXT_BUNCH |
Any |
|
|
Retrieves the strategy object |
Instances of Strategy_Hoder |
||
|
Sets control parameter values |
Any |
||
|
Inputs primary data into the
object |
TBA |
Any |
|
|
Sets the current strategy |
|
Instances of Strategy_Hoder |
|
|
Plots the primary data |
Same as GetData |
Any |
|
|
Prints parameter values |
Any |
||
|
Implements the algorithm tha
generates the object’s data |
Tba |
Any |
|
|
Writes a FITS binary table with
the data of the class |
TBA |
Any |
Keywords can be used
either to request a specific subset of the data associated with a specific
object, or to do a specific, non-standard processing. Keywords to select data
subsets start in general with the prefix THIS_ and are used only with the method GetData().
|
Name |
Purpose |
Default |
To
use with method |
To use with class |
|
Retrieve admin parameters only |
N/A |
Get() |
Any |
|
|
Passes the admin structure |
Null |
Set |
|
|
|
Retrieves parameters from all existing strategies |
Only the current strategy |
Instances of Strategy_Holder |
||
|
Specifies for which class the
method should be used |
Current class |
Any |
Any |
|
|
Retrieve control parameters only |
N/A |
Any |
||
|
Passes the control structure |
Null |
Set |
Any |
|
|
To get the parameters found |
N/A |
Get() |
Any |
|
|
Retrieve info parameters only |
N/A |
Get() |
Any |
|
|
Turns auto dereferencing off |
Dereference |
Get() |
Any |
|
|
Retrieves anon struct even for
single parameter requests |
Returns single as variable |
Get() |
Any |
|
|
Returns the name of the params
not found |
N/A |
Set |
Any |
|
|
Retrieves the object reference |
Retrieves the data |
Get() |
Any |
|
|
Retrieves the pointer to the
original data instead of a copy |
Retrieves a copy of the data |
GetData() |
Any |
|
|
|
|
|
|
|
|
Retrievs the source object
reference |
N/A |
Get() |
Any |
|
|
Gets the object with source
index specified |
0 |
Get() |
Any |
|
|
Gets the index of the current
strategy |
Returns the strategy itself |
GetStrategy |
Instances of Strategy_Holder |
|
|
Gets the associated strategy
object |
Returns the current strategy |
GetStrategy |
Instances of Strategy_Holder |
|
|
THIS_A2D_INDEX |
Specifies for which a2ds the
data should be retrieved |
Equivalent to a2d_index_mask |
GetData,
Plot |
|
|
Retrieves parameter for the
current class |
Retrieves parameter for all
classes |
Get() |
Any |
|
|
THIS_DET_INDEX |
Specifies for which detector
index the data should be retrieved |
Equivalent to det_index_mask
|
GetData,
Plot |
|
|
THIS_HARMONIC_INDEX |
Specifies for which harmonic
index the getdata should be retrieved |
Equivalent to det_index_mask
|
GetData,
Plot |
|
|
Retrieves the object reference
associated with CLASS_NAME |
N/A |
Get,
Set |
Any |
|
|
Retrieves the X axis |
N/A |
GetData |
Any |
|
|
Retrieves the Y axis |
N/A |
GetData |
Any |
|
Name |
Purpose |
Tags |
|
Informatin
parameters of hsi_bproj |
bproj_alg_available |
|
|
Telemetry science packet header |
Generic basis class used to support scientific data analysis tasks. The framework contains four main elements:
1. The primary data which needs to be managed;
2. The control parameters;
3. The informational parameters;
4. The administration parameters.
The framework is inherited by application-specific concrete classes. It is based on the template method design pattern. The abstract class cannot be used without a concrete class. Look for the document “HESSI Object-Oriented Design Concept” for more information on frameworks.
Only by inheritance in concrete
classes.
- Get() : Retrieves ancillary parameters, from control, information, administration and/or source objects. If only one parameter is requested, Get returns the value of this parameter unless /NOSINGLE is set. If more than one parameter are requested, Get returns an anonymous structure that have one tag for each parameter requested. For pointer-type variables, Get does an automatic dereferencing, i.e. it returns the variables to which the pointers are pointing instead of the pointers (but see also /NO_DEREFERENCE).
- GetData() : Retrieves primary data. When this function is called, the object checks whether the control parameters have changed, using the function Need_Update (see below). If parameters have changed, it assumes that data need to be recomputed and Process is called. Otherwise the object retrieves the contents of its memory, and makes the appropriate selection depending on the keyword parameters. Note that most of the time this procedure is only the generic part of a redefined procedure GetData in the concrete class.
- Need_Update() : Returns “1” if the object must call the procedure Process to update its state; otherwise “0.”
- Plot : Plots data associated with an object. This generally first calls GetData, and generates a “view” of the data. Often, tough, the data may be strongly summarized. The generic plotting routine is empty.
- Process : This procedure is called whenever an object needs to be updated. It reads in the control parameters associated with the class, reads in the data form a source object (or from any other sources), process the source data and stpres the results into the object’s memory.
- Print : Prints control, information, and administration parameters.
- Set : Sets values to control parameters. Set does not just store the parameter values into a data structure. It first checks if the parameters are the same as those already stored. If they are, it just returns. If they are not, it will set the need_update flag in the administration structure to 1.
- SetData : Input primary data into the framework. This is usually called by the procedure Process
- Write : Write FITS files, usually binary extensions, with the data associated with the object.
- VERBOSE (Get, Set) Flag
for controlling whether messages commenting the process
are printed or not. Defined in: {hsi_admin_control}, class Structure_Manager. Format: byte scalar, Range: 0B or 1B. Default: 0B. Example:
o->Set, /VERBOSE, /THIS_CLASS_ONLY
-
/ADMIN_ONLY: [Get()] Set this to retrieve only the administration parameters (verbose,
-
ADMIN_STRUCT:(Set) Initializes the admininstration
structure type {admin_struct}
-
CLASS_NAME: (Get, GetData) If set to a valid class
name (string), retrieves parameters for the class specified and all its sources
recursively. Default: current class
-
/CONTROL_ONLY: [Get()] Set this to retrieve only control parameters
-
CONTROL_STRUCT (Set): Sets the controil structure
-
FOUND [Get()] : Set this to a named variable
to get the names of the parameters
found in a string array
-
/INFO_ONLY: [Get()] Set this to retrieve only information parameters
-
POINTER (GetData): If set, retrievs a reference
to the (orginal) data insteade of a copy.
-
SOURCE_ONLY: [Get()] Set this to retrieve the source object reference. See also SRC_INDEX.
-
SRC_INDEX: [Get()] Set this to the index or array of indices of the source object(s) you
want to get with SOURCE_ONLY. Default:
0
-
THIS_CLASS_ONLY: [Get()] Set this to retrieve data only for the current class or for the class
specified by CLASS_NAME
-
OBJECT_REFERENCE: [Get()] Set this to retrieves the object reference of the class specified by CLASS_NAME
-
NO_DEREFERENCE: [Get()] Set this to prefent automatic dereferencing of pointer-type
tags.
-
NOSINGLE: [Get()] Set this to retrieve an anonymous structure even for a
single parameter request
-
NOT_FOUND (Set):
Returns an array of strings containingthe name of the keywords that have not
been found
- XAXIS [GetData()] Returns
the x axis of the data in the class. It is equivalent to a call to the function
GetAxisThis may be the pixel location (in arcseconds) if the class is HSI_Image, or time if the class is HSI_Binned_Eventlist Use with the method: GetData, classes HSI_Binned_Eventlist HSI_Image HSI_Lightcurve HSI_Spectrogram. Example: image_x_axis = o->GetData( /XAXIS )
-
YAXIS [GetData()] Returns the y axis of the data in the class. This
may be the pixel location (in arcseconds) if the class is HSI_Image, or the energy edges for
the class HSI_Lightcurve. Example: image_x_axis = o->GetData(
/XAXIS )
Specifies that the Aspect solution sould be considered as perfect.
Defined in:HSI_Calib_Eventlist
Format: Byte scalar with either 1 or 0
Default: 0
o->Set, /SASZERO
Provides access to back projection maps. The back projection class extends the class strategy_holder_passive. The back projection can be calculated using either of the annsec or the visibility modulation pattern. The startegy holder is passive because it just selects its strategy by listening to the modulation pattern object, which really decides which strategy (commanded by imaging_method) to use.
HSI_Bproj is just a container. The real work is done by the startegies, either hsi_bproj_annsec or hsi_ bproj_vismod, which are two classes extending the basic class hsi_bproj_strategy.
o = HSI_BProj()
None in that class. But look at hsi_bproj_strategy
Defined in {hsi_bproj_info}:
- bproj_alg_available: lists the back projection algorithms (i.e, objects) available.Currently, the values are: HSI_VISMOD_BPROJ for visibility back-projection, or HSI_ANNSEC_BPROJ for annular sector back projection.
HSI_Modul_Pattern
HSI_Modpat_Products, HSI_Image
Computes the backprojection for a
given count rate. The count rate is given either using the parameter vrate, or
if vrate is empty (null pointer), the count rate used is the observed count
rate.
O = hsi_bproj()
An image in the form of a 2D array. The dimensions and units of the image are given by image_dim pixel_size
The algorithm is defined in the procedure hsi_annsec_bproj
Control parameters for the back
projection are defined in the structure hsi_bproj_control.
Allows passing an arbitrary count rate to the backprojection object. It must have the dimensions defined by time_bin_min and time_bin_def in hsi_binned_eventlist. The best way to know these dimensions is to look at the observed count rates (see example below)
Defined in: {hsi_bproj_control}, class HSI_BProj
Example: To set correctly vrate:
be = o->getdata( class=’hsi_binned_eventlist’ )
vrate = be
modify_vrate_here_as_you_want
bp = o->getdata( vrate = vrate )
Provides data structures and methods to build and access the calibrated event list.
obj = hsi_calib_eventlist()
Specifies the time bin definition factor for each detector. It is multiplied by TIME_BIN_MIN.
o->Set,
TIME_BIN_DEF=[1,1,2,4,8,8,16,32,64]
Specifies the minimum time bin in binary microseconds. It is multiplied by TIME_BIN_DEF.
o->Set, IMAGE_DIM=[128,128]
Specifies the offset of the map center from the sun center in arcsecs.
Provides a wrapper for the clean image algorithm.
obj = Obj_New( ‘hsi_clean’ )
An image in the form of a 2D array.
The algorithm is defined in the procedure hsi_map_clean
Control parameters for the clean algorithm are defined in the
structure hsi_clean_parameters.
No accessor methods are implemented in this class.
No display methods are implemented in this class. Need_Update
Provides data structures and methods to build and access an event
list.
obj = hsi_eventlist()
result = obj->Get()
result = obj->GetData( /SCORE THIS_A2D_INDEX=BytArr(27) THIS_ENERGY_BAND=DblArr(2) THIS_TIME_RANGE=DblArr(2)
obj->Plot, THIS_A2D_INDEX=BytArr(27) THIS_ENERGY_BAND=DblArr(2) THIS_TIME_RANGE=DblArr(2)
obj->Write, THIS_A2D_INDEX=BytArr(27) THIS_ENERGY_BAND=DblArr(2) THIS_TIME_RANGE=DblArr(2)
Inherited from Framework: CLEANUP, Get, Set, SetData
Parameters are defined in a single control structure called hsi_eventlist_control.
a2d_index_mask: Allows selecting which
a2ds to use. Note that this setting is very low level. Usually you may want to
select the detectors instead, with det_index_mask Format: Bytarr( 27 ). Each position of the array correspond to a
selected a2d
Range: Each element of the array may take the value 0 or 1.
Default values: BytArr(27) + 1B
Example:
o->Set, A2D_INDEX_MASK =
[0,0,0,1,1,1,1,0,0, BytArr(18)]
This selects the a2ds 3 to 6.
-
- ut_ref
Provides data structures and methods for HESSI imaging tasks.
O = hsi_image()
Get( )
result = obj->GetData( XAXIS=xaxis, YAXIS=yaxis )
obj->Plot
Specifies which algorithm is used to reconstruct the image.
Format:String scalar
Default:’bproj’
Example:
o->Set,
IMAGE_ALG = ‘clean’
HESSI IMAGING ALGORITHM ABSTRACT CLASS DEFINITION. This abstract
class defines operations common to all imaging algorithms used for HESSI image
processing. It leaves up to the subclasses the behavior that can vary. It is
inherited by a concrete class that usually has the same name as the algorithm
it implements. This class is a realization of the Template Method design
pattern.
Only through the concrete classes
The procedure Process
loads the control parameters and passes the control to the child class with
image_alg_hook. Once it returns from image_alg_hook, it stores the information
parameters that may come out of the concrete class into the object.
Image_alg_hook must be defined in the concrete class.