hesi_grid_trans $SSW/hessi/offline/hesi_grid_trans.pro
[Previous] [Next]

 NAME: hesi_grid_trans


 PURPOSE: get the integrated transmission of the twelve hesi grids as a function
	of energy from 1 keV to 100 MeV


 CATEGORY: hessi analysis


 CALLING SEQUENCE:
	hesi_grid_trans, evec, trans, dcm=dcm, zgrids=zgrids 

 CALLED BY:


 CALLS: ***
	AVG [1], AVG [2], CHECKVAR [1], GET_GDFILE, INTERPOL, LOC_FILE [1], LOC_FILE [2]
	LOC_FILE [3], PATH_DIR, READ_GDFILE_GD, Read_mat_xcom, UNIQ [1], UNIQ [2], UNIQ [3]
	checkvar [2], curdir [1], curdir [2]
 INPUTS:
       none explicit, only through data file in SSWDB_HESI:gd_12_c.dat

 OPTIONAL INPUTS:
	none

 OUTPUTS:
       evec - energy on which integral transmission is defined
	trans- average grid transmission, number energies x 12 grids

 OPTIONAL KEYWORD INPUTS:
	MAX_NGRIDS - limit the number of grids to this number, >1.
 OPTIONAL KEYWORD OUTPUTS:
	dcm -12 grid thicknesses in cm
	zgrids - z of each grid pair
 COMMON BLOCKS:
	none

 SIDE EFFECTS:
	none

 RESTRICTIONS:
	none

 PROCEDURE:
	none

 MODIFICATION HISTORY:
	ras, 24 may 1995
	Version 2, 26-May-1997, revised grid input and cross-section reads.
	Version 3, 29-Dec-1997, revised search path.
	Version 4, 5-jan-1997, added max ngrid keyword, richard.schwartz@gsfc.nasa.gov


HESI_MENU $SSW/hessi/idl/sims/menu/hesi_menu.pro
[Previous] [Next]
 Project     : HESI
                   
 Name        : HESI_MENU
               
 Purpose     : This procedure provides an interface to the HESI design procedures.
               
 Category    : HESI
               
 Explanation : This is a user interface which takes options and commands and
		processes them.
 
               
 Use         : 
    
 Inputs      : 
               
 Opt. Inputs : None
               
 Outputs     : None

 Opt. Outputs: None
               
 Keywords    : 

 Calls	      : ***
	COMP_SPEC, GD, GET_GDFILE, IXCOM, MULTITHERM, PLOT_ANGC [1], PLOT_ANGC [2], PLOT_GD
	set_logenv [1], set_logenv [2]
 Common      : None
               
 Restrictions: 
               
 Side effects: None.
               
 Prev. Hist  :

 Modified    :
 
 		By Eric Carzon, Hughes/STX, March 1995
 		Modified April 1995, to change format of GRID subprogram EAC
 		Modification in May 1995 to Angular Coverage and Composite Spectrum plots
 		to change format for proposal
		 AKT 4/11/97  Added black/white option and PostScript output file option
		Version 5, ras, 14-apr-1997, proper header
		Version 6, ras, 23-may-1997, improved gdfile path.
		Version 7, ras, 18-dec-1997, improved gdfile path.
		Version 8, ras, 12-jan-1998, use get_gdfile().


HESSI ASPECT SOLUTION CONTROL STRUCTURE DEFINITION $SSW/hessi/idl/aspect/hsi_aspect_solution_control__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI ASPECT SOLUTION CONTROL STRUCTURE DEFINITION

 PURPOSE: 
       Defines the data type of the structure that controls the
       output of the aspect solution class

 CATEGORY:
       HESSI Utilities
 
 CALLING SEQUENCE: 
       var = {hsi_aspect_solution_control}

 TAG NAMES:

 PROCEDURE:

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 EXAMPLES:
       

 CALLS: ***
	HSI_ASPECT_SOLUTION_CONTROL__DEFINE
 SEE ALSO:
 HISTORY:
       Release 6 development, Nov 2000, 
           A Csillaghy, csillag@ssl.berkeley.edu
       Wed Nov  7 19:17:26 MET 2001
         AFTER272 and ADP_TEST is now a control parameter of the packet object
       Thu Jan 10 16:40:46 MET 2002 new control parameter AS_SPIN_PERIOD
       Thu Jan 17 17:43:14 MET 2002, change AS_SPIN_PERIOD to double
       Sun Feb 17 16:38:49 PST 2002, new control parameter AS_ROLL_OFFSET
       Tue Mar  5 18:45:19 MET 2002, new control parameter AS_ROLL_SOLUTION
       Thu Apr  4 02:56:31 MET DST 2002, new control parameter PMTRAS_DIAGNOSTIC
       Tue Apr  9 23:33:32 MET DST 2002, make PMTRAS_DIAGNOSTIC uint
       Wed May 29 17:59:30 MET DST 2002, new control parameter AS_POINT_SOLUTION
       Tue Jul  9 23:38:08 MET DST 2002, ASPECT_CNTL_LEVEL (int), for neg. values
       Wed Sep 25 14:42:01 PDT 2002, new control parameter AS_INTERPOL
       Fri Oct 17 19:12:27 PDT 2003, new control parameter AS_NO_EXTRAPOL
       Wed Jun 22 16:11:54 PDT 2005, new param: SC_SUN_OFFSET, EQUAT_NS


HESSI ASPECT SOLUTION INFO STRUCTURE DEFINITION [1] $SSW/hessi/idl/aspect/hsi_aspect_solution_info__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI ASPECT SOLUTION INFO STRUCTURE DEFINITION

 PURPOSE: 
       Defines the data type of the structure that controls the
       output of the aspect solution class

 CATEGORY:
       aspect
 
 CALLING SEQUENCE: 
       var = {hsi_aspect_solution_info}

 TAG NAMES:

 PROCEDURE:

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 EXAMPLES:
       

 CALLS: ***
	HSI_ASPECT_SOLUTION_INFO__DEFINE
 SEE ALSO:
 HISTORY:
       Version 1, Martin.Fivian@psi.ch, Tue Mar 19 20:07:48 MET 2002


HESSI ASPECT SOLUTION INFO STRUCTURE DEFINITION [2] $SSW/hessi/idl/atest/hsi_aspect_solution_info__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI ASPECT SOLUTION INFO STRUCTURE DEFINITION

 PURPOSE: 
       Defines the data type of the structure that controls the
       output of the aspect solution class

 CATEGORY:
       aspect
 
 CALLING SEQUENCE: 
       var = {hsi_aspect_solution_info}

 TAG NAMES:

 PROCEDURE:

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 EXAMPLES:
       

 CALLS: ***
	HSI_ASPECT_SOLUTION_INFO__DEFINE
 SEE ALSO:
 HISTORY:
       Version 1, Martin.Fivian@psi.ch, Tue Mar 19 20:07:48 MET 2002
       Version 2, mfivian@ssl.berkeley.edu, Thu Mar  2 17:44:26 PST 2006


HESSI BACK PROJECTION CLASS DEFINITION [1] $SSW/hessi/idl/image/hsi_bproj_annsec__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI BACK PROJECTION CLASS DEFINITION

 PURPOSE:
       Provides data structures and methods to generate and retrieve
       back projection maps.

 CATEGORY:
       HESSI Utilities

 CONSTRUCTION:
       o = Obj_New( 'hsi_bproj' ) ;
       or
       o = HSI_BProj()

       The variable o is the object references used to
       access back projection maps and associated methods.

 INPUTS (CONTROL) PARAMETERS:

 OUTPUTS (INFORMATION) PARAMETERS:


 SOURCE OBJECT:
       HSI_Modul_Pattern

 DESTINATION OBJECTS:
       HSI_Modpat_Products, HSI_Image

 EXAMPLE:

 CALLS: ***
	HSI_ANNSEC_BPROJ [1], HSI_ANNSEC_BPROJ [2], HSI_ANNSEC_BPROJ [3]
	HSI_ANNSEC_BPROJ [4], HSI_BPROJ_ANNSEC::HSI_BPROJ_ALG_HOOK
	HSI_BPROJ_ANNSEC__DEFINE
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/reference.html
	HESSI Utility Reference, hsi_bproj_control, hsi_bproj_control__defin
	hsi_bproj_info__define, hsi_modul_pattern__define
 HISTORY:
    28-jun-2005, ras, changed DET_INDEX_OFF to OFF_DET_INDEX

    12-may-2005, ras, added DETECTOR_INDEX_OFF check for times
     with no livetime for a particular detector such as 8
     Won't be set on the first pass so must check inside
     hsi_annsec_bproj.pro as well.

       29-apr-2005, ras, by setting NORATE_CORRECT to 1, the USE_RATE
     correction can be inhibited on the call to getdata.  This is a true
     keyword not a control parameter and so does not persist.
     19-apr-2004, ras, pass USE_RATE control parameter through to annsec_bproj
       Release 6 development: introduction of normal, uniform, taper, and
                              spatial_frequency_weight keywords
       Release 3 development, August / September 1999,
           A Csillaghy, csillag@ssl.berkeley.edu
       Based on the release 2 software of Richard Schwartz
       Fundamental developments by Richard Schwartz, GSFC


HESSI BACK PROJECTION CLASS DEFINITION [2] $SSW/hessi/idl/image/hsi_bproj_vismod__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI BACK PROJECTION CLASS DEFINITION

 PURPOSE: 
       Provides data structures and methods to generate and retrieve
       back projection maps.

 CATEGORY:
       HESSI Utilities
 
 CONSTRUCTION: 
       o = Obj_New( 'hsi_bproj' ) ;
       or
       o = HSI_BProj()

       The variable o is the object references used to
       access back projection maps and associated methods.

 INPUTS (CONTROL) PARAMETERS:
      
 OUTPUTS (INFORMATION) PARAMETERS:
       

 SOURCE OBJECT:
       HSI_Modul_Pattern
 
 DESTINATION OBJECTS:
       HSI_Modpat_Products, HSI_Image

 EXAMPLE:

 CALLS: ***
	HSI_BPROJ_VISMOD::HSI_BPROJ_ALG_HOOK, HSI_BPROJ_VISMOD__DEFINE
	HSI_MEMVIS_DOBPROJ
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/reference.html
	HESSI Utility Reference, hsi_bproj_control, hsi_bproj_control__defin
	hsi_bproj_info__define, hsi_modul_pattern__define
 HISTORY:
       Release 6 development: introduction of normal, uniform, taper, and
                              spatial_frequency_weight keywords
       Release 3 development, August / September 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu
       Based on the release 2 software of Richard Schwartz
       Fundamental developments by Richard Schwartz, GSFC


HESSI BACK PROJECTION CLASS DEFINITION [3] $SSW/hessi/idl/util/hsi_modul_profile__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI BACK PROJECTION CLASS DEFINITION

 PURPOSE: 
       Provides data structures and methods to generate and retrieve
       back projection maps.

 CATEGORY:
       HESSI Utilities
 
 CONSTRUCTION: 
       o = Obj_New( 'hsi_bproj' ) ;
       or
       o = HSI_BProj()

       The variable o is the object references used to
       access back projection maps and associated methods.

 INPUTS (CONTROL) PARAMETERS:
      
 OUTPUTS (INFORMATION) PARAMETERS:
       

 SOURCE OBJECT:
       HSI_Modul_Pattern
 
 DESTINATION OBJECTS:
       HSI_Modpat_Products, HSI_Image

 EXAMPLE:

 CALLS: ***
	HSI_MODUL_PATTERN, HSI_MODUL_PROFILE::INIT, HSI_MODUL_PROFILE__DEFINE
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/reference.html
	HESSI Utility Reference, hsi_bproj_control, hsi_bproj_control__defin
	hsi_bproj_info__define, hsi_modul_pattern__define
 HISTORY:
       Release 6 development: introduction of normal, uniform, taper, and
                              spatial_frequency_weight keywords
       Release 3 development, August / September 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu
       Based on the release 2 software of Richard Schwartz
       Fundamental developments by Richard Schwartz, GSFC


HESSI BACK PROJECTION CONTROL STRUCTURE DEFINITION [1] $SSW/hessi/idl/image/hsi_bproj_control__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI BACK PROJECTION CONTROL STRUCTURE DEFINITION

 PURPOSE:
       Defines the control parameters used by the back projection
       class.

 CATEGORY:
       HESSI Imaging

 CALLING SEQUENCE:
       var = {hsi_bproj_control}

 TAG NAMES:
       flatfield: back projection normalization
       vrate: allows passing an arbitrary count rate. 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:
              be = o->getdata( class='hsi_binned_eventlist' )
              vrate = be
              modify_vrate_here
              pb = o->getdata( vrate = vrate )


 CALLS: ***
	HSI_BPROJ_CONTROL__DEFINE
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/reference.html#hsi_bproj_control
 HISTORY:
       Dummy version, ras, 30-nov-2001 in preparation for offlining
       Release 5.1 development:
           changed weight to flatfield
       Release 4 development, March 2000
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI BACK PROJECTION CONTROL STRUCTURE DEFINITION [2] $SSW/hessi/idl/image/hsi_bproj_strategy_control__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI BACK PROJECTION CONTROL STRUCTURE DEFINITION

 PURPOSE:
       Defines the control parameters used by the back projection
       class.

 CATEGORY:
       HESSI Imaging

 CALLING SEQUENCE:
       var = {hsi_bproj_control}

 TAG NAMES:
       flatfield: back projection normalization
       vrate: allows passing an arbitrary count rate. 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:
              be = o->getdata( class='hsi_binned_eventlist' )
              vrate = be
              modify_vrate_here
              pb = o->getdata( vrate = vrate )

 CALLS: ***
	HSI_BPROJ_STRATEGY_CONTROL__DEFINE
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/reference.html#hsi_bproj_control
 HISTORY:
     Use_Rate  added 21-apr-2004
       Release 5.1 development:
           changed weight to flatfield
       Release 4 development, March 2000
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI BACK PROJECTION CONTROL STRUCTURE DEFINITION [3] $SSW/hessi/offline/hsi_vismod_bproj_control__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI BACK PROJECTION CONTROL STRUCTURE DEFINITION

 PURPOSE: 
       Defines the control parameters used by the back projection
       class. 

 CATEGORY:
       HESSI Imaging
 
 CALLING SEQUENCE: 
       var = {hsi_bproj_control}

 TAG NAMES:
       weight
       vrate

 CALLS: ***
	HSI_VISMOD_BPROJ_CONTROL__DEFINE
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/referenve.html#hsi_bproj_control
 HISTORY:
       Release 4 development, March 2000
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI BACK PROJECTION CONTROL STRUCTURE INITIALIZATION [1] $SSW/hessi/idl/image/hsi_bproj_control.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI BACK PROJECTION CONTROL STRUCTURE INITIALIZATION

 PURPOSE:
       This function returns an initialized structure of type
       {hsi_bproj_control}

 CATEGORY:
       HESSI Utilities

 CALLING SEQUENCE:
       var = HSI_BProj_Control()

 OPTIONAL OUTPUTS:
       var: a structure containing the following tag names:
       flatfield, initialized to 1
       vrate, initialized to PTR_New()

 CALLS: ***
	HSI_BPROJ_CONTROL
 HISTORY:
       Release 5.1: changed weight to flatfield, ACs
       Version 1, May 17, 1999,
           A Csillaghy, csillag@ssl.berkeley.edu
       Dummy version, ras, 30-nov-2001 in preparation for offlining


HESSI BACK PROJECTION CONTROL STRUCTURE INITIALIZATION [2] $SSW/hessi/idl/image/hsi_bproj_strategy_control.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI BACK PROJECTION CONTROL STRUCTURE INITIALIZATION

 PURPOSE:
       This function returns an initialized structure of type
       {hsi_bproj_control}

 CATEGORY:
       HESSI Utilities

 CALLING SEQUENCE:
       var = HSI_BProj_Control()

 OPTIONAL OUTPUTS:
       var: a structure containing the following tag names:
       flatfield, initialized to 1
       vrate, initialized to PTR_New()

 CALLS: ***
	HSI_BPROJ_STRATEGY_CONTROL
 HISTORY:
     7-may-2004, ras, use_rate added
       Release 5.1: changed weight to flatfield, ACs
       Version 1, May 17, 1999,
           A Csillaghy, csillag@ssl.berkeley.edu
   May 14, 2002, ras, set uniform_weighting as default


HESSI BACK PROJECTION CONTROL STRUCTURE INITIALIZATION [3] $SSW/hessi/offline/hsi_bproj_stategy_control.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI BACK PROJECTION CONTROL STRUCTURE INITIALIZATION

 PURPOSE: 
       This function returns an initialized structure of type
       {hsi_bproj_control}

 CATEGORY:
       HESSI Utilities
 
 CALLING SEQUENCE: 
       var = HSI_BProj_Control()

 OPTIONAL OUTPUTS:
       var: a structure containing the following tag names:
       flatfield, initialized to 1
       vrate, initialized to PTR_New()

 HISTORY:
       Release 5.1: changed weight to flatfield, ACs
       Version 1, May 17, 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI BACK PROJECTION INFORMATION STRUCTURE DEFINITION $SSW/hessi/idl/image/hsi_bproj_info__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI BACK PROJECTION INFORMATION STRUCTURE DEFINITION

 PURPOSE: 
       Defines the information parameters used by the back projection
       class. 

 CATEGORY:
       HESSI Imaging
 
 CALLING SEQUENCE: 
       var = {hsi_bproj_info}

 TAG NAMES:
       bproj_alg_available: an array of object names that can be used
                            as startegies for computing the back projetion

 CALLS: ***
	HSI_BPROJ_INFO__DEFINE
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/reference.html#hsi_bproj_info
 HISTORY:
       Release 6:  'real' parameters moved to
                  hsi_bproj_strategy_info. Acs, Sept 2001
       Release 5.1 development: 
           changed weight to flatfield
       Release 4 development, March 2000
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI BACK PROJECTION STRATEGY ABSTRACT CLASS $SSW/hessi/idl/image/hsi_bproj_strategy__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI BACK PROJECTION STRATEGY ABSTRACT CLASS

 PURPOSE:
       This class provides the default implementation for the back
       projection. It is extended by concrete classe that provide the
       startegies used to generate the bak projection, now basically the
       annular sector back projetion or the visibility back projection.

 CATEGORY
       Imaging

 CONSTRUCTION:
       o = HSI_BProj()

       The variable o is the object references used to
       access back projection maps and associated methods.

 INPUTS (CONTROL) PARAMETERS:

 OUTPUTS (INFORMATION) PARAMETERS:


 SOURCE OBJECT:
       HSI_Modul_Pattern

 DESTINATION OBJECTS:
       HSI_Modpat_Products, HSI_Image

 KEYWORDS:
   On Getdata:
     THIS_DET_INDEX - return only the map for THIS_DET_INDEX
                 CLASS_NAME=class_name, $
     THIS_HARMONIC_INDEX - map for THIS_HARMONIC_INDEX only
       NO_SUM - If set, return pointer array of maps
     NO_SPATIAL_FREQUENCY_WEIGHT - Don't apply any spatial weighting function

     VRATE - Use this pointer array of vectors instead of calib_eventlist.counts


 EXAMPLE:

 CALLS: ***
	CHECKVAR [1], HSI_BPROJ_STRATEGY::GETDATA, HSI_BPROJ_STRATEGY::INIT
	HSI_BPROJ_STRATEGY::PROCESS, HSI_BPROJ_STRATEGY::SET
	HSI_BPROJ_STRATEGY::SETSPATIALFREQUENCYWEIGHT, HSI_BPROJ_STRATEGY_CONTROL
	HSI_BPROJ_STRATEGY__DEFINE, HSI_GRID_PARAMETERS, HSI_MODUL_PATTERN
	SAME_DATA [1], SAME_DATA [2], checkvar [2]
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/reference.html
	HESSI Utility Reference, hsi_bproj_control, hsi_bproj_control__defin
	hsi_bproj_info__define, hsi_modul_pattern__define
 HISTORY:
     9-may-2005,ras, trap and pass through NORATE_CORRECT to support
     back projection without rate correction as required by hsi_pixon_bproj

               21-may-2004--  acs, change the set, last_update to the
                             new last update counter instead of
                             systime which does not work on fast
                             machines. eliminate the set last_update
                             in ::process as it is already done in framework
     24-nov-2002, ras, prevent underflows in call to exp() for taper coeffs.
     Sept 26 2002, ras, added NO_SPATIAL_FREQUENCY_WEIGHT at Metcalf's request
       Release 6 development: introduction of normal, uniform, taper, and
                              spatial_frequency_weight keywords
       Release 3 development, August / September 1999,
           A Csillaghy, csillag@ssl.berkeley.edu
       Based on the release 2 software of Richard Schwartz
       Fundamental developments by Richard Schwartz, GSFC
     19-dec-2001 added det_index_mask trap to SET, ras


HESSI BINNED EVENTLIST CLASS DEFINITION $SSW/hessi/idl/util/hsi_binned_eventlist__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI BINNED EVENTLIST CLASS DEFINITION;

 PURPOSE:
       Provides the algorithme to generate binned eventlists and to
       access them. Using the control parameters one can select
       different time binnings for each detector.

 CATEGORY:
       HESSI Utilities

 CONSTRUCTION:
       obj = Obj_New('hsi_binned_eventlist')

       "obj" may be any variable name

 (INPUT) CONTROL PARAMETERS:
       from {hsi_binned_eventlist_control}:

       front_segment: set this to 1 if you want to use the front segments
       rear_segment: set this to 1 if you want to use the rear segments
       det_index_mask: BYTARR( 9 ) set the corresponding byte to 1
                       for those detectors you want to get the
                       binned eventlist. Note that what this parameter
                       really do is set the parameter a2d_index_mask
                       for those a2ds associated with the choice. In
                       this way, if
                       the a2ds are already set, it will not redo the
                       binned eventlist each time the det_index_mask
                       is changed.
       time_bin_def: FltArr(9): values that multiplies time_bin_min
                     to determine the time binnning for each
               values must be ge 1.
                     detector. Default: 1,1,2,4,8,8,16,32,64
       time_bin_MIN: 0L: minimum value of the time binning (which
                     is then multiplied by time_bin_def). Default is
                     1024 binary microseconds. Must be ge 1.
      ;For the binned_eventlist class coincidence_flag and sum_coincidence have
     this behavior different from the spectrum class.
      coincidence_flag (byte) : Default is 0.  Accumulate only
                                anti-coincdent events. If set, then accumulate
                     anti and coincident events into summed spectra.
     if coincidence_flag is set, sum_coincidence is forced to be set.
     if coincidence_flag is changed, then the object will reprocess


      sum_coincidence: sum over coincidence condition on getdata.
      When sum_coincidence is changed to 1, coincidence_flag is also set
      Changing coincidence_flag to 0 from 1 will not trigger reprocessing
     of the spectrogram unless forced.  With /COINCIDENCE_FLAG set
     don't set SP_DATA_STR because it doesn't take care of all cases
     in writing the structure.


 OUTPUTS:
       n_bin: Lonarr( 9, 3 ): number of bins for each detector and
              each harmonic.
       binned_n_event: lonarr(9, 3): Records the total number of
                       events in each binned eventlist. Dimensioned SC(sub-collimator) by HARM(ONIC).

 PARENT CLASS:
       HSI_SPECTROGRAM

 METHODS:
       INIT: Just passes stuff to Framework
       Set: Deals with the setting of det_index_mask. It checks the
            values, sets the corresponding a2d_index_mask, using the
            conversion with hsi_detseg2a2d
       GetData: does subset selection using then keywords
                THIS_DET_INDEX or/and THIS_HARMONIC_INDEX
       Process
       GETAXIS: Returns pointer array for time axes (/yaxis) or axis for THIS_DET_INDEX and THIS_HARMONIC
         Returns energy edges for /XAXIS

 KEYWORDS:
       THIS_DET_INDEX: (GetData) returns the binned
                       eventlist only for that specific detector
       THIS_HARMONIC_INDEX: (GetData) returns the binned eventlist
                            only for that specific harmonic

 CALLS: ***
	ADD_TAG [1], ADD_TAG [2], CHECKVAR [1], EXIST, FCHECK, GET_EDGES
	HSI_BINNED_EVENTLIST::ACCBIN, HSI_BINNED_EVENTLIST::COMPUTE_TIME_AXES
	HSI_BINNED_EVENTLIST::CONTROL2BINNING, HSI_BINNED_EVENTLIST::GET
	HSI_BINNED_EVENTLIST::GETAXIS, HSI_BINNED_EVENTLIST::GETDATA
	HSI_BINNED_EVENTLIST::INIT, HSI_BINNED_EVENTLIST::PROCESS_HOOK_POST
	HSI_BINNED_EVENTLIST::SET, HSI_BINNED_EVENTLIST_CONTROL
	HSI_BINNED_EVENTLIST__DEFINE, HSI_DETSEG2A2D, LAST_ITEM, SAME_DATA [1]
	SAME_DATA [2], checkvar [2], edge_products, get_uniq, hsi_is_obj_nested
	hsi_rd_ct_edges, prstr [1], prstr [2]
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/reference.html#hsi_binned_eventlist
	hsi_binned_eventlist_control, hsi_binned_eventlist_info
	hsi_eventlist__define
 HISTORY:
 Release 5.1, richard.schwartz@gsfc, added binned_n_event info param.
       Release 3 development, August, 1999,
           initialization using HSI_Binned_Eventlist
       Release 2 development, April, 1999,
           A Csillaghy, csillag@ssl.berkeley.edu
       Algorithm and fundamental development: April 1999,
           G.Hurford, E.J.Schmahl and R.A.Schwartz, NASA/GSFC
   14-dec-2001, energy_band is now a control param of this
   class which holds the energy bin(s) limits, ras
   25-mar-02 RAS
     Added UT_BINNED_EVENTLIST info parameter to hold absolute time axes
     and GETAXIS method.
 1-apr-02, ras, added UT and ENERGY to keywords for getaxis
 3-jun-02, ras, integrate full livetime/dropout merged in livetime_arr
 25-Oct-2002, Kim.  Added @hsi_insert_catch in getdata
 10-oct-02, ras, patch around problem in setting energies before
   obs_time is set.
 7-nov-2002, ras, force TIME_BIN_DEF ge 1
 26-nov-2002, ras, turn on rear detector livetime if enabled
 Feb-2004, ras, culling introduced, small datagap fraction bins removed.
RAS, 17-may-2004
 ;Forced to sum over coincidence if coincidence_flag and sum_coincidence are set
 ;Therefore the independent states are not preserved and
 ;it must be forced to reprocess to regain this information
 ;4-mar-2005, ras, removed unneeded info arrays, livetime_ctr, dropout, livetime_arr
 ;  and ut_binned_eventlist.  These were sometimes quite large.
 ;  The call to getaxis(/ut) will still work even after ut_binned_eventlist is cleared
 ;  because the get(/ut_binned_eventlist) will trigger control2binning where these
 ;  are calculated.  Using /keep_dropout in the call to getdata() will inhibit the destruction
 ;  of those pointers.
 ;6-jun-2005, ras, eliminate memory leak in compute_time_axes and only recompute when necessary


HESSI BINNED EVENTLIST INFO STRUCTURE DEFINITION $SSW/hessi/idl/util/hsi_binned_eventlist_info__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI BINNED EVENTLIST INFO STRUCTURE DEFINITION

 PURPOSE:
       Defines the structure of the eventlist information
       parameters. For more information, please check
       hsi_binned_eventlist__define.

 CATEGORY:
       HESSI Utilities

 CALLING SEQUENCE:
       var = {hsi_eventlist_info}

 TAG NAMES:
       n_bin: the number of bins for each detector and each harmonic
       binned_n_event: Record the total number of events in each binned eventlist.
                 Dimensioned SC(sub-collimator) by HARM(ONIC).

 CALLS: ***
	HSI_BINNED_EVENTLIST_INFO__DEFINE
 HISTORY:
       Version 1, April 29, 1999,
           A Csillaghy, csillag@ssl.berkeley.edu
 Version 2, 20-Feb-2001. richard.schwartz@gsfc.nasa.gov
   Added binned_n_event.
 24-mar-2002, ras, added ut_binned_eventlist
 7-jun-2005, ras, added be_time_info to make compute_time_axes more efficient


HESSI CALIBRATED EVENTLIST CLASS DEFINITION [1] $SSW/hessi/idl/util/hsi_calib_eventlist__define.pro
[Previous] [Next]

 PROJECT:
       HESSI

 NAME:
       HESSI CALIBRATED EVENTLIST CLASS DEFINITION

 PURPOSE:
      Provides data structures and methods to generate and access
      calibrated event lists.

 CATEGORY:
       HESSI Utilities

 CONSTRUCTION:
       cbe_obj = Hsi_Calib_Eventlist_Raw( )
       cbe_obj = Obj_New('hsi_calib_eventlist_raw')

       "cbe_obj" may be any variable name

 CONTROL PARAMETERS
       USE_AUTO_TIME_BIN:  if set, the automatic time binning is implemented
     based on the flare offset and the CBE_DIGITAL_QUALITY parameter.
     0.99 is the highest value for CBE_DIGITAL_QUALITY
       CBE_POWERS_OF_TWO:  forces the multipliers on TIME_BIN_MIN to be in powers of two.;
 USE_FLUX_VAR: if set, then that procedure attempts to construct a demodulated
     profile of the true flux variation in the energy band,
     unmarred by grid modulation. Used in hsi_calib_eventlist_raw::DEMODULATE
 SMOOTHING_TIME is in seconds, and is used with the IDL smooth function, as part
     of this algorithm.  The SMOOTHING_TIME should not be longer than the accumulation
     interval.  If you want to use your own smoothing profile, determine it on regular
     bins, and load it into USER_FLUX_VAR. To subsequently disable that, and use
     the algorithm's value, set USER_FLUX_VAR to a scalar value,
     preferably either 1 or 0. Used in
     hsi_calib_eventlist_raw::DEMODULATE
       USER_FLUX_VAR: to load a custom-designed smoothing profile. See
                      above
       XYOFFSET: the position of the center of the map in arcescs
       USE_AUTO_TIME_BIN: is set, the time bins are determined
                          automatically.
       CBE_DIGITAL_QUALITY:
       SRT_FILENAME: to specify which SRT file to use.
       USE_TIME_WINDOW: a 2 element vector, with the first element
                        being the number of seconds of the data to
                        use, and the second element the number of
                        seconds of data to NOT use
   IMAGING_POWER_LAW - POWER-LAW parameter to pass to hessi_grm, assumed for incident
     photon spectrum

 KEYWORDS:

       ALL: (GetData) returns the calibrated eventlist in a single big
            structure. Use in clean (I think)
       POINTER: (GetData) returns the calibrated eventlist as a pointer, does
                not dereference.
       THIS_DET_INDEX: (GetData) to specify the detector number

                       (starting at 0) for which the calibrated
                       eventlist is requested, can be a scalar or a
                       vector in the range 0 to 9.
       THIS_HARMONIC_INDEX: (GetData) to specify the harmonic number
                       (starting at 0) for which the calibrated
                       eventlist is requested, can be a scalar or a
                       vector in the range 0 to 2.

 EXAMPLES:

       Creation of a calibrated event list object:
           cbe = Obj_New( 'hsi_calib_eventlist_raw' )
       or
           cbe = hsi_calib_eventlist_raw()

       set the following for the other objects:
           o->set,  FILENAME='test.fits', $
                                          TIME_RANGE=[1., 200.], $
                                          ENERGY_BAND=[6.,55.], $
                                          TIME_BIN_MIN=512


       Now:
           data = cbe->GetData( FILENAME='test.fits', $
                                          TIME_RANGE=[1., 200.], $
                                          ENERGY_BAND=[6.,55.], $
                                          TIME_BIN_MIN=512, $
                                          DET_INDEX=4)

       will return the calibrated eventlist for the data in filename
       test.fits and over the time range [1,200] sec for an energy
       band of [6,55] keV with a min time bin of 512 binary microsec,
       for the detector #5. .

 CALLS: ***
	CHECKVAR [1], EXIST, FCHECK, F_DIV, HSI_ALL_PROFILE, HSI_CALIB_EVENTLIST
	HSI_CALIB_EVENTLIST::GET, HSI_CALIB_EVENTLIST::GETDATA
	HSI_CALIB_EVENTLIST::GET_SMOOTHING_BINS, HSI_CALIB_EVENTLIST::INIT
	HSI_CALIB_EVENTLIST::SET, HSI_CALIB_EVENTLIST::WRITE
	HSI_CALIB_EVENTLIST_CONTROL, HSI_CALIB_EVENTLIST_TEST
	HSI_CALIB_EVENTLIST__DEFINE, HSI_GRID_PARAMETERS, HSI_IMAGE, HSI_LOC_FILE
	IS_STRING, REPRODUCE, checkvar [2], hsi_is_obj_nested, prstr [1], prstr [2]
 SEE ALSO:
	HSI_PACKET, hsi_calib_eventlist_raw, hsi_eventlist
 HISTORY:
     12-may-2005, ras, set det_index_off mask for detectors without valid time bins.
     23-mar-2005, ras, traps bad aspect solutions and exits gracefully
     29-sep-2004, ras, change to correction of 7-sep-2004, roll_angle is displaced
     by minimum and fixed number of 2*!pi such that all values are gt 0.
     7-sep-2004, ras, force roll_angle in process to be
     positive. There is an unknown problem downstream for negative
     roll_angles.


     17-apr-2004, ras, added culling.  If the gap value (new 17-apr-2004) is 1, set the livetime
     to 0.0.  0.0 livetime bins will be removed from the flatfielding, 0 livetime removes them from
     profile, and a 0 count value removes them from backprojection
     12-jan-2004, ras, changed call to get(/xyoffset) from getxyoffset()
     Also changes in ::Get concerning USE_FLARE_XYOFFSET
     at the start of process
       29-Jan-03 Kim Prepended $ to HSI_GRID in hsi_loc_file call
     25-Oct-2002, Kim.  Added @hsi_insert_catch in getdata, changed some message
       calls to hsi_message
     25-oct-02, ras, uses efficiencie for front or rear as needed nont
      for total detector (both segments) as before
     21-oct-02, ras, now it uses the correct atten_state to define image
     efficiencies, before all efficiencies were for atten_state 1.
     16-jul-02, ras, revised ::auto_time_bin to always use aspect solution
      USE_AUTO_TIME_BIN restored as the default.
     10-jun-02, ras, check for -1 on getdata for binned_eventlist
       Release 6.1 2002-02-17 -> documentation updated, time_window
       implemented, and firstimage for the support of the analysis of
       the first flare recorded

       16-aug-2001 richard schwartz, cbe_digital_quality constrained.
       12-jun-2001 richard schwartz, added auto time bin, flux variation
       17 April 2001, Release 5.1 - changed meaning of grid orientations
       grid_angle = !pi/2 - (hessi_grid_params.orient)[coll]
       was grid_angle = (hessi_grid_parms.orient)[coll]

       Release 4: - dets instead of a2ds.
                  -
       Release 3 development, August, 1999,
           initialization using Hsi_Calib_Eventlist_Raw
       Release 2 development, April, 1999,
           A Csillaghy, csillag@ssl.berkeley.edu
       Algorithm and fundamental development: April 1999,
           G.Hurford, E.J.Schmahl and R.A.Schwartz, NASA/GSFC


HESSI CALIBRATED EVENTLIST CLASS DEFINITION [2] $SSW/hessi/idl/util/hsi_calib_eventlist_direct__define.pro
[Previous] [Next]

 PROJECT:
       HESSI

 NAME:
       HESSI CALIBRATED EVENTLIST CLASS DEFINITION

 PURPOSE:
      Provides data structures and methods to generate and access
      calibrated event lists.

 CATEGORY:
       HESSI Utilities

 CONSTRUCTION:
       cbe_obj = Hsi_Calib_Eventlist_Raw( )
       cbe_obj = Obj_New('hsi_calib_eventlist_raw')

       "cbe_obj" may be any variable name

 CONTROL PARAMETERS
       USE_AUTO_TIME_BIN:  if set, the automatic time binning is implemented
     based on the flare offset and the CBE_DIGITAL_QUALITY parameter.
     0.99 is the highest value for CBE_DIGITAL_QUALITY
       CBE_POWERS_OF_TWO:  forces the multipliers on TIME_BIN_MIN to be in powers of two.;
 USE_FLUX_VAR: if set, then that procedure attempts to construct a demodulated
     profile of the true flux variation in the energy band,
     unmarred by grid modulation. Used in hsi_calib_eventlist_raw::DEMODULATE
 SMOOTHING_TIME is in seconds, and is used with the IDL smooth function, as part
     of this algorithm.  The SMOOTHING_TIME should not be longer than the accumulation
     interval.  If you want to use your own smoothing profile, determine it on regular
     bins, and load it into USER_FLUX_VAR. To subsequently disable that, and use
     the algorithm's value, set USER_FLUX_VAR to a scalar value,
     preferably either 1 or 0. Used in
     hsi_calib_eventlist_raw::DEMODULATE
       USER_FLUX_VAR: to load a custom-designed smoothing profile. See
                      above
       XYOFFSET: the position of the center of the map in arcescs
       USE_AUTO_TIME_BIN: is set, the time bins are determined
                          automatically.
       CBE_DIGITAL_QUALITY:
       SRT_FILENAME: to specify which SRT file to use.
       USE_TIME_WINDOW: a 2 element vector, with the first element
                        being the number of seconds of the data to
                        use, and the second element the number of
                        seconds of data to NOT use
   IMAGING_POWER_LAW - POWER-LAW parameter to pass to hessi_grm, assumed for incident
     photon spectrum

 KEYWORDS:

       ALL: (GetData) returns the calibrated eventlist in a single big
            structure. Use in clean (I think)
       POINTER: (GetData) returns the calibrated eventlist as a pointer, does
                not dereference.
       THIS_DET_INDEX: (GetData) to specify the detector number

                       (starting at 0) for which the calibrated
                       eventlist is requested, can be a scalar or a
                       vector in the range 0 to 9.
       THIS_HARMONIC_INDEX: (GetData) to specify the harmonic number
                       (starting at 0) for which the calibrated
                       eventlist is requested, can be a scalar or a
                       vector in the range 0 to 2.

 EXAMPLES:

       Creation of a calibrated event list object:
           cbe = Obj_New( 'hsi_calib_eventlist_raw' )
       or
           cbe = hsi_calib_eventlist_raw()

       set the following for the other objects:
           o->set,  FILENAME='test.fits', $
                                          TIME_RANGE=[1., 200.], $
                                          ENERGY_BAND=[6.,55.], $
                                          TIME_BIN_MIN=512


       Now:
           data = cbe->GetData( FILENAME='test.fits', $
                                          TIME_RANGE=[1., 200.], $
                                          ENERGY_BAND=[6.,55.], $
                                          TIME_BIN_MIN=512, $
                                          DET_INDEX=4)

       will return the calibrated eventlist for the data in filename
       test.fits and over the time range [1,200] sec for an energy
       band of [6,55] keV with a min time bin of 512 binary microsec,
       for the detector #5. .

 CALLS: ***
	CHECKVAR [1], EXIST, FCHECK, HSI_ALL_PROFILE, HSI_CALIB_EVENTLIST
	HSI_CALIB_EVENTLIST_CONTROL, HSI_CALIB_EVENTLIST_DIRECT::GET
	HSI_CALIB_EVENTLIST_DIRECT::GETDATA, HSI_CALIB_EVENTLIST_DIRECT::INIT
	HSI_CALIB_EVENTLIST_DIRECT::SET, HSI_CALIB_EVENTLIST_DIRECT::WRITE
	HSI_CALIB_EVENTLIST_DIRECT_TEST, HSI_CALIB_EVENTLIST_DIRECT__DEFINE
	HSI_IMAGE, HSI_LOC_FILE, IS_STRING, REPRODUCE, checkvar [2], hsi_is_obj_nested
	prstr [1], prstr [2]
 SEE ALSO:
	HSI_PACKET, hsi_calib_eventlist_raw, hsi_eventlist
 HISTORY:
     12-may-2005, ras, set det_index_off mask for detectors without valid time bins.
     23-mar-2005, ras, traps bad aspect solutions and exits gracefully
     29-sep-2004, ras, change to correction of 7-sep-2004, roll_angle is displaced
     by minimum and fixed number of 2*!pi such that all values are gt 0.
     7-sep-2004, ras, force roll_angle in process to be
     positive. There is an unknown problem downstream for negative
     roll_angles.


     17-apr-2004, ras, added culling.  If the gap value (new 17-apr-2004) is 1, set the livetime
     to 0.0.  0.0 livetime bins will be removed from the flatfielding, 0 livetime removes them from
     profile, and a 0 count value removes them from backprojection
     12-jan-2004, ras, changed call to get(/xyoffset) from getxyoffset()
     Also changes in ::Get concerning USE_FLARE_XYOFFSET
     at the start of process
       29-Jan-03 Kim Prepended $ to HSI_GRID in hsi_loc_file call
     25-Oct-2002, Kim.  Added @hsi_insert_catch in getdata, changed some message
       calls to hsi_message
     25-oct-02, ras, uses efficiencie for front or rear as needed nont
      for total detector (both segments) as before
     21-oct-02, ras, now it uses the correct atten_state to define image
     efficiencies, before all efficiencies were for atten_state 1.
     16-jul-02, ras, revised ::auto_time_bin to always use aspect solution
      USE_AUTO_TIME_BIN restored as the default.
     10-jun-02, ras, check for -1 on getdata for binned_eventlist
       Release 6.1 2002-02-17 -> documentation updated, time_window
       implemented, and firstimage for the support of the analysis of
       the first flare recorded

       16-aug-2001 richard schwartz, cbe_digital_quality constrained.
       12-jun-2001 richard schwartz, added auto time bin, flux variation
       17 April 2001, Release 5.1 - changed meaning of grid orientations
       grid_angle = !pi/2 - (hessi_grid_params.orient)[coll]
       was grid_angle = (hessi_grid_parms.orient)[coll]

       Release 4: - dets instead of a2ds.
                  -
       Release 3 development, August, 1999,
           initialization using Hsi_Calib_Eventlist_Raw
       Release 2 development, April, 1999,
           A Csillaghy, csillag@ssl.berkeley.edu
       Algorithm and fundamental development: April 1999,
           G.Hurford, E.J.Schmahl and R.A.Schwartz, NASA/GSFC


HESSI CALIBRATED EVENTLIST CLASS DEFINITION [3] $SSW/hessi/idl/util/hsi_calib_eventlist_raw__define.pro
[Previous] [Next]

 PROJECT:
       HESSI

 NAME:
       HESSI CALIBRATED EVENTLIST CLASS DEFINITION

 PURPOSE:
      Provides data structures and methods to generate and access
      calibrated event lists.

 CATEGORY:
       HESSI Utilities

 CONSTRUCTION:
       cbe_obj = Hsi_Calib_Eventlist_Raw( )
       cbe_obj = Obj_New('hsi_calib_eventlist_raw')

       "cbe_obj" may be any variable name

 CONTROL PARAMETERS
       USE_AUTO_TIME_BIN:  if set, the automatic time binning is implemented
     based on the flare offset and the CBE_DIGITAL_QUALITY parameter.
     0.99 is the highest value for CBE_DIGITAL_QUALITY
       CBE_POWERS_OF_TWO:  forces the multipliers on TIME_BIN_MIN to be in powers of two.;
 USE_FLUX_VAR: if set, then that procedure attempts to construct a demodulated
     profile of the true flux variation in the energy band,
     unmarred by grid modulation. Used in hsi_calib_eventlist_raw::DEMODULATE
 SMOOTHING_TIME is in seconds, and is used with the IDL smooth function, as part
     of this algorithm.  The SMOOTHING_TIME should not be longer than the accumulation
     interval.  If you want to use your own smoothing profile, determine it on regular
     bins, and load it into USER_FLUX_VAR. To subsequently disable that, and use
     the algorithm's value, set USER_FLUX_VAR to a scalar value,
     preferably either 1 or 0. Used in
     hsi_calib_eventlist_raw::DEMODULATE
       USER_FLUX_VAR: to load a custom-designed smoothing profile. See
                      above
       XYOFFSET: the position of the center of the map in arcescs
       USE_AUTO_TIME_BIN: is set, the time bins are determined
                          automatically.
       CBE_DIGITAL_QUALITY:
       SRT_FILENAME: to specify which SRT file to use.
       USE_TIME_WINDOW: a 2 element vector, with the first element
                        being the number of seconds of the data to
                        use, and the second element the number of
                        seconds of data to NOT use
   IMAGING_POWER_LAW - POWER-LAW parameter to pass to hessi_grm, assumed for incident
     photon spectrum

 KEYWORDS:

       ALL: (GetData) returns the calibrated eventlist in a single big
            structure. Use in clean (I think)
       POINTER: (GetData) returns the calibrated eventlist as a pointer, does
                not dereference.
       THIS_DET_INDEX: (GetData) to specify the detector number

                       (starting at 0) for which the calibrated
                       eventlist is requested, can be a scalar or a
                       vector in the range 0 to 9.
       THIS_HARMONIC_INDEX: (GetData) to specify the harmonic number
                       (starting at 0) for which the calibrated
                       eventlist is requested, can be a scalar or a
                       vector in the range 0 to 2.

 EXAMPLES:

       Creation of a calibrated event list object:
           cbe = Obj_New( 'hsi_calib_eventlist_raw' )
       or
           cbe = hsi_calib_eventlist_raw()

       set the following for the other objects:
           o->set,  FILENAME='test.fits', $
                                          TIME_RANGE=[1., 200.], $
                                          ENERGY_BAND=[6.,55.], $
                                          TIME_BIN_MIN=512


       Now:
           data = cbe->GetData( FILENAME='test.fits', $
                                          TIME_RANGE=[1., 200.], $
                                          ENERGY_BAND=[6.,55.], $
                                          TIME_BIN_MIN=512, $
                                          DET_INDEX=4)

       will return the calibrated eventlist for the data in filename
       test.fits and over the time range [1,200] sec for an energy
       band of [6,55] keV with a min time bin of 512 binary microsec,
       for the detector #5. .

 CALLS: ***
	ARR2STR [1], AVG [1], AVG [2], Arr2Str [2], FCHECK, HSI_CALIB_EVENTLIST
	HSI_CALIB_EVENTLIST_RAW::AUTO_TIME_BIN, HSI_CALIB_EVENTLIST_RAW::INIT
	HSI_CALIB_EVENTLIST_RAW::NEED_UPDATE, HSI_CALIB_EVENTLIST_RAW::PROCESS
	HSI_CALIB_EVENTLIST_RAW::TIME_BIN, HSI_CALIB_EVENTLIST_RAW_TEST
	HSI_CALIB_EVENTLIST_RAW__DEFINE, HSI_GRID_PARAMETERS, HSI_IMAGE, HSI_LOC_FILE
	HSI_RADIAL_COORD, STDEV, TAG_EXIST [1], TAG_EXIST [2], anytim [1], anytim [2]
	anytim [3], anytim [4], anytim [5], hessi_drm_4image, hessi_grm, hsi_get_debug [1]
	hsi_get_debug [2], hsi_gridtran_correction, hsi_time_bin_auto, where_arr [1]
	where_arr [2]
 SEE ALSO:
	HSI_PACKET, hsi_calib_eventlist_raw, hsi_eventlist
 HISTORY:
   13-dec-2005, ras, integrated changes in calib_eventlist__define (old) into the
     new calib_eventlist_raw__define
   12-dec-2005, ras, removed some old commented code from process, added EMPTY_FLAG keyword to getdata.
     8-jul-2005, ras, use hsi_radial_coord to compute coordinates in imaging axis
     coordinate system
     27-jun-2005, ras, change det_index_off to off_det_index
     jun-2005, ras, avoid overflows in time passed to aspect object.  old formulation
    could have suffered problems for intervals gt 2048 seconds
     12-may-2005, ras, set det_index_off mask for detectors without valid time bins.
     23-mar-2005, ras, traps bad aspect solutions and exits gracefully
     29-sep-2004, ras, change to correction of 7-sep-2004, roll_angle is displaced
     by minimum and fixed number of 2*!pi such that all values are gt 0.
     7-sep-2004, ras, force roll_angle in process to be
     positive. There is an unknown problem downstream for negative
     roll_angles.


     17-apr-2004, ras, added culling.  If the gap value (new 17-apr-2004) is 1, set the livetime
     to 0.0.  0.0 livetime bins will be removed from the flatfielding, 0 livetime removes them from
     profile, and a 0 count value removes them from backprojection
     12-jan-2004, ras, changed call to get(/xyoffset) from getxyoffset()
     Also changes in ::Get concerning USE_FLARE_XYOFFSET
     at the start of process
       29-Jan-03 Kim Prepended $ to HSI_GRID in hsi_loc_file call
     25-Oct-2002, Kim.  Added @hsi_insert_catch in getdata, changed some message
       calls to hsi_message
     25-oct-02, ras, uses efficiencie for front or rear as needed nont
      for total detector (both segments) as before
     21-oct-02, ras, now it uses the correct atten_state to define image
     efficiencies, before all efficiencies were for atten_state 1.
     16-jul-02, ras, revised ::auto_time_bin to always use aspect solution
      USE_AUTO_TIME_BIN restored as the default.
     10-jun-02, ras, check for -1 on getdata for binned_eventlist
       Release 6.1 2002-02-17 -> documentation updated, time_window
       implemented, and firstimage for the support of the analysis of
       the first flare recorded

       16-aug-2001 richard schwartz, cbe_digital_quality constrained.
       12-jun-2001 richard schwartz, added auto time bin, flux variation
       17 April 2001, Release 5.1 - changed meaning of grid orientations
       grid_angle = !pi/2 - (hessi_grid_params.orient)[coll]
       was grid_angle = (hessi_grid_parms.orient)[coll]

       Release 4: - dets instead of a2ds.
                  -
       Release 3 development, August, 1999,
           initialization using Hsi_Calib_Eventlist_Raw
       Release 2 development, April, 1999,
           A Csillaghy, csillag@ssl.berkeley.edu
       Algorithm and fundamental development: April 1999,
           G.Hurford, E.J.Schmahl and R.A.Schwartz, NASA/GSFC


HESSI CALIBRATED EVENTLIST CLASS DEFINITION [4] $SSW/hessi/idl/util/hsi_calib_eventlist_vis__define.pro
[Previous] [Next]

 PROJECT:
       HESSI

 NAME:
       HESSI CALIBRATED EVENTLIST CLASS DEFINITION

 PURPOSE:
      Provides data structures and methods to generate and access
      calibrated event lists.

 CATEGORY:
       HESSI Utilities

 CONSTRUCTION:
       cbe_obj = Hsi_Calib_Eventlist_Raw( )
       cbe_obj = Obj_New('hsi_calib_eventlist_raw')

       "cbe_obj" may be any variable name

 CONTROL PARAMETERS
       USE_AUTO_TIME_BIN:  if set, the automatic time binning is implemented
     based on the flare offset and the CBE_DIGITAL_QUALITY parameter.
     0.99 is the highest value for CBE_DIGITAL_QUALITY
       CBE_POWERS_OF_TWO:  forces the multipliers on TIME_BIN_MIN to be in powers of two.;
 USE_FLUX_VAR: if set, then that procedure attempts to construct a demodulated
     profile of the true flux variation in the energy band,
     unmarred by grid modulation. Used in hsi_calib_eventlist_raw::DEMODULATE
 SMOOTHING_TIME is in seconds, and is used with the IDL smooth function, as part
     of this algorithm.  The SMOOTHING_TIME should not be longer than the accumulation
     interval.  If you want to use your own smoothing profile, determine it on regular
     bins, and load it into USER_FLUX_VAR. To subsequently disable that, and use
     the algorithm's value, set USER_FLUX_VAR to a scalar value,
     preferably either 1 or 0. Used in
     hsi_calib_eventlist_raw::DEMODULATE
       USER_FLUX_VAR: to load a custom-designed smoothing profile. See
                      above
       XYOFFSET: the position of the center of the map in arcescs
       USE_AUTO_TIME_BIN: is set, the time bins are determined
                          automatically.
       CBE_DIGITAL_QUALITY:
       SRT_FILENAME: to specify which SRT file to use.
       USE_TIME_WINDOW: a 2 element vector, with the first element
                        being the number of seconds of the data to
                        use, and the second element the number of
                        seconds of data to NOT use
   IMAGING_POWER_LAW - POWER-LAW parameter to pass to hessi_grm, assumed for incident
     photon spectrum

 KEYWORDS:

       ALL: (GetData) returns the calibrated eventlist in a single big
            structure. Use in clean (I think)
       POINTER: (GetData) returns the calibrated eventlist as a pointer, does
                not dereference.
       THIS_DET_INDEX: (GetData) to specify the detector number

                       (starting at 0) for which the calibrated
                       eventlist is requested, can be a scalar or a
                       vector in the range 0 to 9.
       THIS_HARMONIC_INDEX: (GetData) to specify the harmonic number
                       (starting at 0) for which the calibrated
                       eventlist is requested, can be a scalar or a
                       vector in the range 0 to 2.

 EXAMPLES:

       Creation of a calibrated event list object:
           cbe = Obj_New( 'hsi_calib_eventlist_raw' )
       or
           cbe = hsi_calib_eventlist_raw()

       set the following for the other objects:
           o->set,  FILENAME='test.fits', $
                                          TIME_RANGE=[1., 200.], $
                                          ENERGY_BAND=[6.,55.], $
                                          TIME_BIN_MIN=512


       Now:
           data = cbe->GetData( FILENAME='test.fits', $
                                          TIME_RANGE=[1., 200.], $
                                          ENERGY_BAND=[6.,55.], $
                                          TIME_BIN_MIN=512, $
                                          DET_INDEX=4)

       will return the calibrated eventlist for the data in filename
       test.fits and over the time range [1,200] sec for an energy
       band of [6,55] keV with a min time bin of 512 binary microsec,
       for the detector #5. .

 CALLS: ***
	HSI_CALIB_EVENTLIST, HSI_CALIB_EVENTLIST_TEST, HSI_CALIB_EVENTLIST_VIS::INIT
	HSI_CALIB_EVENTLIST_VIS::PROCESS, HSI_CALIB_EVENTLIST_VIS__DEFINE, HSI_IMAGE
	HSI_LOC_FILE
 SEE ALSO:
	HSI_PACKET, hsi_calib_eventlist_raw, hsi_eventlist
 HISTORY:
     12-may-2005, ras, set det_index_off mask for detectors without valid time bins.
     23-mar-2005, ras, traps bad aspect solutions and exits gracefully
     29-sep-2004, ras, change to correction of 7-sep-2004, roll_angle is displaced
     by minimum and fixed number of 2*!pi such that all values are gt 0.
     7-sep-2004, ras, force roll_angle in process to be
     positive. There is an unknown problem downstream for negative
     roll_angles.


     17-apr-2004, ras, added culling.  If the gap value (new 17-apr-2004) is 1, set the livetime
     to 0.0.  0.0 livetime bins will be removed from the flatfielding, 0 livetime removes them from
     profile, and a 0 count value removes them from backprojection
     12-jan-2004, ras, changed call to get(/xyoffset) from getxyoffset()
     Also changes in ::Get concerning USE_FLARE_XYOFFSET
     at the start of process
       29-Jan-03 Kim Prepended $ to HSI_GRID in hsi_loc_file call
     25-Oct-2002, Kim.  Added @hsi_insert_catch in getdata, changed some message
       calls to hsi_message
     25-oct-02, ras, uses efficiencie for front or rear as needed nont
      for total detector (both segments) as before
     21-oct-02, ras, now it uses the correct atten_state to define image
     efficiencies, before all efficiencies were for atten_state 1.
     16-jul-02, ras, revised ::auto_time_bin to always use aspect solution
      USE_AUTO_TIME_BIN restored as the default.
     10-jun-02, ras, check for -1 on getdata for binned_eventlist
       Release 6.1 2002-02-17 -> documentation updated, time_window
       implemented, and firstimage for the support of the analysis of
       the first flare recorded

       16-aug-2001 richard schwartz, cbe_digital_quality constrained.
       12-jun-2001 richard schwartz, added auto time bin, flux variation
       17 April 2001, Release 5.1 - changed meaning of grid orientations
       grid_angle = !pi/2 - (hessi_grid_params.orient)[coll]
       was grid_angle = (hessi_grid_parms.orient)[coll]

       Release 4: - dets instead of a2ds.
                  -
       Release 3 development, August, 1999,
           initialization using Hsi_Calib_Eventlist_Raw
       Release 2 development, April, 1999,
           A Csillaghy, csillag@ssl.berkeley.edu
       Algorithm and fundamental development: April 1999,
           G.Hurford, E.J.Schmahl and R.A.Schwartz, NASA/GSFC


HESSI CALIBRATED EVENTLIST CLASS DEFINITION [5] $SSW/hessi/idl/util/hsi_fileandraw__define.pro
[Previous] [Next]

 PROJECT:
       HESSI

 NAME:
       HESSI CALIBRATED EVENTLIST CLASS DEFINITION

 PURPOSE:
      Provides data structures and methods to generate and access
      calibrated event lists.

 CATEGORY:
       HESSI Utilities

 CONSTRUCTION:
       cbe_obj = Hsi_Calib_Eventlist_Raw( )
       cbe_obj = Obj_New('hsi_calib_eventlist_raw')

       "cbe_obj" may be any variable name

 CONTROL PARAMETERS
       USE_AUTO_TIME_BIN:  if set, the automatic time binning is implemented
     based on the flare offset and the CBE_DIGITAL_QUALITY parameter.
     0.99 is the highest value for CBE_DIGITAL_QUALITY
       CBE_POWERS_OF_TWO:  forces the multipliers on TIME_BIN_MIN to be in powers of two.;
 USE_FLUX_VAR: if set, then that procedure attempts to construct a demodulated
     profile of the true flux variation in the energy band,
     unmarred by grid modulation. Used in hsi_calib_eventlist_raw::DEMODULATE
 SMOOTHING_TIME is in seconds, and is used with the IDL smooth function, as part
     of this algorithm.  The SMOOTHING_TIME should not be longer than the accumulation
     interval.  If you want to use your own smoothing profile, determine it on regular
     bins, and load it into USER_FLUX_VAR. To subsequently disable that, and use
     the algorithm's value, set USER_FLUX_VAR to a scalar value,
     preferably either 1 or 0. Used in
     hsi_calib_eventlist_raw::DEMODULATE
       USER_FLUX_VAR: to load a custom-designed smoothing profile. See
                      above
       XYOFFSET: the position of the center of the map in arcescs
       USE_AUTO_TIME_BIN: is set, the time bins are determined
                          automatically.
       CBE_DIGITAL_QUALITY:
       SRT_FILENAME: to specify which SRT file to use.
       USE_TIME_WINDOW: a 2 element vector, with the first element
                        being the number of seconds of the data to
                        use, and the second element the number of
                        seconds of data to NOT use
   IMAGING_POWER_LAW - POWER-LAW parameter to pass to hessi_grm, assumed for incident
     photon spectrum

 KEYWORDS:

       ALL: (GetData) returns the calibrated eventlist in a single big
            structure. Use in clean (I think)
       POINTER: (GetData) returns the calibrated eventlist as a pointer, does
                not dereference.
       THIS_DET_INDEX: (GetData) to specify the detector number

                       (starting at 0) for which the calibrated
                       eventlist is requested, can be a scalar or a
                       vector in the range 0 to 9.
       THIS_HARMONIC_INDEX: (GetData) to specify the harmonic number
                       (starting at 0) for which the calibrated
                       eventlist is requested, can be a scalar or a
                       vector in the range 0 to 2.

 EXAMPLES:

       Creation of a calibrated event list object:
           cbe = Obj_New( 'hsi_calib_eventlist_raw' )
       or
           cbe = hsi_calib_eventlist_raw()

       set the following for the other objects:
           o->set,  FILENAME='test.fits', $
                                          TIME_RANGE=[1., 200.], $
                                          ENERGY_BAND=[6.,55.], $
                                          TIME_BIN_MIN=512


       Now:
           data = cbe->GetData( FILENAME='test.fits', $
                                          TIME_RANGE=[1., 200.], $
                                          ENERGY_BAND=[6.,55.], $
                                          TIME_BIN_MIN=512, $
                                          DET_INDEX=4)

       will return the calibrated eventlist for the data in filename
       test.fits and over the time range [1,200] sec for an energy
       band of [6,55] keV with a min time bin of 512 binary microsec,
       for the detector #5. .

 CALLS: ***
	EXIST, HSI_FILEANDRAW::GETPROCESSOR, HSI_FILEANDRAW::INIT
	HSI_FILEANDRAW::NEED_UPDATE, HSI_FILEANDRAW::PROCESS, HSI_FILEANDRAW::SET
	HSI_FILEANDRAW__DEFINE, IS_STRING
 SEE ALSO:
	HSI_PACKET, hsi_calib_eventlist_raw, hsi_eventlist
 HISTORY:
     12-may-2005, ras, set det_index_off mask for detectors without valid time bins.
     23-mar-2005, ras, traps bad aspect solutions and exits gracefully
     29-sep-2004, ras, change to correction of 7-sep-2004, roll_angle is displaced
     by minimum and fixed number of 2*!pi such that all values are gt 0.
     7-sep-2004, ras, force roll_angle in process to be
     positive. There is an unknown problem downstream for negative
     roll_angles.


     17-apr-2004, ras, added culling.  If the gap value (new 17-apr-2004) is 1, set the livetime
     to 0.0.  0.0 livetime bins will be removed from the flatfielding, 0 livetime removes them from
     profile, and a 0 count value removes them from backprojection
     12-jan-2004, ras, changed call to get(/xyoffset) from getxyoffset()
     Also changes in ::Get concerning USE_FLARE_XYOFFSET
     at the start of process
       29-Jan-03 Kim Prepended $ to HSI_GRID in hsi_loc_file call
     25-Oct-2002, Kim.  Added @hsi_insert_catch in getdata, changed some message
       calls to hsi_message
     25-oct-02, ras, uses efficiencie for front or rear as needed nont
      for total detector (both segments) as before
     21-oct-02, ras, now it uses the correct atten_state to define image
     efficiencies, before all efficiencies were for atten_state 1.
     16-jul-02, ras, revised ::auto_time_bin to always use aspect solution
      USE_AUTO_TIME_BIN restored as the default.
     10-jun-02, ras, check for -1 on getdata for binned_eventlist
       Release 6.1 2002-02-17 -> documentation updated, time_window
       implemented, and firstimage for the support of the analysis of
       the first flare recorded

       16-aug-2001 richard schwartz, cbe_digital_quality constrained.
       12-jun-2001 richard schwartz, added auto time bin, flux variation
       17 April 2001, Release 5.1 - changed meaning of grid orientations
       grid_angle = !pi/2 - (hessi_grid_params.orient)[coll]
       was grid_angle = (hessi_grid_parms.orient)[coll]

       Release 4: - dets instead of a2ds.
                  -
       Release 3 development, August, 1999,
           initialization using Hsi_Calib_Eventlist_Raw
       Release 2 development, April, 1999,
           A Csillaghy, csillag@ssl.berkeley.edu
       Algorithm and fundamental development: April 1999,
           G.Hurford, E.J.Schmahl and R.A.Schwartz, NASA/GSFC


HESSI CALIBRATED EVENTLIST CONTROL STRUCTURE DEFINITION [1] $SSW/hessi/idl/util/hsi_calib_eventlist_control__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI CALIBRATED EVENTLIST CONTROL STRUCTURE DEFINITION

 PURPOSE:
       Defines the data type of the structure that controls the
       output of the calibrated eventlist object

 CATEGORY:
       HESSI Utilities

 CALLING SEQUENCE:
       var = {hsi_calib_eventlist_control}

 TAG NAMES:
** Structure HSI_CALIB_EVENTLIST_CONTROL, 8 tags, length=40:
   XYOFFSET        FLOAT     Array[2]
   USE_AUTO_TIME_BIN
                   LONG      =            1
   CBE_DIGITAL_QUALITY
                   FLOAT     =      0.900000
   CBE_POWERS_OF_TWO
                   LONG      =            1
   USER_FLUX_VAR   POINTER   <PtrHeapVar3487>
   USE_FLUX_VAR    LONG                 0
   SMOOTHING_TIME  FLOAT          0.500000
   SRT_FILENAME    STRING    '$SSWDB_HESSI/grid_resp/SRT_2*.dat'

 CALLS: ***
	HSI_CALIB_EVENTLIST_CONTROL__DEFINE
 PROCEDURE:
   Now to explain
   USE_AUTO_TIME_BIN - if set, the automatic time binning is implemented
   based on the flare offset and the CBE_DIGITAL_QUALITY parameter.
   0.99 is the highest value for CBE_DIGITAL_QUALITY
   CBE_POWERS_OF_TWO forces the multipliers on TIME_BIN_MIN to be in powers of two.
   CBE_TIME_BIN_FLOOR, forces time_bin values (time_bin_min * time_bin_def normally)
     to be at least this value.  In units of binary microseconds it's useful
     for removing fine grids from an image accumulation. For long integration
     the numbers of fine grid bins can be excessive without adding signal.
     By setting to a number like 2^16, this can be prevented.

   The next three parameters, USER_FLUX_VAR, USE_FLUX_VAR, and SMOOTHING_TIME
   are used in hsi_calib_eventlist::DEMODULATE

   If USE_FLUX_VAR is set, then that procedure attempts to construct a demodulated
   profile of the true flux variation in the energy band, unmarred by grid modulation.
   The SMOOTHING_TIME is in seconds, and is used with the IDL smooth function, as part
   of this algorithm.  The SMOOTHING_TIME should not be longer than the accumulation
   interval.  If you want to use your own smoothing profile, determine it on regular
   bins, and load it into USER_FLUX_VAR.  To subsequently disable that, and use
   the algorithm's value, set USER_FLUX_VAR to a scalar value, preferably either 1 or 0.

       see further doc in hsi_calib_eventlist__define

 HISTORY:
       17-feb-2002, acs, added the use_time_window for calibration +
       crab obs
   16-aug-2001, ras, added more documentation
   7-jun-2001, richard schwartz,
   added cbe_digital_quality, cbe_powers_of_two, $
   use_flux_var, user_flux_var
       Version 1, April 29, 1999,
           A Csillaghy, csillag@ssl.berkeley.edu
   13-aug-03 added hsi_xyoffset_control
   12-nov-03 added hsi_phz_stacker_control
   25-feb-2004, ras, added cb_coef, these are coefficients that
     may be used in some processing, really tbd placeholder
   25-feb-2004, ras, added user_hook
   6-may-2004, ras, added imaging_power_law, use_local_average, local_average_frequency, auto_frequency
   3-oct-2005, ras, added cbe_time_bin_floor


HESSI CALIBRATED EVENTLIST CONTROL STRUCTURE DEFINITION [2] $SSW/hessi/offline/hsi_modpat_control__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI CALIBRATED EVENTLIST CONTROL STRUCTURE DEFINITION

 PURPOSE: 
       Defines the data type of the structure that controls the
       output of the calibrated eventlist object

 CATEGORY:
       HESSI Utilities
 
 CALLING SEQUENCE: 
       var = {hsi_calib_eventlist_control}

 TAG NAMES:
       time_bin_def: LonARR(9): Definition of the time bin ratio
                     between detectors. The actual value of the tim
                     bin is then computed with: 
                     time_bin = 64L * time_bin_def * (time_bin_min / 64l)
       time_bin_MIN: int. The minimum time bin. The actual
                     values for each detector is then computed with
                     time_bin = 64L * time_bin_def * (time_bin_min / 64l)
       scale: int
       time_range: [0.0D, 0.0D], $
       time_unit: 0, $
       xyoffset: [0.0, 0.0], $
       energy_band: [0.0D, 0.0D], $
       harmonic: BYTARR( 8, 5 ), $
       det_index: BYTARR( 27 )

 COMMON BLOCKS:
       None.

 PROCEDURE:

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 EXAMPLES:
       

 CALLS: ***
	HSI_MODPAT_CONTROL__DEFINE
 SEE ALSO:
 HISTORY:
       Version 1, April 29, 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI Calibrated Eventlist Definition $SSW/hessi/idl/util/hsi_calib_eventlist.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI Calibrated Eventlist Definition

 PURPOSE: 
       Creates an instance of the calibrated eventlist class.

 CATEGORY:
       HESS Utilities (idl/util)
 
 CALLING SEQUENCE: 
       object = hsi_calib_eventlist()

 OUTPUTS:
       The function returns an object reference of the class hsi_calib_eventlist

 KEYWORDS: 
       Any of the keywords defined in hsi_calib_eventlist__define an
       its parent structures.

 CALLS: ***
	HSI_CALIB_EVENTLIST
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/reference.html
	hsi_calib_eventlist__define
 HISTORY:
       Version 1, May 12, 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI CLEAN ALGORITHM CLASS DEFINITION $SSW/hessi/idl/image/hsi_clean__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI CLEAN ALGORITHM CLASS DEFINITION

 PURPOSE:
       Object wrapper for the clean algorithm

 CATEGORY:
       Imaging (hessi/image)

 CONSTRUCTION:
       image_obj = Obj_Name( 'hsi_clean' )

 METHODS:
      No public methods

 OUTPUT TYPE:
      2D IMAGE ARRAY

 INPUT PARAMETERS:
       Control (input) parameters are defined in the structure
       {hsi_clean_parameters}.

 OUTPUT PARAMETERS:
       Info (output) parameters are
       CHI_SQ_TOT: the value of the chi2 at the exit of hsi_map_clean
       RESID_MAP: the residual map

 SOURCE OBJECT:
       HSI_Modpat_Products

 CALLS: ***
	APPEND_ARR, EXIST, HSI_CLEAN::IMAGE_ALG_HOOK, HSI_CLEAN::INIT
	HSI_CLEAN_PARAMETERS, HSI_CLEAN__DEFINE, HSI_MAP_CLEAN [1], HSI_MAP_CLEAN [2]
	HSI_MAP_CLEAN [3], JOIN_STRUCT [1], JOIN_STRUCT [2], MINMAX [1], MINMAX [2]
	REP_TAG_NAME, TRIM, plotman
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/reference.html#hsi_clean
	HSI_MAP_CLEAN [1], HSI_MAP_CLEAN [2], HSI_MAP_CLEAN [3]
 HISTORY:
       Development for Release 4, April 2000
       24-Feb-2001, Kim - added mark_box block
       9-Jan-2001, Kim - corrected mark_box option and call plotman mark_box method now
         instead of hsi_clean_box_options
       27-Feb-2002, Kim - remove clean boxes that are outside image window.  Make colortable 5
         the default for image for marking clean boxes.
		17-Mar-2003, RAS, if bproj_need_update is set, must start at iter 0.


HESSI clean INFORMATION PARAMETER DEFINITION $SSW/hessi/idl/image/hsi_clean_info__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI clean INFORMATION PARAMETER DEFINITION

 PURPOSE: 
       Defines the HESSI clean inforamtion parameters

 CATEGORY:
       HESSI / Imaging
 
 CALLING SEQUENCE: 
       var = {hsi_clean_info}

 EXAMPLES:

 CALLS: ***
	HSI_CLEAN_INFO__DEFINE
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/reference.html
 HISTORY:
       
           


HESSI Compound Widget Simulation $SSW/hessi/idl/sub_task/hsi_cw_simulation.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI Compound Widget Simulation
;
 PURPOSE:
       Parameter selection tool associated with simulation parameters

 CATEGORY:


 CALLING SEQUENCE:
       widget_id = hsi_cw_simulation( parent )

 INPUTS:


 OPTIONAL INPUTS:
       None.

 OUTPUTS:
       widget_id: the id number associated with the widget

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS:
       None.

 COMMON BLOCKS:
       None.

 PROCEDURE:

 RESTRICTIONS:
       None.

 SIDE EFFECTS:
       None.

 EXAMPLES:


 CALLS: ***
	CONGRID [1], CONGRID [2], CONGRID [3], CW_BGROUP, CW_FSLIDER, HSI_CW_SIMULATION
	HSI_CW_SIMULATION_EVENT, HSI_CW_SPECTRUM_TEXT_GET_VALUE
	HSI_CW_SPECTRUM_TEXT_SET_VALUE, HSI_XBM_EDIT, MODEL_PLOT, PLOT_IMAGE
 SEE ALSO:
 HISTORY:
       Version 1, November 23, 1998,
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI CONSTANT STRUCTURE DEFINITION $SSW/hessi/idl/util/hessi_constant__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI CONSTANT STRUCTURE DEFINITION

 PURPOSE:
       Defines the basic constants used everywhere in the
       software. Note that the values are initialized in hessi_constant.

 CATEGORY:
       Utilities

 CALLING SEQUENCE:
       var = hessi_constant()
       (values initialized, recommended)

       var = {hessi_constant}
       (values not initialized)

 OUTPUT:
       A structure with the fundamental constants

 TAGS:
       N_CHANNEL_MAX


 CALLS: ***
	HESSI_CONSTANT__DEFINE
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/soft/reference.html
	HSI_Constant
 HISTORY:
   kim tolbert: added ql_energy_bins
	richard.schwartz: n_channel_max is now a longword, 10-sep-2001.
	Release 5.1, richard.schwartz@gsfc.nasa.gov, 13-feb-2001.
       Release 5, Jue 2000, rebirth, ACs
       Version 1, March 4, 1999, for Release 2
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI CONSTANT $SSW/hessi/idl/util/hessi_constant.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI CONSTANT

 PURPOSE:
       Initializes the {hessi_constant} data structure

 CATEGORY:
       Utilities

 CALLING SEQUENCE:
       var = hessi_constant()

 OUTPUT:
       A structure with the fundamental constants intitialized

 KEYWORDS:
       N_CHANNEL_MAX: returns only the number of channels

 CALLS: ***
	HESSI_CONSTANT
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/soft/reference.html
	HSI_Vonstant__Define
 HISTORY:
   kim tolbert: added ql_energy_bins and restructured so needn't repeat values
	Release 5.1, richard.schwartz@gsfc.nasa.gov, 13-feb-2001.
       Release 5 development -- rebirth ACs, June 2000
       Version 1, March 4, 1999, for Release 2
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI Create FITS Binary Table $SSW/hessi/offline/hsi_fitsbinarytablecreate.pro
[Previous] [Next]
 PROJECT:
	HESSI
 NAME: 
       HESSI Create FITS Binary Table 

 PURPOSE:
       Creates and opens a FITS binary table for a HESSI data set. 

 CATEGORY:
       Utilities (hessi/util)

 CALLING SEQUENCE:
       HSI_FITSBinaryTableCreate, unit, filename, columns
;
 INPUTS:
       none 
       
 OPTIONAL INPUTS:
	filename: if not given, a temporary fits file is created.
 OUTPUTS:
       unit: the unit number 

 OPTIONAL OUTPUTS:
	none

 KEYWORDS:
       CREATE: if set, creates a NEW file. Otherwise, if the binary
               table does not exist, it appends the new binary table at 
               the end of the FITS file. IF the binary table already
               exists, it append the new data at the end of the
               binary table.
       FILEINFO: the result of an fstat of the file unit
	PACKETS: if set,creates the binary table extension for
                packet data (called 'PACKETS')
       NELS: the number of rows to write.
       SCORE: if set, creates the binary table extension for score
              data (called 'EVENTS')
       VERBOSE: if set, prints on the tty what it is doing

 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], DOC_MENU, FXADDPAR [1], FXADDPAR [2]
	FXBADDCOL [1], FXBADDCOL [2], FXBCREATE [1], FXBCREATE [2], FXBHMAKE [1]
	FXBHMAKE [2], HSI_FITSBINARYTABLECREATE, HSI_PACKETBTABLEKEYWORDMAKE
	HSI_SCOREBTABLEKEYWORDMAKE, HSI_STRUCT_DEF [1], HSI_STRUCT_DEF [2]
 SIDE EFFECTS:
	none

 RESTRICTIONS:
	none

 PROCEDURE:
	none

 MODIFICATION HISTORY:
	Release 0, A.Csillaghy, csillag@ssl.berkeley.edu, Oct. 1998
       In development for Release 1, Dec 1998


HESSI EVENT STRUCTURE DEFINITION $SSW/hessi/idl/util/hsi_event__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI EVENT STRUCTURE DEFINITION

 PURPOSE:
       Defines the data structure storing single photon events.
       An event consists of an time relative to a reference time in
       given units, plus the source amplifier which indicates
       the detector, its segment, and whether it is from the low or
       high energy amplifier for the rear segment.
       The source is denoted with A2D_INDEX which runs from 0 to 26.
       A2D refers to both a detector, its segment,
       and pulse-height analyzer  which together indicate the source
       of an event.  An A2D_INDEX of 0 refers to Detector_index 0,
       the front segment.
       A2D_INDEX of 9 refers to Detector_index 9, rear segment of
       detector 0, low energy amplifier.  Finally,
       A2D_INDEX of 18 refers to detector 0, high energy amplifier,
       etc. Finally the CHANNEL tag returns the pulse-height analyzer
       channel which ranges from 0-8193.
       -1 stands for ULD event and -2 stands for CSA event.
       A2d_index and channel could be replaced by an Energy and Detector_index.


 CATEGORY:
       HESSI Utilities

 CALLING SEQUENCE:
       variable = {hsi_event}

 TAG NAMES:
       time: the event time in binary microseconds (long int)
       a2d_index: [0..27] (see above) (byte)
       channel: [0..8193] (see above) (int)

 CALLS: ***
	HSI_EVENT__DEFINE
 HISTORY:

       Release 2: "define" version , May 10, 1999,
           A Csillaghy, csillag@ssl.berkeley.edu
       Definition: R.A.Schwartz, richard.schwartz@gsfc.nasa.gov


HESSI EVENTLIST CLASS DEFINITION $SSW/hessi/idl/util/hsi_eventlist__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI EVENTLIST CLASS DEFINITION

 PURPOSE:
       Manages HESSI event lists. Events can be read from three
       different sources:
       1 - a simulation object
       2 - a packet object. In case of the packet object,
           events can be read in bunches to avoid excessive
           memory requirements. The eventlist reader reads the first
           bunch that
           correspond to the firts bunch of packets, and then goes on to
           the next bunch (with NEXT_BUNCH keyword, see below). Each
           event contains a time tag referenced to a UT value,
           UT_REF, which is set when the first bunch is read.
       3 - a file object, in this case the data comes from a
           eventlist (fits) file prepared for this purpose (see the
           write method). The scalable way to read data is as
           described for eventlist packets.

       HSI_Eventlist is the top level of a strategy pattern involving four
       classes. HSI_Eventlist, the Context, relies on an abstract class
       hsi_eventlist_strategy, the Strategy, that is extended into
       two Concrete Strategy  classes, hsi_eventlist_packet and
       hsi_eventlist_simulation. These two classes are used
       interchangeably as strategies to get event lists.

 CATEGORY:
       Utilities (idl/util)

 CONSTRUCTION:
       obj = Obj_New( 'hsi_eventlist' )
       obj = HSI_Eventlist()

 (INPUT) CONTROL PARAMETERS ASSOCIATED WITH THIS CLASS:
      eventlist_strategy: the name of the strategy cuurently in use.

 (OUTPUT) INFORMATIONAL PARAMETERS ASSOCIATED WITH THIS CLASS:
      none

 PARENT CLASSES:
      Strategy_Holder, Framework

 AGGREGATED CLASSES
      This is a strategy object, so it contains the obejcts that are
      implementing the different strategies, as mentioned above.
      hsi_eventlist_packet
      hsi_eventlist_simulation
      hsi_eventlist_file

 METHODS DEFINED OR OVERRIDDEN IN THIS CLASS:
      INIT: nothing special except that the source of the strategies
      is different for hsi_eventlist_simulation

      Set: Checks whether file_type or file_name is set to decide of
           the simulation or the packet object must be used.
           Extention of Framework::Set

      GetData: Checks how to deal with coincidences.
           Extension of Framework::GetData

      Write: this just passes the control to the appropriate strategy

 KEYWORDS:

      Any control parameter name can be used as a keyword to any
      method in this class.

      ALL: [GetData only] Retrieves all events it can find, not only
           those in the current bunch. Only when the events originate
           from packets in a file. Default: undefined
      ANTI_COINCIDENT_EVENTS [GetData]: Retrieves only
                                        anti-coincident events
      COINCIDENT_EVENTS; [GetData] Retrieves only coincident events
      DONE: [GetData only] Is 1 if all events have been read, 0 otherwise
      NEXT_BUNCH: [GetData only] Reads the next bunch of
                  events. Default: 0
      RESET: [GetData only] Starts reading the first bunch of
             packets. Default: 0
      TAG_NAME [GetData] Retrieves only this tag name of
      {hsi_event}. Default: undefined. Values: time, a2d_index, channel
      THIS_A2D_INDEX: [GetData only] Retrieves only events for
                      a2d_index =  this_a2d_index. Default: Where(
                                                            a2d_index_mask )
      THIS_DET_INDEX: [Overriden by THIS_A2D_INDEX] Retrieves only events for the detector
                      this_det_index, front and rear segments by
                      default, but see THIS_FRONT_SEGMENT and
                      THIS_REAR_SEGMENT below. Default: undefined
      THIS_FRONT_SEGMENT: [GetData only, only with THIS_DET_INDEX]
                          Retrieves front segment events for
                          THIS_DET_INDEX. Default: 1
      THIS_REAR_SEGMENT:  [GetData only, only with THIS_DET_INDEX]
                          Retrieves rear segment events for
                          THIS_DET_INDEX. Default: 1
      OTHER_A2D_INDEX: [GetData only, only with COINCIDENT_EVENTS AND
                       THIS_A2D_INDEX] Retrieves only the events that
                       are coincident between this_a2d_index and
                       other_a2d_index. Default: undefined
      OTHER_CHANNEL_RANGE:  [GetData only, only with COINCIDENT_EVENTS,
                       THIS_A2D_INDEX and OTHER_A2D_INDEX]
                       Retrieves only events that
                       are coincident between this_a2d_index and
                       other_a2d_index, an the events in
                       other_a2d_index are in the range (min, max [0,8192]) given by
                       other_channel_range. Default: undefined
      THIS_ENERGY_BAND: [GetData only] Retrieves only events that are
                        in the energy band this_energy_band (keV). Default: energy_band
      THIS_TIME_RANGE: [GetData only] Retrieves only events that are
                        in the time range this_time_range
                        (seconds). Default: time_range

 EXAMPLE:
       eventlist = Obj_New( 'hsi_eventlist' )
       o->set, obs_time = '23-jul-2002 ' + ['00:35', '00:40']
       o->set, time_range = [10,11]
 retrieves all events between 00:35:10 and :11
       ev = o->GetData( /all )
 retrieves eventlists by bunches:
       done = 0
       ev = o->getdata( /first, done = done )
       while not done do ev = o->getdata( /next, done = done )
 writes selected event lists into a file
       o->set, energy_band = [300,400]
       o->set, time_range = [10,100]
       o->write, 'gaga.fits' ; MAY BE VERY BIG!!

 (AGGREGATED) SOURCE CLASSES:
       HSI_Packet for hsi_eventlist_file and hsi_eventlist_packet

 DESTINATION CLASSES:
       HSI_Spectrogram and thus finally
       HSI_Binned_Eventlist, HSI_Spectrum, HSI_Lightcurve

 CALLS: ***
	EXIST, HAVE_TAG, HSI_EVENTLIST::GETDATA, HSI_EVENTLIST::INIT, HSI_EVENTLIST::SET
	HSI_EVENTLIST::WRITE, HSI_EVENTLIST__DEFINE, HSI_PACKET, HSI_USE_SIM, IS_STRING
	hsi_get_debug [1], hsi_get_debug [2], hsi_is_obj_nested, hsi_obs_source
	prstr [1], prstr [2]
 SEE ALSO:
	hessi.ssl.berkeley.edu/software/reference.html#hsi_eventlist
	hsi_eventlist_control, hsi_eventlist_control__define, hsi_eventlist_file
	hsi_eventlist_packet, hsi_eventlist_simulation, hsi_eventlist_strategy
	hsi_packet__define
 HISTORY:
       24-Apr-2003: Kim added hsi_obs_source source object in index 2
       16-dec-2002: Andre moved the source definition of hsi_packet()
                    from the startegy object to here. doc updated,
                    and integration of hsi_eventlist_file polished,
                    documentation header updated.
       24-Oct-2002, Kim. Added @hsi_insert_catch to getdata.  Changed some message calls
		  to hsi_message.
       8-apr-2002, Kim.  Added checks for simulation.  Only allow sims when hsi_use_sim()=1
		2-apr-02, ras, apply anytim to _extra.time_range
       Release 6 Apr 2001 acs:
           Despagetthizing
           Strategy_holder stuff, i.e. now you can have both
           simulation and packets coexisting
       Release 5 June - August 2000
           Major changes in the coincidence checking
       Release 4 May 2000 ACS
           Code to read eventlists in bunches
           Coincidence stuff
       jimm's adaptations,
       Dev. for Release 3, July 1999
       Release 2, June 1999
       Version 1, February 17, 1999,
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI Eventlist Constructor [1] $SSW/hessi/idl/image/hsi_bproj.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI Eventlist Constructor

 PURPOSE: 
       Creates an instance of the eventlist class.

 CATEGORY:
       HESSI Utilities (idl/util)
 
 CALLING SEQUENCE: 
       object = hsi_eventlist()

 OUTPUTS:
       The function returns an object reference of the class hsi_eventlist

 KEYWORDS: 
       Any of the keywords defined in hsi_eventlist__define and
       its parent structures.

 CALLS: ***
	HSI_BPROJ
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/reference.html
	hsi_eventlist__define, hsi_packet__define, hsi_super__define
 HISTORY:
       Created: HESSI Software Release 2, May 12, 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI Eventlist Constructor [2] $SSW/hessi/idl/image/memvis/hsi_vismod_profile.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI Eventlist Constructor

 PURPOSE: 
       Creates an instance of the eventlist class.

 CATEGORY:
       HESSI Utilities (idl/util)
 
 CALLING SEQUENCE: 
       object = hsi_eventlist()

 OUTPUTS:
       The function returns an object reference of the class hsi_eventlist

 KEYWORDS: 
       Any of the keywords defined in hsi_eventlist__define and
       its parent structures.

 CALLS: ***
	HSI_VISMOD_PROFILE
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/reference.html
	hsi_eventlist__define, hsi_packet__define, hsi_super__define
 HISTORY:
       Created: HESSI Software Release 2, May 12, 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI Eventlist Constructor [3] $SSW/hessi/idl/util/hsi_eventlist.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI Eventlist Constructor

 PURPOSE: 
       Creates an instance of the eventlist class.

 CATEGORY:
       HESSI Utilities (idl/util)
 
 CALLING SEQUENCE: 
       object = hsi_eventlist()

 OUTPUTS:
       The function returns an object reference of the class hsi_eventlist

 KEYWORDS: 
       Any of the keywords defined in hsi_eventlist__define and
       its parent structures.

 CALLS: ***
	HSI_EVENTLIST
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/reference.html
	hsi_eventlist__define, hsi_packet__define, hsi_super__define
 HISTORY:
       Created: HESSI Software Release 2, May 12, 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI Eventlist Constructor [4] $SSW/hessi/idl/util/hsi_modul_pattern.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI Eventlist Constructor

 PURPOSE: 
       Creates an instance of the eventlist class.

 CATEGORY:
       HESSI Utilities (idl/util)
 
 CALLING SEQUENCE: 
       object = hsi_eventlist()

 OUTPUTS:
       The function returns an object reference of the class hsi_eventlist

 KEYWORDS: 
       Any of the keywords defined in hsi_eventlist__define and
       its parent structures.

 CALLS: ***
	HSI_MODUL_PATTERN
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/reference.html
	hsi_eventlist__define, hsi_packet__define, hsi_super__define
 HISTORY:
       Created: HESSI Software Release 2, May 12, 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI Eventlist Constructor [5] $SSW/hessi/idl/util/hsi_modul_profile.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI Eventlist Constructor

 PURPOSE: 
       Creates an instance of the eventlist class.

 CATEGORY:
       HESSI Utilities (idl/util)
 
 CALLING SEQUENCE: 
       object = hsi_eventlist()

 OUTPUTS:
       The function returns an object reference of the class hsi_eventlist

 KEYWORDS: 
       Any of the keywords defined in hsi_eventlist__define and
       its parent structures.

 CALLS: ***
	HSI_MODUL_PROFILE
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/reference.html
	hsi_eventlist__define, hsi_packet__define, hsi_super__define
 HISTORY:
       Created: HESSI Software Release 2, May 12, 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI Eventlist Constructor [6] $SSW/hessi/offline/hsi_vismod_bproj.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI Eventlist Constructor

 PURPOSE: 
       Creates an instance of the eventlist class.

 CATEGORY:
       HESSI Utilities (idl/util)
 
 CALLING SEQUENCE: 
       object = hsi_eventlist()

 OUTPUTS:
       The function returns an object reference of the class hsi_eventlist

 KEYWORDS: 
       Any of the keywords defined in hsi_eventlist__define and
       its parent structures.

 CALLS: ***
	HSI_VISMOD_BPROJ
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/reference.html
	hsi_eventlist__define, hsi_packet__define, hsi_super__define
 HISTORY:
       Created: HESSI Software Release 2, May 12, 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI EVENTLIST CONTROL STRUCTURE DEFINITION [1] $SSW/hessi/idl/util/gaussian_source_str__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI EVENTLIST CONTROL STRUCTURE DEFINITION

 PURPOSE: 
       Defines the data type of the structure that controls the
       output of the calibrated eventlist object

 CATEGORY:
       HESSI Utilities
 
 CALLING SEQUENCE: 
       var = {hsi_calib_eventlist_control}

 TAG NAMES:
       time_bin_def: LonARR(9): Definition of the time bin ratio
                     between detectors. The actual value of the tim
                     bin is then computed with: 
                     time_bin = 64L * time_bin_def * (time_bin_min / 64l)
       time_bin_MIN: int. The minimum time bin. The actual
                     values for each detector is then computed with
                     time_bin = 64L * time_bin_def * (time_bin_min / 64l)
       scale: int
       time_range: [0.0D, 0.0D], $
       time_unit: 0, $
       xyoffset: [0.0, 0.0], $
       energy_band: [0.0D, 0.0D], $
       harmonic: BYTARR( 8, 5 ), $
       det_index: BYTARR( 27 )

 COMMON BLOCKS:
       None.

 PROCEDURE:

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 EXAMPLES:
       

 CALLS: ***
	GAUSSIAN_SOURCE_STR__DEFINE
 SEE ALSO:
 HISTORY:
       Version 1, April 29, 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI EVENTLIST CONTROL STRUCTURE DEFINITION [2] $SSW/hessi/idl/util/hsi_binned_eventlist_control__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI EVENTLIST CONTROL STRUCTURE DEFINITION

 PURPOSE:
          Defines the structure of the eventlist control
          parameters. For full information please check
          hsi_binned_eventlist__define.


 CATEGORY:
       HESSI Utilities

 CALLING SEQUENCE:
       var = {hsi_eventlist_control}

 TAG NAMES:
       front_segment: set this to 1 if you want to use the front segments
       rear_segment: set this to 1 if you want to use the rear segments
       det_index_mask: BYTARR( 9 ) set the corresponding byte to 1
                       for those detectors you want to get the
                       binned eventlist. Note that what this parameter
                       really do is set the parameter a2d_index_mask
                       for those a2ds associated with the choice. In
                       this way, if
                       the a2ds are already set, it will not redo the
                       binned eventlist each time the det_index_mask
                       is changed.
       time_bin_def: FltArr(9): values that multiplies time_bin_min
                     to determine the time binnnig for each
                     detector. Default: 1,1,2,4,8,8,16,32,64
       time_bin_MIN: 0L: minimum value of the time binning (which
                     is then multiplied by time_bin_def). Default is
                     1024 binary microseconds.

 CALLS: ***
	HSI_BINNED_EVENTLIST_CONTROL__DEFINE
 HISTORY:

 8-aug-03, ras - reconciling eb_index, im_energy_binning, energy_band
       Version 1, April 29, 1999,
           A Csillaghy, csillag@ssl.berkeley.edu
 17-oct-2001, added be_energy_binning, support multiple e bands, ras.
 19-oct-2001, ras, removed explicit det_index_mask
 20-nov-2001, ras, added explicit det_index_mask
 14-dec-2001, ras, replace be_energy_binning with energy_band


HESSI EVENTLIST CONTROL STRUCTURE DEFINITION [3] $SSW/hessi/offline/hsi_aspect_model__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI EVENTLIST CONTROL STRUCTURE DEFINITION

 PURPOSE: 
       Defines the data type of the structure that controls the
       output of the calibrated eventlist object

 CATEGORY:
       HESSI Utilities
 
 CALLING SEQUENCE: 
       var = {hsi_calib_eventlist_control}

 TAG NAMES:


 COMMON BLOCKS:
       None.

 PROCEDURE:

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 EXAMPLES:
       

 CALLS: ***
	HSI_ASPECT_MODEL__DEFINE, HSI_REF_TIME
 SEE ALSO:
 HISTORY:
       Version 1, April 29, 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI EVENTLIST CONTROL STRUCTURE DEFINITION [4] $SSW/hessi/offline/hsi_eventlist_control__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI EVENTLIST CONTROL STRUCTURE DEFINITION

 PURPOSE: 
       Defines the structure of the eventlist control parameters

 CATEGORY:
       HESSI Utilities
 
 CALLING SEQUENCE: 
       var = {hsi_eventlist_control}
       var = HSI_Eventlist_Control() initializes to default values

 NOTE:
      This structure is managed by the HSI_Eventlist object. See
      hsi_eventlist__define for a description of the parameters

 CALLS: ***
	HSI_EVENTLIST_CONTROL__DEFINE
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/reference.html#hsi_eventlist
	hsi_eventlist__define, hsi_eventlist_control, hsi_eventlist_info
 HISTORY:
      Release 6: saszero moved to hsi_aspect_solution_control
                 coincid_time_delta disabled for the correct
                 coincidence check
      Release 5.1 Feb 2001, ras added new_gain
      Release 5, August 2000, ACs
      Release 4, March 2000, ACs
          Tags for coincidence checking
      Release 1, April 29, 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI Eventlist Parameter Selection Tool $SSW/hessi/idl/sub_task/hsi_cw_eventlist.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI Eventlist Parameter Selection Tool

 PURPOSE:
       Compound widget tool to select the eventlist control parameters.

 CATEGORY:


 CALLING SEQUENCE:
       result = hsi_cw_eventlist()

 INPUTS:


 OPTIONAL INPUTS:
       None.

 OUTPUTS:
       None.

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS:
       None.

 COMMON BLOCKS:
       None.

 PROCEDURE:

 RESTRICTIONS:
       None.

 SIDE EFFECTS:
       None.

 EXAMPLES:


 CALLS: ***
	CW_BGROUP, CW_FSLIDER, HSI_CW_EVENTLIST, HSI_CW_EVENTLIST_EVENT
	HSI_CW_EVENTLIST_GET_VALUE, HSI_CW_EVENTLIST_SET_VALUE
 SEE ALSO:
 HISTORY:
       Version 1, November 23, 1998,
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI EVENTLIST SIMULATION CLASS DEFINITION $SSW/hessi/idl/util/hsi_eventlist_simulation__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI EVENTLIST SIMULATION CLASS DEFINITION

 PURPOSE:
       Generates and manages simulated event list.  This class
       extends the generic hsi_eventlist_startegy class. This class
       is a member of the eventlist strategy collaboration, i.e. the
       simulaton  concrete strategy.

 CATEGORY:
       Utilities (idl/util)

 CONSTRUCTION:
       The best way to access this is via hsi_eventlist, the strategy
       holder. But you can create it directly too with:
       o = Obj_New( 'hsi_eventlist_simulation' )

 PRIMARY DATA TYPE
       Array of {hsi_event}
 
 (INPUT) CONTROL PARAMETERS ASSOCIATED WITH THIS CLASS:
       Check the parameters in hsi_eventlist_strategy
        
 (OUTPUT) INFORMATIONAL PARAMETERS ASSOCIATED WITH THIS CLASS:
       Check the parameters in hsi_eventlist_strategy

 PARENT CLASS:
       hsi_eventlist_strategy

 METHODS DEFINED OR OVERRIDDEN IN THIS CLASS:

       Adjust_Absolute_Time_Range: make sure that the time range
                                   passed to absolute_time_range is
                                   correct
       Select_By_Time: some parameter transformation necesary before
                       calling the generic proc
       Process_Hook: gets the data from the simulation objet

 (AGGREGATED) SOURCE CLASS:
       HSI_Simulation

 DESTINATION CLASSES:
       HSI_Binned_Eventlist, HSI_Spectrum, HSI_Lightcurve

 CALLS: ***
	HSI_ANY2SCTIME, HSI_EVENTLIST_SIMULATION::ADJUST_ABSOLUTE_TIME_RANGE
	HSI_EVENTLIST_SIMULATION::INIT, HSI_EVENTLIST_SIMULATION::PROCESS_HOOK
	HSI_EVENTLIST_SIMULATION::SELECT_BY_TIME
	HSI_EVENTLIST_SIMULATION::WRITE_HOOK, HSI_EVENTLIST_SIMULATION__DEFINE
	HSI_SIMULATION, VALID_RANGE, hsi_sim_dummy_livetime, is_struct
 SEE ALSO:
	hsi_eventlist_strategy__define, hsi_eventlist_strategy_control
	hsi_eventlist_strategy_control__define
	hsi_eventlist_strategy_info__define, hsi_simulation__define
 HISTORY:
       May 2003: acs, added the write_hook method to writeh
                 eventlist files from simulationa 
       Oct 2001: More clear separation between simulation and packet
                 handling Acs
       Release 6 Apr 2001 acs:
           Despagetthizing
           Strategy_holder stuff, i.e. now you can have both
           simulation and packets coexisting
       Release 5 June - August 2000
           Major changes in the coincidence checking
       Release 4 May 2000 ACS
           Code to read eventlists in bunches
           Coincidence stuff
       jimm's adaptations, 
       Dev. for Release 3, July 1999
       Release 2, June 1999
       Version 1, February 17, 1999,
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI EVENTLIST STRATEGY CONTROL STRUCTURE DEFINITION [1] $SSW/hessi/idl/util/hsi_eventlist_control__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI EVENTLIST STRATEGY CONTROL STRUCTURE DEFINITION

 PURPOSE:
       Defines the structure of the eventlist control parameters
       used in common by the eventlist simulation and eventlist
       packet classes.

 CATEGORY:
       HESSI Utilities

 CALLING SEQUENCE:
       var = {hsi_eventlist_strategy_control}
       var = HSI_Eventlist_Strategy_Control() initializes to default values

 NOTE:
      This structure is managed by the HSI_Eventlist_Startegy object. See
      hsi_eventlist_strategy__define for a description of the parameters

 CALLS: ***
	HSI_EVENTLIST_CONTROL__DEFINE
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/reference.html#hsi_eventlist
	hsi_eventlist__define, hsi_eventlist_info, hsi_eventlist_packet__define
	hsi_eventlist_simulation__define, hsi_eventlist_strategy__define
	hsi_eventlist_strategy_control
 HISTORY:
      19-feb-2002, added no_livetime and ct_interpolate
      4-jan-2002, energy_band to fltarr(2) from [12d,25d], ras
      ras, 15-sep-2001, added GAIN_GENERATION & Gain_TIME_WANTED
      Release 6: saszero moved to hsi_aspect_solution_control
                 coincid_time_delta disabled for the correct
                 coincidence check
                 changed name from hsi_eventlist_control to
                 hsi_eventlist-startegy_control__define which is more
                 consistent. ACs, June 2001
      Release 5.1 Feb 2001, ras added new_gain
      Release 5, August 2000, ACs
      Release 4, March 2000, ACs
          Tags for coincidence checking
      Release 1, April 29, 1999,
           A Csillaghy, csillag@ssl.berkeley.edu
           A Csillaghy, csillag@ssl.berkeley.edu
		10-apr-2002 RAS
			Gain generation defaults to 2
			New_gain is removed


HESSI EVENTLIST STRATEGY CONTROL STRUCTURE DEFINITION [2] $SSW/hessi/idl/util/hsi_eventlist_file_control__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI EVENTLIST STRATEGY CONTROL STRUCTURE DEFINITION

 PURPOSE:
       Defines the structure of the eventlist control parameters
       used in common by the eventlist simulation and eventlist
       packet classes.

 CATEGORY:
       HESSI Utilities

 CALLING SEQUENCE:
       var = {hsi_eventlist_strategy_control}
       var = HSI_Eventlist_Strategy_Control() initializes to default values

 NOTE:
      This structure is managed by the HSI_Eventlist_Startegy object. See
      hsi_eventlist_strategy__define for a description of the parameters

 CALLS: ***
	HSI_EVENTLIST_FILE_CONTROL__DEFINE
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/reference.html#hsi_eventlist
	hsi_eventlist__define, hsi_eventlist_info, hsi_eventlist_packet__define
	hsi_eventlist_simulation__define, hsi_eventlist_strategy__define
	hsi_eventlist_strategy_control
 HISTORY:
      19-feb-2002, added no_livetime and ct_interpolate
      4-jan-2002, energy_band to fltarr(2) from [12d,25d], ras
      ras, 15-sep-2001, added GAIN_GENERATION & Gain_TIME_WANTED
      Release 6: saszero moved to hsi_aspect_solution_control
                 coincid_time_delta disabled for the correct
                 coincidence check
                 changed name from hsi_eventlist_control to
                 hsi_eventlist-startegy_control__define which is more
                 consistent. ACs, June 2001
      Release 5.1 Feb 2001, ras added new_gain
      Release 5, August 2000, ACs
      Release 4, March 2000, ACs
          Tags for coincidence checking
      Release 1, April 29, 1999,
           A Csillaghy, csillag@ssl.berkeley.edu
           A Csillaghy, csillag@ssl.berkeley.edu
		10-apr-2002 RAS
			Gain generation defaults to 2
			New_gain is removed


HESSI EVENTLIST STRATEGY CONTROL STRUCTURE DEFINITION [3] $SSW/hessi/idl/util/hsi_eventlist_strategy_control__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI EVENTLIST STRATEGY CONTROL STRUCTURE DEFINITION

 PURPOSE:
       Defines the structure of the eventlist control parameters
       used in common by the eventlist simulation and eventlist
       packet classes.

 CATEGORY:
       HESSI Utilities

 CALLING SEQUENCE:
       var = {hsi_eventlist_strategy_control}
       var = HSI_Eventlist_Strategy_Control() initializes to default values

 NOTE:
      This structure is managed by the HSI_Eventlist_Startegy object. See
      hsi_eventlist_strategy__define for a description of the parameters

 CALLS: ***
	HSI_EVENTLIST_STRATEGY_CONTROL__DEFINE
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/reference.html#hsi_eventlist
	hsi_eventlist__define, hsi_eventlist_info, hsi_eventlist_packet__define
	hsi_eventlist_simulation__define, hsi_eventlist_strategy__define
	hsi_eventlist_strategy_control
 HISTORY:
      19-feb-2002, added no_livetime and ct_interpolate
      4-jan-2002, energy_band to fltarr(2) from [12d,25d], ras
      ras, 15-sep-2001, added GAIN_GENERATION & Gain_TIME_WANTED
      Release 6: saszero moved to hsi_aspect_solution_control
                 coincid_time_delta disabled for the correct
                 coincidence check
                 changed name from hsi_eventlist_control to
                 hsi_eventlist-startegy_control__define which is more
                 consistent. ACs, June 2001
      Release 5.1 Feb 2001, ras added new_gain
      Release 5, August 2000, ACs
      Release 4, March 2000, ACs
          Tags for coincidence checking
      Release 1, April 29, 1999,
           A Csillaghy, csillag@ssl.berkeley.edu
           A Csillaghy, csillag@ssl.berkeley.edu
     10-apr-2002 RAS
      Gain generation defaults to 2
      New_gain is removed
     19-sep-02, ras, moved dp_enable, dp_cutoff, min_time_4_off,
      and extend_time_range here from hsi_spectrogram_control
     1-oct-02, ras, add dp_lld, channel thresholds for events that close datagaps
   24-oct-02, ras, added deflt_atten_state for simulation files
   11-apr-03, ras, added NO_CSA_DROPOUT
   11-apr-05, ras, added dp_extend, this is used to extend the datagaps this many SECONDS
     after the otherwise determined conclusion.  And it sets the coinc flag for
     any events within any datagap intervals.


HESSI FAST STRUCTURE DEFINITION [1] $SSW/hessi/idl/util/hsi_fast__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI FAST STRUCTURE DEFINITION

 PURPOSE: 
       Defines the data structure storing fast rates.
       An fast consists of an time relative to a reference time 
       in ut units, a detector number, an energy band and the
	data

 CATEGORY:
       HESSI Utilities
 
 CALLING SEQUENCE: 
       variable = {hsi_fast}

 TAG NAMES:
       ut_ref: time of the beginning of segment
	data: Array of pointers. Each pointer points to the data for
	a given detector and energy band

 CALLS: ***
	HSI_FAST__DEFINE
 HISTORY:
      
       David Ardila (ardila@garavito.berkeley.edu) created   
       1-31-00


HESSI FAST STRUCTURE DEFINITION [2] $SSW/hessi/idl/util/hsi_fastrate_counter__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI FAST STRUCTURE DEFINITION

 PURPOSE: 
       Defines the data structure storing fast rates.
       An fast consists of an time relative to a reference time 
       in ut units, a detector number, an energy band and the
	data

 CATEGORY:
       HESSI Utilities
 
 CALLING SEQUENCE: 
       variable = {hsi_fast}

 TAG NAMES:
       time: time of the beginning of segment, with respect to
	fr_ut_ref. In seconds
	data: Array of pointers. Each pointer points to the data for
	a given detector and energy band

 CALLS: ***
	HSI_FASTRATE_COUNTER__DEFINE
 HISTORY:
      
       David Ardila (ardila@garavito.berkeley.edu) created   
       1-31-00


HESSI FAST STRUCTURE DEFINITION [3] $SSW/hessi/offline/hsi_fast_old__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI FAST STRUCTURE DEFINITION

 PURPOSE: 
       Defines the data structure storing fast rates.
       An fast consists of an time relative to a reference time 
       in ut units, a detector number, an energy band and the
	data

 CATEGORY:
       HESSI Utilities
 
 CALLING SEQUENCE: 
       variable = {hsi_fast}

 TAG NAMES:
       time: time of the beginning of segment, with respect to
	fr_ut_ref. In seconds
	data: Array of pointers. Each pointer points to the data for
	a given detector and energy band

 CALLS: ***
	HSI_FAST_OLD__DEFINE
 HISTORY:
      
       David Ardila (ardila@garavito.berkeley.edu) created   
       1-31-00


HESSI FASTRATE CLASS DEFINITION $SSW/hessi/idl/util/hsi_fastrate__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI FASTRATE CLASS DEFINITION

 PURPOSE:
       Manages HESSI fastrate data type methods. The data are
	read from a packet object, in bunches.

 CATEGORY:
       Utilities (idl/util)

 CONSTRUCTION:
       obj = Obj_New( 'hsi_fastrate' )
       obj = HSI_Fastrate()

 (INPUT) CONTROL PARAMETERS DEFINED IN THIS CLASS:
      
      Defined in {hsi_fastrate_control}

      fr_time_range: [0D, 0D] Time range in anytim format
                     The default (all zeroes) loads all the data
      fr_energy_band: [1,1,1,1] Energy band wanted
      fr_det_index_mask:[1,1,1,1,1,1,1,1,1] Detector wanted



      To see a list of all control parameters, use 
      o->Print, /CONTROL_ONLY      
      To assign a value to a control parameter, use 
      o->Set, KEYWORD=value
      To retrieve the value of a control parameter, use 
      value=o->Get( /KEYWORD ) 

      See also {hsi_fastrate_control} 

 (OUTPUT) INFORMATIONAL PARAMETERS DEFINED IN THIS CLASS:

      Defined in {hsi_fastrate_info}

          fr_ut_ref: Collect time at start of packet
          fr_n_interval: Number of independent fastrate segments
		The fastrates in a file may be discontinous.
	   fr_abs_time_range: Absolute time range
	   fr_data_range: Data range of the fast rate. A pointer to an
	   array of 2 by fr_n_interval elements
      To see a list of all info parameters, use 
      o->Print, /INFO_ONLY      
      To retrieve the value of an info parameter, use 
      value=o->Get( /KEYWORD ) 
  
      See also {hsi_fastrate_info} 

 METHODS DEFINED OR OVERRIDDEN IN THIS CLASS:


 KEYWORDS:
      
           THIS_DET_INDEX=[1,1,1,1,1,1,1,1,1]: Retrieves data for this detector
           THIS_ENERGY_BAND=[1,1,1,1]: Retrieves data for this energy badn
           THIS_TIME_RANGE=[0,4]: Retrieves data for this time range
           This_time_segment=0: Retrieves data for this segment of time
	    The following keywords are used for the plot routine:
           bands_wanted=[1,1,1,1]: Energy bands to plot
	    det_wanted=[1,1,1,1,1,1,1,1,1]: Detectors to plot
	    time_seg_wanted=0: Time segment to plot
           bin_data=[16,16,16,4,4,4,1,1,1]: How will the data be binned

 EXAMPLES:

       Start by instatiating the object class:
       fastrate = Obj_New( 'hsi_fastrate' )

       fastrate = o->GetData( )

 PARENT CLASS:
       Framework

 (AGGREGATED) SOURCE CLASSES:
       HSI_Packet

 DESTINATION CLASSES:
       HSI_Binned_Fastrate, HSI_Spectrum, HSI_Lightcurve

 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3]
	HSI_FASTRATE::ADJUST_ABSOLUTE_TIME_RANGE, HSI_FASTRATE::FIND_DATA_RANGE
	HSI_FASTRATE::GETDATA, HSI_FASTRATE::INIT, HSI_FASTRATE::PLOT
	HSI_FASTRATE::PROCESS, HSI_FASTRATE::SET, HSI_FASTRATE_CONTROL
	HSI_FASTRATE_SELECT_BY_ENERGY, HSI_FASTRATE_SELECT_BY_TIME
	HSI_FASTRATE_SELECT_BY_a2d, HSI_FASTRATE__DEFINE, HSI_PACKET
	HSI_PACKET2FASTRATE, UTPLOT [1], UTPLOT [2], UTPLOT [3], UTPLOT [4], UTPLOT [5]
	UTPLOT [6], VALID_RANGE, anytim [1], anytim [2], anytim [3], anytim [4], anytim [5]
 SEE ALSO:
	HSI_FASTRATE_CONTROL, framework
	hessi.ssl.berkeley.edu/software/reference.html#hsi_fastrate
	hsi_fastrate_control__define, hsi_fastrate_info__define, hsi_packet2fastrate
	hsi_packet__define, hsi_simulation__define
 HISTORY:
	Release Feb 16, 2001
	David Ardila (ardila@astron.berkeley.edu)


HESSI Fastrate Constructor $SSW/hessi/idl/util/hsi_fastrate.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI Fastrate Constructor

 PURPOSE: 
       Creates an instance of the fastrate class.

 CATEGORY:
       HESSI Utilities (idl/util)
 
 CALLING SEQUENCE: 
       object = hsi_fastrate()

 OUTPUTS:
       The function returns an object reference of the class hsi_fastrate

 KEYWORDS: 
       Any of the keywords defined in hsi_fastrate__define and
       its parent structures.

 CALLS: ***
	HSI_FASTRATE
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/reference.html
	hsi_fastrate__define, hsi_packet__define, hsi_super__define
 HISTORY:
       Created: HESSI Software Release 2, May 12, 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI FASTRATE CONTROL STRUCTURE DEFINITION $SSW/hessi/idl/util/hsi_fastrate_control__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI FASTRATE CONTROL STRUCTURE DEFINITION

 PURPOSE: 
       Defines the structure of the fastrate control parameters

 CATEGORY:
       HESSI Utilities
 
 CALLING SEQUENCE: 
       var = {hsi_fastrate_control}

 TAG NAMES:

        fr_time_range: [0D, 0D] Time range in anytim format
                     The default (all zeroes) loads all the data
        fr_energy_band: [1,1,1,1] Energy band wanted
        fr_det_index_mask:[1,1,1,1,1,1,1,1,1] Detector wanted

 COMMON BLOCKS:
       None.

 PROCEDURE:

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 EXAMPLES:
       

 CALLS: ***
	HSI_FASTRATE_CONTROL__DEFINE
 SEE ALSO:
 HISTORY:
       Version 1, April 29, 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI FASTRATE INFO STRUCTURE DEFINITION $SSW/hessi/idl/util/hsi_fastrate_info__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI FASTRATE INFO STRUCTURE DEFINITION

 PURPOSE: 
       Defines the HESSI fastrate informational structure

 CATEGORY:
       HESSI / Utilities
 
 CALLING SEQUENCE: 
       var = {hsi_fastrate_info}

 TAG NAMES:
	 fr_ut_ref:Collect time at start of packet
        fr_abs_time_range:Absolute time range
          fr_N_interval:Number of independent fastrate segments
               The fastrates in a file may be discontinous.
          fr_data_range:Data range of the fast rate. A pointer to an
          array of 2 by fr_n_interval elements

 EXAMPLES:
       var = {hsi_fastrate_info}
       var = obj->Get( /INFO )

 CALLS: ***
	HSI_FASTRATE_INFO__DEFINE
 SEE ALSO:
 HISTORY:
       Release 2 development, April 27, 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI FORWARDFIT IMAGE ALGORITHM CLASS $SSW/hessi/idl/image/hsi_forwardfit__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI FORWARDFIT IMAGE ALGORITHM CLASS

 PURPOSE: 
       Provides an object wrapper to the forwardfit image algorithm

 CATEGORY:
       HESSI Imaging
 
 CONSTRUCTION:
       image_obj = Obj_New( 'hsi_forwardfit' )
       or through hsi_image:
       image_obj = HSI_Image( IMAGE_ALGORITHM = 'forwardfit' )

 INPUT (CONTROL) PARAMETERS:
       Defined in {hsi_forwardfit_control}

 CALLS: ***
	HSI_FORWARDFIT, HSI_FORWARDFIT::IMAGE_ALG_HOOK, HSI_FORWARDFIT::INIT
	HSI_FORWARDFIT_CONTROL, HSI_FORWARDFIT__DEFINE
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/sofware/#hsi_forwardfit
	HSI_FORWARDFIT_CONTROL, HSI_FORWARDFIT_CONTROL__DEFINE, hsi_image
 HISTORY:
       Adding object {hsi_forwardfit_control}, 29 January 2001, M.Aschwanden
       Development for Release 5.1 January 2001
           fwd stuff taken away
       Development for Release 3, July-October 1999
       Development for Release 2, March-July 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI FRAMEWORK TEMPLATE CLASS [1] $SSW/hessi/idl/objects/framework_template__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI FRAMEWORK TEMPLATE CLASS

 PURPOSE: 
      
       (*
       THIS IS NOT RUNNING CODE
       Use this framework to create your own object classes. Replace
       all occurences of framework_template with your own class name,
       delete the comments that are bewteen (* *), and fill up the
       blanks.

       More detailed instructions are in 
       http://hessi.ssl.berkeley.edu/software/hessi_oo_concept.html
       *)

 CATEGORY:
       Objects
 
 CONTRUCTION:
       o = Obj_New( 'framework_template' )
       or
       o = Framework_Template( ) 

 INPUT (CONTROL) PARAMETERS:
       Defined in {framework_template_control}

 CALLS: ***
	DO_SOMETHING_WITH_PARAMETER, FRAMEWORK_TEMPLATE, FRAMEWORK_TEMPLATE::GET
	FRAMEWORK_TEMPLATE::GETDATA, FRAMEWORK_TEMPLATE::INIT
	FRAMEWORK_TEMPLATE::SET, FRAMEWORK_TEMPLATE_CONTROL
	FRAMEWORK_TEMPLATE__DEFINE, TAKE_SOME_ACTION
 SEE ALSO:
	FRAMEWORK_TEMPLATE_CONTROL, FRAMEWORK_TEMPLATE_CONTROL__DEFINE [1]
	FRAMEWORK_TEMPLATE_CONTROL__DEFINE [2], framework_template_info__define
 HISTORY:
       Development for Release 5.1 January-March 2001
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI FRAMEWORK TEMPLATE CLASS [2] $SSW/hessi/idl/spectra/hsi_drm_mod__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI FRAMEWORK TEMPLATE CLASS

 PURPOSE:

       Compute hessi attenuator transmission

 CATEGORY:
       Spectra

 CONTRUCTION:
       o = Obj_New( 'hsi_filter' )
       or
       o = hsi_filter( )

 INPUT (CONTROL) PARAMETERS:
       Defined in {hsi_filter_control}

 CALLS: ***
	CHECKVAR [1], DEFAULT, ENERGY_RES::INIT, ENERGY_RES::PROCESS, ENERGY_RES_CONTROL
	ENERGY_RES_CONTROL__DEFINE, ENERGY_RES_INFO__DEFINE, ENERGY_RES__DEFINE, EXIST
	Energy_res [1], Energy_res [2], F_DIV, GET_EDGES, HESSI_ID2INDEX
	HSI_DRM_MOD::GETDATA, HSI_DRM_MOD::INIT, HSI_DRM_MOD::PROCESS
	HSI_DRM_MOD_CONTROL, HSI_DRM_MOD_CONTROL__DEFINE, HSI_DRM_MOD_INFO__DEFINE
	HSI_DRM_MOD__DEFINE, HSI_FILTER, HSI_FILTER::BLANKET_TRANSMISSION
	HSI_FILTER::GETDATA, HSI_FILTER::INIT, HSI_FILTER::PROCESS, HSI_FILTER_CONTROL
	HSI_FILTER_CONTROL__DEFINE, HSI_FILTER_INFO__DEFINE, HSI_FILTER__DEFINE
	HSI_LOC_FILE, HSI_SRM, INTERP2INTEG, INTERPOL, MRDFITS [1], MRDFITS [2]
	SAME_DATA [1], SAME_DATA [2], STR2ARR [1], STR2ARR [2], checkvar [2]
	edge_products, get_fits_extno, hsi_calc_resolutions, hsi_default_resolutions
	hsi_shutter_transmission, rd_tfile [1], rd_tfile [2]
 SEE ALSO:
	hsi_filter_control, hsi_filter_control__define, hsi_filter_info__define
 HISTORY:
       Development for Release 5.1 January-March 2001
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI FRAMEWORK TEMPLATE CLASS [3] $SSW/hessi/idl/spectra/hsi_drm_mod__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI FRAMEWORK TEMPLATE CLASS

 PURPOSE:

       Compute hessi attenuator transmission

 CATEGORY:
       Spectra

 CONTRUCTION:
       o = Obj_New( 'energy_res' )
       or
       o = energy_res( )

 INPUT (CONTROL) PARAMETERS:
       Defined in {energy_res_control}

 CALLS: ***
	CHECKVAR [1], DEFAULT, ENERGY_RES::INIT, ENERGY_RES::PROCESS, ENERGY_RES_CONTROL
	ENERGY_RES_CONTROL__DEFINE, ENERGY_RES_INFO__DEFINE, ENERGY_RES__DEFINE, EXIST
	Energy_res [1], Energy_res [2], F_DIV, GET_EDGES, HESSI_ID2INDEX
	HSI_DRM_MOD::GETDATA, HSI_DRM_MOD::INIT, HSI_DRM_MOD::PROCESS
	HSI_DRM_MOD_CONTROL, HSI_DRM_MOD_CONTROL__DEFINE, HSI_DRM_MOD_INFO__DEFINE
	HSI_DRM_MOD__DEFINE, HSI_FILTER, HSI_FILTER::BLANKET_TRANSMISSION
	HSI_FILTER::GETDATA, HSI_FILTER::INIT, HSI_FILTER::PROCESS, HSI_FILTER_CONTROL
	HSI_FILTER_CONTROL__DEFINE, HSI_FILTER_INFO__DEFINE, HSI_FILTER__DEFINE
	HSI_LOC_FILE, HSI_SRM, INTERP2INTEG, INTERPOL, MRDFITS [1], MRDFITS [2]
	SAME_DATA [1], SAME_DATA [2], STR2ARR [1], STR2ARR [2], checkvar [2]
	edge_products, get_fits_extno, hsi_calc_resolutions, hsi_default_resolutions
	hsi_shutter_transmission, rd_tfile [1], rd_tfile [2]
 SEE ALSO:
	energy_res_control, energy_res_control__define, energy_res_info__define
 HISTORY:
       Development for Release 5.1 January-March 2001
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI GROUND SUPPORT EQUIPMENT READER [1] $SSW/hessi/idl/util/hsi_data_record__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI GROUND SUPPORT EQUIPMENT READER

 PURPOSE: 
       Provides data structure and methods to read HESSI
       GSE (telemetry) packets.

 CATEGORY:
       HESSI Utilities
 
 CONSTRUCTION: 
       obj = Obj_New( 'HSI_GSE' ) ;

       The variable o is the object reference used to
       access the packets.

 INPUTS:
       Provided by the "Set" accessor method:
       obj->Set, KEYWORD=value
       The list of available keywords can be obtained with 
       Help, obj->Get(), /STRUCTURE
       For further information, see
       http://hessi.ssl.berkeley.edu/software/reference.html#set

 OUTPUTS:
       Control parameters are retrieved with:
       result = obj->Get( /KEYWORD1, /KEYWORD2, ... )
       If a single keyword is passed, the variable  "result"
       contains the value of the coprresponding control parameter.  
       If several keywords are  passed, then variable "result"
       contains a structure that has a tag for each keyword.
       For further information, see
       http://hessi.ssl.berkeley.edu/software/reference.html#get

       The actual data is accessed using the function method
       "GetData":
       result = obj->GetData()
       The variable "result" contains the retrieved data. "GetData"
       accepts a number of object-dependent selection parameters,
       see the keywords below. 

 GENERIC METHODS:
       Get
       Set
       GetData
       Print
       Plot
       Write
       
 OBJECT-SPECIFIC METHODS:
       GetGSE
       
       
 KEYWORDS: 
       TBD
   
 EXAMPLE:
       To read the packets 1000 to 9999 from the HESSI GSE file
       therm6a.dat:

       obj = Obj_New( 'HSI_GSE', FILENAME='therm6a.dat' )
       packet = obj->GetData( PACKET_INDEX = IndGen( 9000 ) + 1000 )

       To plot a "quick and dirty" lightcurve of the pac
       packet->Plot, file='abc.fits', time_resolution=2.

 SEE ALSO:    
	http://hessi.ssl.berkeley.edu/software/reference.html
	HESSI Utility Reference
	HESSI telemetry formats http://hessi.ssl.berkeley.edu/internal/
 HISTORY:
       Release 4 development ACs:
           The GSE part has been extracted form hsi_packet__define
           The cache is new
           The whole sync process is new
       Release 2 development, May 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu
       Based on: HSI_packet*.pro (Releases 0 and 1)


HESSI GROUND SUPPORT EQUIPMENT READER [2] $SSW/hessi/idl/util/hsi_gse__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI GROUND SUPPORT EQUIPMENT READER

 PURPOSE: 
       Provides data structure and methods to read HESSI
       GSE (telemetry) packets.

 CATEGORY:
       HESSI Utilities
 
 CONSTRUCTION: 
       obj = Obj_New( 'HSI_GSE' ) ;

       The variable obj is the object reference used to
       access the packets.

 INPUTS:
       Control parameters are set via the Set method:
       obj->Set, KEYWORD=value

       The list of available keywords can be obtained with 
       Help, obj->Get(), /STRUCTURE

 OUTPUTS:
       Primary data are retrievd with the GetData method:
       packets = obj->GetData()

       Ancillary parameters are retrieved with the Get method
       result = obj->Get( /KEYWORD1, /KEYWORD2, ... )


 METHODS:
       Get, GetData, Set, SetData, Print, Plot
       
 KEYWORDS: 
       TBD
   
 EXAMPLES:
       To read the packets 1000 to 9999 from the HESSI GSE file
       therm6a.dat:

       obj = Obj_New( 'HSI_GSE', FILENAME='therm6a.dat' )
       packet = obj->GetData( PACKET_INDEX = IndGen( 9000 ) + 1000 )

       To plot a "quick and dirty" lightcurve of the pac
       packet->Plot, file='abc.fits', time_resolution=2.

 CALLS: ***
	HSI_GSE::BUILDFILEOFFSET, HSI_GSE::GETBYTEOFFSET, HSI_GSE::GETDATATYPE
	HSI_GSE::GETPACKETLENGTH, HSI_GSE::GETTABLETYPE, HSI_GSE::READHEADER
	HSI_GSE__DEFINE
 SEE ALSO:    
	http://hessi.ssl.berkeley.edu/software/reference.html
	HESSI Utility Reference
	HESSI telemetry formats http://hessi.ssl.berkeley.edu/internal/
 HISTORY:
       Release 4 development ACs:
           The GSE part has been extracted form hsi_packet__define
           The cache is new
           The whole sync process is new
       Release 2 development, May 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu
       Based on: HSI_packet*.pro (Releases 0 and 1)


HESSI GROUND SUPPORT EQUIPMENT READER [3] $SSW/hessi/idl/util/hsi_raw__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI GROUND SUPPORT EQUIPMENT READER

 PURPOSE: 
       Provides data structure and methods to read HESSI
       GSE (telemetry) packets.

 CATEGORY:
       HESSI Utilities
 
 CONSTRUCTION: 
       obj = Obj_New( 'HSI_GSE' ) ;

       The variable obj is the object reference used to
       access the packets.

 INPUTS:
       Control parameters are set via the Set method:
       obj->Set, KEYWORD=value

       The list of available keywords can be obtained with 
       Help, obj->Get(), /STRUCTURE

 OUTPUTS:
       Primary data are retrievd with the GetData method:
       packets = obj->GetData()

       Ancillary parameters are retrieved with the Get method
       result = obj->Get( /KEYWORD1, /KEYWORD2, ... )


 METHODS:
       Get, GetData, Set, SetData, Print, Plot
       
 KEYWORDS: 
       TBD
   
 EXAMPLES:
       To read the packets 1000 to 9999 from the HESSI GSE file
       therm6a.dat:

       obj = Obj_New( 'HSI_GSE', FILENAME='therm6a.dat' )
       packet = obj->GetData( PACKET_INDEX = IndGen( 9000 ) + 1000 )

       To plot a "quick and dirty" lightcurve of the pac
       packet->Plot, file='abc.fits', time_resolution=2.

 CALLS: ***
	HSI_RAW::BUILDFILEOFFSET, HSI_RAW::READHEADER, HSI_RAW__DEFINE
 SEE ALSO:    
	http://hessi.ssl.berkeley.edu/software/reference.html
	HESSI Utility Reference
	HESSI telemetry formats http://hessi.ssl.berkeley.edu/internal/
 HISTORY:
       Release 4 development ACs:
           The GSE part has been extracted form hsi_packet__define
           The cache is new
           The whole sync process is new
       Release 2 development, May 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu
       Based on: HSI_packet*.pro (Releases 0 and 1)


HESSI HSI_PILEUP CLASS $SSW/hessi/idl/spectra/hsi_pileup__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI HSI_PILEUP CLASS

 PURPOSE:

       This class manages the pileup correction for hsi_spectrum

 CATEGORY:
       Objects

 CONTRUCTION:
       o = Obj_New( 'hsi_pileup' )
       or
       o = hsi_pileup( )

 INPUT (CONTROL) PARAMETERS:
       Defined in {hsi_pileup_control}

 CALLS: ***
	AVG [1], AVG [2], EXIST, F_DIV, GET_IJ, HSI_CORRECT_PILEUP
	HSI_PILEUP::CORRECT_PILEUP, HSI_PILEUP::GETDATA, HSI_PILEUP::INIT
	HSI_PILEUP::PROCESS, HSI_PILEUP::RESET, HSI_PILEUP::SET, HSI_PILEUP::TEST
	HSI_PILEUP_CONTROL, HSI_PILEUP__DEFINE, HSI_SPECTRUM
 SEE ALSO:
	hsi_pileup_control, hsi_pileup_control__define, hsi_pileup_info__define
 HISTORY:
       5-jul-2005, richard.schwartz@gsfc.nasa.gov
     Manages the recomputation of pileup as conditions
     change in the spectrum and pileup params.
      26-oct-2005, ras, added protection against no front segments selected
      20-Nov-2006, Kim.  Added catch in process so we can restore obj params


HESSI IMAGE CLASS DEFINITION [1] $SSW/hessi/idl/image/hsi_image__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI IMAGE CLASS DEFINITION

 PURPOSE:
       Generates image cubes. The object generates automatically a
       image cube FITS file that can be reused using the control
       parameter im_input_fits.

       This object is the outer layer, or access layer, of the group of
       objects made of hsi_image, hsi_image_strategy, hsi_image_file,
       and hsi_image_raw.

       See also the hsi_image_howto at:
       http://hesperia.gsfc.nasa.gov/~kim/hsi_image_howto.html

 CATEGORY:
       HESSI Imaging

 CONSTRUCTION:
       obj = Obj_Name( 'hsi_image' )
       obj = hsi_image()

 CONTROL PARAMETERS:
       For a comprehensive list of imaging parameters, look at
       http://hesperia.gsfc.nasa.gov/ssw/hessi/doc/hsi_params_all.htm

       Most relevant parameters associated with this class

       im_input_fits - specify the input filename to use. If set to
                       an empty string (the default), it will
                       generate new images.
       im_out_fits_filename - if set, a file with that name will be written

       im_time_interval - Definition of the time intervals. Time
                          intervals are given in UT, anytim
                          format. im_time_interval can be either:
           - a two-element array: in this case it defines a single
             image per energy bin, or  multiple images with a specific time bin
             given by im_time_bin.
           - an n+1 - element array: in this case each value of the
             array defines the time boundaries of the n images
           - a 2xn array: in this case each value pair define the
             time boundaries of an image, allowing non-contiguous images.

       im_time_bin - Defines individual image time intervals, used whenever
                     im_time_interval is a two-element array, ignored
                     otherwise. Similar to SP_TIME_INTERVAL.
         Default is 0.
           - If 0, then dont use bins. Make images according to the
             information given in im_time_interval
           - If non-zero scalar, divide full time range into bins of this width

       im_energy_bin - Definition of the energy intervals. Similar to
                       im_time_interval. This parameter can be either:
           - a scalar, then uses one of the pre-defined energy binning
             schemes, see
             http://hesperia.gsfc.nasa.gov/ssw/hessi/dbase/spec_resp/energy_binning.txt
           - a two-element array: in this case it defines a single
             image per energy band per time interval
           - an n+1 - element array: in this case each value of the
             array defines the energy boundaries of the n images
           - a 2xn array: in this case each value pair define the
             energy boundaries of an image, allowing non-contiguous images.

       progress_bar - If set, show progress bar while making
                     images. Default=0..

 EXAMPLES:
     Check hsi_image_test for a lot of examples.

     This example will make 8 images, four 5-second time bins starting at 20-feb-02 10:00, and
     two energy bands (3-12 and 12-25), and write the image cube in the file test_cube.fits
     obj = hsi_multi_image()
     obj -> set, obs_time_interval='20-feb-02 10:' + ['00','00:20']
     obj -> set, im_time_interval=5, im_energy_bin=[3,12,25]
     ptim, obj -> getaxis(/ut, /edges_2)		; shows time bins
     print,obj -> getaxis(/energy, /edges_2)	; shows energy bins
     data = obj -> getdata(image_dim=16, multi_fits_filename='test_cube.fits')

 CALLS: ***
	HSI_IMAGE::FITSWRITE, HSI_IMAGE::GETAXIS, HSI_IMAGE::INIT, HSI_IMAGE::MOVIE
	HSI_IMAGE::PANEL_DISPLAY, HSI_IMAGE::PLOT, HSI_IMAGE::SET, HSI_IMAGE::SLICER
	HSI_IMAGE_SINGLE, HSI_IMAGE__DEFINE, HSI_PANEL_DISPLAY, IS_STRING, REM_TAG [1]
	REM_TAG [2], is_struct
 SEE ALSO:
	2003-10-01 - hsi_image is split into multiple
	2003-12-13: Andre Csillaghy - many changes to make a
	2004-01-15 - merge hsi_image and hsi_multi_image
	2004-09-01 - first alpha version
	2005-01-07 - first beta version csillag@fh-aargau.ch, Modifications:
	Written:  Kim Tolbert / Andre Csillaghy, acs, csillag@fh-aargau.ch
	csillag@ssl.berkeley.edu, hsi_image, hsi_image_file, hsi_image_raw
	hsi_image_strategy, smoother input to, spex_hessi_multi_image, strategies


HESSI IMAGE CLASS DEFINITION [2] $SSW/hessi/offline/hsi_image__define_old.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI IMAGE CLASS DEFINITION

 PURPOSE: 
       Generates and provides access to images.

 CATEGORY:
       HESSI Imaging
 
 CONSTRUCTION:
       image_obj = Obj_Name( 'hsi_image' )
       image_obj = HSI_Image()

 (INPUT) CONTROL PARAMETERS DEFINED IN THIS CLASS:
       
       image_alg: a string determining which algorithm to
                  use. Currently defined are: 'BACK PROJECTION',
                                              'CLEAN', 'MEM SATO',
                                              'PIXON', 'FORWARD
                                              FITTING'

       see hsi_image_control__define

       To print a list of all control parameters, use 
       o->Print, /CONTROL_ONLY      
       To assign a value to a control parameter, use 
       o->Set, KEYWORD=value
       To get the value of a control parameter, use 
       value=o->Get( /KEYWORD ) 

 (OUTPUT) INFO PARAMETERS DEFINED IN THIS CLASS:

      image_alg_used: a string giving the name of the imaging
                       algorithm used to create the image. 

      see hsi_image_info__define

      To print a list of all info parameters, use 
      o->Print, /INFO_ONLY      
      To get the value of an info parameter, use 
      value=o->Get( /KEYWORD )

 CLASS RELATIONSHIPS:
      HSI_Framework: parent class
      HSI_Modpat_Products, HSI_Bproj, HSI_Clean, HSI_MEM_Sato,
      HSI_Pixon, HSI_Forwardfit: source classes

 KEYWORDS:

 EXAMPLES:
       
             

 SEE ALSO:
	hsi_image
 HISTORY:
       Development for Release 3, July-October 1999
       Development for Release 2, March-July 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI Image Constructor [1] $SSW/hessi/idl/image/hsi_image.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI Image Constructor

 PURPOSE: 
       Creates an instance of the image class.

 CATEGORY:
       HESSI Imageing (idl/image)
 
 CALLING SEQUENCE: 
       object = hsi_image()

 OUTPUTS:
       object: an object reference of the class hsi_image

 KEYWORDS: 
       Any of the keywords defined in hsi_image__define and
       its parent structures.

 CALLS: ***
	HSI_IMAGE
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/reference.html#hsi_image
 HISTORY:
       Created: HESSI Software Release 3, September 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI Image Constructor [2] $SSW/hessi/idl/sims/hsi_simulation.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI Image Constructor

 PURPOSE: 
       Creates an instance of the image class.

 CATEGORY:
       HESSI Imageing (idl/image)
 
 CALLING SEQUENCE: 
       object = hsi_image()

 OUTPUTS:
       object: an object reference of the class hsi_image

 KEYWORDS: 
       Any of the keywords defined in hsi_image__define and
       its parent structures.

 CALLS: ***
	HSI_SIMULATION
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/reference.html#hsi_image
 HISTORY:
       Created: HESSI Software Release 3, September 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI IMAGE CONTROL STRUCTURE DEFINITION [2] $SSW/hessi/idl/image/hsi_image_control__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI IMAGE CONTROL STRUCTURE DEFINITION

 PURPOSE: 
       Defines the HESSI image control structure

 CATEGORY:
       HESSI / Imaging
 
 CALLING SEQUENCE: 
       var = {hsi_image_control}

 EXAMPLES:
       img_ctrl = {hsi_image_control}
       help, img_ctrl, /structure

 CALLS: ***
	HSI_IMAGE_CONTROL__DEFINE
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/reference.html
	HSI_IMAGE_CONTROL [1], HSI_IMAGE_CONTROL [2], HSI_IMAGE_CONTROL [3]
	HSI_IMAGE_CONTROL [4]
 HISTORY:
       Release 6: imaging_method introduced
       Release 3 development, August 1999, ACs
       Release 2 development, April 27, 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI IMAGE CONTROL STRUCTURE DEFINITION [3] $SSW/hessi/idl/image/hsi_image_single_control__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI IMAGE CONTROL STRUCTURE DEFINITION

 PURPOSE:
       Defines the HESSI image control structure

 CATEGORY:
       HESSI / Imaging

 CALLING SEQUENCE:
       var = {hsi_image_control}

 EXAMPLES:
       img_ctrl = {hsi_image_control}
       help, img_ctrl, /structure

 CALLS: ***
	HSI_IMAGE_SINGLE_CONTROL__DEFINE
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/reference.html
	HSI_IMAGE_CONTROL [1], HSI_IMAGE_CONTROL [2], HSI_IMAGE_CONTROL [3]
	HSI_IMAGE_CONTROL [4]
 HISTORY:
       Release 6: imaging_method introduced
       Release 3 development, August 1999, ACs
       Release 2 development, April 27, 1999,
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI IMAGE CONTROL STRUCTURE DEFINITION [4] $SSW/hessi/idl/image/hsi_map__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI IMAGE CONTROL STRUCTURE DEFINITION

 PURPOSE: 
       Defines the HESSI image control structure

 CATEGORY:
       HESSI / Imaging
 
 CALLING SEQUENCE: 
       var = {hsi_image_control}
;
 EXAMPLES:
       img_ctrl = {hsi_image_control}
       help, img_ctrl, /structure

 SEE ALSO:
 HISTORY:
       Release 2 development, April 27, 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI IMAGE CONTROL STRUCTURE DEFINITION [5] $SSW/hessi/idl/util/hsi_calib_eventlist_info__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI IMAGE CONTROL STRUCTURE DEFINITION

 PURPOSE:
       Defines the HESSI image control structure

 CATEGORY:
       HESSI / Imaging

 CALLING SEQUENCE:
       var = {hsi_image_control}
;
 EXAMPLES:
       img_ctrl = {hsi_image_control}
       help, img_ctrl, /structure

 CALLS: ***
	HSI_CALIB_EVENTLIST_INFO__DEFINE
 SEE ALSO:
 HISTORY:
       Release 2 development, April 27, 1999,
           A Csillaghy, csillag@ssl.berkeley.edu
     5-jul-2002, ras, added n_event to help support
      multiple energy bands in binned_eventlist
   2-oct-2003, richard.schwartz@gsfc.nasa.gov, image_atten_state
   7-may-2004, ras, added avg offaxis_disp measured in arcseconds.
   27-mar-2005, ras, added phz_n_roll_bins_info
   12-may-2005, ras, added det_index_off, must stop bproj on
     on detectors with no livetime
   27-jun-2005, ras, change det_index_off to off_det_index


HESSI IMAGE CONTROL STRUCTURE DEFINITION [6] $SSW/hessi/offline/hsi_modpat_info__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI IMAGE CONTROL STRUCTURE DEFINITION

 PURPOSE: 
       Defines the HESSI image control structure

 CATEGORY:
       HESSI / Imaging
 
 CALLING SEQUENCE: 
       var = {hsi_image_control}
;
 EXAMPLES:
       img_ctrl = {hsi_image_control}
       help, img_ctrl, /structure

 SEE ALSO:
 HISTORY:
       Release 2 development, April 27, 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI IMAGE FILE CLASS DEFINITION [1] $SSW/hessi/idl/image/hsi_image_file__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI IMAGE FILE CLASS DEFINITION

 PURPOSE:
       This class uses files generated by hsi_image/hsi_image_raw for dealing
       with images. This is not intended to work on its own (altough it
       should), use hsi_image() as access layer.

       See also the hsi_image_howto at:
       http://hessi.ssl.berkeley.edu/~csillag/rhessi/hsi_image_howto.html

 CATEGORY:
       HESSI Imaging

 CONSTRUCTION:
       obj = Obj_Name( 'hsi_image' )
       obj = hsi_image()

 CONTROL PARAMETERS:
       For a comprehensive list of imaging parameters, look at
       http://hesperia.gsfc.nasa.gov/ssw/hessi/doc/hsi_params_all.htm

       Most relevant parameters associated with this class

       im_input_fits - specify the input filename to use. If set to
                       an empty string (the default), it will
                       generate new images.
       im_out_fits_filename - if set, a file with that name will be written

       im_time_interval - Definition of the time intervals. Time
                          intervals are given in UT, anytim
                          format. im_time_interval can be either:
           - a two-element array: in this case it defines a single
             image per energy bin, or  multiple images with a specific time bin
             given by im_time_bin.
           - an n+1 - element array: in this case each value of the
             array defines the time boundaries of the n images
           - a 2xn array: in this case each value pair define the
             time boundaries of an image, allowing non-contiguous images.

       im_time_bin - Defines individual image time intervals, used whenever
                     im_time_interval is a two-element array, ignored
                     otherwise. Similar to SP_TIME_INTERVAL.
         Default is 0.
           - If 0, then dont use bins. Make images according to the
             information given in im_time_interval
           - If non-zero scalar, divide full time range into bins of this width

       im_energy_bin - Definition of the energy intervals. Similar to
                       im_time_interval. This parameter can be either:
           - a scalar, then uses one of the pre-defined energy binning
             schemes, see
             http://hesperia.gsfc.nasa.gov/ssw/hessi/dbase/spec_resp/energy_binning.txt
           - a two-element array: in this case it defines a single
             image per energy band per time interval
           - an n+1 - element array: in this case each value of the
             array defines the energy boundaries of the n images
           - a 2xn array: in this case each value pair define the
             energy boundaries of an image, allowing non-contiguous images.

       progress_bar - If set, show progress bar while making
                     images. Default=0..

 EXAMPLES:
     Check hsi_image_test for a lot of examples.

     This example will make 8 images, four 5-second time bins starting at 20-feb-02 10:00, and
     two energy bands (3-12 and 12-25), and write the image cube in the file test_cube.fits
     obj = hsi_multi_image()
     obj -> set, obs_time_interval='20-feb-02 10:' + ['00','00:20']
     obj -> set, im_time_interval=5, im_energy_bin=[3,12,25]
     ptim, obj -> getaxis(/ut, /edges_2)		; shows time bins
     print,obj -> getaxis(/energy, /edges_2)	; shows energy bins
     data = obj -> getdata(image_dim=16, multi_fits_filename='test_cube.fits')

 CALLS: ***
	CHECKVAR [1], CLEAR_STRUCT, EXIST, HAVE_TAG, HSI_IMAGE_FILE
	HSI_IMAGE_FILE::FITSWRITE, HSI_IMAGE_FILE::GET, HSI_IMAGE_FILE::GETAXIS
	HSI_IMAGE_FILE::GET_INFO_PARAMS, HSI_IMAGE_FILE::INIT
	HSI_IMAGE_FILE::NEED_UPDATE, HSI_IMAGE_FILE::PROCESS, HSI_IMAGE_FILE::SET
	HSI_IMAGE_FILE_CONTROL, HSI_IMAGE_FILE_TEST, HSI_IMAGE_FILE__DEFINE
	HSI_IMAGE_SINGLE, IS_STRING, REM_TAG [1], REM_TAG [2], TAG_EXIST [1]
	TAG_EXIST [2], anytim [1], anytim [2], anytim [3], anytim [4], anytim [5]
	checkvar [2], hsi_image_fitsread, hsi_is_obj_nested, is_struct, prstr [1]
	prstr [2], str_sub2top, str_subset
 SEE ALSO:
	20-Mar-2005, 2003-10-01 - hsi_image is split into multiple
	2003-12-13: Andre Csillaghy - many changes to make a
	2004-01-15 - merge hsi_image and hsi_multi_image
	2004-09-01 - first alpha version
	2005-01-07 - first beta version csillag@fh-aargau.ch, 29-Sep-2005
	30-Sep-2005, Kim.  If using data_struct in process
	Kim.  Put /this_class on call to get in get_info_params method
	Kim.  Remove EV_FILENAME from control structure before setting in object.
	Modifications:, Written:  Kim Tolbert / Andre Csillaghy, acs
	control.energy_band rather than info.im_eband_used - latter won't be correct if
	csillag@fh-aargau.ch, csillag@ssl.berkeley.edu
	file is an old format (or new format created from an old format file)
	get eband from, hsi_image, hsi_image_file, hsi_image_raw, hsi_image_strategy
	smoother input to, spex_hessi_multi_image, strategies


HESSI IMAGE FILE CLASS DEFINITION [2] $SSW/hessi/idl/image/hsi_image_pseudo__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI IMAGE FILE CLASS DEFINITION

 PURPOSE:
       This class is used to create a pseudo image object from a saved data structure.
       It is a pseudo object in the sense that everything is set directly into
       the object and gets and getdatas just return what was set, no further processing
       is allowed.  The purpose is to allow us to use the existing hsi_image object methods.
       This is not intended to work on its own (altough it
       should), use hsi_image() as access layer.

       See also the hsi_image_howto at:
       http://hessi.ssl.berkeley.edu/~csillag/rhessi/hsi_image_howto.html

 CATEGORY:
       HESSI Imaging

 CONSTRUCTION:
       obj = Obj_Name( 'hsi_image' )
       obj = hsi_image()

 INPUT:
		DATA_STRUCT - Structure containing all information and data to set in object.
       Input to this object is in the form of a saved_data structure.  The saved_data
       structures are usually created by the HESSI GUI.  They contain:
          ** Structure PLOTMAN_SAVED_DATA, 8 tags, length=56, data length=56:
           DATA            POINTER   <PtrHeapVar1075>
           XAXIS           POINTER   <PtrHeapVar1076>
           YAXIS           POINTER   <PtrHeapVar1077>
           CONTROL         POINTER   <PtrHeapVar1078>
           INFO            POINTER   <PtrHeapVar1083>
           CLASS           STRING    'HSI_IMAGE'
           CLASS_NAME      STRING    ''
           SAVE_MODE       STRING    'obj_extract'
       Set this into the object via:
           obj -> set, data_struct=data_struct
           or on creation via obj = hsi_image(data_struct=data_struct)
       The control, info, and data from this structure will be set into the object.
       No more sets will be allowed (they will not have an effect), but obj->get(...) will
       return the control and info parameters as usual, and obj->getdata() will return the
       image array.

 EXAMPLES:
       Note this object can be created directly, but is most useful when used from plotman.
       If pl is a plotman object, then to create an object from the 3rd panel (which must be
       a HESSI Image panel:
         panels = pl -> get(/panels)
         panel3 = panels -> get_item(3)
         obj = hsi_image(data_str=(*panel3).saved_data)

 CALLS: ***
	HSI_IMAGE_FILE_CONTROL, HSI_IMAGE_PSEUDO::INIT, HSI_IMAGE_PSEUDO::PROCESS
	HSI_IMAGE_PSEUDO::SET, HSI_IMAGE_PSEUDO__DEFINE
 SEE ALSO:
	Modifications:, Written:  Kim Tolbert 22-Jan-2005, hsi_image, hsi_image_file
	hsi_image_raw, hsi_image_strategy


HESSI IMAGE INFO STRUCTURE DEFINITION [1] $SSW/hessi/idl/image/hsi_image_info__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI IMAGE INFO STRUCTURE DEFINITION

 PURPOSE:
       Creates a structures that contains all paramaters
       sets by the process method of HSI_Image.

 CATEGORY:
       HESSI / Imaging

 CALLING SEQUENCE:
       var = {hsi_image_info}

 EXAMPLES:
       Ususally you will want to use at the image info parameters after
       img_ctrl = {hsi_image_control}
       help, img_ctrl, /structure

 CALLS: ***
	HSI_IMAGE_INFO__DEFINE
 SEE ALSO:
 HISTORY:
       Release 2 development, April 27, 1999,
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI IMAGE INFO STRUCTURE DEFINITION [2] $SSW/hessi/idl/image/hsi_image_single_info__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI IMAGE INFO STRUCTURE DEFINITION

 PURPOSE:
       Creates a structures that contains all paramaters
       sets by the process method of HSI_Image.

 CATEGORY:
       HESSI / Imaging

 CALLING SEQUENCE:
       var = {hsi_image_info}

 EXAMPLES:
       Ususally you will want to use at the image info parameters after
       img_ctrl = {hsi_image_control}
       help, img_ctrl, /structure

 CALLS: ***
	HSI_IMAGE_SINGLE_INFO__DEFINE
 SEE ALSO:
 HISTORY:
       Release 2 development, April 27, 1999,
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI Image Parameter Selection Tool $SSW/hessi/idl/sub_task/hsi_cw_image.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI Image Parameter Selection Tool
;
 PURPOSE:
       Compound widget tool for the image control parameters

 CATEGORY:


 CALLING SEQUENCE:
       widget_id = hsi_cw_image( parent )

 INPUTS:


 OPTIONAL INPUTS:
       None.

 OUTPUTS:
       widget_id: the id number associated with the widget

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS:
       None.

 COMMON BLOCKS:
       None.

 PROCEDURE:

 RESTRICTIONS:
       None.

 SIDE EFFECTS:
       None.

 EXAMPLES:


 CALLS: ***
	CW_BGROUP, CW_FSLIDER, HSI_CW_IMAGE, HSI_CW_IMAGE_EVENT, HSI_CW_IMAGE_GET_VALUE
	HSI_CW_IMAGE_SET_VALUE
 SEE ALSO:
 HISTORY:
       Version 1, November 23, 1998,
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI Image PLOTMAN method $SSW/hessi/idl/image/hsi_image__plotman.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI Image PLOTMAN method

 PURPOSE:
       Plotman method for hsi_image object

 CATEGORY:
       HESSI Imaging

 KEYWORDS:
       plotman_obj - plotman object reference to use.  If not passed, self.plotman_obj will be used.  If
         self.plotman_obj isn't a valid plotman object, creates a new plotman object.  In either case,
         self.plotman_obj is set to the plotman object used.
       description - String description of image (default is 'Image').  Used for Window_Control pulldown
         to identify each image panel.
       error - Output.  0 means no error, 1 means error making plotman object
       _extra - any additional keywords to pass on to hsi_image object, or plotman object

 Written:  Kim Tolbert, September 2004 (Extracted from hsi_image__define.pro)
 Modifications:
 16-Nov-2006, Kim.  Removed delay_set_pulldown stuff. Not needed anymore.


HESSI IMAGE RAW CLASS DEFINITION [1] $SSW/hessi/idl/image/hsi_image_client__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI IMAGE RAW CLASS DEFINITION

 PURPOSE:
       This object is used to generate image cubes from raw data.
       This class is associated with the hsi_image_file class that reads
       images cubes from files. This class is not intended to be used alone.
       The best is to use the overall wrapper hsi_image(). However,
       there is no harm using this doirectly either.

 CATEGORY:
       HESSI Imaging

 CONSTRUCTION:
       obj = Obj_Name( 'hsi_image_raw' )
       obj = hsi_image_raw()

 (INPUT) CONTROL PARAMETERS USED IN THIS CLASS:

       The control parameters are defined in the class hsi_image_raw_control__define

       IM_TIME_INTERVAL - Defines individual image time intervals.  Similar to SP_TIME_INTERVAL.
         Default is 0.
         If 0, then make one time bin equal to full time range
         If non-zero scalar, divide full time range into bins of this width
         If vector, these are time bin edges.  If > full time range start, they are absolute
            otherwise they are relative to start of full time range.
         Full time range is either the obs_time_interval, or if set, multi_time_range

       IM_TIME_RANGE - Full time range to break up into time bins via IM_TIME_INTERVAL
         Default is [0.,0.] which means use obs_time_interval as full time range.

       IM_OUT_FITS_FILENAME - Output FITS file name.  Default is '' (no file written)

       PROGRESS_BAR - If set, show progress bar while making images. Default=0

 (OUTPUT) INFO PARAMETERS DEFINED IN THIS CLASS:

      Not defined yet.  Will contain pointer array of info params for cube.

 CLASS RELATIONSHIPS:
      Inherits hsi_image_strategy

 KEYWORDS:

 NOTE:  This is just a first draft of this object.  Saving of the image cube information and
   writing the image cube FITS file will be handled differently in the future.  In fact right now,
   unless you write a FITS file, you end up only with the image array and no control or info
   information for the individual images (the FITS file, however, does contain a single control
   structure for all of the images, and an array of info structures that apply to each individual image).
   Also bad - right now once you set the FITS file name, it persists.
   To not write a fits file, do;   o->set,multi_fits_filename=''

 EXAMPLES:

     This example will make 8 images, four 5-second time bins starting at 20-feb-02 10:00, and
     two energy bands (3-12 and 12-25), and write the image cube in the file test_cube.fits
     obj = hsi_image_raw()
     obj -> set, obs_time_interval='20-feb-02 10:' + ['00','00:20']
     obj -> set, im_time_interval=5, im_energy_bin=[3,12,25]
     ptim, obj -> getaxis(/ut, /edges_2)		; shows time bins
     print,obj -> getaxis(/energy, /edges_2)	; shows energy bins
     data = obj -> getdata(image_dim=16, multi_fits_filename='test_cube.fits')

 CALLS: ***
	HSI_IMAGE, HSI_IMAGE_CLIENT, HSI_IMAGE_CLIENT::INIT, HSI_IMAGE_CLIENT::PROCESS
	HSI_IMAGE_CLIENT_TEST, HSI_IMAGE_CLIENT__DEFINE, HSI_IMAGE_RAW, ptim
 SEE ALSO:
	2004-apr-12 acs from hsi_multi_image splitted into several classes to integrate
	26-Oct-2002, Modifications:, Written:  Kim Tolbert, hsi_image
	hsi_image and hsi_multi_image


HESSI IMAGE RAW CLASS DEFINITION [2] $SSW/hessi/idl/image/hsi_image_server__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI IMAGE RAW CLASS DEFINITION

 PURPOSE:
       This object is used to generate image cubes from raw data.
       This class is associated with the hsi_image_file class that reads
       images cubes from files. This class is not intended to be used alone.
       The best is to use the overall wrapper hsi_image(). However,
       there is no harm using this doirectly either.

 CATEGORY:
       HESSI Imaging

 CONSTRUCTION:
       obj = Obj_Name( 'hsi_image_raw' )
       obj = hsi_image_raw()

 (INPUT) CONTROL PARAMETERS USED IN THIS CLASS:

       The control parameters are defined in the class hsi_image_raw_control__define

       IM_TIME_INTERVAL - Defines individual image time intervals.  Similar to SP_TIME_INTERVAL.
         Default is 0.
         If 0, then make one time bin equal to full time range
         If non-zero scalar, divide full time range into bins of this width
         If vector, these are time bin edges.  If > full time range start, they are absolute
            otherwise they are relative to start of full time range.
         Full time range is either the obs_time_interval, or if set, multi_time_range

       IM_TIME_RANGE - Full time range to break up into time bins via IM_TIME_INTERVAL
         Default is [0.,0.] which means use obs_time_interval as full time range.

       IM_OUT_FITS_FILENAME - Output FITS file name.  Default is '' (no file written)

       PROGRESS_BAR - If set, show progress bar while making images. Default=0

 (OUTPUT) INFO PARAMETERS DEFINED IN THIS CLASS:

      Not defined yet.  Will contain pointer array of info params for cube.

 CLASS RELATIONSHIPS:
      Inherits hsi_image_strategy

 KEYWORDS:

 NOTE:  This is just a first draft of this object.  Saving of the image cube information and
   writing the image cube FITS file will be handled differently in the future.  In fact right now,
   unless you write a FITS file, you end up only with the image array and no control or info
   information for the individual images (the FITS file, however, does contain a single control
   structure for all of the images, and an array of info structures that apply to each individual image).
   Also bad - right now once you set the FITS file name, it persists.
   To not write a fits file, do;   o->set,multi_fits_filename=''

 EXAMPLES:

     This example will make 8 images, four 5-second time bins starting at 20-feb-02 10:00, and
     two energy bands (3-12 and 12-25), and write the image cube in the file test_cube.fits
     obj = hsi_image_raw()
     obj -> set, obs_time_interval='20-feb-02 10:' + ['00','00:20']
     obj -> set, im_time_interval=5, im_energy_bin=[3,12,25]
     ptim, obj -> getaxis(/ut, /edges_2)		; shows time bins
     print,obj -> getaxis(/energy, /edges_2)	; shows energy bins
     data = obj -> getdata(image_dim=16, multi_fits_filename='test_cube.fits')

 CALLS: ***
	ADD_TAG [1], ADD_TAG [2], CHECKVAR [1], HSI_IMAGE_SERVER, HSI_IMAGE_SERVER::INIT
	HSI_IMAGE_SERVER::PROCESS, HSI_IMAGE_SERVER_TEST, HSI_IMAGE_SERVER__DEFINE
	REM_TAG [1], REM_TAG [2], SOCK_OPEN, STRUCT2VOTABLE, anytim [1], anytim [2]
	anytim [3], anytim [4], anytim [5], checkvar [2]
 SEE ALSO:
	2004-apr-12 acs from hsi_multi_image splitted into several classes to integrate
	26-Oct-2002, Modifications:, Written:  Kim Tolbert, hsi_image
	hsi_image and hsi_multi_image


HESSI IMAGE STRATEGY CLASS DEFINITION $SSW/hessi/idl/image/hsi_image_strategy__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI IMAGE STRATEGY CLASS DEFINITION

 PURPOSE:
       This class provides the generic prcedures and attributes needed by
       both hsi_image_raw and hsi_image_file. This class is abstract in the
       sense that it works only together with the classes just mentioned.

 CATEGORY:
       HESSI Imaging

 CONSTRUCTION:
       Only with the concrete classes hsi_image_raw or hsi_image_file

 CONTROL PARAMETERS DEFINED IN THIS CLASS:
       See hsi_image__define

 INFO PARAMETERS DEFINED IN THIS CLASS:
       See hsi_image__define

 CLASS RELATIONSHIPS:
       Inherits framework

 CALLS: ***
	ADD_PROP, ADD_TAG [1], ADD_TAG [2], CHECKVAR [1], CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], EXIST, HSI_IMAGE_SINGLE, HSI_IMAGE_STRATEGY::CLEANUP
	HSI_IMAGE_STRATEGY::CLEANUP_AXIS, HSI_IMAGE_STRATEGY::FITSWRITE
	HSI_IMAGE_STRATEGY::FITS_CREATE, HSI_IMAGE_STRATEGY::GET
	HSI_IMAGE_STRATEGY::GETAXIS, HSI_IMAGE_STRATEGY::GETDATA
	HSI_IMAGE_STRATEGY::GET_INFO_PARAMS, HSI_IMAGE_STRATEGY::GET_SUB_STRUCT
	HSI_IMAGE_STRATEGY::INIT, HSI_IMAGE_STRATEGY::MOVIE
	HSI_IMAGE_STRATEGY::PLOT, HSI_IMAGE_STRATEGY::PLOT_OLD
	HSI_IMAGE_STRATEGY::SAVE, HSI_IMAGE_STRATEGY::SET
	HSI_IMAGE_STRATEGY::SLICER, HSI_IMAGE_STRATEGY_CONTROL
	HSI_IMAGE_STRATEGY__DEFINE, IS_STRING, JOIN_STRUCT [1], JOIN_STRUCT [2], JSMOVIE
	LOADCT, MAKE_MAP, MAP2JPEG, MAP2MPEG, MINMAX [1], MINMAX [2], MOVIE_MAP, PTR_EXIST
	REM_TAG [1], REM_TAG [2], REPRODUCE, REP_TAG_VALUE, SAME_DATA [1], SAME_DATA [2]
	SLICER3, STRUCT2VOTABLE, TAG_EXIST [1], TAG_EXIST [2], TIME2FILE, TRIM, VALID_RANGE
	anytim [1], anytim [2], anytim [3], anytim [4], anytim [5], checkvar [2]
	concat_dir [4], hsi_compute_image_axis, hsi_image_plot, hsi_is_obj_nested
	is_number [1], is_number [2], is_struct, prstr [1], prstr [2], str_subset
	str_top2sub
 SEE ALSO:
	2003-10-01 - hsi_image is split into multiple
	2003-12-13: Andre Csillaghy - many changes to make a
	2004-01-15 - merge hsi_image and hsi_multi_image
	2004-09-01 - first alpha version
	2005-01-07 - first beta version csillag@fh-aargau.ch
	2005-05-11 - changes to make it work with o->get( /time )
	2005-06-16 - changes to control reprocessing when dealing with
	2005-07-27 - see change below with this date; minor change, Modifications:
	Written:  Kim Tolbert / Andre Csillaghy, acs, csillag@fh-aargau.ch
	csillag@ssl.berkeley.edu, different image algorithms. acs, hsi_image
	hsi_image_file, hsi_image_raw, hsi_image_strategy, smoother input to
	spex_hessi_multi_image, strategies


HESSI IMAGE [1] $SSW/hessi/idl/image/hessi_image.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI IMAGE

 PURPOSE: 
       Command-line interface  to the HESSI imaging utilities.

 CATEGORY:
       imaging (hessi/image)
 
 CALLING SEQUENCE: 
       HESSI_Image, out_image, out_parameter

 INPUTS: 
       Inputs are exclusively through keywords.
      
 OUTPUTS:
       out_image: the reconstructed image, a 2D array
       out_parameter: a structure containing all the parameters characterizing
               this image. Each tag if this structure is explained in 

               http://hessi.ssl.berkeley.edu/software/reference.html#keywords

 KEYWORDS:
       These are only the most used keywords. An exaustive list
       is provided at 
       http://hessi.ssl.berkeley.edu/software/reference.html#keywords

       A2D_INDEX_MASK: A 27-element byte array containing the mask
                         for the detector selection.
                         Default: [1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]

       ENERGY_BAND: a 2-Element array containing the minimum and
                     maximum value of the energy band in keV.
                     Default: [6., 100.]

       FILENAME: the name of a FITS file containing the input
                 data. 
                 Default: '' 
                 i.e. without filename, simulated data is created

       IMAGE_ALGORITHM:  The name of the image reconstruction algorithm.
                         Default: ''
                         i.e. the dirty map is returned.
                         Options are: 'clean', 'forward fit', 'mem sato'

       PIXEL_SIZE: arcseconds per pixel of the image


       SIM_PIXEL_SIZE: The pixel size of the model used for the
                       simulation.

       SIM_PHOTONS_PER_COLL: The nuber of photons per collimator per
                             seconds used for the simulation.

       SIM_MODEL: A square array containing the map used for
                  simulating data.

       SIM_XYOFFSET:  the offset, in arcseconds, of the center of the image,
                  [xoffset, yoffset] from the telescope axis, used
                  for the simulation.

       TIME_RANGE: a 2-element array containing the minimum and
                   maximum value of the time range, in seconds. 
                   Default: [0., 4.]

       XYOFFSET: a 2-element array for the center of the map in
                 arcsec.
                 Default: [600,200]

 EXAMPLE:
       IDL> hessi_image, image, /DEMO
          This will create a default model, generate the telemetry
          file for this model, extract the packets from the score,
          write the packets into a fits file, extract the score from
          the packets, generate a light curve and a spectrum,
          back-project the score events to reconstruct the image.

 CALLS: ***
	CHECKVAR [1], HESSI_IMAGE, checkvar [2]
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/reference.html
	hsi_image__define
 HISTORY:
       Release 4: rewritten for the new objects. February 2000
       Development for Release 4, December 1999
       Adaptation for Release 3, Nov. 1999
       Rewritten for Release 2 for access to hsi_image class, ACs
       Release 1 dev started in Nov. 1998, ACs
          Added SATO MEM algorithm, and algorithm keywords, jmm  20-nov-1998
       Release 0, October 1998, 
           A Csillaghy, csillag@ssl.berkeley.edu (ACs)


HESSI IMAGE [2] $SSW/hessi/idl/image/hsi_image__set_no_screen_output.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI IMAGE

 PURPOSE:
   Turns off all parameters that control sending output to the screen for currently
   selected image algorithm.  Used for batch processing.

 CATEGORY:
       HESSI Imaging

 CALLING SEQUENCE:
       image_obj -> set_no_screen_output

 KEYWORDS:

 EXAMPLES:

 HISTORY:
  Written: 13-Jul-2001, Kim Tolbert


HESSI IMAGE [3] $SSW/hessi/idl/image/hsi_image_strategy__set_no_screen_output.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI IMAGE

 PURPOSE:
   Turns off all parameters that control sending output to the screen for currently
   selected image algorithm.  Used for batch processing.

 CATEGORY:
       HESSI Imaging

 CALLING SEQUENCE:
       image_obj -> set_no_screen_output

 KEYWORDS:

 EXAMPLES:

 HISTORY:
  Written: 13-Jul-2001, Kim Tolbert


HESSI IMAGING ALGORITHM ABSTRACT CLASS DEFINITION $SSW/hessi/idl/image/hsi_image_alg__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI IMAGING ALGORITHM ABSTRACT CLASS DEFINITION

 PURPOSE: 
       This abstract class defines operations common to all imaging
       algorithms used for HESSI image processing. It is inherited by
       a concrete class that usually has the same name as the
       algorithm it implements.

 CATEGORY:
       Imaging (hessi/image)
 
 CONSTRUCTION:
       Only through the conceret classes

 OUTPUT TYPE:
       2D IMAGE ARRAY

 INPUT PARAMETERS:
       Control (input) parameters are defined in the concrete class.

 OUTPUT PARAMETERS:
       Info (output) parameters are defined in the concrete class.
       
 SOURCE OBJECT:
       HSI_Modpat_Products
 
 KNOWN CONCRETE CLASSES:
       hsi_clean__define
       hsi_forwardfit__define
       hsi_pixon__define

 CALLS: ***
	ADD_TAG [1], ADD_TAG [2], HSI_CALC_IMAGE_ERROR, HSI_IMAGE_ALG::INIT
	HSI_IMAGE_ALG::PROCESS, HSI_IMAGE_ALG__DEFINE, TAG_PREFIX
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/reference.html#hsi_image_alg
	concrete classes above
 HISTORY:
       Release 5.1: updated documentation, January 2001, ACS
       Development for Release 4, April 2000
            csillag@ssl.berkeley.edu


HESSI ITOS data structure definition $SSW/hessi/idl/util/hsi_itos_data__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI ITOS data structure definition

 PURPOSE: 
       Defines the structure of the source packets with the itos
       header.

 CATEGORY:
       Utilities
 
 CALLING SEQUENCE: 
       var = {hsi_itos_data}

 INHERITANCE
       HSI_Packet_Source

 CALLS: ***
	HSI_ITOS_DATA__DEFINE
 SEE ALSO:
	HSI_ITOS__define
 HISTORY:
       Version 1, May 3, 1999, for Release 2
           A Csillaghy, csillag@ssl.berkeley.edu
       Extracted from Richard Schwartz' schwartz_struct_def
           (orig. name hsi_source_packet)


HESSI ITOS TELEMETRY PACKET READER $SSW/hessi/idl/util/hsi_itos__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI ITOS TELEMETRY PACKET READER

 PURPOSE: 
       Provides data structure and methods to read HESSI
       itos (telemetry) packets. This object is usually used from the
       packet reader hsi_packet.

 CATEGORY:
       Utilities
 
 CONSTRUCTION: 
       obj = HSI_Packet( FILE_TYPE = 'ITOS' )       

       The variable obj is the object reference used to
       access the packets. See hsi_packet__define for details

 KEYWORDS: 
       TBD

 CALLS: ***
	HSI_ITOS::BUILDFILEOFFSET, HSI_ITOS::GETDATATYPE, HSI_ITOS::GETPACKETLENGTH
	HSI_ITOS::GETTABLETYPE, HSI_ITOS::READHEADER, HSI_ITOS__DEFINE
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/reference.html
	HESSI Utility Reference
	HESSI telemetry formats http://hessi.ssl.berkeley.edu/internal/
 HISTORY:
       Release 4 development ACs:
           The GSE part has been extracted form hsi_packet__define
           The cache is new
           The whole sync process is new
       Release 2 development, May 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu
       Based on: HSI_packet*.pro (Releases 0 and 1)


HESSI MEM POLAR CLASS DEFINITION $SSW/hessi/idl/image/memvis/hsi_memvis__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI MEM POLAR CLASS DEFINITION

 PURPOSE: 
       Object wrapper for the MEM POLAR image reconstruction algorithm.

 CATEGORY:
       HESSI Imaging
 
 CONSTRUCTION:
       image_obj = Obj_Name( 'hsi_memvis' )

 METHODS:
       Get
       GetData
       Set
       SetData
       Print
       Plot
       Write
       
 RESTRICTIONS:
       

 CALLS: ***
	HSI_MEMVIS, HSI_MEMVIS::IMAGE_ALG_HOOK, HSI_MEMVIS::INIT, HSI_MEMVIS_INIT
	HSI_MEMVIS__DEFINE
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/reference.html
	HSI_MEMVIS_INIT, hsi_memvis
 HISTORY:
       Based on hsi_mem_sato - details:
       Development for Release 4, February-March 2000
           A Csillaghy, csillag@ssl.berkeley.edu
       Algorithm: Jim McTiernan / Jun Sato
       Changes to hsi_memvis August 2000


HESSI MODULATION PATTERN CLASS DEFINITION [1] $SSW/hessi/idl/image/memvis/hsi_vismod_profile__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI MODULATION PATTERN CLASS DEFINITION

 PURPOSE: 
       Provides data structures and methods to work with modulation patterns

 CATEGORY:
       HESSI Utilities
 
 CONSTRUCTION: 
       vismod_pattern_obj = Obj_New( 'hsi_vismod_pattern' ) ;

       The variable vismod_pattern_obj is the object references used to
       access modulation pattern data and methods.

 INHERITANCE
       HSI_Calib_Eventlist (direct)
       HSI_Eventlist, HSI_Packet, Universal

 INPUTS:
       Provided by the "Set" method:
       packet_obj->Set, KEYWORD=value
       See below for the list of available keywords

 OUTPUTS:
       For control variables: provided by the "Get" method;
       For data: provided by the methods:
                 GetMemvisPattern
                 GetMemvisProfile
                 GetBProj
                 GetPSF

 OBJECT-SPECIFIC METHODS:



 CALLS: ***
	CHECKVAR [1], HSI_MEMVIS_DOPROFILE, HSI_VISMOD_PROFILE::GETDATA
	HSI_VISMOD_PROFILE::INIT, HSI_VISMOD_PROFILE__DEFINE, checkvar [2]
 SEE ALSO:
	HESSI Utility Reference http://hessi.ssl.berkeley.edu/software/reference.html
 HISTORY:
       Release 3 development, August / September 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu
       Based on the release 2 software of Richard Schwartz
       Fundamental developments by Richard Schwartz, GSFC
       modul->memvis conversion ajc, 16-aug-2000


HESSI MODULATION PATTERN CLASS DEFINITION [2] $SSW/hessi/idl/util/annsec/hsi_annsec_pattern__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI MODULATION PATTERN CLASS DEFINITION

 PURPOSE:
       Provides data structures and methods to work with modulation patterns

 CATEGORY:
       HESSI Utilities

 CONSTRUCTION:
       modul_pattern_obj = Obj_New( 'hsi_modul_pattern' ) ;

       The variable modul_pattern_obj is the object references used to
       access modulation pattern data and methods.



 CALLS: ***
	HSI_ANNSEC_MODUL_PATTERN, HSI_ANNSEC_PATTERN::INIT
	HSI_ANNSEC_PATTERN::PROCESS, HSI_ANNSEC_PATTERN::SET
	HSI_ANNSEC_PATTERN_CONTROL, HSI_ANNSEC_PATTERN__DEFINE, HSI_RMAP_DIM
	HSI_annsec_phase
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/reference.html
	HESSI Objects Reference
 HISTORY:
		Aug 22, 2001, richard.schwartz
			no longer uses hsi_annsec_map, now hsi_annsec_modul_pattern
			and hsi_annsec_phase.
       Release 6: inherits hsi_modul_pattern
       Release 4: Really just a wrapper around HSI_Annsec_Map
       Release 3 development, August / September 1999,
           A Csillaghy, csillag@ssl.berkeley.edu
       Based on the release 2 software of Richard Schwartz
       Fundamental developments by Richard Schwartz, GSFC


HESSI MODULATION PATTERN CLASS DEFINITION [3] $SSW/hessi/idl/util/hsi_modul_pattern__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI MODULATION PATTERN CLASS DEFINITION

 PURPOSE:
       Provides data structures and methods to work with modulation patterns

 CATEGORY:
       HESSI Utilities

 CONSTRUCTION:
       modul_pattern_obj = Obj_New( 'hsi_modul_pattern' ) ;

       The variable modul_pattern_obj is the object references used to
       access modulation pattern data and methods.



 CALLS: ***
	HSI_CALIB_EVENTLIST, HSI_MODUL_PATTERN::INIT, HSI_MODUL_PATTERN::SET
	HSI_MODUL_PATTERN_CONTROL, HSI_MODUL_PATTERN__DEFINE
 SEE ALSO:
	HESSI Utility Reference http://hessi.ssl.berkeley.edu/software/reference.html
 HISTORY:
       Release 6: The hsi_modul_pattern class is the strategy holder
                  of a couple of imaging methods. It basically just
                  decides whether to use the annular sector or the
                  visibilites in the image reconstruction process. ACs
       Release 4: Really just a wrapper around HSI_Annsec_Map
       Release 3 development, August / September 1999,
           A Csillaghy, csillag@ssl.berkeley.edu
       Based on the release 2 software of Richard Schwartz
       Fundamental developments by Richard Schwartz, GSFC


HESSI MODULATION PATTERN CLASS DEFINITION [4] $SSW/hessi/idl/util/hsi_modul_profile_annsec__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI MODULATION PATTERN CLASS DEFINITION

 PURPOSE:
       Provides data structures and methods to work with modulation patterns

 CATEGORY:
       HESSI Utilities

 CONSTRUCTION:
       modul_pattern_obj = Obj_New( 'hsi_modul_pattern' ) ;

       The variable modul_pattern_obj is the object references used to
       access modulation pattern data and methods.

 INHERITANCE
       HSI_Calib_Eventlist (direct)
       HSI_Eventlist, HSI_Packet, Universal

 INPUTS:
       Provided by the "Set" method:
       packet_obj->Set, KEYWORD=value
       See below for the list of available keywords

 OUTPUTS:
       For control variables: provided by the "Get" method;
       For data: provided by the methods:
                 GetModulPattern
                 GetModulProfile
                 GetBProj
                 GetPSF

 OBJECT-SPECIFIC METHODS:



 CALLS: ***
	HSI_ANNSEC_PROFILE [1], HSI_ANNSEC_PROFILE [2]
	HSI_MODUL_PROFILE_ANNSEC::MODUL_PROFILE_HOOK
	HSI_MODUL_PROFILE_ANNSEC__DEFINE
 SEE ALSO:
	HESSI Utility Reference http://hessi.ssl.berkeley.edu/software/reference.html
 HISTORY:
       Release 3 development, August / September 1999,
           A Csillaghy, csillag@ssl.berkeley.edu
       Based on the release 2 software of Richard Schwartz
       Fundamental developments by Richard Schwartz, GSFC


HESSI MODULATION PATTERN CLASS DEFINITION [5] $SSW/hessi/idl/util/hsi_modul_profile_strategy__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI MODULATION PATTERN CLASS DEFINITION

 PURPOSE:
       Provides data structures and methods to work with modulation patterns

 CATEGORY:
       HESSI Utilities

 CONSTRUCTION:
       modul_pattern_obj = Obj_New( 'hsi_modul_pattern' ) ;

       The variable modul_pattern_obj is the object references used to
       access modulation pattern data and methods.

 INHERITANCE
       HSI_Calib_Eventlist (direct)
       HSI_Eventlist, HSI_Packet, Universal

 INPUTS:
       Provided by the "Set" method:
       packet_obj->Set, KEYWORD=value
       See below for the list of available keywords

 OUTPUTS:
       For control variables: provided by the "Get" method;
       For data: provided by the methods:
                 GetModulPattern
                 GetModulProfile
                 GetBProj
                 GetPSF

 OBJECT-SPECIFIC METHODS:



 CALLS: ***
	CHECKVAR [1], HSI_ALL_PROFILE, HSI_MODUL_PATTERN
	HSI_MODUL_PROFILE_STRATEGY::GETDATA, HSI_MODUL_PROFILE_STRATEGY::INIT
	HSI_MODUL_PROFILE_STRATEGY__DEFINE, checkvar [2]
 SEE ALSO:
	HESSI Utility Reference http://hessi.ssl.berkeley.edu/software/reference.html
 HISTORY:
       Release 3 development, August / September 1999,
           A Csillaghy, csillag@ssl.berkeley.edu
       Based on the release 2 software of Richard Schwartz
       Fundamental developments by Richard Schwartz, GSFC


HESSI MODULATION PATTERN CLASS DEFINITION [6] $SSW/hessi/idl/util/hsi_modul_profile_vismod__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI MODULATION PATTERN CLASS DEFINITION

 PURPOSE: 
       Provides data structures and methods to work with modulation patterns

 CATEGORY:
       HESSI Utilities
 
 CONSTRUCTION: 
       modul_pattern_obj = Obj_New( 'hsi_modul_pattern' ) ;

       The variable modul_pattern_obj is the object references used to
       access modulation pattern data and methods.

 INHERITANCE
       HSI_Calib_Eventlist (direct)
       HSI_Eventlist, HSI_Packet, Universal

 INPUTS:
       Provided by the "Set" method:
       packet_obj->Set, KEYWORD=value
       See below for the list of available keywords

 OUTPUTS:
       For control variables: provided by the "Get" method;
       For data: provided by the methods:
                 GetModulPattern
                 GetModulProfile
                 GetBProj
                 GetPSF

 OBJECT-SPECIFIC METHODS:



 CALLS: ***
	HSI_MEMVIS_DOPROFILE, HSI_MODUL_PROFILE_VISMOD::MODUL_PROFILE_HOOK
	HSI_MODUL_PROFILE_VISMOD__DEFINE
 SEE ALSO:
	HESSI Utility Reference http://hessi.ssl.berkeley.edu/software/reference.html
 HISTORY:
       Release 3 development, August / September 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu
       Based on the release 2 software of Richard Schwartz
       Fundamental developments by Richard Schwartz, GSFC


HESSI MODULATION PATTERN CLASS DEFINITION [7] $SSW/hessi/offline/hsi_modpat__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI MODULATION PATTERN CLASS DEFINITION

 PURPOSE: 
       Provides data structures and methods to work with modulation patterns

 CATEGORY:
       HESSI Utilities
 
 CONSTRUCTION: 
       modpat_obj = Obj_New( 'hsi_modpat' ) ;

       The variable modpat_var is the object references used to
       access modulation pattern data and methods.

 INHERITANCE
       HSI_Calib_Eventlist (direct)
       HSI_Eventlist, HSI_Packet, HSI_SUPER

 INPUTS:
       Provided by the "Set" method:
       packet_obj->Set, KEYWORD=value
       See below for the list of available keywords

 OUTPUTS:
       For control variables: provided by the "Get" method;
       For data: provided by the methods:
                 GetModPat

 GENERIC METHODS:
       Display: prints the specification of the modulation patterns considered
       Get: returns the contents of the object variable specified by keyword.
       Plot: Plots the data specified by the keywords.
       Set: Sets the object variable specified by keyword.      
       
 OBJECT-SPECIFIC METHODS:
       GetModPat
       
 KEYWORDS: 

   
 SIDE EFFECTS:
      
 EXAMPLES:
      
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/cgi-bin/hsi_calib_eventlist__define.pro
	HESSI Utility Reference http://hessi.ssl.berkeley.edu/soft/reference.html
	HESSI telemetry formats http://hessi.ssl.berkeley.edu/internal/
	hsi_, hsi_eventlist__define.pro
 HISTORY:
       Release 2 development, May 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu
       Based on: hsi_packet*.pro (Releases 0 and 1)


HESSI MODULATION PATTERN CONTROL STRUCTURE DEFINITION [1] $SSW/hessi/idl/util/hsi_modul_pattern_control__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI MODULATION PATTERN CONTROL STRUCTURE DEFINITION

 PURPOSE: 
       Defines the data type of the structure that controls the
       output of the modulation pattern class

 CATEGORY:
       HESSI Utilities
 
 CALLING SEQUENCE: 
       var = {hsi_modul_patterm_control}

 TAG NAMES:

 PROCEDURE:

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 EXAMPLES:
       

 CALLS: ***
	HSI_MODUL_PATTERN_CONTROL__DEFINE
 SEE ALSO:
 HISTORY:
       Release 3 development, August 1999
       Release 2, June 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu
	Release 5 development, June 2000, richard.schwartz@gsfc.nasa.gov.
		Added two parameters, r0_offset and xaxis_fov.
		R0_offset is the distance in arcseconds between the annular sector axis (not nececessarily
		the telescope axis or sun-center) and the map center. r0_offset must be greater than
		the half-length of the FOV along the radial directions.  It's default is image_dim[0]*
		pixel_size[0] * pixel_scale  * 10.
		Xaxis_fov is a switch.  Default value is 1.  When set, the orientation of the annular sector
		FOV is along the positive X axis, i.e. the direction defined by the radial running through
		the axis of symmetry is parallel to the X axis.
		


HESSI MODULATION PATTERN CONTROL STRUCTURE DEFINITION [2] $SSW/hessi/idl/util/hsi_modul_profile_control__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI MODULATION PATTERN CONTROL STRUCTURE DEFINITION

 PURPOSE: 
       Defines the data type of the structure that controls the
       output of the modulation pattern class

 CATEGORY:
       HESSI Utilities
 
 CALLING SEQUENCE: 
       var = {hsi_modul_patterm_control}

 TAG NAMES:

 PROCEDURE:

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 EXAMPLES:
       

 CALLS: ***
	HSI_MODUL_PROFILE_CONTROL__DEFINE
 SEE ALSO:
 HISTORY:
       Release 3 development, August 1999
       Release 2, June 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI MODULATION PATTERN CONTROL STRUCTURE INITIALIZATION [1] $SSW/hessi/idl/image/hsi_psf_control.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI MODULATION PATTERN CONTROL STRUCTURE INITIALIZATION

 PURPOSE: 
       This function returns an initialized structure of type
       {hsi_modul_pattern_control}

 CATEGORY:
       HESSI Utilities
 
 CALLING SEQUENCE: 
       var = HSI_Modul_Pattern_Control()

 OPTIONAL OUTPUTS:
       var: a variable containing the following tag names:


 KEYWORDS: 
       None.

 COMMON BLOCKS:
       None.

 PROCEDURE:

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 EXAMPLES:
       

 CALLS: ***
	HSI_PSF_CONTROL
 SEE ALSO:
 HISTORY:
       Version 1, May 17, 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI MODULATION PATTERN CONTROL STRUCTURE INITIALIZATION [2] $SSW/hessi/idl/util/hsi_modul_pattern_control.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI MODULATION PATTERN CONTROL STRUCTURE INITIALIZATION

 PURPOSE: 
       This function returns an initialized structure of type
       {hsi_modul_pattern_control}

 CATEGORY:
       HESSI Utilities
 
 CALLING SEQUENCE: 
       var = HSI_Modul_Pattern_Control()

 OPTIONAL OUTPUTS:
       var: a variable containing the following tag names:


 KEYWORDS: 
		R0_offset is the distance in arcseconds between the annular sector axis (not nececessarily
		the telescope axis or sun-center) and the map center. r0_offset must be greater than
		the half-length of the FOV along the radial directions.  It's default is image_dim[0]*
		pixel_size[0] * pixel_scale  * 10.
		Xaxis_fov is a switch.  Default value is 1.  When set, the orientation of the annular sector
		FOV is along the positive X axis, i.e. the direction defined by the radial running through
		the axis of symmetry is parallel to the X axis.
       

 COMMON BLOCKS:
       None.

 PROCEDURE:

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 EXAMPLES:
       

 CALLS: ***
	HSI_MODUL_PATTERN_CONTROL
 SEE ALSO:
 HISTORY:
       Version 1, May 17, 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu
	Version 1.1, 5-jun-2000.
	richard.schwartz@gsfc.nasa.gov, added xaxis_fov and r0_offset parameters.


HESSI MODULATION PATTERN CONTROL STRUCTURE INITIALIZATION [3] $SSW/hessi/idl/util/hsi_modul_pattern_control_strategy.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI MODULATION PATTERN CONTROL STRUCTURE INITIALIZATION

 PURPOSE: 
       This function returns an initialized structure of type
       {hsi_modul_pattern_control}

 CATEGORY:
       HESSI Utilities
 
 CALLING SEQUENCE: 
       var = HSI_Modul_Pattern_Control()

 OPTIONAL OUTPUTS:
       var: a variable containing the following tag names:


 KEYWORDS: 
		R0_offset is the distance in arcseconds between the annular sector axis (not nececessarily
		the telescope axis or sun-center) and the map center. r0_offset must be greater than
		the half-length of the FOV along the radial directions.  It's default is image_dim[0]*
		pixel_size[0] * pixel_scale  * 10.
		Xaxis_fov is a switch.  Default value is 1.  When set, the orientation of the annular sector
		FOV is along the positive X axis, i.e. the direction defined by the radial running through
		the axis of symmetry is parallel to the X axis.
       

 COMMON BLOCKS:
       None.

 PROCEDURE:

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 EXAMPLES:
       

 SEE ALSO:
 HISTORY:
       Version 1, May 17, 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu
	Version 1.1, 5-jun-2000.
	richard.schwartz@gsfc.nasa.gov, added xaxis_fov and r0_offset parameters.


HESSI MODULATION PATTERN CONTROL STRUCTURE INITIALIZATION [4] $SSW/hessi/idl/util/hsi_modul_pattern_strategy_control.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI MODULATION PATTERN CONTROL STRUCTURE INITIALIZATION

 PURPOSE:
       This function returns an initialized structure of type
       {hsi_modul_pattern_control}

 CATEGORY:
       HESSI Utilities

 CALLING SEQUENCE:
       var = HSI_Modul_Pattern_Control()

 OPTIONAL OUTPUTS:
       var: a variable containing the following tag names:


 KEYWORDS:
   R0_offset is the distance in arcseconds between the annular sector axis (not nececessarily
   the telescope axis or sun-center) and the map center. r0_offset must be greater than
   the half-length of the FOV along the radial directions.  It's default is image_dim[0]*
   pixel_size[0] * pixel_scale  * 10.
   Xaxis_fov is a switch.  Default value is 1.  When set, the orientation of the annular sector
   FOV is along the positive X axis, i.e. the direction defined by the radial running through
   the axis of symmetry is parallel to the X axis.


 COMMON BLOCKS:
       None.

 PROCEDURE:

 RESTRICTIONS:
       None.

 SIDE EFFECTS:
       None.

 EXAMPLES:


 CALLS: ***
	HSI_MODUL_PATTERN_STRATEGY_CONTROL
 SEE ALSO:
 HISTORY:
       Version 1, May 17, 1999,
           A Csillaghy, csillag@ssl.berkeley.edu
 Version 1.1, 5-jun-2000.
 richard.schwartz@gsfc.nasa.gov, added xaxis_fov and r0_offset parameters.
       30 nov 2001 - ras, remove xyoffset
;		11-dec-2001, ras, moved pixel_scale here from annsec_pattern_control


HESSI MODULATION PATTERN CONTROL STRUCTURE INITIALIZATION [5] $SSW/hessi/idl/util/hsi_modul_profile_control.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI MODULATION PATTERN CONTROL STRUCTURE INITIALIZATION

 PURPOSE: 
       This function returns an initialized structure of type
       {hsi_modul_pattern_control}

 CATEGORY:
       HESSI Utilities
 
 CALLING SEQUENCE: 
       var = HSI_Modul_Pattern_Control()

 OPTIONAL OUTPUTS:
       var: a variable containing the following tag names:


 KEYWORDS: 
       None.

 COMMON BLOCKS:
       None.

 PROCEDURE:

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 EXAMPLES:
       

 CALLS: ***
	HSI_MODUL_PROFILE_CONTROL
 SEE ALSO:
 HISTORY:
       Version 1, May 17, 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI MODULATION PATTERN CONTROL STRUCTURE INITIALIZATION [6] $SSW/hessi/offline/hsi_vismod_bproj_control.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI MODULATION PATTERN CONTROL STRUCTURE INITIALIZATION

 PURPOSE: 
       This function returns an initialized structure of type
       {hsi_modul_pattern_control}

 CATEGORY:
       HESSI Utilities
 
 CALLING SEQUENCE: 
       var = HSI_Modul_Pattern_Control()

 OPTIONAL OUTPUTS:
       var: a variable containing the following tag names:


 KEYWORDS: 
       None.

 COMMON BLOCKS:
       None.

 PROCEDURE:

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 EXAMPLES:
       

 CALLS: ***
	HSI_VISMOD_BPROJ_CONTROL
 SEE ALSO:
 HISTORY:
       Version 1, May 17, 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI MODULATION PATTERN INFO STRUCTURE DEFINITION [1] $SSW/hessi/idl/util/annsec/hsi_annsec_pattern_info__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI MODULATION PATTERN INFO STRUCTURE DEFINITION

 PURPOSE: 
       Defines the HESSI modulation pattern info parameters, which
       are generated by HSI_Modul_Pattern::Process

 CATEGORY:
       HESSI / Utilities
 
 EXAMPLE: 
       var = obj->Get( CLASS_NAME='hsi_modul_pattern', /INFO_ONLY  )
       returns {hsi_modul_pattern_info}

 CALLS: ***
	HSI_ANNSEC_PATTERN_INFO__DEFINE
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/reference.html#hsi_modul_pattern_info
	hsi_modul_pattern__define.pro
 HISTORY:
       Rel 4, spring 2000: rmap_dim for universal modulation pattern
       Release 3 development, August 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI MODULATION PATTERN INFO STRUCTURE DEFINITION [2] $SSW/hessi/idl/util/hsi_modul_pattern_info__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI MODULATION PATTERN INFO STRUCTURE DEFINITION

 PURPOSE: 
       Defines the HESSI modulation pattern info parameters, which
       are generated by HSI_Modul_Pattern::Process

 CATEGORY:
       HESSI / Utilities
 
 EXAMPLE: 
       var = obj->Get( CLASS_NAME='hsi_modul_pattern', /INFO_ONLY  )
       returns {hsi_modul_pattern_info}

 CALLS: ***
	HSI_MODUL_PATTERN_INFO__DEFINE
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/reference.html#hsi_modul_pattern_info
	hsi_modul_pattern__define.pro
 HISTORY:
       Rel 4, spring 2000: rmap_dim for universal modulation pattern
       Release 3 development, August 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI MODULATION PATTERN STRATEGY CLASS DEFINITION $SSW/hessi/idl/util/hsi_modul_pattern_strategy__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI MODULATION PATTERN STRATEGY CLASS DEFINITION

 PURPOSE: 
       This abstract class provides the default methods for tha
       different imaging strategies used for HESSI image
       reconstruction. Image reconstruction currently are either
       annular sectors or visibilities.

 CATEGORY:
       HESSI Utilities
 
 CONSTRUCTION: 
       Cannot be used without the concrete classes. See
       hsi_annsec_pattern__define or hsi_vismod_pattern__define

 KNOWN CHILD CLASSES:
       hsi_annsec_pattern__define
       hsi_vismod_pattern__define

 CALLS: ***
	CHECKVAR [1], HSI_MODUL_PATTERN_STRATEGY::GETDATA
	HSI_MODUL_PATTERN_STRATEGY::SET, HSI_MODUL_PATTERN_STRATEGY__DEFINE
	SAME_DATA [1], SAME_DATA [2], checkvar [2]
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/reference.html
	hsi_annsec_pattern__define, hsi_vismod_pattern__define
 HISTORY:
       Release 6: Annsec and Vismod pattern classes are
                  integrated. The modul_pattern_strategy stuff is the
                  common part between these two 
       Release 4: Really just a wrapper around HSI_Annsec_Map
       Release 3 development, August / September 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu
       Based on the release 2 software of Richard Schwartz
       Fundamental developments by Richard Schwartz, GSFC


HESSI MODULATION PATTERN STRATEGY CONTROL STRUCTURE DEFINITION $SSW/hessi/idl/util/hsi_modul_pattern_strategy_control__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI MODULATION PATTERN STRATEGY CONTROL STRUCTURE DEFINITION

 PURPOSE:
       Defines the data type of the structure that controls the
       output of the modulation pattern class

 CATEGORY:
       HESSI Utilities

 CALLING SEQUENCE:
       var = {hsi_modul_pattern_strategy_control}

 TAG NAMES:

 PROCEDURE:

 RESTRICTIONS:
       None.

 SIDE EFFECTS:
       None.

 EXAMPLES:


 CALLS: ***
	HSI_MODUL_PATTERN_STRATEGY_CONTROL__DEFINE
 SEE ALSO:
 HISTORY:
       Release 6: the parameters that concern annular sectors are
                  moved to hsi_annsec_pattern_control
                  csillag@ssl.berkeley.edu, March 2001
       Release 3 development, August 1999
       Release 2, June 1999,
           A Csillaghy, csillag@ssl.berkeley.edu
       30 nov 2001 - ras, remove xyoffset
		11-dec-2001, ras, moved pixel_scale here from annsec_pattern_control


HESSI MONITOR RATE CLASS DEFINITION $SSW/hessi/idl/util/hsi_monitor_rate__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI MONITOR RATE  CLASS DEFINITION

 PURPOSE:
       Allows to read monitor rate data out of telemetry packets and
       plot some of them.

 CATEGORY:
       Utilities

 CONSTRUCTION:
       obj = Obj_New( 'hsi_monitor_rate' )
       obj = HSI_Monitor_Rate()

 GENERIC METHODS:

 OBJECT METHODS:

 KEYWORDS:


 EXAMPLES:

 CALLS: ***
	CHECKVAR [1], EXIST, HSI_MONITOR_RATE::GETDATA, HSI_MONITOR_RATE::INIT
	HSI_MONITOR_RATE::PLOT, HSI_MONITOR_RATE::PLOTMAN, HSI_MONITOR_RATE::PROCESS
	HSI_MONITOR_RATE__DEFINE, HSI_PACKET, Hsi_monitor_rate_read, INTERPOL, IS_CLASS
	MINMAX [1], MINMAX [2], STR_FIND, XALIVE, anytim [1], anytim [2], anytim [3]
	anytim [4], anytim [5], checkvar [2], hsi_a2d_list, hsi_corrected_livetime
	hsi_is_obj_nested, hsi_show_flags [1], hsi_show_flags [2], is_struct, prstr [1]
	prstr [2]
 SEE ALSO:
 HISTORY:

            jimm's adaptations,
       Dev. for Release 3, July 1999
       Release 2, June 1999
       Version 1, February 17, 1999,
           A Csillaghy, csillag@ssl.berkeley.edu
	10-apr-02, default to no_102 of 0, ras
	8-Dec-2003, Kim.  Added @hsi_insert_catch in getdata
	27-May-2005, Kim.  Rewrote plot method.  Added plotman method.
	10-Jun-2005, Kim.  Plot particle data as count/sec and ylog


HESSI Monitor Rate Constructor $SSW/hessi/idl/util/hsi_monitor_rate.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI Monitor Rate Constructor

 PURPOSE: 
       Creates an instance of the monitor rate class.

 CATEGORY:
       HESSI Utilities (idl/util)
 
 CALLING SEQUENCE: 
       object = hsi_monitor_rate()

 OUTPUTS:
       The function returns an object reference of the class hsi_monitor_rate

 KEYWORDS: 
       Any of the keywords defined in hsi_monitor_rate__define and
       its parent structures.

 EXAMPLE
       To read monitor rates from the file 
       http://hessi.ssl.berkeley.edu/data/test_data/vc1_test5.0
       load file to your system
       o = hsi_monitor_rate( filename = 'vc1_test5.0', file_type = 'gse' )

 CALLS: ***
	HSI_MONITOR_RATE
 SEE ALSO:
	hsi_monitor_rate__define
 HISTORY:
       Created: HESSI Software Release 4, March 2, 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI MONITOR RATE CONTROL STRUCTURE DEFINITION $SSW/hessi/idl/util/hsi_monitor_rate_control__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI MONITOR RATE CONTROL STRUCTURE DEFINITION

 PURPOSE: 
       Defines the moitor rate control parameters

 CATEGORY:
       Utilities
 
 CALLING SEQUENCE: 
       var = HSI_Monitor_rate_control}

 TAG NAMES:
      mr_time_range: Dblarr(2) the time range for which the monitor rates are
                     requested, in Anytim format
      det_index_mask: Bytarr(18) flags the segments for which the monitor
                      rates are requested 

 COMMON BLOCKS:
       None.

 PROCEDURE:

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 EXAMPLES:
       

 CALLS: ***
	HSI_MONITOR_RATE_CONTROL__DEFINE
 SEE ALSO:
 HISTORY:
       Version 1, April 29, 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI MULTI IMAGE CLASS DEFINITION [1] $SSW/hessi/idl/image/hsi_multi_image_file__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI MULTI IMAGE CLASS DEFINITION

 PURPOSE:
       Generates image cubes

 CATEGORY:
       HESSI Imaging

 CONSTRUCTION:
       obj = Obj_Name( 'hsi_multi_image' )
       obj = hsi_multi_image()

 (INPUT) CONTROL PARAMETERS DEFINED IN THIS CLASS:

       IM_TIME_INTERVAL - Defines individual image time intervals.  Similar to SP_TIME_INTERVAL.
         Default is 0.
         If 0, then make one time bin equal to full time range
         If non-zero scalar, divide full time range into bins of this width
         If vector, these are time bin edges.  If > full time range start, they are absolute
            otherwise they are relative to start of full time range.
         Full time range is either the obs_time_interval, or if set, multi_time_range

       MULTI_TIME_RANGE - Full time range to break up into time bins via IM_TIME_INTERVAL
         Default is [0.,0.] which means use obs_time_interval as full time range.

       multi_in_fits_filename - Output FITS file name.  Default is '' (no file written)

       PROGRESS_BAR - If set, show progress bar while making images. Default=0

 (OUTPUT) INFO PARAMETERS DEFINED IN THIS CLASS:

      Not defined yet.  Will contain pointer array of info params for cube.

 CLASS RELATIONSHIPS:
      Inherits HSI_IMAGE

 KEYWORDS:

 NOTE:  This is just a first draft of this object.  Saving of the image cube information and
   writing the image cube FITS file will be handled differently in the future.  In fact right now,
   unless you write a FITS file, you end up only with the image array and no control or info
   information for the individual images (the FITS file, however, does contain a single control
   structure for all of the images, and an array of info structures that apply to each individual image).
   Also bad - right now once you set the FITS file name, it persists.  To not write a fits file, do
   o->set,multi_in_fits_filename=''

 EXAMPLES:

     This example will make 8 images, four 5-second time bins starting at 20-feb-02 10:00, and
     two energy bands (3-12 and 12-25), and write the image cube in the file test_cube.fits
     obj = hsi_multi_image()
     obj -> set, obs_time_interval='20-feb-02 10:' + ['00','00:20']
     obj -> set, im_time_interval=5, im_energy_bin=[3,12,25]
     ptim, obj -> getaxis(/ut, /edges_2)		; shows time bins
     print,obj -> getaxis(/energy, /edges_2)	; shows energy bins
     data = obj -> getdata(image_dim=16, multi_in_fits_filename='test_cube.fits')
;--------------------------------------------------------------------

 CALLS: ***
	EXIST, FITSREAD, HSI_MULTI_IMAGE_FILE::GETAXIS, HSI_MULTI_IMAGE_FILE::INIT
	HSI_MULTI_IMAGE_FILE::PROCESS, HSI_MULTI_IMAGE_FILE_TEST
	HSI_MULTI_IMAGE_FILE__DEFINE, get_edge_products
 SEE ALSO:
	26-Oct-2002, Modifications:, Written:  Kim Tolbert, hsi_image


HESSI MULTI IMAGE CLASS DEFINITION [2] $SSW/hessi/idl/image/hsi_multi_image_raw__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI MULTI IMAGE CLASS DEFINITION

 PURPOSE:
       Generates image cubes

 CATEGORY:
       HESSI Imaging

 CONSTRUCTION:
       obj = Obj_Name( 'hsi_multi_image' )
       obj = hsi_multi_image()

 (INPUT) CONTROL PARAMETERS DEFINED IN THIS CLASS:

       IM_TIME_INTERVAL - Defines individual image time intervals.  Similar to SP_TIME_INTERVAL.
         Default is 0.
         If 0, then make one time bin equal to full time range
         If non-zero scalar, divide full time range into bins of this width
         If vector, these are time bin edges.  If > full time range start, they are absolute
            otherwise they are relative to start of full time range.
         Full time range is either the obs_time_interval, or if set, multi_time_range

       MULTI_TIME_RANGE - Full time range to break up into time bins via IM_TIME_INTERVAL
         Default is [0.,0.] which means use obs_time_interval as full time range.

       multi_in_fits_filename - Output FITS file name.  Default is '' (no file written)

       PROGRESS_BAR - If set, show progress bar while making images. Default=0

 (OUTPUT) INFO PARAMETERS DEFINED IN THIS CLASS:

      Not defined yet.  Will contain pointer array of info params for cube.

 CLASS RELATIONSHIPS:
      Inherits HSI_IMAGE

 KEYWORDS:

 NOTE:  This is just a first draft of this object.  Saving of the image cube information and
   writing the image cube FITS file will be handled differently in the future.  In fact right now,
   unless you write a FITS file, you end up only with the image array and no control or info
   information for the individual images (the FITS file, however, does contain a single control
   structure for all of the images, and an array of info structures that apply to each individual image).
   Also bad - right now once you set the FITS file name, it persists.  To not write a fits file, do
   o->set,multi_in_fits_filename=''

 EXAMPLES:

     This example will make 8 images, four 5-second time bins starting at 20-feb-02 10:00, and
     two energy bands (3-12 and 12-25), and write the image cube in the file test_cube.fits
     obj = hsi_multi_image()
     obj -> set, obs_time_interval='20-feb-02 10:' + ['00','00:20']
     obj -> set, im_time_interval=5, im_energy_bin=[3,12,25]
     ptim, obj -> getaxis(/ut, /edges_2)		; shows time bins
     print,obj -> getaxis(/energy, /edges_2)	; shows energy bins
     data = obj -> getdata(image_dim=16, multi_in_fits_filename='test_cube.fits')

 CALLS: ***
	EXIST, FORMAT_INTERVALS, HSI_IMAGE, HSI_MULTI_IMAGE_RAW::GETAXIS
	HSI_MULTI_IMAGE_RAW::INIT, HSI_MULTI_IMAGE_RAW::PROCESS
	HSI_MULTI_IMAGE_RAW__DEFINE, PROGBAR, anytim [1], anytim [2], anytim [3]
	anytim [4], anytim [5], get_edge_products
 SEE ALSO:
	26-Oct-2002, Modifications:, Written:  Kim Tolbert, hsi_image


HESSI MULTI IMAGE CLASS DEFINITION [3] $SSW/hessi/idl/image/hsi_multi_image_strategy__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI MULTI IMAGE CLASS DEFINITION

 PURPOSE:
       Generates image cubes

 CATEGORY:
       HESSI Imaging

 CONSTRUCTION:
       obj = Obj_Name( 'hsi_multi_image' )
       obj = hsi_multi_image()

 (INPUT) CONTROL PARAMETERS DEFINED IN THIS CLASS:

       IM_TIME_INTERVAL - Defines individual image time intervals.  Similar to SP_TIME_INTERVAL.
         Default is 0.
         If 0, then make one time bin equal to full time range
         If non-zero scalar, divide full time range into bins of this width
         If vector, these are time bin edges.  If > full time range start, they are absolute
            otherwise they are relative to start of full time range.
         Full time range is either the obs_time_interval, or if set, multi_time_range

       MULTI_TIME_RANGE - Full time range to break up into time bins via IM_TIME_INTERVAL
         Default is [0.,0.] which means use obs_time_interval as full time range.

       multi_in_fits_filename - Output FITS file name.  Default is '' (no file written)

       PROGRESS_BAR - If set, show progress bar while making images. Default=0

 (OUTPUT) INFO PARAMETERS DEFINED IN THIS CLASS:

      Not defined yet.  Will contain pointer array of info params for cube.

 CLASS RELATIONSHIPS:
      Inherits HSI_IMAGE

 KEYWORDS:

 NOTE:  This is just a first draft of this object.  Saving of the image cube information and
   writing the image cube FITS file will be handled differently in the future.  In fact right now,
   unless you write a FITS file, you end up only with the image array and no control or info
   information for the individual images (the FITS file, however, does contain a single control
   structure for all of the images, and an array of info structures that apply to each individual image).
   Also bad - right now once you set the FITS file name, it persists.  To not write a fits file, do
   o->set,multi_in_fits_filename=''

 EXAMPLES:

     This example will make 8 images, four 5-second time bins starting at 20-feb-02 10:00, and
     two energy bands (3-12 and 12-25), and write the image cube in the file test_cube.fits
     obj = hsi_multi_image()
     obj -> set, obs_time_interval='20-feb-02 10:' + ['00','00:20']
     obj -> set, im_time_interval=5, im_energy_bin=[3,12,25]
     ptim, obj -> getaxis(/ut, /edges_2)		; shows time bins
     print,obj -> getaxis(/energy, /edges_2)	; shows energy bins
     data = obj -> getdata(image_dim=16, multi_in_fits_filename='test_cube.fits')

 CALLS: ***
	HSI_MULTI_IMAGE_STRATEGY::INIT, HSI_MULTI_IMAGE_STRATEGY::SET
	HSI_MULTI_IMAGE_STRATEGY::SLICER, HSI_MULTI_IMAGE_STRATEGY_CONTROL
	HSI_MULTI_IMAGE_STRATEGY__DEFINE, SLICER3, anytim [1], anytim [2], anytim [3]
	anytim [4], anytim [5]
 SEE ALSO:
	26-Oct-2002, Modifications:, Written:  Kim Tolbert, hsi_image


HESSI PACKET CLASS DEFINITION $SSW/hessi/idl/util/hsi_packet__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI PACKET CLASS DEFINITION

 PURPOSE:
       Provides data structures and methods to access HESSI
       telemetry packets from various file types. Packets can be read
       in either by giving on or more filename, or by giving an observing time
       interval. In the latter case, the file database
       hsi_filedb.fits, usually found on the /ssw/hessi/dbase area,

       HSI_Packet the Context object of a strategy pattern wich involves
       hsi_packet_file (Strategy) and the packet readers as concrete classes
       (ConcreteStrategies). Currently defined are hsi_gse, hsi_smex,
       hsi_fits, hsi_raw

 CATEGORY:
       HESSI Utilities

 CONSTRUCTION:

       obj = HSI_Packet()

 CONTROL PARAMETERS:

       Defined in {hsi_packet_control}

       file_type: a string containing the file type of the
                  data. Currently defined values are: 'fits' (default), 'gse',
                                                      itos', 'raw'.

 INFORMATION PARAMETERS:

       Defined in {hsi_packet_info}

       file_time_range: a 2 element double array giving the start and
                        end times of the file

           n_packet: Ptr_New(), $
           packet_ref_time: 0D, $
           simulated_data: 0B

 KEYWORDS:
       TIME_RANGE: The range in seconds for which data
                   should be returned. 2-El array of Double; default:
                   [0D,0D], i.e. no time range is selected.
       PACKET_INDEX:  default: [0L, 0L], i.e. no index range is selected
       PACKET-PER_BUNCH: Default: 100OL
       FILE_TYPE: '', $
       FILENAME: '', $
       OUT_FILENAME: '', $
       APP_ID: Ptr_New()

 EXAMPLES:
      assume there is an object of type hsi_packet
      o = hsi_packet( filename = ['a.fits', 'b.fits, 'c.fits' ] )

      p = o->getdata() ; reads the first bunch if packets (see
      packet_per_bunch)

      p = o->getdata( /all ) reads all packets (NO selection, may be
      very large!)

 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CHECKVAR [1], GREP
	HSI_PACKET::GET, HSI_PACKET::GETDATA, HSI_PACKET::INIT
	HSI_PACKET::NEED_UPDATE, HSI_PACKET::PLOT, HSI_PACKET::PROCESS
	HSI_PACKET::SET, HSI_PACKET::WRITE, HSI_PACKET_CONTROL [1]
	HSI_PACKET_CONTROL [2], HSI_PACKET__DEFINE, UTPLOT [1], UTPLOT [2], UTPLOT [3]
	UTPLOT [4], UTPLOT [5], UTPLOT [6], VALID_RANGE, break_file [4], checkvar [2]
	is_member [1], is_member [2]
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/reference.html
	HESSI Utility Reference
	HESSI telemetry formats http://hessi.ssl.berkeley.edu/internal/
	UNIVERSAL
 HISTORY:
       Release 2 development, May 1999,
           A Csillaghy, csillag@ssl.berkeley.edu
       Based on: hsi_packet*.pro (Releases 0 and 1)
	14-Nov-2002, Kim. In get(/file_time_range), check for valid filename
	  before looking in lookup table.


HESSI PACKET CONTROL STRUCTURE DEFINITION [1] $SSW/hessi/idl/qlook_archive/hsi_obs_summary_control__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI PACKET CONTROL STRUCTURE DEFINITION

 PURPOSE:
       Defines the data type of the structure that controls the
       output of the packet object

 CATEGORY:
       HESSI Utilities

 CALLING SEQUENCE:
       var = {hsi_packet_control}

 TAG NAMES:

 EXAMPLES:
       To initialize, use hsi_packet_control() which will set the
       default values

 CALLS: ***
	HSI_OBS_SUMMARY_CONTROL__DEFINE
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/reference.html#hsi_packet_control
 HISTORY:
       Version 1, April 29, 1999,
           A Csillaghy, csillag@ssl.berkeley.edu
	16-Apr-03, Kim.  filename control param changed to pointers (for multiple files)


HESSI PACKET CONTROL STRUCTURE DEFINITION [2] $SSW/hessi/idl/util/hsi_gse_control__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI PACKET CONTROL STRUCTURE DEFINITION

 PURPOSE: 
       Defines the data type of the structure that controls the
       output of the packet object

 CATEGORY:
       HESSI Utilities
 
 CALLING SEQUENCE: 
       var = {hsi_packet_control}

 TAG NAMES:

 PARENT STRUCTURES:
       None.

 EXAMPLES:
       To initialize        

 CALLS: ***
	HSI_GSE_CONTROL__DEFINE
 SEE ALSO:
 HISTORY:
       Version 1, April 29, 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI PACKET CONTROL STRUCTURE DEFINITION [3] $SSW/hessi/idl/util/hsi_gse_info__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI PACKET CONTROL STRUCTURE DEFINITION

 PURPOSE: 
       Defines the data type of the structure that controls the
       output of the packet object

 CATEGORY:
       HESSI Utilities
 
 CALLING SEQUENCE: 
       var = {hsi_packet_control}

 TAG NAMES:

 PARENT STRUCTURES:
       None.

 EXAMPLES:
       To initialize        

 CALLS: ***
	HSI_GSE_INFO__DEFINE
 SEE ALSO:
 HISTORY:
       Version 1, April 29, 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI PACKET CONTROL STRUCTURE DEFINITION [4] $SSW/hessi/idl/util/hsi_packet_control__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI PACKET CONTROL STRUCTURE DEFINITION

 PURPOSE: 
       Defines the data type of the structure that controls the
       output of the packet object

 CATEGORY:
       HESSI Utilities
 
 CALLING SEQUENCE: 
       var = {hsi_packet_control}

 TAG NAMES:

 EXAMPLES:
       To initialize, use hsi_packet_control() which will set the
       default values 

 CALLS: ***
	HSI_PACKET_CONTROL__DEFINE
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/reference.html#hsi_packet_control
 HISTORY:
       Version 1, April 29, 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI PACKET CONTROL STRUCTURE DEFINITION [5] $SSW/hessi/offline/hsi_obs_summary_adapter_control__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI PACKET CONTROL STRUCTURE DEFINITION

 PURPOSE:
       Defines the data type of the structure that controls the
       output of the packet object

 CATEGORY:
       HESSI Utilities

 CALLING SEQUENCE:
       var = {hsi_packet_control}

 TAG NAMES:

 EXAMPLES:
       To initialize, use hsi_packet_control() which will set the
       default values

 CALLS: ***
	HSI_OBS_SUMMARY_ADAPTER_CONTROL__DEFINE
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/reference.html#hsi_packet_control
 HISTORY:
       Version 1, April 29, 1999,
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI PACKET FILE ABSTRACT CLASS $SSW/hessi/idl/util/hsi_packet_file__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI PACKET FILE ABSTRACT CLASS

 PURPOSE:
       Provides generic methods to read HESSI telemetry packets.

       This abstract class is inherited by concrete classes that
       implement the file operations associated with specific file
       types, including FITS, GSE, ITOS, or SMEX. It cannot be
       used by itself. It collaborates with the
       HSI_Packet class that takes care of the switching between
       different file types.

       This class is supposed to be the abstact class of a template
       method pattern.
       It is also the Strategy object of a strategy pattern with
       hsi_packet (Context) and the packet reader concrete classes
       (ConcreteStrategies)

 CATEGORY:
       HESSI Utilities

 CONSTRUCTION:

       Only through the packet reader concrete classes
       e.g.
       o = Obj_New( 'HSI_FITS' )

 CONTROL PARAMETERS:
       app_id: a list of integeres specifying the HESSI-specific
               application ids of the packets to be read.
       file_type: a string containing the file type of the
                  data. Currently defined values are: 'fits' (default), 'gse',
                                                      itos', 'raw'.
       filename: a list of filenames from where the data should be
                 read.
       obs_time_interval: a 2-element vector in anytim format
                          specifying the ibservation type. If this is
                          set, the file type is assumed to be FITS.
       packet_per_bunch: the maximum number of packets to read in a
                         single call to getdata. Default: 1000.  Set
                         it to 0 to turn off this feature. To set it
                         you must specify the class name
                         ='HSI_PACKET_FILE' in the set procedure

 METHODS DEFINED OR OVERWRITTEN IN THIS CLASS
       CLEANUP: Nothing special
       GetData: Allows retrieving packets from data files.
                Keywords associated:
       INIT: Nothing special
       Set: Sets the partial_selection internal var to 1 if the ke

 KEYWORDS:
       ALL: If set, all selection methods are turned off and all
            packets in the files are returned.

 EXAMPLES:

       Assume you have a object of the packet class:

       o = hsi_packet()

       FITS file writing:

       o->write, out_filename = 'gaga.fits', filename =
       'blalbla.dat', file_type='smex',/ALL

       will write all packets in the smex file blalbla.dat into a
       FITS file.


 CALLS: ***
	ARR2STR [1], Arr2Str [2], CUM_SUM, EXIST, FILE_BREAK, HSI_FIND_FILE, HSI_LOAD_STRUCT
	HSI_PACKET, HSI_PACKET2FITS, HSI_PACKET_FILE::BUILDTABLE
	HSI_PACKET_FILE::CHECK_BAD_PAK, HSI_PACKET_FILE::CLEANUP
	HSI_PACKET_FILE::GET, HSI_PACKET_FILE::GETBYTEOFFSET
	HSI_PACKET_FILE::GETDATA, HSI_PACKET_FILE::GETDATATYPE
	HSI_PACKET_FILE::GETPACKETLENGTH, HSI_PACKET_FILE::GETTABLETYPE
	HSI_PACKET_FILE::GETTRAILERLENGTH, HSI_PACKET_FILE::INIT
	HSI_PACKET_FILE::PROCESS, HSI_PACKET_FILE::READPACKET
	HSI_PACKET_FILE::READTRAILER, HSI_PACKET_FILE::SELECT, HSI_PACKET_FILE::SET
	HSI_PACKET_FILE::WRITE, HSI_PACKET_FILE_CONTROL, HSI_PACKET_FILE__DEFINE
	HSI_PACKET_TEST, HSI_RELOAD_PACKET, HSI_SCTIME2ANY, MASK, MINMAX [1], MINMAX [2]
	SAME_DATA [1], SAME_DATA [2], STR_CHOP, VALID_RANGE, anytim [1], anytim [2]
	anytim [3], anytim [4], anytim [5], hsi_filedb_filename, hsi_get_debug [1]
	hsi_get_debug [2], hsi_is_obj_nested, prstr [1], prstr [2], ptim, str_subset
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/reference.html#hsi_packet_file
	HESSI Utility Reference
	HESSI telemetry formats http://hessi.ssl.berkeley.edu/internal/
 HISTORY:
       16-oct-2004: acs, introduce sel_100_next and ltbl_next (ltbl=lookup table)
                    ltbl_next in getdata returns the lookup table entry of the next
                    appid 100 packet to be read. This is needed for eventlist
                    unpacking.
       21-dec-2002, Again a revision of the packet selection $
                    using historam for appid selection
                    (should be more efficient)
       20-dec-2002, Andre, Revision in getdata to avoid calling the select method
                    when the lookup table is requested
       01-nov-2002, Andre, Changed the way packets are selected to account for the packet
                    *just before* the start time
	25-Oct-2002, Kim.  Added @hsi_insert_catch in getdata, changed some message
		     calls to hsi_message
       9-Jun-2002,  Kim.  
                    In SELECT, if no lookup table available, call self->SetSelection,  -1
                    In PROCESS, if no lookup table, call self->setdata,-1
       Release 5: - the idea of a file cache is abandoned.
                  - multiple file reading
                  - better correcpondance to the template
                  method/strategy patterns.
                  - cooperation w/hsi_packet and concrete classes
       Release 4 development ACs:
           The PACKET_FILE part has been extracted form hsi_packet__define
           The cache is new
           The whole sync process is new
       Release 2 development, May 1999,
           A Csillaghy, csillag@ssl.berkeley.edu
       Based on: HSI_packet*.pro (Releases 0 and 1)


HESSI packet file close $SSW/hessi/offline/hsi_packetfileclose.pro
[Previous] [Next]
 PROJECT:
	HESSI
 NAME: 
       HESSI packet file close

 PURPOSE:
       Closes a  HESSI FITS source packet file. 

 CATEGORY:
       Utilities (hessi/util)

 CALLING SEQUENCE:
       HSI_PacketFileClose, unit

 CALLS: ***
	DOC_MENU, FXBCLOSE [1], FXBCLOSE [2], FXBFINISH [1], FXBFINISH [2]
	HSI_PACKETFILECLOSE
 INPUTS:
       unit: the unit of the opened file (as returned by HSI_PacketFileOpen)
       
 OPTIONAL INPUTS:
	none

 OUTPUTS:
       unit: the unit number 

 OPTIONAL OUTPUTS:
	none

 KEYWORDS:
       HELP: prints this text
       VERBOSE: if set, prints on the tty what it is doing

 SIDE EFFECTS:
	none

 RESTRICTIONS:
	none

 PROCEDURE:
	none

 SEE ALSO
      HSI_PacketFileOpen, HSI_PacketRead, HSI_PacketWrite

 MODIFICATION HISTORY:
	Version 1, A.Csillaghy, csillag@ssl.berkeley.edu, Oct. 1998


HESSI PACKET FILE CONTROL STRUCTURE DEFINITION $SSW/hessi/idl/util/hsi_packet_file_control__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI PACKET FILE CONTROL STRUCTURE DEFINITION

 PURPOSE: 
       Defines the data type of the structure that controls the
       output of the packet file object

 CATEGORY:
       HESSI Utilities
 
 CALLING SEQUENCE: 
       var = {hsi_packet_file_control}

 TAG NAMES:
       adp_test: if 1, some selection tests are done for the aspect
                 data processor; default: 0 
       after272_test: if 1, some selection tests are done to use
                      only packets that are after the app id 272 
       app_id: only packets with this or these app id(s) are passed
               back (scalar or vector)
       obs_time_interval: (2-el double vector) 2 Anytim values that
                          determine the range of the observation
                          requested.  This parameter checks in the
                          file database  which files contain the data requested.
       packet_time_range: [0D, 0D]: (2-el double vector)  only packets within
                          these two values are passed back. This
                          seems the same as obs_time_interval, but
                          it is not. This one does look into the file
                          database to find files. It assumes
                          obs_time_interval has been set or a
                          filename has been set
        packet_per_bunch: specifies the number of packets that are
                          read in one read operation 
        filename: specifies a file name. This or obs_time_intervale
                  may be used but not both.

 EXAMPLES:
       To initialize, use hsi_packet_file_control() which will set
       also default values 

 CALLS: ***
	HSI_PACKET_FILE_CONTROL__DEFINE
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/reference.html#hsi_packet_control
 HISTORY:
       Version 1, April 29, 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI PACKET INFO STRUCTURE DEFINITION $SSW/hessi/idl/util/hsi_packet_info__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI PACKET INFO STRUCTURE DEFINITION

 PURPOSE: 
       Defines the HESSI packet info structure

 CATEGORY:
       HESSI / Utilities
 
 CALLING SEQUENCE: 
       var = {hsi_packet_info}
;
 EXAMPLES:
       pkt_info = {hsi_packet_info}
       help, pkt_info, /structure

 CALLS: ***
	HSI_PACKET_INFO__DEFINE
 SEE ALSO:
 HISTORY:
       Release 3 development, July 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI Packet Read [1] $SSW/hessi/offline/hsi_packetread-990211.pro
[Previous] [Next]
 PROJECT:
	HESSI
 NAME: 
       HESSI Packet Read

 PURPOSE:
       Reads one or more telemetry packets from a HESSI source packet file.

 CATEGORY:


 CALLING SEQUENCE:
       HSI_PacketRead, unit, index, packet
       HSI_PacketRead, fileName, index, packet
       HSI_PacketRead, fileName, packet

 CALLS:
	none
 INPUTS:
       fileUnit: the unit of the file opened by HSI_PacketFileOpen or
                 a filename. If a filename is given, then the packets
                 will be read in a single call to this procedure. 
       index: either a single value for reading a single row (starts
              at 1) or 2-element array for reading a range of rows,
              or a list of packet indices. WARNING: index counts from
                                                    0 to n-1!
              The index list can be produced e.g. by HSI_PacketIndexSearch

 OPTIONAL INPUTS:
	none

 OUTPUTS:
       packet: an single packet or an array of packets 
               of type {source_packet_words}
 OPTIONAL OUTPUTS:
	none

 KEYWORDS:
       BYTE: Instead of {source_packet_words}, returns packets in the 
             type {source_packet}
       ERRORMSG: contains eventual error messages in case of abnormal
                 termination of the procedure
	HELP: writes the command usage
       VERBOSE: comments the procedure events

 COMMON BLOCKS:
	none

 SIDE EFFECTS:
	Be aware that storing a large number of packets into the main
	memory may result in bad system performance. You may use the
	possibilities of reading one packet at a time.

 RESTRICTIONS:
	none

 PROCEDURE:
	none

 EXAMPLES:
       1.  To read packets # 100000 to packet # 500000 from a file called
           hessi.fits, without storing the packets into main memory, do:
               HSI_PacketFileOpen, unit,'hessi.fits'
               FOR index=100000L, 500000L DO BEGIN
                   HSI_PacketRead, unit, index,  packet
                   Do_Something_With_Packet, packet
               ENDFOR
               HSI_PacketFileClose, unit
       2. To read  packets # 100000 to packet # 500000 from a file called
           hessi.fits, storing the packets into main memory, do:
               HSI_PacketRead, 'hessi.fits', [100000L, 500000L], packets

 SEE ALSO:
	FXBREAD [1], FXBREAD [2], FXBREAD [3], HSI_PacketFileOpen, HSI_PacketIndexSearch
	HSI_PacketWrite
 MODIFICATION HISTORY:
       Release 1, ACs, Jan 1999
           Default packet output type is {source_packet_word}
               instead of {source_packet}
           BYTE Keyword added
	Release 0, A.Csillaghy, csillag@ssl.berkeley.edu, Oct. 98


HESSI Packet Read [2] $SSW/hessi/offline/hsi_packetread.pro
[Previous] [Next]
 PROJECT:
	HESSI
 NAME: 
       HESSI Packet Read

 PURPOSE:
       Reads one or more telemetry packets from a HESSI source packet file.

 CATEGORY:


 CALLING SEQUENCE:
       HSI_PacketRead, unit, index, packet
       HSI_PacketRead, fileName, index, packet
       HSI_PacketRead, fileName, packet

 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], DOC_MENU, HSI_PACKETFILECLOSE
	HSI_PACKETFILEOPEN, HSI_PACKETREAD, HSI_RELOAD_PACKET, IEEE_TO_HOST [1]
	IEEE_TO_HOST [2], IEEE_TO_HOST [3], IEEE_TO_HOST [4], MRD_SKIP [1], MRD_SKIP [2]
 INPUTS:
       fileUnit: the unit of the file opened by HSI_PacketFileOpen or
                 a filename. If a filename is given, then the packets
                 will be read in a single call to this procedure. 
       index: either a single value for reading a single row (starts
              at 1) or 2-element array for reading a range of rows,
              or a list of packet indices. WARNING: index counts from
                                                    0 to n-1!
              The index list can be produced e.g. by HSI_PacketIndexSearch

 OPTIONAL INPUTS:
	none

 OUTPUTS:
       packet: an single packet or an array of packets 
               of type {source_packet_words}
 OPTIONAL OUTPUTS:
	none

 KEYWORDS:
       BYTE: Instead of {source_packet_words}, returns packets in the 
             type {source_packet}
       ERRORMSG: contains eventual error messages in case of abnormal
                 termination of the procedure
	HELP: writes the command usage
       VERBOSE: comments the procedure events

 COMMON BLOCKS:
	none

 SIDE EFFECTS:
	Be aware that storing a large number of packets into the main
	memory may result in bad system performance. You may use the
	possibilities of reading one packet at a time.

 RESTRICTIONS:
	none

 NOTES:
	THE first version used fxbread to read the bintable
	rows. However, since we know exactly the format, it is much more
	efficient to use ReadU to get the data in.

 EXAMPLES:
       1. To read all packets from the file hessi.fits:
               HSI_PacketRead, 'hessi.fits', p
       2. To read  packets # 100000 to packet # 500000 from a file called
           hessi.fits:
               HSI_PacketRead, 'hessi.fits', [100000L, 500000L], packets
       3. To read packet number 10203 from the file hessi.fits:
               HSI_PacketRead, 'hessi.fits', 10203, packet
       4. To read a list of packet numbers (stored in "list"):
               HSI_PacketRead, 'hessi.fits', list, packet
       5. To read single packets and process them sequentially:
          without storing all packets into main memory:
               HSI_PacketFileOpen, unit,'hessi.fits'
               FOR index=100000L, 500000L DO BEGIN
                   HSI_PacketRead, unit, index,  packet
                   Do_Something_With_Packet, packet
               ENDFOR
               HSI_PacketFileClose, unit

 SEE ALSO:
	HSI_PacketFileClose, HSI_PacketFileOpen, HSI_PacketIndexSearch
	HSI_PacketWrite
 MODIFICATION HISTORY:
       Release 1 dev, ACs, Jan-Feb 1999
           Changed FXBread for ReadU for efficiency reasons.
           BYTE Keyword added
           Default packet output type is {source_packet_word}
               instead of {source_packet}
	Release 0, A.Csillaghy, csillag@ssl.berkeley.edu, Oct. 98


HESSI Packet to coarse light curve $SSW/hessi/offline/hsi_packet2coarselightcurve.pro
[Previous] [Next]
 PROJECT:
	HESSI
 NAME: 
       HESSI Packet to coarse light curve

 PURPOSE:
      Transforms packet data into a coarse light curve that allows a
      rough viev of the data

 CATEGORY:
      Utilities (/ssw/hessi/idl/util)

 CALLING SEQUENCE:


 CALLS:
	none
 INPUTS:
       none

 OPTIONAL INPUTS:
	none

 OUTPUTS:
       none

 OPTIONAL OUTPUTS:
	none

 KEYWORDS:
	none
 COMMON BLOCKS:
	none

 SIDE EFFECTS:
	none

 RESTRICTIONS:
	none

 PROCEDURE:
	none
 
 SEE ALSO:
	HSI_Packet2CoarseSpectrum
 MODIFICATION HISTORY:
	Version 1, A.Csillaghy, csillag@ssl.berkeley.edu


HESSI Packet to EventList $SSW/hessi/offline/hsi_packet2eventlist.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI Packet to EventList

 PURPOSE: 
       Transforms a list of packets into an eventlist.

 CATEGORY:
       
 
 EXPLANATION:
       
 SYNTAX: 
       HSI_Packet2eventList, packet, eventList, reftime

 EXAMPLES:
       
 INPUTS:
       packet: an array of packets, of type {source_packet_words}
       refTime: the reference time of the time in the tag event.time

 OUTPUTS:
       eventlist: an array of events of type {event}
       refTime: the reference time of the time in the tag event.time;
                see remark under "procedure." This is set ONLY if the
                reftime variable is undefined. 

 KEYWORDS: 
	HELP: writes the command usage
       VERBOSE: comments the procedure events

 RESTRICTIONS: 
       None.

 PROCEDURE:
       The reference time is set to the collect time of
       the first packet, WITHOUT its binary microsecond part. That
       is, the reference time is the integral number of seconds of 
       the collect time of the first packet
       
 CALLS: ***
	CHECKVAR [1], FCHECK, HSI_APP100_COLLECT_TIME, HSI_APP100_UNPACK
	HSI_APP100_UNPACK_LIVETIME, HSI_PACKET2EVENTLIST, HSI_SCTIME_DIFF
	checkvar [2]
 SIDE EFFECTS:
       It will eliminate packet that have not an ID of 100

 HISTORY:
       Release 1 dev, ACs, January 1999
           the bmicro16 reference time tag is set to 0 
       Release 0, October 21, 1998, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI Packet Write $SSW/hessi/offline/hsi_packetwrite.pro
[Previous] [Next]
 PROJECT:
	HESSI
 NAME: 
	HESSI Packet Write

 PURPOSE:
	Writes hessi telemetry packets into a FITS file

 CATEGORY:
       Utilities (idl/util)

 CALLING SEQUENCE:
       HSI_PacketWrite, filename, packet
       HSI_PacketWrite, unit, packet, column, rowNr

 INPUTS:
       filename: the FITS file to contain the packets. If it exists, 
                 it will be replaced.
       packet: an array of packets of type {source_packet_words}
       unit: a file unit number, as returned by the procedure 
             hsi_packetfileopen
       column: a structure required by fxbwrite, as returned by the procedure 
               hsi_packetfileopen 
       rowNr: the index nuber of the packet + 1 (1-based index) 

 KEYWORDS:
	HELP: writes this text
       VERBOSE: comments the procedure 

 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], DOC_MENU, FXBWRITE [1], FXBWRITE [2]
	HSI_PACKETFILECLOSE, HSI_PACKETFILEOPEN, HSI_PACKETWRITE
 SIDE EFFECTS:
	Writes a file in the current directory. 
       WARNING: if a file exists with the same name as
                given, it will be replaced.

 RESTRICTIONS:

 PROCEDURE:
	none

 MODIFICATION HISTORY:
       Release 1, ACs, January 1999
           Added file name possibility
	Release 0, Andre Csillaghy, csillag@ssl.berkeley.edu Oct.1998.


HESSI PARAMETER SELECTION TOOL [1] $SSW/hessi/idl/sub_task/hessi_parameter_sel.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI PARAMETER SELECTION TOOL

 PURPOSE: 
       

 CATEGORY:
       
 
 CALLING SEQUENCE: 
       result = hessi_parameter_sel( control 

 INPUTS:
       

 OPTIONAL INPUTS: 
       None.

 OUTPUTS:
       None.

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS: 
       None.

 COMMON BLOCKS:
       None.

 PROCEDURE:

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 EXAMPLES:
       

 CALLS: ***
	ADD_TAG [1], ADD_TAG [2], GET_DFONT [1], GET_DFONT [2], HESSI_PARAMETER_SEL
	HESSI_PARAMETER_SEL_EVENT, HSI_CW_EVENTLIST, HSI_CW_PACKET, HSI_CW_Super
	SWAPDISPLAYEDWIDGET, XMANAGER
 SEE ALSO:
 HISTORY:
       
       Version 1, February 26, 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI Parameter Selection Tool [2] $SSW/hessi/idl/sub_task/hessi_parameter_sel_dev.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI Parameter Selection Tool

 PURPOSE: 
       Allows users to select the parameters used to run a given
       HESSI task.  Parameters can be passed in or chosen interactively. 

 
 CATEGORY:
       sub tasks (hessi/idl/sub_tasks)
 
 CALLING SEQUENCE: 
       HESSI_Parameter_sel

 INPUTS:
      event lists 
      light curves in different energy bands, 
      time intervals
      energy bands, 
      background intervals 
      background spectra, 
      task_id, 
      image algorithm identifier, 
      image control parameters, 
      spectral model identifier, 
      spectral control parameters. 

 OPTIONAL INPUTS: 
       None.

 OUTPUTS:
       time intervals
       energy bands
       background intervals or spectra, 
       task_id, 
       image algorithm identifier, 
       image control parameters,
       spectral model identifier, 
       spectral control parameters 

 OPTIONAL OUTPUTS:

 KEYWORDS: 

       
 COMMON BLOCKS:
       None.

 PROCEDURE:

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       

 EXAMPLES:
      

 SEE ALSO:
 HISTORY:
       Release 1 development started in December 1998, 
           A Csillaghy, csillag@ssl.berkeley.edu (ACs)


HESSI PIXON CLASS DEFINITION $SSW/hessi/idl/image/hsi_pixon__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI PIXON CLASS DEFINITION

 PURPOSE:
       Provides HESSI pixon data structures and functions.

 CATEGORY:
       HESSI Imaging

 CONSTRUCTION:

 GENERIC METHODS:

 OBJECT SPECIFIC METHODS:

 CONTROL PARAMETERS:

 RESTRICTIONS:

 EXAMPLES:


 CALLS: ***
	HSI_PIXON::IMAGE_ALG_HOOK, HSI_PIXON::INIT, HSI_PIXON_IMAGE [1]
	HSI_PIXON_IMAGE [2], HSI_PIXON__DEFINE, REP_TAG_NAME
 SEE ALSO:
	hsi_image
 HISTORY:
       T. Metcalf  2001 Feb 27
 Modifications:
   22-May-2001, Kim.  Init and use progress_bar control parameter.
   27-Mar-2002, TRM.  Change sensitivity default to 1.0
   08-May-2002, TRM   Changed sesitivity default back to 0.0 now the
                      the data gap problem is being corrected.
   16-Mar-2004, TRM   Added support for full_pm_calc,
                      background_model, and variable_metric


HESSI polar MODULATION PATTERN CLASS DEFINITION $SSW/hessi/idl/image/memvis/hsi_vismod_pattern__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI polar MODULATION PATTERN CLASS DEFINITION

 PURPOSE: 
       Provides data structures and methods to work with modulation patterns

 CATEGORY:
       HESSI Utilities
 
 CONSTRUCTION: 
       vismod_pattern_obj = Obj_New( 'hsi_vismod_pattern' ) ;

       The variable vismod_pattern_obj is the object references used to
       access modulation pattern data and methods.

 SOURCE OBJECT
       HSI_Calib_Eventlist

 INPUTS:
       Provided by the "Set" method:
       packet_obj->Set, KEYWORD=value
       See below for the list of available keywords

 OUTPUTS:
       For control variables: provided by the "Get" method;
       For data: provided by the methods:
                 GetMemvisPattern
                 GetMemvisProfile
                 GetBProj
                 GetPSF



 CALLS: ***
	HSI_MEMVIS_MAKEPAT, HSI_VISMOD_PATTERN::INIT, HSI_VISMOD_PATTERN::PROCESS
	HSI_VISMOD_PATTERN_CONTROL, HSI_VISMOD_PATTERN__DEFINE
 SEE ALSO:
	HESSI Utility Reference http://hessi.ssl.berkeley.edu/software/reference.html
 HISTORY:
       Release 3 development, August / September 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu
       Based on the release 2 software of Richard Schwartz
       Fundamental developments by Richard Schwartz, GSFC


HESSI Polar Visibility pattern $SSW/hessi/idl/image/memvis/hsi_vismod_pattern.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI Polar Visibility pattern

 PURPOSE: 
       Creates a polar visibility modulation pattern

 CATEGORY:
       HESSI Utilities (idl/util)
 
 CALLING SEQUENCE: 
       object = hsi_vismod_pattern()

 OUTPUTS:
       The function returns an object reference of the class hsi_vismod_pattern

 KEYWORDS: 
       Any of the keywords defined in hsi_vismod_pattern__define and
       its parent structures.

 CALLS: ***
	HSI_VISMOD_PATTERN
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/reference.html
 HISTORY:
       Created: HESSI Software Release 2, May 12, 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu
	    Adapted for polar visiibilities Aug 17, 2000


HESSI PSF CONTROL STRUCTURE DEFINITION $SSW/hessi/idl/image/hsi_psf_control__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI PSF CONTROL STRUCTURE DEFINITION

 PURPOSE:
       Defines the data type of the structure that controls the
       output of the point spreas function class

 CATEGORY:
       Imaging

 CALLING SEQUENCE:
       var = {hsi_psf_control}

 TAG NAMES:
       xy_pixel: the pixel of the map (defined by xyoffset and
                 image_dim of hsi_eventlist_control) for which the
                 psf must be processed

 CALLS: ***
	HSI_PSF_CONTROL__DEFINE
 SEE ALSO:
	hsi_psf__define
 HISTORY:
       Release 3 development, August 1999
       Release 2, June 1999,
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI RAW DATA READER $SSW/hessi/idl/util/hsi_rawdata_reader__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI RAW DATA READER

 PURPOSE: 
       Provides data stru to read HESSI
       GSE (telemetry) packets.

 CATEGORY:
       HESSI Utilities
 
 CONSTRUCTION: 
       obj = Obj_New( 'HSI_GSE' ) ;

       The variable o is the object reference used to
       access the packets.

 INPUTS:
       Provided by the "Set" accessor method:
       obj->Set, KEYWORD=value
       The list of available keywords can be obtained with 
       Help, obj->Get(), /STRUCTURE
       For further information, see
       http://hessi.ssl.berkeley.edu/software/reference.html#set

 OUTPUTS:
       Control parameters are retrieved with:
       result = obj->Get( /KEYWORD1, /KEYWORD2, ... )
       If a single keyword is passed, the variable  "result"
       contains the value of the coprresponding control parameter.  
       If several keywords are  passed, then variable "result"
       contains a structure that has a tag for each keyword.
       For further information, see
       http://hessi.ssl.berkeley.edu/software/reference.html#get

       The actual data is accessed using the function method
       "GetData":
       result = obj->GetData()
       The variable "result" contains the retrieved data. "GetData"
       accepts a number of object-dependent selection parameters,
       see the keywords below. 

 GENERIC METHODS:
       Get
       Set
       GetData
       Print
       Plot
       Write
       
 OBJECT-SPECIFIC METHODS:
       GetRAWDATA_READER
       
       
 KEYWORDS: 
       TBD
   
 EXAMPLE:
       To read the packets 1000 to 9999 from the HESSI RAWDATA_READER file
       therm6a.dat:

       obj = Obj_New( 'HSI_RAWDATA_READER', FILENAME='therm6a.dat' )
       packet = obj->GetData( PACKET_INDEX = IndGen( 9000 ) + 1000 )

       To plot a "quick and dirty" lightcurve of the pac
       packet->Plot, file='abc.fits', time_resolution=2.

 CALLS: ***
	HSI_RAWDATA_READER::BUILDTABLE, HSI_RAWDATA_READER::CLEANUP
	HSI_RAWDATA_READER::GETHEADER, HSI_RAWDATA_READER::GETTABLE
	HSI_RAWDATA_READER::INIT, HSI_RAWDATA_READER__DEFINE, HSI_SCTIME2ANY, MASK
	MINMAX [1], MINMAX [2], MRD_SKIP [1], MRD_SKIP [2]
 SEE ALSO:    
	http://hessi.ssl.berkeley.edu/software/reference.html
	HESSI Utility Reference
	HESSI telemetry formats http://hessi.ssl.berkeley.edu/internal/
 HISTORY:
       Release 4 development ACs:
           The RAWDATA_READER part has been extracted form hsi_packet__define
           The cache is new
           The whole sync process is new
       Release 2 development, May 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu
       Based on: HSI_packet*.pro (Releases 0 and 1)


HESSI Read lookup table $SSW/hessi/offline/hsi_lookuptableread.pro
[Previous] [Next]
 PROJECT:
	HESSI
 NAME: 
       HESSI Read lookup table

 PURPOSE:
       Reads a FITS source packet lookup table

 CATEGORY:
       Utilities (hessi/util)

 CALLING SEQUENCE:
       HSI_LookupTableRead, filename, lookupTable

 CALLS: ***
	HSI_LOOKUPTABLEREAD, MRDFITS [1], MRDFITS [2]
 INPUTS:
       filename: the file containing the lookup table (may be the
                 same as the file containing the packet data)
       
 OPTIONAL INPUTS:
	filename: if not given, a temporary fits file is
                 created.
 OUTPUTS:
       unit: the unit number 

 OPTIONAL OUTPUTS:
	none

 KEYWORDS:
       VERBOSE: if set, prints on the tty what it is doing

 SIDE EFFECTS:
	none

 RESTRICTIONS:
	none

 PROCEDURE:
	none

 MODIFICATION HISTORY:
	Version 1, A.Csillaghy, csillag@ssl.berkeley.edu, Oct. 1998


HESSI ROLL_DB CLASS DEFINITION $SSW/hessi/idl/pmtras/hsi_roll_db__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI ROLL_DB CLASS DEFINITION

 PURPOSE:
       Interface to access the roll database. Given a time range, the object
       returns a structure containing the roll solution with a time interval
       of 64 seconds. If there are no points available, the structure
       contains zeroes (which are "filled" then with
       pmtras_analysis).

 CATEGORY:
       Utilities (idl/util)

 CONSTRUCTION:
       obj = Obj_New( 'hsi_roll_db' )
       obj = HSI_ROLL_DB()

 METHODS:
       result = getdata( obs_time_interval = obs_time_interval )
       returns the roll solution for the specified time interval.

 KEYWORDS:
       obs_time_interval: an anytim 2-element time interval
       specifying the times for which the roll solution is requested

 EXAMPLES:
       o = hsi_roll_db() ; creates the roll dbase handler
       roll = o->getdata( obs_time_int = '2002/05/31 ' + ['12:00', '13:00']
       obj_destroy, o

 CALLS: ***
	APPEND_ARR, CHECKVAR [1], FITSREAD, HSI_ANY2SCTIME, HSI_ASPECT_SOLUTION [2]
	HSI_FLARE_LIST, HSI_IMAGE, HSI_ROLL_DB, HSI_ROLL_DB::CLEANUP
	HSI_ROLL_DB::GETDATA, HSI_ROLL_DB::INIT, HSI_ROLL_DB::PLOT
	HSI_ROLL_DB::TIME2INDEX, HSI_ROLL_DB_FULL, HSI_ROLL_DB_TEST
	HSI_ROLL_DB__DEFINE, HSI_SCTIME2ANY, HSI_SPECTRUM, MINMAX [1], MINMAX [2], POPD
	PUSHD, SAME_DATA [1], SAME_DATA [2], UTPLOT [1], UTPLOT [2], UTPLOT [3], UTPLOT [4]
	UTPLOT [5], UTPLOT [6], VALID_RANGE, anytim [1], anytim [2], anytim [3], anytim [4]
	anytim [5], checkvar [2], datetime, hsi_aspect_solution [1], hsi_get_debug [1]
	hsi_get_debug [2], is_winnt
 SEE ALSO:
 HISTORY:
      2004-09-01- minor adaptation to make it work with the new
                  fitsgen__define; also some more tests to make sure
                  it reads the correct db file
      2004-04-08 corrected a problem with the file searching
      2004-01-06 minor bug fixes showing up after putting in online,
                 csillag@ssl.berkeley.edu
      2003-10-21 changed for reading monthly files
      2003-10-20 corrected the problem with out-of-range values
      In development till summer 2003
      Created in september 2002


HESSI score file close $SSW/hessi/offline/hsi_scorefileclose.pro
[Previous] [Next]
 PROJECT:
	HESSI
 NAME: 
       HESSI score file close

 PURPOSE:
       Closes a  HESSI FITS score file

 CATEGORY:
       Utilities (hessi/util)

 CALLING SEQUENCE:
       HSI_ScoreFileClose, unit

 CALLS: ***
	DOC_MENU, FXBCLOSE [1], FXBCLOSE [2], FXBFINISH [1], FXBFINISH [2]
	HSI_SCOREFILECLOSE
 INPUTS:
       unit: the unit of the opened file (as returned by HSI_ScoreFileOpen)
       
 OPTIONAL INPUTS:
	none

 OUTPUTS:
       unit: the unit number 

 OPTIONAL OUTPUTS:
	none

 KEYWORDS:
       HELP: prints this text
       VERBOSE: if set, prints on the tty what it is doing

 SIDE EFFECTS:
	none

 RESTRICTIONS:
	none

 PROCEDURE:
	none

 SEE ALSO
      HSI_ScoreFileOpen, HSI_ScoreRead, HSI_ScoreWrite

 MODIFICATION HISTORY:
	Dev for Rel 1, A.Csillaghy, csillag@ssl.berkeley.edu, Dec 1998


HESSI Score Read $SSW/hessi/offline/hsi_scoreread.pro
[Previous] [Next]
 PROJECT:
	HESSI
 NAME: 
       HESSI Score Read

 PURPOSE:
       Reads a score from a HESSI source packet file.

 CATEGORY:


 CALLING SEQUENCE:
       HSI_ScoreRead, unit, index, score
       HSI_ScoreRead, fileName, index, score
       HSI_ScoreRead, fileName, score

 CALLS: ***
	DOC_MENU, FXBREAD [1], FXBREAD [2], FXBREAD [3], HSI_PACKETFILECLOSE
	HSI_SCOREFILEOPEN, HSI_SCOREREAD, HSI_STRUCT_DEF [1], HSI_STRUCT_DEF [2]
 INPUTS:
       fileUnit: the unit of the file opened by HSI_PacketFileOpen or
                 a filename. If a filename is given, then the packets
                 will be read in a single call to this procedure. 
       index: either a single value for reading a single row (starts
              at 1) or 2-element array for reading a range of rows,
              or a list of packet indices. WARNING: index counts from
                                                    0 to n-1!
              The index list can be produced e.g. by HSI_PacketIndexSearch

 OPTIONAL INPUTS:
	none

 OUTPUTS:
       score: an single packet or an array of packets {SourcePacketStruct}

 OPTIONAL OUTPUTS:
	none

 KEYWORDS:
       ERRORMSG: contains eventual error messages in case of abnormal
                 termination of the procedure
	HELP: writes the command usage
       VERBOSE: comments the procedure events

 COMMON BLOCKS:
	none

 SIDE EFFECTS:
	Be aware that storing a large number of packets into the main
	memory may result in bad system performances. You may use the
	possibilities of reading on packet at a time.

 RESTRICTIONS:
	none

 PROCEDURE:
	none

 EXAMPLE:
       1.  To read packets # 100000 to packet # 500000 from a file called
           hessi.fits, without storing the packets into main memory, do:
               HSI_PacketFileOpen, unit,'hessi.fits'
               FOR index=100000L, 500000L DO BEGIN
                   HSI_PacketRead, unit, index,  packet
                   Do_Something_With_Packet, packet
               ENDFOR
               HSI_PacketFileClose, unit
       2. To read  packets # 100000 to packet # 500000 from a file called
           hessi.fits, storing the packets into main memory, do:
               HSI_PacketRead, 'hessi.fits', [100000L, 500000L], packets

 SEE ALSO:
	FXBREAD [1], FXBREAD [2], FXBREAD [3], HSI_PacketFileOpen, HSI_PacketIndexSearch
	HSI_PacketWrite
 MODIFICATION HISTORY:
	Release 0, A.Csillaghy, csillag@ssl.berkeley.edu, Oct. 98


HESSI SCORE STRUCTURE DEFINITION $SSW/hessi/idl/util/hsi_score__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI SCORE STRUCTURE DEFINITION

 PURPOSE: 
       Defines the data structure storing a score. A score is a list
       of photon events, of type {hsi_event}, with a UT reference
       time and a time unit.

 CATEGORY:
       HESSI Utilities
 
 CALLING SEQUENCE: 
       variable = {hsi_score}
       variable.eventlist_ptr = $
           Ptr_New( Replicate( {hsi_event} ), n_event )

       where n_event is the length of the photon events.

 TAG NAMES:
       ut_ref: time in seconds from 1-jan-1979 
               (convert with anytim()) (real)
       time_unit: (int) the time unit used in the time tag of the
                  events, in binary microseconds.
       eventlist_ptr: (pointer to array of {hsi_event}) the reference
                      to the event list

 CALLS: ***
	HESSI_REF_TIME, HSI_SCORE__DEFINE
 SEE ALSO: 
	{hsi_event}
 HISTORY:
       Release 2: "define" version , May 11, 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu
       Definition: R.A.Schwartz, richard.schwartz@gsfc.nasa.gov


HESSI Score to Light Curve [1] $SSW/hessi/offline/hsi_score2lightcurve-981203.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI Score to Light Curve

 PURPOSE: 
       Takes a score and produces a light curve according to
       the given range / resolution parameters.

 CATEGORY:
       
 
 CALLING SEQUENCE: 
       hsi_score2lightcurve, score, timeAxis, lightCurve

 INPUTS:
       

 OPTIONAL INPUTS: 
       None.

 OUTPUTS:
       None.

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS: 
       BINSIZE: the size of the bins used for generating the
                histogram. Be aware that time_resolution has
                precedence over binsize.
       A2D_INDEX_MASK: a 27-element byte array containing a "1" at
                         each position corresponding to a detector id
                         to consider and a "0" at all other locations
       ENERGY_RANGE: the limits of the energy range, a 2-element
                     array in keV.
       TIME_RANGE: the limits of the time range to plot, a 2-element
                   array in seconds .
       TIME_RESOLUTION: the resolution in seconds for the time
                        bins. Same as binsize, but has precedence on
                        binSize in cas both keywords are used.


 COMMON BLOCKS:
       None.

 PROCEDURE:

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 EXAMPLES:
       

 SEE ALSO:
 HISTORY:
       Version 1, October 22, 1998, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI Score to Light Curve [2] $SSW/hessi/offline/hsi_score2lightcurve.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI Score to Light Curve

 PURPOSE: 
       Takes a score and produces a light curve according to
       the given range / resolution parameters.

 CATEGORY:
       
 
 CALLING SEQUENCE: 
       hsi_score2lightcurve, score, timeAxis, lightCurve

 INPUTS:
       score: a structure of type {score}. This is ususally the
              output of hsi_packet2score. 

 OPTIONAL INPUTS: 
       None.

 OUTPUTS:
       None.

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS: 
       A2D_INDEX_MASK: a 27-element byte array containing a "1" at
                         each position corresponding to a detector id
                         to consider and a "0" at all other locations
       BINSIZE: the size of the bins used for generating the
                histogram. Be aware that time_resolution has
                precedence over binsize. In seconds.
       ENERGY_RANGE: the limits of the energy range, a 2-element
                     array in keV.
       ERANGE: same as ENERGY_RANGE
       PLOT: if set, plots the light curve
       TIME_RANGE: the limits of the time range to plot, a 2-element
                   array in seconds.
       TIME_RESOLUTION: the resolution in seconds for the time
                        bins. Same as binsize, but has precedence on
                        binSize in cas both keywords are used.
       TRANGE: same as TIME_RANGE
       TRESOLUTION: same as TIME_RESOLUTION

 PROCEDURE:
       Basically just a histogram function

 RESTRICTIONS: 
       Only the standard energy binning is used for now

 EXAMPLES:
        

 CALLS: ***
	DOC_MENU, HSI_LIGHTCURVEPLOT, HSI_SCORE2LIGHTCURVE, MINMAX [1], MINMAX [2]
	hsi_get_e_edges [1], hsi_get_e_edges [2], hsi_scoreels2profile
 SEE ALSO:
 HISTORY:
       Release 1 dev started in Dec 1998
       Release 0, October 22, 1998, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI Search Lookup Table Index $SSW/hessi/offline/hsi_lookuptableindexsearch.pro
[Previous] [Next]
 PROJECT:
	HESSI

 NAME: 
       HESSI Search Lookup Table Index

 PURPOSE:
       Given a lookup table, returns a list of
       indices matching a given search criteria

 CATEGORY:
       Utilities (hessi/util)

 CALLING SEQUENCE:
       HSI_LookupTableIndexSearch, lookupTable, index
       HSI_LookupTableIndexSearch, filename, index, [, lookupTable] 

 CALLS: ***
	DOC_MENU, HSI_LOOKUPTABLEINDEXSEARCH, HSI_LOOKUPTABLEREAD, HSI_STRUCT_DEF [1]
	HSI_STRUCT_DEF [2], anytim [1], anytim [2], anytim [3], anytim [4], anytim [5]
 INPUTS:
       filename: the name of the file containing the packets and the
                 lookup table)
       lookupTable: the array of type {LookupTableStruct} to search

 OPTIONAL INPUTS:
	none

 OUTPUTS:
       none

 OPTIONAL OUTPUTS:
	lookupTable: the lookupTable associated with the search

 KEYWORDS:
	APPLICATIONPROCESSID: 
          Selects the application process ids that must be retrieved.
          It can be a single or an array of ids.
       COLLECTTIME
          Selects the time range of the packets to be retrieved
          It is a range (which may consist of 1 value--***useful(?))
          in seconds
       ERRMSG : contains the error message string. Empty string if normal
                termination.
       SOURCESEQUENCECOUNT
          Selects the source sequence counts that must be retrieved.
          It is a range (which may consist of 1 value--***useful(?))
 SIDE EFFECTS:
	none

 RESTRICTIONS:
	none

 PROCEDURE:
     The packet list is (linearly) searched according to the information
     available in the lookup table (obviously)
     Thus, it gives a combination of
         - a list of application process IDs
         - a range of source sequenc count
         - a range of collect times
     If a filename is given, the file is looked for a lookup table,
     which is the read into the main memory.

 MODIFICATION HISTORY:
	Version 1, A.Csillaghy, csillag@ssl.berkeley.edu


HESSI SIMULATION CLASS DEFINITION $SSW/hessi/idl/sims/hsi_simulation__define.pro
[Previous] [Next]
 PROJECT:
       HESSI
 NAME:
       HESSI SIMULATION CLASS DEFINITION
 PURPOSE:
       Provides the HESSI simulation data type and associated methods
       Not usually called directly, but from the hsi_eventlist object
 CATEGORY:
       Simulations
 CONSTRUCTION:
       obj = Obj_New('hsi_simulation')
 INPUTS:
       The "Set" method is used to change the state of the object.
       obj->Set, KEYWORD=value
       see below for KEYWORD signification
 OUTPUTS:
       Provided by the Get, Getdata methods.
 GENERIC METHODS:
       INIT
       Get
       Set
       Process
       getdata
 KEYWORDS:
       all input is set by keywords, any sim_control parameter can be
       set:
                         sim_time_unit: 1, bmuseconds
                         sim_ut_ref: hessi_ref_time(), $;reference time
                         sim_a2d_index_mask: Bytarr(27), $;set to 1
                                             to sim this a2d)index
                         sim_pixel_size: 0.0, $;used if a model array
                                         is passed in
                         sim_xyoffset: fltarr(2), $;offset of whole
                                       image from sun center
                         sim_model: ptr_new(), $;spatial model an
                                        array or an array of gaussian sources
                         sim_time_range: dblarr(2), $;time range
                                         starting at ut_ref
                         sim_energy_band: ptr_new(), $energy band for
                                          simulation
                         sim_new_gain: 1b, $
                         sim_max_size: 128.0, $ ; default 1d maximum dimension
                         sim_atten_state:1b, $;attenuator state
                         sim_saszero:0b, $;set to 1 for no aspect solution
                         sim_srt_filename:' ', $;grid response filename
                         sim_just_background:0b, $ ;only background?
                         sim_use_spectrum:0b, $;use photon spectrum input
                         sim_photons_per_coll: 0.0, $;use a given
                                               number of photons, not
                                               the spectrum to get
                                               the eventlist. if the
                                               spectrum is still
                                               passed in, but
                                               sim_use_spectrum is
                                               not set, then the
                                               spectral shape is used.
                         sim_time_profile: ptr_new(), $;time
                                               profile, an anonymous
                                               structure of {time, profile}
                         sim_photon_flux: ptr_new(), $;photon
                                              flux array, nenergies,
                                              ntimes, nsources
                         sim_photon_energy: ptr_new(), $;photon
                                                energy, nust be set
                                                if photon flux is set
                         sim_photon_times: ptr_new(), $;photon
                                               flux times
                         sim_spec_pars: ptr_new(), $;photon spetral parameters
                         sim_spec_model:' ', $;photon spectral model
                         sim_background: 0.0, $;background multiplies
                                         hessi_background
                         sim_use_bkgd_spectrum: 0b, $;same as above
                                                keywords for background
                         sim_bkgd_time_profile: ptr_new(), $
                         sim_bkgd_photons_per_coll: 0.0, $
                         sim_bkgd_photon_flux: ptr_new(), $
                         sim_bkgd_photon_energy: ptr_new(), $
                         sim_bkgd_photon_times: ptr_new(), $
                         sim_bkgd_spec_model: ' ', $
                         sim_bkgd_spec_pars: ptr_new(), $
                         sim_interp_tprofile: 0b, $;interpolate time
                                              profile to smaller bins
                         sim_interp_dt: 0.0, $;time binsize for interpolation
                         sim_seed:0, $;seed value
                         sim_nbuff: 5e5};buffer value only this many
                                    photons are sent to
                                    hsi_modulate_point_source at a
                                    time
 EXAMPLES:
       Start by creating an eventlist object
       event_obj = Obj_New( 'hsi_eventlist')
       To create a simulated event list with default parameters:
       data=event_obj -> getdata()
       To write an simulation into a file:
       event_obj -> write
 SUPERCLASSES:
 SUBCLASSES:
 IMPORTED OBJECTS:
 CALLS: ***
	HSI_MODEL_TO_SCORE, HSI_SIMULATION::INIT, HSI_SIMULATION::PROCESS
	HSI_SIMULATION::SET, HSI_SIMULATION__DEFINE, TAG_EXIST [1], TAG_EXIST [2]
	anytim [1], anytim [2], anytim [3], anytim [4], anytim [5], is_struct
 SEE ALSO:
 HISTORY:
       27-may-2003, substantially rewritten, new control parameters,
       but old params are accounted for in set method
	10-apr-2002 remove new_gain, set gain_generation to 2, ras
       Release 6 version, jmm, jimm@ssl.berkeley.edu, 10-10-2001
	14-May-2001, ras, default for srt_filename,
       ras, set sim_new_gain 22-feb-2001.
            jimm's adaptations,
       Dev. for Release 3, July 1999
       Release 2, June 1999
       Version 1, February 17, 1999,
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI SIMULATION INFO STRUCTURE DEFINITION $SSW/hessi/idl/sims/hsi_simulation_info__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI SIMULATION INFO STRUCTURE DEFINITION

 PURPOSE: 
       Defines the structure for the  simulation info parameters.

 CATEGORY:
       Simulation
 
 CALLING SEQUENCE: 
       var = {hsi_simulation_info}

 TAG NAMES:
       sim_out_time_unit: the time unit in binary microseconds used
                          with the event time tags in the eventlist
       sim_ut_ref: the UT reference time of the event times in the
                   simulated event list

 EXAMPLES:
       var = obj->Get( /INFO, /THIS_OBJECT )

 CALLS: ***
	HESSI_REF_TIME, HSI_SIMULATION_INFO__DEFINE
 SEE ALSO:
 HISTORY:
        Created December 1999 A Csillaghy, csillag@ssl.berkeley.edu


HESSI SMEX TELEMETRY PACKET READER $SSW/hessi/idl/util/hsi_smex__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI SMEX TELEMETRY PACKET READER

 PURPOSE: 
       Provides data structure and methods to read HESSI
       SMEX (telemetry) frames.

 CATEGORY:
       HESSI Utilities
 
 CONSTRUCTION: 
       obj = Obj_New( 'HSI_SMEX' ) ;

       The variable obj is the object reference used to
       access the packets.

 INPUTS:
       Control parameters are set via the Set method:
       

 OUTPUTS:
       

 KEYWORDS: 
       TBD
   
 EXAMPLES:
       To read the packets 1000 to 9999 from the HESSI GSE file
       therm6a.dat:

       obj = Obj_New( 'HSI_GSE', FILENAME='therm6a.dat' )
       packet = obj->GetData( PACKET_INDEX = IndGen( 9000 ) + 1000 )

       To plot a "quick and dirty" lightcurve of the pac
       packet->Plot, file='abc.fits', time_resolution=2.

 CALLS: ***
	HSI_SCTIME2ANY, HSI_SMEX::BUILDFILEOFFSET, HSI_SMEX::CHECK_BAD_PAK
	HSI_SMEX::GETBYTEOFFSET, HSI_SMEX::GETDATATYPE, HSI_SMEX::GETPACKETLENGTH
	HSI_SMEX::GETTABLETYPE, HSI_SMEX::GETTRAILERLENGTH, HSI_SMEX::READHEADER
	HSI_SMEX__DEFINE, hsi_bad_pak
 SEE ALSO:    
	http://hessi.ssl.berkeley.edu/software/reference.html
	HESSI Utility Reference
	HESSI telemetry formats http://hessi.ssl.berkeley.edu/internal/
 HISTORY:
       Release 5.1 development ACs. Based on the GSE reader
      


HESSI Soh Constructor $SSW/hessi/idl/util/hsi_sohdata.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI Soh Constructor

 PURPOSE: 
       Creates an instance of the soh class.

 CATEGORY:
       HESSI Utilities (idl/util)
 
 CALLING SEQUENCE: 
       object = hsi_sohdata()

 OUTPUTS:
       The function returns an object reference of the class hsi_soh

 KEYWORDS: 
       Any of the keywords defined in hsi_soh__define and
       its parent structures.

 CALLS: ***
	HSI_SOHDATA
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/reference.html
	hsi_packet__define, hsi_sohdata__define, hsi_super__define
 HISTORY:
       Created: HESSI Software Release 2, May 12, 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI SOHDATA CLASS DEFINITION $SSW/hessi/idl/util/hsi_sohdata__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI SOHDATA CLASS DEFINITION

 PURPOSE:
       Manages HESSI soh data type methods. The data are
	read from a packet object.

 CATEGORY:
       Utilities (idl/util)

 CONSTRUCTION:
       obj = Obj_New( 'hsi_sohdata' )
       obj = HSI_Sohdata()

 (INPUT) CONTROL PARAMETERS DEFINED IN THIS CLASS:
      
      Defined in {hsi_sohdata_control}

      soh_time_range: [0D, 4D] Time range in
      seconds relative to obs_time_interval

      soh_label:Pointer to a string array with the keywords wanted. These
      are 'natural language' keywords or ITOS keywords


      To see a list of all control parameters, use 
      o->Print, /CONTROL_ONLY      
      To assign a value to a control parameter, use 
      o->Set, KEYWORD=value
      To retrieve the value of a control parameter, use 
      value=o->Get( /KEYWORD ) 



 (OUTPUT) INFORMATIONAL PARAMETERS DEFINED IN THIS CLASS:

      Defined in {hsi_sohdata_info}

          soh_time_array: ptr_new()  A pointer to an array of times in sec.
		The times contain the collect time of each packet
          soh_absolute_time_range:Dblarr(2) Equivalent to 
		absolute_time_range in hsi_eventlist
	   soh_info: a pointer to an array of pointers. Each points to an informational structure
	soh_data_files(): a pointer to a structure that will contain the information within the HESSI files
	(Keyword names in each file, bit positions, etc.)
	
      To see a list of all info parameters, use 
      o->Print, /INFO_ONLY      
      To retrieve the value of an info parameter, use 
      value=o->Get( /KEYWORD ) 
  

 METHODS DEFINED OR OVERRIDDEN IN THIS CLASS:
      Init
      Set
      Process
      Plot
 KEYWORDS:
      
      soh_include_all: If set, the result include all packets,
      including those flagged as bad by hsi_bad_pak

 EXAMPLES:

       Start by instatiating the object class:
       sohdata = Obj_New( 'hsi_sohdata' )
	or
	sohdata=hsi_sohdata()

       data = sohdata->GetData(filename='XXX',app_id=1,file_type='XXX',soh_label=['###','###',...] )
	data is an array of pointers, where each one point to a number array with the data.
	What each pointer is, can be found by doing info=sohdata->get(/info)

	A very useful procedure is 
	sohdata->plot

	

 PARENT CLASS:
       Framework

 (AGGREGATED) SOURCE CLASSES:
       HSI_Packet

 DESTINATION CLASSES:
       HSI_Binned_Sohdata, HSI_Spectrum, HSI_Lightcurve

 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], CW_BGROUP, CW_FIELD, DATATYPE [1]
	DATATYPE [2], DATATYPE [3], GETTOK [1], GETTOK [2], GETTOK [3], GETTOK [4]
	GO_CONTROL, HSI_PACKET, HSI_PACKET2SOH, HSI_SOHDATA::INIT, HSI_SOHDATA::PLOT
	HSI_SOHDATA::PROCESS, HSI_SOHDATA::SET, HSI_SOHDATA__DEFINE, NUMLINES [1]
	NUMLINES [2], OLD_READCOL, REMCHAR [1], REMCHAR [2], REMCHAR [3], REPCHR [1]
	REPCHR [2], REPCHR [3], SOH_BASE_EVENT, SOH_TEXT_CONTROL, STRNUMBER [1]
	STRNUMBER [2], STRNUMBER [3], STRNUMBER [4], VALID_RANGE, XMANAGER, ZPARCHECK [1]
	ZPARCHECK [2], ZPARCHECK [3], anytim [1], anytim [2], anytim [3], anytim [4]
	anytim [5], concat_dir [4], plotman
 SEE ALSO:
	HSI_SOH_TYPE_CONVERSION, framework
	hessi.ssl.berkeley.edu/software/reference.html#hsi_sohdata, hsi_packet2soh
	hsi_packet__define, hsi_simulation__define, hsi_sohdata_control__define
	hsi_sohdata_info__define
 HISTORY:
	Release Feb 16, 2001
	David Ardila (ardila@astron.berkeley.edu)
	Oct. 9, 2001: D. Ardila. Added widget routines to plot.


HESSI SOHDATA CONTROL STRUCTURE DEFINITION $SSW/hessi/idl/util/hsi_sohdata_control__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI SOHDATA CONTROL STRUCTURE DEFINITION

 PURPOSE: 
       Defines the structure of the SOH data control parameters

 CATEGORY:
       HESSI Utilities
 
 CALLING SEQUENCE: 
       var = {hsi_sohdata_control}

 TAG NAMES:

         soh_time_range: [0D, 4D] Time range to look for soh data, in
      seconds relative to obs_time_interval
         soh_label:ptr_new()  Pointer to a string array with the 
	keywords wanted. 
 
 COMMON BLOCKS:
       None.

 PROCEDURE:

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 EXAMPLES:
       

 CALLS: ***
	HSI_SOHDATA_CONTROL__DEFINE
 SEE ALSO:
 HISTORY:
       Version 1, April 29, 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI SOHDATA INFO STRUCTURE DEFINITION $SSW/hessi/idl/util/hsi_sohdata_info__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI SOHDATA INFO STRUCTURE DEFINITION

 PURPOSE: 
       Defines the HESSI sohdata informational structure

 CATEGORY:
       HESSI / Utilities
 
 CALLING SEQUENCE: 
       var = {hsi_sohdata_info}

 TAG NAMES:
	 soh_absolute_time_range:Dblarr(2) Equivalent to 
               absolute_time_range in hsi_eventlist
       soh_time_array:ptr_new() A pointer to an array of times in sec.
               The times contain the collect time of each packet
       soh_info:ptr_new() a pointer to an array of pointers. Each points to an informational structure
	soh_data_files(): a pointer to a structure that will contain the information within the HESSI files
	(Keyword names in each file, bit positions, etc.)
	


 EXAMPLES:
       var = {hsi_sohdata_info}
       var = obj->Get( /INFO )

 CALLS: ***
	HSI_SOHDATA_INFO__DEFINE
 SEE ALSO:
 HISTORY:
       Release 2 development, April 27, 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI Spectrogram Constructor $SSW/hessi/idl/spectra/hsi_spectrogram.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI Spectrogram Constructor

 PURPOSE: 
       Creates an instance of the spectrogram object class.

 CATEGORY:
       HESSI Spectroscopy (idl/spectra)
 
 CALLING SEQUENCE: 
       object = hsi_spectrogram()

 OUTPUTS:
       The function returns an object reference of the class hsi_spectrogram

 KEYWORDS: 
       Any of the keywords that can be passed to the INIT function of
       hsi_spectrogram__define and its parent classes.

 CALLS: ***
	HSI_SPECTROGRAM
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/reference.html$hsi_spectrogram
	hsi_spectrogram_Control, hsi_spectrogram__define [1]
	hsi_spectrogram__define [2], hsi_spectrogram__define [3]
	hsi_spectrogram_control__define, hsi_spectrogram_info__define
 HISTORY:
       Created: HESSI Software Release 5, June 2000, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI Spectroscopy Response Matrix Constructor $SSW/hessi/idl/spectra/hsi_srm.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI Spectroscopy Response Matrix Constructor

 PURPOSE:
       Creates an instance of the eventlist class.

 CATEGORY:
       HESSI Spectroscopy (idl/spectra)

 CALLING SEQUENCE:
       object = hsi_srm()

 OUTPUTS:
       The function returns an object reference of the class hsi_srm

 KEYWORDS:
       Any of the keywords defined in hsi_srm_control__define and
       its parent structures.

 CALLS: ***
	HSI_SRM
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/reference.html
 HISTORY:
       23-apr-2001, RAS.


HESSI Spectrum Constructor [1] $SSW/hessi/idl/spectra/hsi_spectrum.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI Spectrum Constructor

 PURPOSE: 
       Creates an instance of the eventlist class.

 CATEGORY:
       HESSI Spectroscopy (idl/spectra)
 
 CALLING SEQUENCE: 
       object = hsi_spectrum()

 OUTPUTS:
       The function returns an object reference of the class hsi_eventlist

 KEYWORDS: 
       Any of the keywords defined in hsi_eventlist__define and
       its parent structures.

 CALLS: ***
	HSI_SPECTRUM
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/reference.html
 HISTORY:
       Created: HESSI Software Release 4, Nov. 23, 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI Spectrum Constructor [2] $SSW/hessi/idl/util/hsi_lightcurve.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI Spectrum Constructor

 PURPOSE: 
       Creates an instance of the eventlist class.

 CATEGORY:
       HESSI Spectroscopy (idl/spectra)
 
 CALLING SEQUENCE: 
       object = hsi_spectrum()

 OUTPUTS:
       The function returns an object reference of the class hsi_eventlist

 KEYWORDS: 
       Any of the keywords defined in hsi_eventlist__define and
       its parent structures.

 CALLS: ***
	HSI_LIGHTCURVE
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/software/reference.html
 HISTORY:
       Created: HESSI Software Release 4, Nov. 23, 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI SPECTRUM PLOT $SSW/hessi/offline/hsi_spectrumplot.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI SPECTRUM PLOT

 PURPOSE: 
       Plots a hessi spectrum

 CATEGORY:
       Utilities (hessi/idl/util)
 
 CALLING SEQUENCE: 
       hsi_spectrumplot, energyAxis, spectrum

 INPUTS:
       energyAxis: the axis, in keV
       spectrum: the counts per energy bin per detector

 OUTPUTS:
       None.

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS: 
       None.

 COMMON BLOCKS:
       None.

 PROCEDURE:

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 EXAMPLES:
       

 CALLS: ***
	DOC_MENU, HSI_PLOT, HSI_SPECTRUMPLOT
 SEE ALSO:
 HISTORY:
       Release 1 dev, December 4, 1998, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI Spectrum [1] $SSW/hessi/idl/sub_task/hsi_cw_calib_eventlist.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI Spectrum

 PURPOSE:
       Tool to select spectrum parameters

 CATEGORY:


 CALLING SEQUENCE:
       result = hsi_cw_spectrum_text()

 INPUTS:


 OPTIONAL INPUTS:
       None.

 OUTPUTS:
       None.

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS:
       None.

 COMMON BLOCKS:
       None.

 PROCEDURE:

 RESTRICTIONS:
       None.

 SIDE EFFECTS:
       None.

 EXAMPLES:


 SEE ALSO:
 HISTORY:
       Version 1, November 23, 1998,
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI Spectrum [2] $SSW/hessi/idl/sub_task/hsi_cw_lightcurve_text.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI Spectrum

 PURPOSE:
       Tool to select spectrum parameters

 CATEGORY:


 CALLING SEQUENCE:
       result = hsi_cw_spectrum_text()

 INPUTS:


 OPTIONAL INPUTS:
       None.

 OUTPUTS:
       None.

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS:
       None.

 COMMON BLOCKS:
       None.

 PROCEDURE:

 RESTRICTIONS:
       None.

 SIDE EFFECTS:
       None.

 EXAMPLES:


 CALLS: ***
	CW_FSLIDER, DOC_MENU, GET_DFONT [1], GET_DFONT [2], HSI_CW_LIGHTCURVE_TEXT
	HSI_CW_LIGHTCURVE_TEXT_EVENT, HSI_CW_LIGHTCURVE_TEXT_GET_VALUE
	HSI_CW_LIGHTCURVE_TEXT_SET_VALUE
 SEE ALSO:
 HISTORY:
       Version 1, November 23, 1998,
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI Spectrum [3] $SSW/hessi/idl/sub_task/hsi_cw_modul_pattern.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI Spectrum

 PURPOSE:
       Tool to select spectrum parameters

 CATEGORY:


 CALLING SEQUENCE:
       result = hsi_cw_spectrum_text()

 INPUTS:


 OPTIONAL INPUTS:
       None.

 OUTPUTS:
       None.

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS:
       None.

 COMMON BLOCKS:
       None.

 PROCEDURE:

 RESTRICTIONS:
       None.

 SIDE EFFECTS:
       None.

 EXAMPLES:


 SEE ALSO:
 HISTORY:
       Version 1, November 23, 1998,
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI Spectrum [4] $SSW/hessi/idl/sub_task/hsi_cw_spectrum_text.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI Spectrum

 PURPOSE:
       Tool to select spectrum parameters

 CATEGORY:


 CALLING SEQUENCE:
       result = hsi_cw_spectrum_text()

 INPUTS:


 OPTIONAL INPUTS:
       None.

 OUTPUTS:
       None.

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS:
       None.

 COMMON BLOCKS:
       None.

 PROCEDURE:

 RESTRICTIONS:
       None.

 SIDE EFFECTS:
       None.

 EXAMPLES:


 CALLS: ***
	CW_FIELD, DOC_MENU, GET_DFONT [1], GET_DFONT [2], HSI_CW_SPECTRUM_TEXT
	HSI_CW_SPECTRUM_TEXT_EVENT, HSI_CW_SPECTRUM_TEXT_GET_VALUE
	HSI_CW_SPECTRUM_TEXT_SET_VALUE
 SEE ALSO:
 HISTORY:
       Version 1, November 23, 1998,
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI VISIBILITY CLASS DEFINITION $SSW/hessi/offline/hsi_vismod_bproj__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI VISIBILITY  CLASS DEFINITION

 PURPOSE: 
       Provides data structures and methods to work with modulation patterns

 CATEGORY:
       HESSI Utilities
 
 CONSTRUCTION: 
       modul_pattern_obj = Obj_New( 'hsi_modul_pattern' ) ;

       The variable modul_pattern_obj is the object references used to
       access modulation pattern data and methods.

 INHERITANCE
       HSI_Calib_Eventlist (direct)
       HSI_Eventlist, HSI_Packet, Universal

 INPUTS:
       Provided by the "Set" method:
       packet_obj->Set, KEYWORD=value
       See below for the list of available keywords

 OUTPUTS:
       For control variables: provided by the "Get" method;
       For data: provided by the methods:
                 GetModulPattern
                 GetModulProfile
                 GetBProj
                 GetPSF

 OBJECT-SPECIFIC METHODS:



 CALLS: ***
	HSI_MEMVIS_DOBPROJ, HSI_VISMOD_BPROJ::HSI_BPROJ_ALG_HOOK
	HSI_VISMOD_BPROJ__DEFINE
 SEE ALSO:
	HESSI Utility Reference http://hessi.ssl.berkeley.edu/software/reference.html
 HISTORY:
       Release 3 development, August / September 1999, 
           A Csillaghy, csillag@ssl.berkeley.edu
       Based on the release 2 software of Richard Schwartz
       Fundamental developments by Richard Schwartz, GSFC


HESSI Widget Lightcurve $SSW/hessi/idl/sub_task/hsi_cw_generalinfo.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI Widget Lightcurve

 PURPOSE: 
       Tool to select light curve parameters

 CATEGORY:
       
 
 CALLING SEQUENCE: 
       result = hsi_w_lightcurve()

 INPUTS:
       

 OPTIONAL INPUTS: 
       None.

 OUTPUTS:
       None.

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS: 
       None.

 COMMON BLOCKS:
       None.

 PROCEDURE:

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 EXAMPLES:
       

 SEE ALSO:
 HISTORY:
       Version 1, November 23, 1998, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI Write lookup table $SSW/hessi/offline/hsi_lookuptablewrite.pro
[Previous] [Next]
 PROJECT:
	HESSI
 NAME: 
       HESSI Write lookup table

 PURPOSE:
       Opens a FITS binary table for a HESSI data set. 

 CATEGORY:
       Utilities (hessi/util)

 CALLING SEQUENCE:
       HSI_CreateBFITS, unit, filename

 CALLS: ***
	DOC_MENU, FXBADDCOL [1], FXBADDCOL [2], FXBCREATE [1], FXBCREATE [2]
	FXBFINISH [1], FXBFINISH [2], FXBHMAKE [1], FXBHMAKE [2], FXBWRITE [1]
	FXBWRITE [2], HSI_LOOKUPTABLEWRITE, HSI_STRUCT_DEF [1], HSI_STRUCT_DEF [2]
 INPUTS:
       none 
       
 OPTIONAL INPUTS:
	filename: if not given, a temporary fits file is created.
 OUTPUTS:
       unit: the unit number 

 OPTIONAL OUTPUTS:
	none

 KEYWORDS:
       VERBOSE: if set, prints on the tty what it is doing

 SIDE EFFECTS:
	none

 RESTRICTIONS:
	none

 PROCEDURE:
	none

 MODIFICATION HISTORY:
	Version 1, A.Csillaghy, csillag@ssl.berkeley.edu, Oct. 1998


HESSI $SSW/hessi/idl/widgets/hessi.pro
[Previous] [Next]
 Name: HESSI

 Purpose: main HESSI GUI

 Project:   HESSI


 Written: Kim Tolbert, 2000
 Modifications:
  14-Jan-2001, Kim, if 'Define Intervals' selected, but no utplot showing,
    make observing summary count rate plot of obs time interval first
  21-Jan-2001, Kim - Added import fits option
  4-Feb-2001,  Kim - Changed calls to hsi_ui_img, so hsi_ui_img can be aware
    of changes in time and interval selection in Main GUI.
    Made separate event handling for obs time selection and obs summary viewing
    even though they both call hsi_ui_obs.  Calls are different so that hsi_ui_obs
    can behave differently depending on context of call.
    If already running, just bring to foreground.
  18-Feb-2001, Kim.  Made it possible to run with GUI with default simulation or
    a simulation passed in through input_obj argument.
  30-May-2001, Kim. In import_fits, use new hsi_image__fitsread and let it create object.
  25-Oct-2001, Kim. Changed object to not share hsi_eventlist source.  Now objects are
    independent.  Also changed help to use html page instead of text page.
  3-Nov-2001, Kim.  Use dialog_message instead of w_message widget.
  2-Dec-2001, Kim.  Remove buttons on main GUI for intervals selection/display
  8-Jan-2002, Kim.  Remove button on main GUI for GOES, and change synoptic,other to synoptic
  12-Feb-2002, Kim.  Added filename parameter and _extra to enable using early files
  17-Feb-2002, Kim.  When no flare list is available, set obs_time to an arbitrary time
  22-Feb-2002, Kim.  Pass _extra to object even when filename not passed (the normal case)
  25-Apr-2002, Kim.  Make fresh session the default.  Added previous_settings keyword.
  30-Jun-2002, Kim.  In import method, call hsi_imagefile_2_plotman to handle the work.
  7-Jul-2002, Kim.   Added what's new help button
  10-Jul-2002, Kim.  Added check for valid window before adding flags or flare location to plot
  01-Aug-2002, Kim.  Added reset button
  06-Aug-2002, Kim.  In import FITS file option, previously was setting control parameters in GUI
    image object to those in file.  Now just create new panel(s), but don't change object parameters.
  19-Sep-2002, Kim.  Added keyword colortable to calling arguments.
  22-Sep-2002, Kim.  use catch, /relaxed on call to restgenx (when user types hessi,/prev) and declare
    plotman_plot_control and flarelist_ext structures before calling restgenx in case structures have changed,
    should probably declare all the structures being restored before restoring.  Later.
  25-Sep-2002, Kim.  If no flare or obs_time specified, default to first flare in catalog.
  17-Oct-2002, Kim.  Previously called show_synop without a time, now call with current
    obs_time_interval expanded by a day on either side.
  21-Oct-2002, Kim.  If time or flare number not specified by input parameters, or restoring
    object, then restore time/flare used in last session of GUI.  Also, if color not set via
    colortable keyword, then set image color to that used in last session of GUI.
  11-Dec-2002, Kim.  Now pass show_synop the plotman obj ref, and it will add panels directly
    to plotman.  Previously used a pointer and widget_event to communicate between GUI and show_synop.
  11-Dec-2002, Kim.  Added init_img_obj state property.  Use for keyword init on call to image widget -
    controls whether time_range and xyoffset are set in object for current flare, or left alone.
	10-Jan-2003, Kim.  Use widget size info a little differently to make it work in IDL 5.6 on UNIX
	17-Jan-2003, Kim.  added hessi_cleanup procedure to clean up when widget is killed (even from outside)
	21-Feb-2003, Kim.  Use hsi_widget_title for title of base widget.
	07-Mar-2003, Kim.  Added save and restore object buttons under File.  Restore not active yet.
	16-Sep-2003, Kim.  For resizing main widget, call plotman_widget_event, instead of duplicating
	  code here.
	11-Nov-2003, Kim.  Call new quicklook image widget - hsi_ui_ql
	10-Dec-2004, Kim.  Commented out Import FITS and Image Movie buttons - done in Image GUI now
	1-Mar-2005,  Kim.  Use hessi_obj_common now instead of storing obj references in state.  Only save
	  most recent version of objects, not all previous.
	27-May-2005, Kim.  Added monitor interface and monitor object to hessi_data objects.
	9-Jun-2005, Kim.  Changed order of buttons under File / Retrieve/Process Data
	23-Jan-2006, Kim.  A change in show_synop breaks the GUI.  Don't call show_synop with the GUI's
	  widget id in group keyword.
	25-May-2006, Kim. Changed warning msg if HSI_DATA_ARCHIVE and HSI_DATA_USER aren't defined.
	25-Oct-2006, Kim.  Added plotman object to hessi_obj_common. Can get it now via hessi_data.

 CALLS:


HESSI_ATTENUATOR_SPECTRA $SSW/hessi/idl/sims/hessi_attenuator_spectra.pro
[Previous] [Next]
 PROJECT:
	HESSI
 NAME: 
	HESSI_ATTENUATOR_SPECTRA

 PURPOSE:
	This procedure displays count rate spectra suitable for evaluating the performance
	of the HESSI attenuator.

 CATEGORY:
	SIMULATIONS, HESSI

 CALLING SEQUENCE:
	hessi_attenuator_spectra, hopen

 CALLS: ***
	AVG [1], AVG [2], FCHECK, HESSI_DATA_PATHS [1], HESSI_DATA_PATHS [2]
	HESSI_MODEL_COUNTS, HESSI_SHUTTERS, LEGEND [1], LEGEND [2], LEGEND [3]
	LOC_FILE [1], LOC_FILE [2], LOC_FILE [3], SET_X [1], SET_X [2], SPS
 INPUTS:
       hopen = shutter structure from hessi_shutters() for 00, open-open state.

 OPTIONAL INPUTS:
	none

 OUTPUTS:
       none explicit, only through commons;

 OPTIONAL OUTPUTS:
	none

 OPTIONAL KEYWORD INPUTS:
	X - if set, plot on xdevice()
	HEAVY_SHUTTER_FILE - shutter file for thickest blankets.
	OUTFILE - Postscript file name, def is ~/public_html/plot_spectra.ps

 COMMON BLOCKS:
	none

 SIDE EFFECTS:
	none

 RESTRICTIONS:
	none

 PROCEDURE:
	none

 MODIFICATION HISTORY:
	Version 1, richard.schwartz@gsfc.nasa.gov, 12-aug-1998.


hessi_background $SSW/hessi/idl/spectra/hessi_background.pro
[Previous] [Next]
 PROJECT: 
       HESSI
 NAME:   
       hessi_background

 PURPOSE:  
       Provides typical background rates (counts/detector/second) for 
       selected detector segments for a given time.  By default gives
       counts/channel/segment/second; if nointegrate is set, gives 
       counts/keV/segment/second at the energy values given.
       Eventually it will take other input parameters like
       earth_zenith_angle and mcilwain_L, or just an absolute time.
       Segment coincidence and detector coincidence rates are not yet 
       implemented; full-detector rates are just front+rear.

 CATEGORY: 
       HESSI spectral utilities 

 CALLING SEQUENCE:
       hessi_background, energy_edges, background_rates, $
            use_segment=use_segment, seg_index=seg_index, $
            time_wanted=time_wanted, earth_zenith_angle=earth_zenith_angle, $
            mcilwain_L=mcilwain_L, bkg_method=bkg_method, $
            nointegrate=nointegrate

 CALLS: ***
	CUTOFF_BPOW_EVAL, F_BPOW, HSI_ROUGH_FRONT_BKG, HSI_ROUGH_REAR_BKG
	hsi_energy_scale
 INPUTS:
   energy_edges   The energy boundaries wanted, in keV.
                  Format [N+1] edges for N contiguous channels, or
                  N energies at which to evaluate background (if nointegrate
                  is set).
       

 OPTIONAL (KEYWORD) INPUTS:
   use_segment[27] If set, include the corresponding one of the 27
                   detector segments.
   seg_index[?]    A scalar or vector array of detector indices. USE
                   THIS OR USE_SEGMENT, BUT NOT BOTH!  If NEITHER is
                   set, returns the background for seg_index 0 (a front).
   nointegrate     If set, evaluate at energies given; otherwise integrate
                   over channels bounded by energies given.

 PLACE HOLDERS (NOT YET IN USE:)
   bkg_method      Modelling method to use for bkg generation

   time_wanted     Time of the observation (any input readable by
                   anytim).  Will be used for some types of bkg_method.
   
   earth_zenith_angle  Will be used for some types of bkg_method.

   mcilwain_L      Will be used for some types of bkg_method.

 OUTPUTS:

   background_rates[?]     counts/segment/second for each segment chosen.
                           
 CALLED BY:
	hsi_sim_par_2_bkgd
 MODIFICATION HISTORY:
       Version 1, dsmith@ssl.berkeley.edu, Nov 23 1998
       Modified to add "nointegrate" option, add default of
         seg_index = 0, and use f_bpow from the library: 11/27/98 -dms


hessi_build_srm $SSW/hessi/idl/spectra/hessi_build_srm.pro
[Previous] [Next]
 PROJECT: HESSI
 NAME:   hessi_build_srm


 PURPOSE:  Provide response matrix for HESSI spectral deconvolution

 CATEGORY: HESSI spectral analysis

 CALLING SEQUENCE:

      hessi_build_srm, ct_edges, use_vird, srm, geom_area, $
       /sep_dets, /sep_virds, /astro,$
       simplify=simplify, atten_state=atten_state, dead_seg=dead_seg, $
       all_simplify=all_simplify, time_wanted=time_wanted, $
       earth_position=earth_position,offax_position=offax_position, $
       integrator=integrator, use_saved=use_saved, make_saved=make_saved, $
       ph_edges=ph_edges, print_subrms=print_subrms, verbose=verbose, $
       display_result=display_result, time_it=time_it,$
       pha_on_row=pha_on_row,lld_values=lld_values,resolutions=resolutions,$
       lambda=lambda,diagonal=diagonal, $
       subdivide_level=subdivide_level, _extra = _extra

 INPUTS:

     ct_edges       If a single number, refers to a particular standard
                     binning (these TBD).  If a string, will be taken
                     to refer to an input file. Otherwise will be a
                     (N+1) vector containing boundaries for
                     N channels of the counts side of the
                     matrices (in that order). If any of the use_saved[]s
                     are defined, the binning of that will override
                     what is supplied.

      use_vird[18 or 47]   If set, include the corresponding one of 18
                              detector segments, or 47 virtual detectors
                              [interpretation is based on length of the array]

 OUTPUTS:

       srm   Detector response matrices per input photon/cm2 in cnts/cm2/keV
             A column vector (i.e. srm[i,*]) corresponds to all the
             PHA channels' response to a single photon energy.
         Row vectors (i.e. srm[*,i]) correspond to photon energy index.
             If  "diagonal" is set, the elements are in different units:
             (cnts/cm2)/(ph/cm2), with no /keV.

       geom_area  Geometrical area of each detector assumed in generating
                  the srm in these units: it is a circle of radius 7.1 cm
                  (regardless of front or rear segment - this makes the
                  front segments less "efficient" than you might expect,
                  since their true diameter is about 6.1 cm)

 OPTIONAL INPUTS: (ALL INPUT ANGLES IN DEGREES)

     /sep_dets  if set, return separate matrices for each detector used; cannot
                  be used with detector/detector coincidence virtual detectors.
     /sep_virds  if set, return separate matrices for each virtual detector
                 (if /sep_dets set) or else separate sums of each virtual
                 detector type (front,rear,f/r coincidence, rear neighbor coincidence,
                                and "other")
     /astro     if set, treat as an astrophysical (out-of-aperture) source

     simplify[10] For each submatrix:
        0 Full calculation of diagonal, off diagonal terms
        1 Off diagonal terms are an approximation - for most submatrices
          this will mean an average of all segments of the right kind
          (f,r,coinc.) instead of detector-specific results
        2 Diagonal terms only
        3 Diagonal terms only, and all = 1 (or zero if
                           it's a normally off-diagonal matrix)

                     The 9 submatrices are:
                       0 Grid-pair transmission
                       1 Attenuator transmission
                       2 Blanket transmission
                       3 Det. resp. to modulated photons
                       4 Det. resp. to scattering in 2nd grid and attenuator
                       5 Det. resp. to spacecraft scatter
                       6 Det. resp. to Earth scattering
                       7 Detector resolution (w/ radiation damage)
                       8 Extra broadening (no longer in use)
                       9 Detector LLD threshold cutoff

                     The "perfect" condition for these is:
                       [1,1,1,1,0,0,0,1,1,1]
                     Where 1=diagonal, and 0= all zeros.

                     For a source outside the imaging FOV,
                     (i.e. /astro is set), we automatically
                     set simplify [0,1,2,4,5]=3
                     and "modulated" contains the full
                     detector/spacecraft response.  Submatrices
                     6-8 can be added or not as desired.

     all_simplify If set, overrides individual entries in "simplify"
                  Same values.  There will be a warning if both are set.
     atten_state   Attenuator setting
     dead_seg[18]  If set, consider the corresponding one of 18
                       detector segments to be passive
     time_wanted     Time of the observation, for purposes of time-varying
                     resolution.  In seconds from standard time-zero.
     earth_position  If a single value, it's a zenith angle, spin
                     integrated.  If an array of two values, the second
                     is the azimuth angle (from spacecraft +x).
                     Default is azimuth averaged, zenith=180 (Earth behind).
     offax_position  If not called or <=0, assume (solar) source
                     0.25 deg from the z axis. If a single number > 0,
                     use as a single radius angle (degrees) and azimuth
                     average.  Otherwise two numbers, zenith and azimuth
                     angles.
     integrator      This is an assumed power law index over the
                     whole spectrum,
                     for purposes of splitting channels into "subchannels",
                     calculating the response for each,  weighting by the
                     assumed powerlaw, and summing back together.
     subdivide_level Determines how finely a channel is subdivided
                     when calculating the response using a powerlaw
                     assumption for the input.  This
                     is the maximum acceptable ratio for the values
                     of the powerlaw at the bottom and top of a
                     "subchannel".  Defaults to 1.2 in hsi_subdivide_bins.
     use_saved[10]   If each is set, it should be set to a filename to
                     be read rather than generating that submatrix.
     make_saved[10]  If each is set, it should be set to a filename to
                     which the appropriate submatrix will be written.
     ph_edges        If a single number, refers to a particular standard
                     binning (these TBD).  If a string, will be taken
                     to refer to an input file. Otherwise will be a
                     (N+1) vector containing boundaries for
                     N channels of the photon side of the
                     matrices (in that order). If any of the use_saved[]s
                     are defined, the binning of that will override
                     what is supplied.  MUST BE EITHER THE SAME AS
                     ct_edges (DEFAULT) OR EQUAL TO ct_edges WITH A
                     HIGH-ENERGY EXTENSION

     print_subrms    Print the submatrices to the screen (BEWARE: use
                     only for SMALL matrices, and if you're only
                     generating one SEGMENT at a time.

     verbose         Periodic status updates

     display_result  Plot the final matrix (or matrices) using
                     hessi_display_srm

     time_it         Print system time at the beginning and the end.

     pha_on_row      If set, units of srm are
                     [count energy, photon energy, matrix number].
                     If zero, count and photon indices reversed.

     lld_values      array [9,4] Settings of the four thresholds per
                     detector: FrontSlowLLD,FrontFastLLD,RearSlowLLD,
                     RearFastLLD defaults (launch configuration) set below.

     resolutions     array [47,3] For now, all the routines assume a
                     Gaussian lineshape; for each detector the three
                     parameters are A,B,C, where
                     FWHM(keV) = A + B*sqrt(E(keV)) + C*E(keV)

     lambda          array [47] Radiation damage parameter to
                     determine tail on the lineshape due to trapping
                     (hole exponential trapping length in cm)


     diagonal        Generate and return only a diagonal vector, not a matrix


 CALLS: ***
	FCHECK, HESSI_CONSTANT, HSI_LOC_FILE, NUM2STR, edge_products, hessi_display_diag
	hessi_display_srm, hsi_convert_rm_pars, hsi_default_resolutions
	hsi_lambda_vs_t, hsi_matadd, hsi_matmult, hsi_rd_ct_edges, hsi_rd_ph_edges
	hsi_rm_atten, hsi_rm_blanket, hsi_rm_detmod, hsi_rm_detresol, hsi_rm_earth
	hsi_rm_elecresol, hsi_rm_grid2scat, hsi_rm_gridmod, hsi_rm_lld
	hsi_rm_spacecraft, hsi_subdivide_bins
 CALLED BY:
	HSI_DECIM_CORRECTION [1], HSI_DECIM_CORRECTION [2], HSI_SRM__DEFINE
	SPEX_DRM__DEFINE, hessi_drm_4image, hsi_spectrum__filewrite
	spex_hessi_image__define
 MODIFICATION HISTORY:

 DMSmith 2-Sep-1998   VERSION 0.0
 Level 0.0 version, just exists to be called by hessi_drm_4image.pro
   Therefore no error checking or off-diagonal terms done yet.
   Powerlaw integration and offaxis response not yet implemented.

 Removed loop over energies, to speed it up, added check for
 energies GT 1000.0 which will cause HESSI_FILTERS to crash.
 Jmm, 7-Oct-1998
 DMSmith 8-Oct-1998   VERSION 0.1

 Added error message on non-square input, call to edge_products
 Richard.schwartz@gsfc.nasa.gov 20-oct-1998, Version 0.1.1
     fixed bug in front/rear select.

 DMSmith 4-Dec-1998   VERSION 1.0 rewritten completely.  New features:
     complete list of submatrix calls, matrix multiplication/addition
     of submatrices, control structure definition, proper averaging of
     matrices based on sep_dets and sep_virds, display of output if desired.

 DMSmith 4-May-1999 VERSION 1.1, calls functions for earth and detearth
     submatrices which acknowledge their 3rd dimension (angle).

 DMSmith 4-May-1999 VERSION 1.2, is parsimonious with memory by
     not holding all the submatrices in memory at once, but rather
     reusing the variable space as it goes along.  Also, the variable
     system "force_perfect" and "simplify" was turned instead into
     "simplify" (now an array) and "all_simplify" (only used here
     and not passed in the response matrix control structure).

 DMSmith 25-May-2000 Added electronic threshold submatrix.

 DMSmith 20-Nov-2000 Electronic threshold submatrix will now
             include gain crossover function

 DMSmith 17-Apr-2001 Force "simplify" to 3 for the blanket
          submatrix since, for now, blankets are also included in the
          attenuator submatrix.

 DMSmith 2-May-2001 Added "pass through" parameters for resolution,
          fraction of photopeak->tail from trapping.  Also added
          "diagonal" option to never make a 2-d matrix.

 DMSmith 14-Jun-2001 Added the ability to use power-law weighting
          across channels (for diagonal calls only)
 R Schwartz 1-oct-2001, added _extra for keyword inheritance

 DMSmith 22-Dec-2001 Switch to virtual detector scheme, mostly
     transparently, i.e. if use_vird has only 18 elements (non-coincident
     segment modes), then the rest of the virtual detector modes
     are padded with zeros (coincident modes).

 R Schwartz 7-Feb-2002 Fixed temporary file handling for WINDOWS

 DMSmith 14-Mar-2002 IMPORTANT: When using "diagonal", elements are now
     changed from (counts/photon)/keV to counts/photon.  This makes
     them more equivalent to a photopeak efficiency.  The full square
     matrix still has units of (c/p)/keV, even its diagonal components.

 DMSmith 5-Apr-2002 forced simplifies of irrelevant submatrices when
     a source outside the field of view is wanted (i.e. "astro" set.)
     Also alert the user that offax_position is required in this case
     and that only rear segments are currently supported.

 ras, 10-apr-2002
     Add _extra to call to hsi_rm_gridmod to support setting SRT_FILENAME.

 29-Jan-03 Kim Prepended $ to HSI_SPEC in hsi_loc_file call
 29-Dec-03 Replace "tailfracs" with "lambda"; made hsi_elecresol
           submatrix automatically null (diagonal, unity);
           broadening is now all done in hsi_detresol.


hessi_correct_pileup [1] $SSW/hessi/idl/spectra/hsi_correct_pileup.pro
[Previous] [Next]
 PROJECT: HESSI
 NAME:   hessi_correct_pileup

 PURPOSE:  Remove first order pileup using an iterative algorithm.
           This does not correct the spectrum for deadtime, which
           can be done elsewhere by dividing by "livecorr".
           The correction should be applied to a count spectrum
           before correcting for the rest of the instrument response
           using the response matrix or efficiency.

 CATEGORY: HESSI spectral analysis

 CALLING SEQUENCE:


hsi_correct_pileup,inspec,eedge,segment=segment,livetime,outspec,$
   minbin=minbin,maxbin=maxbin,livetrue=livetrue,perkeV=perkeV,$
   oldway=oldway,firstorder=firstorder,pile1,pile2,pileparams=pileparams,$
   cts_above=cts_above,cts_below=cts_below,mod_amp=mod_amp, $
   rescaling_factor=rescaling_factor, use_ssw_rebinner = use_ssw_rebinner

 INPUTS:

      inspec      Input spectrum in counts/channel or counts/channel/sec
                     (or per keV if perkeV set).  Currently for a single
                     detector segment

      eedge_in    boundaries of energy channels, keV (1d or 2d)

      livetime    Livetime reading accumulated over the same interval
                  as the spectrum

 OPTIONAL INPUTS:

      cts_above   Total of input spectrum which is above the top channel
                  included

      cts_below   Total of input spectrum which is below the bottom channel
                  included

      minbin      Minimum bin number over which to do the livetime correction
                  (default 0)

      maxbin      Maximum bin number over which to do the livetime correction
                  (default the last bin)

      livetrue    Livetime passed to the routine has already been corrected
                  by  hsi_corrected_livetime()  (default 0)

      perkeV      Input spectrum is in counts/keV instead of counts/channel
                  (default 0)

      segment     Detector segment number, 0-17.  Doesn't do anything yet.

      oldway      Read empirical pileup probability from a table
                  instead of using the semiphysical limit at low deadtime.
                  This overcorrected, particularly at low deadtime.

      firstorder  Do first order correction only instead of 1st and 2nd.

      pileparams  Parameters that control the pileup correction;
                  derived empirically from calibration data.

      mod_amp     Average modulation amplitude during the
                  accumulation.  When high, the pileup correction
                  is more severe than would be expected for that
                  average livetime.

      rescaling_factor  For testing, rescales the amplitude
                  of the pileup corrections by a multiplicative
                  factor.  Not setting it has the same effect
                  as setting it to 1.  If OLDWAY is not set,
                  using this is equivalent to rescaling pileparams[0].

      use_ssw_rebinner
                  Uses ssw_rebinner instead of hsi_rebinner,
      SMOOTH - smoothes resampled fine bins to lessen aliasing.

 OUTPUTS:

      outspec       Output spectrum in the same units as the
                    input spectrum (/channel or /keV; /second or not)

      pile1, pile2  The 1st and 2nd order calculated pileup spectra


 CALLS: ***
	FCHECK, HSI_CORRECT_PILEUP, HSI_EMPIRICAL_TOTAL_PILEUP, HSI_LOC_FILE
	HSI_PILE_CONVOL, INTERPOL, edge_products, hsi_corrected_livetime
 MODIFICATION HISTORY:

 DMS 20-Nov-01: Version 1.0
 DMS 14-Apr-02: made "segment" optional
 DMS 27-Nov-02: Force pileup probablility to go as (true) deadtime^2;
   this gives more physical values at low deadtime and is pretty
   close to the data at middle-to-high deadtime.  Result is less
   pileup below about 35% true deadtime (which reads as 78%
   livetime).
 DMS 28-Nov-02: Coefficients to calculate pileprob from livecorr
   updated based on "ref214" calibration data.
 DMS 30-Nov-02: Added the low-energy enhancement to pileup due to the
   fast LLD.  Best empirical parameter (ref211) is that it's a
   factor of 2.5 worse below the fast LLD.  The file
   'hessi_total_pileup.txt' is now only read if you flag "/oldway"
 DMS 14-Dec-02: Added the "cts_above" and "cts_below" variables so that there
   aren't errors when a significant fraction of counts are outside
   the energy range passed in.  Previously this would cause an
   overcorrection.  Note that even this will not make things right
   when there are missing counts on the *low* end -- it's mainly for
   times when a weak, soft flare is being studied with all the
   high-energy part (all background) ignored.
 DMS 10-Jan-03: Added modulation amplitude feature.
 DMS 30-Sep-03: Added rescaling_factor for ease of testing
 RAS 19-nov-2003: Changed loop variables to longword as needed
 ras, 5-jul-2005, regrouped arithmetic and removed 1 time ops
   from loops.  Added smooth keyword


hessi_correct_pileup [2] $SSW/hessi/idl/spectra/hsi_correct_pileup_old.pro
[Previous] [Next]
 PROJECT: HESSI
 NAME:   hessi_correct_pileup

 PURPOSE:  Remove first order pileup using an iterative algorithm.
           This does not correct the spectrum for deadtime, which
           can be done elsewhere by dividing by "livecorr".
           The correction should be applied to a count spectrum
           before correcting for the rest of the instrument response
           using the response matrix or efficiency.

 CATEGORY: HESSI spectral analysis

 CALLING SEQUENCE:


hsi_correct_pileup,inspec,eedge,segment=segment,livetime,outspec,$
   minbin=minbin,maxbin=maxbin,livetrue=livetrue,perkeV=perkeV,$
   oldway=oldway,firstorder=firstorder,pile1,pile2,pileparams=pileparams,$
   cts_above=cts_above,cts_below=cts_below,mod_amp=mod_amp, $
   rescaling_factor=rescaling_factor, use_ssw_rebinner = use_ssw_rebinner

 INPUTS:

      inspec      Input spectrum in counts/channel or counts/channel/sec
                     (or per keV if perkeV set).  Currently for a single
                     detector segment

      eedge_in    boundaries of energy channels, keV (1d or 2d)

      livetime    Livetime reading accumulated over the same interval
                  as the spectrum

 OPTIONAL INPUTS:

      cts_above   Total of input spectrum which is above the top channel
                  included

      cts_below   Total of input spectrum which is below the bottom channel
                  included

      minbin      Minimum bin number over which to do the livetime correction
                  (default 0)

      maxbin      Maximum bin number over which to do the livetime correction
                  (default the last bin)

      livetrue    Livetime passed to the routine has already been corrected
                  by  hsi_corrected_livetime()  (default 0)

      perkeV      Input spectrum is in counts/keV instead of counts/channel
                  (default 0)

      segment     Detector segment number, 0-17.  Doesn't do anything yet.

      oldway      Read empirical pileup probability from a table
                  instead of using the semiphysical limit at low deadtime.
                  This overcorrected, particularly at low deadtime.

      firstorder  Do first order correction only instead of 1st and 2nd.

      pileparams  Parameters that control the pileup correction;
                  derived empirically from calibration data.

      mod_amp     Average modulation amplitude during the
                  accumulation.  When high, the pileup correction
                  is more severe than would be expected for that
                  average livetime.

      rescaling_factor  For testing, rescales the amplitude
                  of the pileup corrections by a multiplicative
                  factor.  Not setting it has the same effect
                  as setting it to 1.  If OLDWAY is not set,
                  using this is equivalent to rescaling pileparams[0].

      use_ssw_rebinner
                  Uses ssw_rebinner instead of hsi_rebinner,


 OUTPUTS:

      outspec       Output spectrum in the same units as the
                    input spectrum (/channel or /keV; /second or not)

      pile1, pile2  The 1st and 2nd order calculated pileup spectra


 CALLS:
	edge_products, hsi_corrected_livetime()
	hsi_empirical_total_pileup() [table reader - enclosed], hsi_loc_file()
	hsi_rebinner OR ssw_rebinner
 MODIFICATION HISTORY:

 DMS 20-Nov-01: Version 1.0
 DMS 14-Apr-02: made "segment" optional
 DMS 27-Nov-02: Force pileup probablility to go as (true) deadtime^2;
   this gives more physical values at low deadtime and is pretty
   close to the data at middle-to-high deadtime.  Result is less
   pileup below about 35% true deadtime (which reads as 78%
   livetime).
 DMS 28-Nov-02: Coefficients to calculate pileprob from livecorr
   updated based on "ref214" calibration data.
 DMS 30-Nov-02: Added the low-energy enhancement to pileup due to the
   fast LLD.  Best empirical parameter (ref211) is that it's a
   factor of 2.5 worse below the fast LLD.  The file
   'hessi_total_pileup.txt' is now only read if you flag "/oldway"
 DMS 14-Dec-02: Added the "cts_above" and "cts_below" variables so that there
   aren't errors when a significant fraction of counts are outside
   the energy range passed in.  Previously this would cause an
   overcorrection.  Note that even this will not make things right
   when there are missing counts on the *low* end -- it's mainly for
   times when a weak, soft flare is being studied with all the
   high-energy part (all background) ignored.
 DMS 10-Jan-03: Added modulation amplitude feature.
 DMS 30-Sep-03: Added rescaling_factor for ease of testing
 RAS 19-nov-2003: Changed loop variables to longword as needed
 ras, 5-jul-2005, added _extra


HESSI_DATA $SSW/hessi/idl/widgets/hessi_data.pro
[Previous] [Next]
 Project     : HESSI

 Name        : HESSI_DATA

 Purpose     : retrieve or get info about objects used in HESSI GUI

 Method	: Every time the HESSI GUI is run, the image, lightcurve and
				observing summary objects used are appended to arrays
				that are stored in common.  HESSI_DATA allows you to
				see how many of each type of object has been saved, and
				when it was saved, and to retrieve any object.

 Category    : hessi widgets

 Syntax      : IDL> hessi_data, image=image, lc=lc, obs=obs, $
						index=index, clear=clear, help=help, error=error

 Input Keywords:	INDEX - retrieve object in element INDEX in object array
					CLEAR - if set, destroy and delete all objects saved
					HELP - if set, show time saved and type of all objects saved.  If no
						keywords are set, then help is set automatically.

 Output Keywords:	IMAGE - return image object in IMAGE
					LC - return lightcurve object in LC
					OBS - return observing summary object in OBS
					ERROR - 0/1 indicates no error / error

 CALLS: ***
	EXIST, FREE_VAR, XREGISTERED, prstr [1], prstr [2]
 CALLED BY:
	HESSI
 History     : Written 20-Aug-2000, Kim Tolbert
 Modifications:  27-May-2005, Kim.  Added monitor object
	25-Oct-2006, Kim.  Added plotman object

 Contact     : kim.tolbert@gsfc.nasa.gov


HESSI_DATA_PATHS [1] $SSW/hessi/idl/util/hessi_data_paths.pro
[Previous] [Next]
 PROJECT:
	HESSI
 NAME:
	HESSI_DATA_PATHS

 PURPOSE:
	This function returns all the directories needed for a HESSI data path.

 CATEGORY:
	HESSI, FILE LOCATION, SYSTEM

 CALLING SEQUENCE:
	paths = hessi_data_paths() ;returned as an array of strings.
	paths = hessi_data_paths(/path_format) ;returned as path string (':' delimited for Unix).

 CALLS: ***
	ARR2STR [1], Arr2Str [2], CHKLOG [1], CHKLOG [2], FILE_EXIST [2], FIND_ALL_DIR [1]
	FIND_ALL_DIR [2], FIND_ALL_DIR [3], GET_PATH_DELIM, IS_DIR, OS_FAMILY
	STRIP_LAST_SLASH, STR_LASTPOS [1], curdir [1], curdir [2], file_exist [1]
	file_exist [3], fix_slash, get_uniq, str_lastpos [2]
 INPUTS:
       none explicit, only through commons;

 OPTIONAL KEYWORD INPUTS:
	RESET - if set, force reacquiring paths, otherwise gets it out of common
	PATH_FORMAT - search path returned as a single path string.

 OUTPUTS:
       none explicit, only through commons;

 OPTIONAL OUTPUTS:
	none

 KEYWORDS:
	none
 CALLED BY:
	Data reader with caching, GET_GDFILE, GE_WINDOW [1], HESSI_ATTENUATOR_SPECTRA
	HESSI_FIGURE4_INPUTS [2], HESSI_FLARE_SPECTRUM, HESSI_MODEL_COUNTS
	HESSI_READ_SPEC, HESSI_SHUTTERS, HSI_DIAGNOSTICS, HSI_LOC_FILE
	HSI_RD_WEIGHT_MAP, Hsi_contact2fits [1], Hsi_contact2fits [2]
	NEW_EFFECTIVE_AREAS_CODE, NEW_FIG4_INPUTS, PLOT_HESSI_FILTERS, READ_GDFILE_GD
	READ_HESSI_DAT, hessi_setup_info
 COMMON BLOCKS:
	HESSI_DATA_PATH_COMMON

 SIDE EFFECTS:
	none

 RESTRICTIONS:
	none

 PROCEDURE:
	Major re-write Aug 30, 2005 to form path for searching for data files
	from current directory, HSI_DATA_ARCHIVE (if it's visible and
	HSI_ARCHIVE_MOUNTED isn't true), and HSI_DATA_USER.

	Previously constructed path from the current directory followed by
	'HSI_DATA_ARCHIVE', 'HSI_DATA_USER', 'SSW_HESSI', 'SSWDB_HESSI','HESSI_DBASE',$
	HSI_USER_DATA','SPEX_USER_DATA', 'HSI_DOC'  as well as all env. variables
	in $SSW/hessi/setup/setup.hessi_env

	The current directory leads, next the expanded directories above

	Note that the path (except for the current directory) is saved in common
	hessi_data_path_common once it's determined, so if you change an environment variable
	or something, you should call hessi_data_paths with /reset to reacquire the path.

 MODIFICATION HISTORY:
	Version 1, richard.schwartz@gsfc.nasa.gov, 9-aug-1998.
	Version 2, richard.schwartz@gsfc.nasa.gov, 17-aug-2000.
		Give the routine a memory
	Version 3, richard schwartz, 16-oct-2000. add curdir only on return.
	Version 4, richard.schwartz@gsfc, 26-mar-2001, big revision, idl directories excluded.
   Version 5, kim.tolbert@gsfc, 30-Apr-2001.  Added reset keyword.
	Version 6, ras, 7-mar-2002, allow ':\' as last two characters, before the '\' would
	have been stripped.
   Version 7, Kim, 12-apr-2002, added hsi_data_user to the path, preserve order of
     searching (to be same as order of known_db below), and eliminate duplicates in path
   23-Sep_2002, Kim.  Changed URL for hessi faq
   29-Jan-03 Kim Prepended $ to SSW_HESSI in concat_dir call
   Aug-2005 Kim,  Major changes described above to reduce path.  Also removed check for
     release stuff, since there's no 'release' anymore.
   15-Sep-2005, Kim.  Added some checks for when all_top_dir is empty (could happen when
     hsi_data_user not defined and mounted is true), and when none of all_top_dir dirs exist.


HESSI_DATA_PATHS [2] $SSW/hessi/offline/hessi_data_paths_old.pro
[Previous] [Next]
 PROJECT:
	HESSI
 NAME: 
	HESSI_DATA_PATHS	

 PURPOSE:
	This function returns all the directories needed for a HESSI data path.

 CATEGORY:
	HESSI, FILE LOCATION, SYSTEM

 CALLING SEQUENCE:
	paths = hessi_data_paths() ;returned as an array of strings.
	paths = hessi_data_paths(/path_format) ;returned as path string (':' delimited for Unix).
	
 CALLS:
	ARR2STR [1], Arr2Str [2], CHKLOG [1], CHKLOG [2], FIND_ALL_DIR [1]
	FIND_ALL_DIR [2], FIND_ALL_DIR [3], OS_FAMILY, PATH_DIR
 INPUTS:
       none explicit, only through commons;

 OPTIONAL KEYWORD INPUTS:
	PATH_FORMAT - search path returned as a single path string.

 OUTPUTS:
       none explicit, only through commons;

 OPTIONAL OUTPUTS:
	none

 KEYWORDS:
	none
 CALLED BY:
	Data reader with caching, GET_GDFILE, GE_WINDOW [1], HESSI_ATTENUATOR_SPECTRA
	HESSI_FIGURE4_INPUTS [2], HESSI_FLARE_SPECTRUM, HESSI_MODEL_COUNTS
	HESSI_READ_SPEC, HESSI_SHUTTERS, HSI_DIAGNOSTICS, HSI_LOC_FILE
	HSI_RD_WEIGHT_MAP, Hsi_contact2fits [1], Hsi_contact2fits [2]
	NEW_EFFECTIVE_AREAS_CODE, NEW_FIG4_INPUTS, PLOT_HESSI_FILTERS, READ_GDFILE_GD
	READ_HESSI_DAT, hessi_setup_info
 COMMON BLOCKS:
	HESSI_DATA_PATH_COMMON	

 SIDE EFFECTS:
	none

 RESTRICTIONS:
	none

 PROCEDURE:
	All instances of files with hessi in the sware path, SSWDB_HESSI, and the current directory are included in the search path.
	The current directory leads, next expanded SSWDB_HESSI, followed by the software directories in the path containing HESSI.


 MODIFICATION HISTORY:
	Version 1, richard.schwartz@gsfc.nasa.gov, 9-aug-1998.
	Version 2, richard.schwartz@gsfc.nasa.gov, 17-aug-2000.
		Give the routine a memory


HESSI_DEV $SSW/hessi/idl/util/hessi_dev.pro
[Previous] [Next]
 PROJECT:
	HESSI
 NAME: 
	HESSI_DEV

 PURPOSE:
	This procedure loads the development area of the HESSI tree and removes the current
	release from the path.  It also resets SSWDB_HESSI.

 CATEGORY:
	HESSI

 CALLING SEQUENCE:
	HESSI_DEV

 CALLS: ***
	CHKLOG [1], CHKLOG [2], CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3]
	REMOVE_PATH, concat_dir [4], set_logenv [1], set_logenv [2]
 INPUTS:
       none explicit, only through commons;

 OPTIONAL INPUTS:
	none

 OUTPUTS:
       none explicit, only through commons;

 OPTIONAL OUTPUTS:
	none

 KEYWORDS:
	none
 COMMON BLOCKS:
	none

 SIDE EFFECTS:
	The IDL path and SSWDB_HESSI are modified.

 RESTRICTIONS:
	none

 PROCEDURE:
	none

 MODIFICATION HISTORY:
	Version 1, richard.schwartz@gsfc.nasa.gov, 6-Nov-1998.


hessi_display_diag $SSW/hessi/idl/spectra/hessi_display_diag.pro
[Previous] [Next]
 PROJECT: HESSI
 NAME:   hessi_display_diag


 PURPOSE:  Display a HESSI diagonal response, including zoomed views,
           logarithmic compression, /keV or /chan viewing.

 CATEGORY: HESSI spectral analysis

 CALLING SEQUENCE:

        hessi_display_diag, srm, ct_edges, logstretch=logstretch,
          per_chan=per_chan, per_keV=per_keV,$
          zoomxrange=zoomxrange

 INPUTS:


     srm    Detector response vector (efficiency) per input photon/cm2 
            in cnts/cm2/keV; dimensions should match ct_edges.

     ct_edges       If a single number, refers to a particular standard
                     binning (these TBD).  If a string, will be taken
                     to refer to an input file. Otherwise will be a
                     (N+1) vector containing boundaries for
                     N channels of the counts side of the
                     matrices (in that order).

 OPTIONAL INPUTS (KEYWORDS):
  
     logstretch     Display the logarithm; the scale runs from the
                    highest pixel to its value divided by the value
                    of 10^logstretch (i.e. this is a dynamic range
                    in decades).

     per_chan    Convert to ct/ph/chan if in ct/ph/keV
                    (as returned by hessi_build_srm)

     per_keV     Convert to ct/ph/keV if in ct/ph/chan
                    (as the submatrices used in hessi_build_srm)

     zoomxrange   Look only at the vector between
                  zoomxrange[0] and zoomxrange[1] (keV)

 CALLS: ***
	FCHECK, edge_products, hsi_rd_ct_edges
 CALLED BY:
	hessi_build_srm
 MODIFICATION HISTORY: 

 DMSmith 2-May-2001   VERSION 0.0


hessi_display_srm $SSW/hessi/idl/spectra/hessi_display_srm.pro
[Previous] [Next]
 PROJECT: HESSI
 NAME:   hessi_display_srm


 PURPOSE:  Display a HESSI response matrix, including zoomed views,
           logarithmic compression, /keV or /chan viewing.

 CATEGORY: HESSI spectral analysis

 CALLING SEQUENCE:

        hessi_display_srm, srm, ph_edges, ct_edges, logstretch=logstretch,
          max_color_val=max_color_val, per_chan=per_chan, per_keV=per_keV,$
          zoomxrange=zoomxrange, zoomyrange=zoomyrange

 INPUTS:


     srm    Detector response matrices per input photon/cm2 in cnts/cm2/keV;
            dimensions should match ct_edges and ph_edges.

     ct_edges       If a single number, refers to a particular standard
                     binning (these TBD).  If a string, will be taken
                     to refer to an input file. Otherwise will be a
                     (N+1) vector containing boundaries for
                     N channels of the counts side of the
                     matrices (in that order).

     ph_edges       If a single number, refers to a particular standard
                     binning (these TBD).  If a string, will be taken
                     to refer to an input file. Otherwise will be a
                     (N+1) vector containing boundaries for
                     N channels of the counts side of the
                     matrices (in that order).

 OPTIONAL INPUTS (KEYWORDS):
  
     logstretch     Display the logarithm; the scale runs from the
                    highest pixel to its value divided by the value
                    of 10^logstretch (i.e. this is a dynamic range
                    in decades).

     max_color_val  Set the top of the color scale to this value
                    (useful for absolute comparisons).  Value 0. to 1.
                    If logstretch is called, enter the true value,
                    not its log.

     per_chan    Convert to ct/ph/chan if in ct/ph/keV
                    (as returned by hessi_build_srm)

     per_keV     Convert to ct/ph/keV if in ct/ph/chan
                    (as the submatrices used in hessi_build_srm)

     zoomxrange,   Look only at the submatrix between
     zoomyrange    zoomxrange[0] and zoomxrange[1] (photons) and
                   zoomyrange[0] and zoomyrange[1] (counts) (all in keV)

 CALLS: ***
	FCHECK, edge_products, hsi_rd_ct_edges, hsi_rd_ph_edges
 CALLED BY:
	hessi_build_srm
 MODIFICATION HISTORY: 

 DMSmith 7-Dec-1998   VERSION 0.0
 DMSmith 24-Dec-2001  Fixed color scaling for logarithmic display


hessi_doc_template $SSW/hessi/doc/hessi_doc_template.pro
[Previous] [Next]
 PROJECT:
	HESSI
 NAME: 


 PURPOSE:


 CATEGORY:


 CALLING SEQUENCE:


 CALLS:
	none
 INPUTS:
       none explicit, only through commons;

 OPTIONAL INPUTS:
	none

 OUTPUTS:
       none explicit, only through commons;

 OPTIONAL OUTPUTS:
	none

 KEYWORDS:
	none
 COMMON BLOCKS:
	none

 SIDE EFFECTS:
	none

 RESTRICTIONS:
	none

 PROCEDURE:
	none

 MODIFICATION HISTORY:
	Version 1, richard.schwartz@gsfc.nasa.gov


hessi_drm_4image $SSW/hessi/idl/spectra/hessi_drm_4image.pro
[Previous] [Next]
 PROJECT: 
       HESSI
 NAME:   
       hessi_drm_4image

 PURPOSE:  
       Provide diagonal detector response vector for HESSI imaging

 CATEGORY: 
       HESSI imaging

 CALLING SEQUENCE:
       hessi_drm_4image, drm, energy_edges, det_id, atten_state, $
          offax_position=offax_position, powerlaws=powerlaws, $
          use_segco=use_segco, subdivide_level=subdivide_level

 CALLS: ***
	FCHECK, HESSI_ID2INDEX, hessi_build_srm
 INPUTS:
       energy_edges    A (N+1) vector of the edges of N energy channels
       det_id          Standard string format: 1f, 1r, 1t -> 9f, 9r, 9t
       atten_state     Attenuator state, 0-3

 OPTIONAL INPUTS:
   offax_position  If not called or <=0, assume a (solar) source 15' from
                     the z axis. If a single number > 0, use as a single
                     radius angle (degrees) and azimuth average.  Otherwise
                     two tags with azimuth and radius angles (degrees from
                     spacecraft z). Just passed on to hessi_build_srm.

   powerlaws       Either a single powerlaw index, or else an array
                     of indices, one for each channel.  If set, instead of
                     assuming the solar spectrum is flat over each energy
                     bin, it is assumed to be distributed as a powerlaw with
                     the given index (a positive value is a falling spectrum).
                     The response is calculated for a number of "subchannels"
                     determined by the index and the value of "subdivide_level",
                     and these "subresponses" are weighted according to the
                     input power-law spectrum and summed (in hessi_build_srm).

   subdivide_level Determines how finely a channel is subdivided when calculating
                   the response using a powerlaw assumption for the input.  This
                   is the maximum acceptable ratio for the values of the powerlaw
                   at the bottom and top of a "subchannel".  Defaults to 1.2 in
                   hsi_subdivide_bins.

   use_segco       Use F/R coincident events; defaults to 0

 OUTPUTS:
       drm         A vector of N efficiencies (0. to 1.) corresponding to
                   the N energy channels input

 OPTIONAL OUTPUTS:
       none

 OPTIONAL KEYWORD OUTPUTS:
	none
       
 CALLED BY:
	HESSI CALIBRATED EVENTLIST CLASS DEFINITION [3], HSI_COUNTS_PER_MODEL
	HSI_CSPECTRUM_DIST, HSI_FLARE_LIST_ATTENXC, HSI_MAP_EVALUATOR [1]
	HSI_SPEC2CDIST
 COMMON BLOCKS:
       none

 SIDE EFFECTS:
       none

 RESTRICTIONS:
       Prints explanatory error and returns drm=[-1] if one of the
       inputs (mandatory or optional) is invalid

 PROCEDURE:
       For a single powerlaw index or no index, hessi_build_srm is
       called once with grid and scattering submatrices disabled.
       For an array of powerlaw indices, hessi_build_srm is called
       once for each bin.

 MODIFICATION HISTORY:
       Version 1, dsmith@ssl.berkeley.edu, Sept 3 1998
       12-7-98: Modified to match hessi_build_srm.pro v1.0  -dsmith
       5-2-01 DMS: add use_segco as optional input; default 0.
       3-14-02 DMS: hessi_build_srm no longer returns diagonal
            elements /keV, so the code multiplying them by the bin
            width has been excised.


HESSI_FIGURE4_INPUTS [1] $SSW/hessi/idl/sims/figure4_inputs.pro
[Previous] [Next]
 PROJECT:
	HESSI
 NAME: 
	HESSI_FIGURE4_INPUTS

 PURPOSE:
	This procedure generates simulated count rate spectra for the HESSI proposal.

 CATEGORY:
	SIMULATIONS

 CALLING SEQUENCE:
	hessi_figure4_inputs, e_si, si_counts, therm_fluence, edg2b, ph, cfront, crear, ctotal

 CALLS:
	HESSI_READ_SPC, READ_SEQFILE
 INPUTS:
       none explicit, only through commons;

 OPTIONAL INPUTS:
	none

 OUTPUTS:
       none explicit, only through commons;

 OPTIONAL OUTPUTS:
	none

 KEYWORDS:
	none
 COMMON BLOCKS:
	none

 SIDE EFFECTS:
	none

 RESTRICTIONS:
	This procedure hasn't been checked after installation under SSW.

 PROCEDURE:
	none

 MODIFICATION HISTORY:
	Version 1, richard.schwartz@gsfc.nasa.gov, 11-aug-1998.


HESSI_FIGURE4_INPUTS [2] $SSW/hessi/idl/sims/hessi_figure4_inputs.pro
[Previous] [Next]
 PROJECT:
	HESSI
 NAME: 
	HESSI_FIGURE4_INPUTS

 PURPOSE:
	This procedure generates simulated count rate spectra for the HESSI proposal.

 CATEGORY:
	SIMULATIONS

 CALLING SEQUENCE:
	hessi_figure4_inputs, e_si, si_counts, therm_fluence, edg2b, ph, cfront, crear, ctotal

 CALLS: ***
	HESSI_DATA_PATHS [1], HESSI_DATA_PATHS [2], HESSI_READ_SPC, INTERPOL
	LOC_FILE [1], LOC_FILE [2], LOC_FILE [3], READ_HESSI_FLUXES, READ_SEQFILE, xsec
 INPUTS:
       none explicit, only through commons;

 OPTIONAL INPUTS:
	none

 OUTPUTS:
       none explicit, only through commons;

 OPTIONAL OUTPUTS:
	none

 KEYWORDS:
	none
 COMMON BLOCKS:
	none

 SIDE EFFECTS:
	none

 RESTRICTIONS:
	This procedure hasn't been checked after installation under SSW.

 PROCEDURE:
	none

 MODIFICATION HISTORY:
	Version 1, richard.schwartz@gsfc.nasa.gov, 11-aug-1998.


HESSI_FILTERS $SSW/hessi/idl/spectra/hessi_filters.pro
[Previous] [Next]
 Project     : HESSI

 Name        : HESSI_FILTERS

 Purpose     : This function returns the attenuation vs energy for the HESSI window models
		for the al, be windows, Mylar blankets, and Kapton end pieces.

 Category    : HESSI, SPECTRA, SIMULATIONS

 Explanation : FILTER_ATTEN called to compute the attenuation for the specific windows.
		This procedure reads and interprets a text file with the specific
		details of the window.

 Use         : Result = HESSI_FILTERS( E, Alum, Be )
		Result is the attenuation which ranges from 0.0 to 1.0.

		19-feb-2001 - General useage of HESSI_FILTERS - the only way it should be called by anyone
			other than Richard Schwartz

			filter_trans = hessi_filters( E, THICK=thick, THIN=thin, DET_INDEX=det_index )

 Inputs      :
       e    - energy in keV
       alum - aluminum thickness in cm.
       be   - beryllium thickness in cm.

 Opt. Inputs : None

 Outputs     : Returns the fractional transmission through the specified filter.

 Opt. Outputs: None

 Keywords Inputs:
	MIKECHOI- Default is -1, see OTHER_FILTERS.PRO for meaning.
       PANKOW - If set, then use Pankow MLI design of 22-0ct-1997 quoted
       by Paul Turin: Dave Pankow tells me he thinks
       the plan is more like 5 layers on the grids and 10 in the cryostat of 1/2
       mil mylar, only used with the multilayer keyword.
	WINDOW - Structure describing attenuating filters from routines,
	hessi_window.pro, new_windows.pro, or hessi_shutters.pro
	Arguments, al and be are not used in this case.
	N.B. HESSI_SHUTTERS is the currently supported routine, richard schwartz, 10-jan-1998.
	SHUTTERS - Automatically sets window to one of four HESSI_SHUTTERS outputs,
	controlled by the following keywords:
		THINSHUTTER- Add thinner shutter to xray path.
		THICKSHUTTER- Add thickest shutter to xray path. /THICK AND /THIN may be used together.
		Not setting THICK or THIN returns the least absorbing path.
		MODIFYSHUTTER- Calls IDL editor to edit file describing shutters.
		MAXLAYERS - Uses maximum number of layers in range given for multilayers.
		MAXTHICKNESS - Uses maximum thickness of elements for multilayer and Kapton caps.
	SHUTTER_FILE - File containing material specifications to be used with /SHUTTERS setting.
		Default file name (29-jun-1999) is hessi_shutters.txt_gmcm2new
	NOCRYOSTAT
	NOBLANKET

 Calls       : ***
	CHECKVAR [1], COEFDATA, DATATYPE [1], DATATYPE [2], DATATYPE [3], EXIST, FCHECK
	FILTER_ATTEN, HESSI_SHUTTERS, HESSI_WINDOW, HSI_BLANKET_ATTEN
	HSI_CRYOSTAT_ATTEN, HSI_LOC_FILE, checkvar [2], hsi_shutter_transmission
	uniqo [1], uniqo [2]
 CALLED BY:
	COMPARE_SHUTTERS, GE_WINDOW [1], HESSI_FLARE_SPECTRUM, HESSI_MODEL_COUNTS
	HSI_BLANKET_ATTEN, HSI_CRYOSTAT_ATTEN, NEW_EFFECTIVE_AREAS_CODE
	PLOT_HESSI_FILTERS, hsi_rm_atten
 Common      : FILTER_ATTEN

 Restrictions:

 Side effects: None.

 Prev. Hist  : Was HESI_FIL.

 Modified    : Version 1, RAS, 1-May-1997
		Version 2, RAS, 30-May-1997, use FILTER_ATTEN
		Version 3, RAS, 3-jun-1997, more sophisticated window design
       	Version 4, richard.schwartz@gsfc.nasa.gov, 22-oct-1997, added pankow keyword
		Version 5, richard.schwartz@gsfc.nasa.gov, 6-jan-1998, disable mikechoi keyword
		when Pankow is set by setting it to -2.
               Version 6, richard.schwartz@gsfc.nasa.gov, 10-jan-1998, integrate HESSI_SHUTTERS().
		Version 7, richard.schwartz@gsfc.nasa.gov, 25-jun-1998, allow use of gmcm2 (gm/cm2) for
		units.
		Version 8, richard.schwartz@gsfc.nasa.gov, 6-Aug-1998, renamed HESI_FIL to HESSI_FILTERS
		Version 9, richard.schwartz@gsfc.nasa.gov, 29-jun-1999, added SHUTTER_FILE keyword.
		Version 10, richard.schwartz@gsfc.nasa.gov, 19-feb-2001, added and enable DET_INDEX
		18-apr-2001, richard.schwartz@gsfc.nasa.gov, separate CRYOSTAT and BLANKET
		attenuation at user discretion. Change shutter file names.

		20-jun-2001 - Modified to use hsi_shutter_transmission.pro  by default


hessi_fits2drm [1] $SSW/hessi/idl/spectra/hessi_fits2drm.pro
[Previous] [Next]

 NAME:
 hessi_fits2drm

 PURPOSE:
   Read a HESSI response matrix from a FITS file and return information of
   interest to Spex.


 CATEGORY:
       SPECTRAL FITTING, SPEX - HESSI

 CALLING SEQUENCE:

 CALLS: ***
	FXPAR [1], FXPAR [2], fits2rm, st2num
 INPUTS:

 OUTPUTS:

 INPUT KEYWORDS:
   FILE - name of FITS file to read.
   SFILE - not used.  Included for Spex comptability.

 OUTPUT KEYWORDS:
   EDGES_OUT - 2 x n_pha_bins array of detector channel energy bins
   EDGES_IN - 2 x n_input_bins array of input energy bins
   AREA - detector area
   DRM - response matrix

 CALLED BY:
	rd_hessi_drm_4_spex [1], rd_hessi_drm_4_spex [2]
 PROCEDURE:

 Written 25-May-2001 Paul Bilodeau, RITSS/NASA-GSFC
 25-jan-2002, ras, ensure area is scalar


HESSI_FLARE_SPECTRUM $SSW/hessi/idl/sims/hessi_flare_spectrum.pro
[Previous] [Next]
 PROJECT:
	HESSI
 NAME: 
	HESSI_FLARE_SPECTRUM	

 PURPOSE:
	This procedure takes a set of power-law and thermal parameters or the descriptive
	flare model string and shutter design and returns the HESSI count rate spectrum.

 CATEGORY:
	HESSI, SIMS

 CALLING SEQUENCE:
	count_spectrum = hessi_flare_spectrum( model_arg, shutter, eout )

 CALLS: ***
	CHECKVAR [1], DATATYPE [1], DATATYPE [2], DATATYPE [3], FLARE_XRAY_MODEL
	HESSI_DATA_PATHS [1], HESSI_DATA_PATHS [2], HESSI_FILTERS, INTERPOL
	LOC_FILE [1], LOC_FILE [2], LOC_FILE [3], USE_VLTH, Vlth, checkvar [2]
	edge_products, hessi_grid_trans, restgen [1], restgen [2]
 INPUTS:
       Model_arg - parameters for double thermal  + 
				  power-law [with low energy cutoff], 6 [or 8] x number_intervals.
		or a string used as an argument by FLARE_MODEL, 
       	limited to the tags of
		flare_types = { active: active_region, micro: micro_flare,plmicro: plmicro_flare, thmicro: thmicro_flare,$
		c:c_flare, m:m_flare, x:x_flare, y:y_flare, mini:mini, june7a: june7, june7b: june7, june7c: june7, $
		june7d: june7, june7e: june7, june7f: june7, june7g: june7}
	Shutter   - filter window structure created by hessi_shutters and used by hessi_filters().	

 OPTIONAL INPUTS:
	none

 OUTPUTS:
       Eout - 2xN PHA channel edges in keV.

 OPTIONAL OUTPUTS:
	none

 KEYWORD INPUTS:
	MODEL - a string giving the function name.  only valid for direct parameter array
	input into Model_arg.  The default is 'f_vth_bpow'.

 KEYWORD OUTPUTS:
	
 COMMON BLOCKS:
	hessi_flare_spectrum

 SIDE EFFECTS:
	none

 RESTRICTIONS:
	This routine is not currently used for this purpose.  Use hessi_model_counts.
	Simulation Resp matrix file, hessi_resp.genx, must reside within SSWDB_HESSI.

 PROCEDURE:
	

 MODIFICATION HISTORY:
	
	Version 1, richard.schwartz@gsfc.nasa.gov, 6-aug-1998 based on prelim version flare_spectrum.pro


hessi_grid_trans $SSW/hessi/idl/spectra/hessi_grid_trans.pro
[Previous] [Next]
 PROJECT:
	HESSI
 NAME: 
	hessi_grid_trans


 PURPOSE: 
	This procedure returns the integrated transmission of the twelve hessi grids as a function
	of energy from 1 keV to 100 MeV


 CATEGORY: 
	hessi analysis, SIMS, SPECTRA


 CALLING SEQUENCE:
	hessi_grid_trans, evec, trans, dcm=dcm, zgrids=zgrids 

 CALLED BY:


 CALLS: ***
	AVG [1], AVG [2], CHECKVAR [1], CHKLOG [1], CHKLOG [2], FIND_ALL_DIR [1]
	FIND_ALL_DIR [2], FIND_ALL_DIR [3], GET_GDFILE, INTERPOL, LOC_FILE [1]
	LOC_FILE [2], LOC_FILE [3], PATH_DIR, READ_GDFILE_GD, Read_mat_xcom, UNIQ [1]
	UNIQ [2], UNIQ [3], checkvar [2], curdir [1], curdir [2]
 INPUTS:
       none explicit, only through data file in SSWDB_HESSI/gd_12_c.dat

 OPTIONAL INPUTS:
	none

 OUTPUTS:
       evec - energy on which integral transmission is defined
	trans- average grid transmission, number energies x 12 grids

 OPTIONAL KEYWORD INPUTS:
	MAX_NGRIDS - limit the number of grids to this number, >1.
 OPTIONAL KEYWORD OUTPUTS:
	dcm -12 grid thicknesses in cm
	zgrids - z of each grid pair
 CALLED BY:
	HESSI_FLARE_SPECTRUM, HESSI_MODEL_COUNTS, NEW_EFFECTIVE_AREAS_CODE
 COMMON BLOCKS:
	none

 SIDE EFFECTS:
	none

 RESTRICTIONS:
	none

 PROCEDURE:
	The material x-ray attenuation factors are read and interpolated for the grid thicknesses to
	compute the transmission factors.

 MODIFICATION HISTORY:
	ras, 24 may 1995
	Version 2, 26-May-1997, revised grid input and cross-section reads.
	Version 3, 29-Dec-1997, revised search path.
	Version 4, 5-jan-1997, added max ngrid keyword, richard.schwartz@gsfc.nasa.gov
	Version 5, 6-aug-1998, changed to HESSI_GRID_TRANS from HESI_GRID_TRANS.


hessi_grm $SSW/hessi/idl/image/hessi_grm.pro
[Previous] [Next]
 NAME:
 hessi_grm

 PURPOSE:
 Calculates the probability that a photon, which is incident on the top grid will
     pass through both grids and, assuming no other attenuation, will be incident on the
   detector.

 CATEGORY:

 CALLING SEQUENCE:
 hessi_grm, energy_edges, det_index, grm, atten_state, offset_radius
   [, offset_azimuth]  [,POWER_LAW=power_law] [,SRT_FILENAME=srt_filename]

 INPUTS:
 energy_edges   = vector of N (monotonically increasing) energies [keV] representing the lower and
							upper edges of N-1 energy bands.
   det_index    = scalar, detector index: 0,,17 correspond to 1t,2t,,,9t,1r,2r,,,
 atten_state    = scalar, 0,1,2,3 ==> none, thin, thick, both attenuators in.
 offset_radius  = scalar or M-element vector containing a set of radial offsets [degrees] of
							center of the image relative to the imaging axis.
 offset_azimuth = optional M-element vector containing the corresponding set of azimuth angles [degrees] of the
           				center of the image relative to the optical axis. (ref HESSI Imaging Geometry diagram)
           			Increases from 0 as image center location moves counterclockwise from 'Optical' X axis.
                       For example, if roll angle = 0 and is increasing with time, and the nominal
                           grid orientation is 22.5 degrees, the azimuth is 180-22.5 = 157.5 deg
                           and increasing.
           			If offset_azimuth is omitted (eg as in a spectroscopy application), the returned transmission
             				is a rotationally-averaged value and modulation amplitudes and phases are not calculated.

 OPTIONAL (KEYWORD) INPUT PARAMETERS:
 power_law    = vector of N-1 power law indices, E^-(power_law), corresponding to the N-1 energy bands.
             			Default is power_law=4
 srt_filename = name of file containing subcollimator response table created by hessi_grm_calc.
             				Default is latest version of HSI_GRID/SRT_2*.dat

 OUTPUT:
 grm = structure containing:
       gridtran = 2-D array of N-1 by M values of the grid transmission probabilities
       modampl  = 3-D array of N-1 by M by hmax values of relative modulation
       modphz   = 3-D array of N-1 by M by hmax values of modulation phases [radians]

 Conventions:  Initially, hmax = 3
         Consider a source that is offset by an angle, A, orthogonal to grids with angular
           pitch, angpitch.  Then gridtran, modampl and modphz can be defined in terms of
           the following formulae:

         For a diffuse source (diameter>>angpitch) the transmission probability is given by:

   Probability(A) = gridtran

         For a point source (diameter<<angpitch) the transmission probability is given by:

   Probability(A) = gridtran*{1 + SUM(h=1,,hmax) [modampl(h)*cos(2pi*h*(A-modphz(h))/angpitch)]}

 CALLS: ***
	HSI_LOC_FILE, INTERPOL, INT_TABULATED_PIECEWISE, UNIQ [1], UNIQ [2], UNIQ [3]
	hsi_grid_detector_overlap, hsi_rd_subcoll_response_table
 CALLED BY:
	HESSI CALIBRATED EVENTLIST CLASS DEFINITION [3], HSI_MODULATE_POINT_SOURCE
	HSI_SCORE_BPROJ, hsi_rm_gridmod
 COMMON BLOCKS:
 SIDE EFFECTS:

 RESTRICTIONS:
 Optional input parameters atten_state is ignored.
 Very limited provision for errors in input parameters.
 Maximum allowable offset_radius of source from imager axis is ~0.9 degrees.
 All elements of the input energy vector must be within the range of energies in the
   subcollimator response table database.
 If insufficient harmonics are summed, there is a possibility, especially at large offsets, that the resulting
   probability will be perceived to be negative at some positions.
 Correction for grid-detector overlap is ok only for solar-class ( <0.5deg) offsets.

 MODIFICATION HISTORY:
   18-Sep-98     Initial version written by Gordon Hurford for use with Release 0.
   12-Dec-98 gh  Corrected bug which overestimated modampl by a factor of gridtran
   13-Jan-00 gh  Added direct calculation of effective slit/pitch ratio as a function
           			of offaxis source position.
   17-Feb-00 gh  Revised vectorization.  det_index is now a scalar; offset_azimuth is now vectorized.
   19-Feb-00 ras Did a little cleanup.  Made hsi_grid_parameters() source of pitch and orientation and
                     other nominal grid paramters.
   24-Jul-00 gh  Major rewrite to use subcollimator response table as input.
         		  Output now includes energy-dependence and power-law weighting.
        				offset_azimuth input is now optional such that its absense indicates azimuth-averaging.
         		  Added keyword parameter to specify srt_filename.
   28-Jul-00 gh  Added path search and error checking when opening srt_filename
         		  Changed default power_law index to +4 (==> E^-4 differential photon spectrum)
   31-Jul-00 gh  Adapt to binary version of input srt_file and to read data for only one subcollimator.
    2-Aug-00 gh  Added some consistency checking between input arguments and srt data.
    9-Aug-00 gh  Change default srt_filename to SRT_default.dat
    		      For backward-compatibility, allow offset_radius to be either a scalar or vector.
         		  For backward-compatibility, energy_edges = [0,0] is overridden to [3., 4.] kev.
   16-Aug-00 gh/ejs   To support IDL5.2, REFORM eliminates lead dimension of size 1 on first INTERPOLATE parameter.
    8-Mar-01 gh  Clarify definition of azimuth angle input and correct calculation of relative
                       orientation accordingly.
   14-May-01 gh  Use INT_TABULATED_PIECEWISE instead of INT_TABULATED to improve accuracy at K-edges.
   15-May-01 ras Use hsi_loc_file to replace loc_file and hessi_data_paths.
                 Set SRT default to $SSWDB_HESSI/grid_resp/srt_2*.dat
    8-Nov-01 ras Change srt default to HSI_GRID/SRT_2*.dat
	24-Dec-01 gh  Minor cleanup of comments and messages.
				  Add rear segment correction for grid-detector overlap.
	 6-May-02 gh  Replace remaining STOP calls with MESSAGE calls.
    29-Jan-03 Kim Prepended $ to HSI_GRID in hsi_loc_file call


HESSI_ID2INDEX $SSW/hessi/idl/util/hessi_id2index.pro
[Previous] [Next]
 PROJECT:
       HESSI
 NAME: 
	HESSI_ID2INDEX

 PURPOSE:
	This function returns the detector or grid index(ices) based on the input string array.

 CATEGORY:
	Utility

 CALLING SEQUENCE:
	index_array = hessi_id2index( id_array, count )

 CALLS: ***
	uniqo [1], uniqo [2], where_arr [1], where_arr [2]
 INPUTS:
       Id_array - An array of detector or grid string ids of the form, #f, #r, #t (e.g. 1f, 1r, 1t)
	letters may be lower (preferred) or upper case.

 OPTIONAL INPUTS:
       none

 OUTPUTS:
       The function returns a unique set of grid indices in the original order.  The indices range 0-8 for 
	the front segment (top grid) and 9-17 for the rear segment (bottom grid).

 OPTIONAL OUTPUTS:
       none

 OPTIONAL KEYWORD OUTPUTS:
	INPUT_INDEX - an array of indices for each output element set to the corresponding value of
	the input, id_array.
       
 CALLED BY:
	Energy_res [2], HESSI FRAMEWORK TEMPLATE CLASS [2]
	HESSI FRAMEWORK TEMPLATE CLASS [3], HSI_DRM_MOD CLASS
	HSI_DRM_MOD_CONTROL__DEFINE, SPEX_DRM__DEFINE, hessi_drm_4image
	spex_hessi_image__define
 COMMON BLOCKS:
       none

 SIDE EFFECTS:
       none

 RESTRICTIONS:
       Invalid inputs, e.g. '10f', return -1 as an array if there are no valid inputs.

 PROCEDURE:
       Where_arr is used to find the approprate indices by comparison.  Then it is bookkeeping to 
	deal with the 'Nt' format, sort, and eliminate doubles.

 MODIFICATION HISTORY:
       Version 1, richard.schwartz@gsfc.nasa.gov, Aug 27  1998


HESSI_IMAGE_TEST $SSW/hessi/idl/image/hessi_image_test.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HESSI_IMAGE_TEST

 PURPOSE: 
       

 CATEGORY:
       
 
 CALLING SEQUENCE: 
       hessi_image_test, 

 INPUTS:
       

 OPTIONAL INPUTS: 
       None.

 OUTPUTS:
       None.

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS: 
       None.

 COMMON BLOCKS:
       None.

 PROCEDURE:

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 EXAMPLES:
       

 CALLS: ***
	HESSI_IMAGE, PLOT_IMAGE
 SEE ALSO:
 HISTORY:
       Version 1, October 25, 2000, 
           A Csillaghy, csillag@ssl.berkeley.edu


HESSI_INDEX2ID $SSW/hessi/idl/util/hessi_index2id.pro
[Previous] [Next]
 PROJECT:
       HESSI
 NAME: 
	HESSI_INDEX2ID

 PURPOSE:
	This function returns the detector or grid index(ices) based on the input string array.

 CATEGORY:
	Utility

 CALLING SEQUENCE:
	index_array = hessi_index2id( index_array )

 CALLS:
	None.
 INPUTS:
       Index_array - An array of detector or grid indices between 0-26. 0-8 reference 1-9f, 9-17 1-9r, and
	18-26 1-9t. 

 OPTIONAL INPUTS:
       none

 OUTPUTS:
       The function returns a unique set of grid ids in the original order.  The values are returned as
	an array, even for a single element. 

 OPTIONAL OUTPUTS:
       none

 OPTIONAL KEYWORD OUTPUTS:
	
       
 COMMON BLOCKS:
       none

 SIDE EFFECTS:
       none

 RESTRICTIONS:
 	The input is forced between 0 and 26, no other error checking is done.      

 PROCEDURE:
       The index is used with the array of valid strings. Out of range values are forced to
	lie between 0 and 26.

 MODIFICATION HISTORY:
       Version 1, richard.schwartz@gsfc.nasa.gov, Aug 27  1998


hessi_list $SSW/hessi/idl/gen/hessi_list.pro
[Previous] [Next]
 PROJECT:  HESSI

 NAME: hessi_list

 PURPOSE: List one line description of basic routines for HESSI

 CATEGORY: HESSI general

 CALLING SEQUENCE:  hessi_list [, out=out]

 INPUTS:  None

 OUTPUTS:  None

 OPTIONAL OUTPUTS:
	out - if present, returns string array containing list instead of displaying on screen

 CALLS: ***
	text_output
 COMMON BLOCKS: None

 PROCEDURE:

 RESTRICTIONS: None

 SIDE EFFECTS: None.

 EXAMPLES:

 HISTORY:
	Kim Tolbert, 19-Sep-2000


HESSI_MODEL_COUNTS $SSW/hessi/idl/sims/hessi_model_counts.pro
[Previous] [Next]
 PROJECT: HESSI

 NAME: 
	HESSI_MODEL_COUNTS	

 PURPOSE:
	This procedure takes a set of power-law and thermal parameters, and
	returns the HESSI count rate as function of window design.

 CATEGORY:
	HESSI/SIMS

 CALLING SEQUENCE:


 CALLS: ***
	CHECKVAR [1], DATATYPE [1], DATATYPE [2], DATATYPE [3], FLARE_XRAY_MODEL
	F_2THERM_POW, F_BPOW, HESSI_DATA_PATHS [1], HESSI_DATA_PATHS [2], HESSI_FILTERS
	INTERPOL, LIMITS, LOC_FILE [1], LOC_FILE [2], LOC_FILE [3], RD_ASCII [1]
	RD_ASCII [2], USE_VLTH, Vlth, checkvar [2], edge_products, hessi_grid_trans
	restgen [1], restgen [2], wc_where [1], wc_where [2]
 INPUTS:
       All_apar - parameters for double thermal  + 
				  power-law [with low energy cutoff], 6 [or 8] x number_intervals.
		   It may also be an array of strings used as the typing argument in flare_model().
	Hessi_window   - filter window structure created by hessi_shutters and used by hesi_fil().	

 OPTIONAL INPUTS:
	none

 OUTPUTS:
       none explicit, only through commons;

 OPTIONAL OUTPUTS:
	none

 KEYWORD INPUTS:
	RESP - (Optional) HESSI front segment response matrix structure, single detector w/o grids.
       ** Structure MS_250878190005, 6 tags, length=461512:
          TYP             BYTE      Array[20]
          EOUT            FLOAT     Array[2, 286]
          EIN             FLOAT     Array[2, 200]
          DRM             FLOAT     Array[286, 200]
          TDRM            FLOAT     Array[286, 200]
          AREA            FLOAT           38.4845
       ;       
	HXRBS_IN - a structure with the hxrbs response function and defining energy vectors (photons, pha).
	NSPAN    - Span the range of functional shapes with this number of elements.
	SPECTRA  - If set, function returns APLCTS.
	The next two keywords pass through to HESSI_FILTERS().
	MAXLAYERS - Uses maximum number of layers in range given for multilayers. 
	MAXTHICKNESS - Uses maximum thickness of elements for multilayer and Kapton caps.

 KEYWORD OUTPUTS:
	BACKGROUND - A structure with text, energy (keV),  and counts_spectrum (/keV/s/detector) tags.
	HXRBS_OUT  - If HXRBS_IN is defined, a structure is returned.
	PLPAR      - Interpolated power-law parameters used.
	THERMPAR   - Interpolated thermal parameters used.
	APLCTS     - Count rate spectrum for plpar, counts/s/keV, summed over area and detectors.
	ATHERMLCTS - Count rate spectrum for thermpar, counts/s/keV, summed over area and detectors.
	FIL        - Filter attenuation on EMDGES
	EMDGES     - Photon energy centroids for fil and spectrum, from resp.ein
	
 CALLED BY:
	HESSI_ATTENUATOR_SPECTRA
 COMMON BLOCKS:
	HESSI_MODEL_COUNTS

 SIDE EFFECTS:
	none

 RESTRICTIONS:
	Simulation Resp matrix file, hessi_resp.genx, must reside within SSWDB_HESSI.
	

 PROCEDURE:
	This is a medium precision tool, useful for evaluating telemetry flow.
	It is designed to process a large set of thermal and power-law
	parameters.  It creates a grid of total counting rate as a function
	of the model shape parameter for the window design and interpolates
	on that grid to obtain the values for each time interval.

 MODIFICATION HISTORY:
	Version 1, RAS, 6-Dec-1997
	Version 2, richard.schwartz@gsfc.nasa.gov, 12-jan-1998, allow for window
	definition structures from hessi_shutters().
	Version 3, richard.schwartz@gsfc.nasa.gov, 6-apr-1998,only accepts filter models from hessi shutters.
	Version 4, richard.schwartz@gsfc.nasa.gov, 6-aug-1998, reflect changes in function names and path.


Hessi_obs_summary $SSW/hessi/idl/qlook_archive/hessi_obs_summary.pro
[Previous] [Next]
NAME:
 Hessi_obs_summary
PROJECT:
 HESSI
CATEGORY:
 Hessi catalog generation
PURPOSE:
 Obtains the Hessi Observing Summary, from a telemetry file,
 or score structure
CALLING SEQUENCE:
 Hessi_obs_summary, infile, ephemeris_file, obs_summary, $
                    interval_duration = interval_duration, $
                    a2d_index_mask = a2d_index_mask, $
                    front_energy_bins=front_energy_bins, $
                    rear_lo_energy_bins=rear_lo_energy_bins, $
                    rear_hi_energy_bins=rear_hi_energy_bins, $
                    flag_ids=flag_ids, dt_ephemeris=dt_ephemeris
INPUT:
 infile = the name of the input file, this can be a score structure too
 ephemeris_file = the file with the ephemeris data in it, things will
                  change
OUTPUT:
 Obs_summary = A structure containing the observing summary for
              one file, or score structure
    tags:
      .summary_id = a string identifying the summary,
                 max 80 characters FOR FITS output
      .n_summaries = the number of summaries that have been concatenated
                     together for this summary, = 1 for Hsi_obs_summary output
    obs_summary.info_ptr = A pointer to a structure  of type {hsi_obssumminfo}
                       containing the information for the observing summary
    *obs_summary.info-ptr tags:
      .file_id = a string identifying the input file, or output file, if
                 the summary was generated from a score, or concatenated
                 from summaries from multiple files
                 max 80 characters FOR FITS output
      .summary_start_time = the summary start time, in a string, ecs format
                            e.g., 1998/08/16 17:05:00.000
      .summary_end_time = the summary end time, in a string, ecs format
                            e.g., 1998/08/16 17:05:00.000
      .a2d_index_mask = a bytarr(27) set to 1 for each detector element
                        that is used
      .n_time_intv = the number of time intervals, for this summary
      .av_spin_period = the nominal duration, in seconds,
                            of a single time interval
      .n_ephemeris = the number of ephemeris data points, for this summary
      .dt_ephemeris = the time interval between ephemeris recordings;
      .n_front_bands= the number of energy bands for the front
                      detector count rates, hardwired to be 4
      .n_rear_lo_bands= the number of energy bands for the rear
                        detector count rates, low energies, hardwired to be 2
      .n_rear_hi_bands= the number of energy bands for the rear
                        detector count rates, high energies, hardwired to be 2
      .front_energy_edges = the energy bin edges for the front detector
                           fltarr(n_front_bands+1)
      .rear_lo_energy_edges = the energy bin edges for the rear detector
                             low energies, fltarr(n_rear_lo_bands+1)
      .rear_hi_energy_edges = the energy bin edges for the rear detector
                             high energies, fltarr(n_rear_hi_bands+1)
      .nflags = the number of data flags, to a max of 8
      .flag_ids = string identifiers for each data flag, e.g.,
                  'Attenuator State', 'SAA passage', etc.
      .variance_nbin = the number of time bins, per spin period,
                       used to obtain the variance for
                       detection of modulation.
 obs_summary.data_ptr = Pointer points to an array of structures of type
                        {hsi_obsoneintv} with the accumulated data for each
                        time interval
    *obs_summary.data_ptr tags:
      .front_rate = count rate of front detectors, summed over the detectors,
                    in n_front_bands energy bands, compressed cps,
      .rear_lo_rate = count rate of rear detectors, summed over the detectors,
                      in n_rear_lo_bands energy bands, compressed cps,
                      low energies
      .rear_hi_rate = count rate of rear detectors, summed over the detectors,
                      in n_rear_hi_bands energy bands, compressed cps,
                      high energies
      .particle_rate = count rate for particle detector, compressed cps,
      .front_mod_variance = a bytarr(9), for
                            the variance in the count rate for
                            front detector elements, scaled by the
                            poisson variance, then*10
      .flags = a bytarr(8) of data flags,
 obs_summary.data_gap_ptr = Pointer points to an array of data gaps
    *obs_summary.data_gap_ptr tags:
    a2d_index = the index of the detector element with the gap, 0 to 27
    st_time = data gap start time, string, ecs format
    en_time = data_gap end time, string, ecs format
 obs_summary.ephemeris_ptr = Pointer points to the array of
            ephemeris data of type {hsi_ephemeris}
    *obs_summary.ephemeris_ptr tags:
      .sc_latitude = Latitude of the spacecraft orbit
      .sc_longitude = Longitude of the spacecraft orbit
      .sc_height = Height of the spacecraft orbit
KEYWORDS:
 a2d_index_mask = a bytarr(27) set to 1 for each detector element
                  that is used. the default is to use all detectors
 interval_duration = Duration of an interval, the default is 4.0 seconds
 front_energy_bins = Energy bin edges, in KeV, either a vector of
                     n_bins+1, or an array of (2, n_bins), for the front
                     detectors, the default is
                     [3.0, 10.0, 20.0, 60.0, 2700.0]
                     n_bins is hardwired to be 4!
 rear_lo_energy_bins = Energy bin edges, in KeV, either a vector of
                     n_bins+1, or an array of (2, n_bins), for the rear
                     detectors, low energy, the default is
                     [3.0, 1000.0, 5000.0]
 rear_hi_energy_bins = Energy bin edges, in KeV, either a vector of
                     n_bins+1, or an array of (2, n_bins), for the rear
                     detectors, high energy, the default is
                     [5000.0, 10000.0, 20000.0]
 flag_ids= string identifiers for each data flag, e.g.,
                  'Attenuator State', 'SAA passage', etc.
                  Max 16 characters for FITS output
 verbose = if set, print lots of diagnostics
 quiet = if set, no error messages or diagnostics, overrides /verbose,
         and quiet is the default
 dt_ephemeris = the time interval between ephemeris recordings;the
                default is 20 seconds
 CALLS: ***
	Hsi_obs_summ_init, anytim [1], anytim [2], anytim [3], anytim [4], anytim [5]
	hsi_ephemeris_fill, hsi_obs_summ_fill [1], hsi_obs_summ_fill [2]
HISTORY:
 6-Oct-1998, jmm, jimm@ssl.berkeley.edu
 17-dec-1998, jmm, changed to call hsi_obs_summ_struct_def,
                   with named structures
 2-feb-1999, jmm, changed some structure tag names
 9-feb-1999, jmm, changed anonymous structure to named structure with pointers
 26-feb-1999, jmm, split ephemeris data into its own structure,
                    compress the count rate data to sqrt(countrate)
 22-mar-1999, jmm, compress the count rates to bytes using HSI_OBS_SUMM_COMPRESS
 30-mar-1999, jmm, dropped time arrays from output structures
                   variance is done for the sum of the lowest two bands for front dets
 13-apr-1999, jmm, info is now a pointer too, for concatenation purposes
 19-apr-1999, jmm, changed default fron energy edges to be consistent
                   with HSI_SCORE2FASTRATE


HESSI_PHA $SSW/hessi/idl/util/hessi_pha.pro
[Previous] [Next]
 PROJECT:
	HESSI
 NAME: 
	HESSI_PHA	

 PURPOSE:
	This provides a quick and dirty energy/pha channel relationship for the HESSI Ge detectors.

 CATEGORY:
	SPECTRA

 CALLING SEQUENCE:
	pha_energies = hessi_pha( [/front] [,/rear] [,/upper])

 CALLS: ***
	FIND_IX, edge_products
 INPUTS:
       Energy_for_channels- a vector of energies for which the channel numbers are needed.
	The channels returned contain the energies passed. If on the boundary, the upper channel
	is passed.

 OPTIONAL INPUTS:
	none

 OUTPUTS:
       This function returns the edges in keV.

 OPTIONAL OUTPUTS:
	none

 KEYWORD INPUTS:
	/FRONT - return nominal front segment calibration. This is the default setting.
	/REAR  - return nominal rear segment calibration low energy PHA.
	/UPPER - return nominal rear segment calibration for high energy PHA.
 	/TWOD  - return the 2x8192 formulation instead of the 8193 edges formulation.



 COMMON BLOCKS:
	none

 SIDE EFFECTS:
	none

 RESTRICTIONS:
	none

 PROCEDURE:
	none

 MODIFICATION HISTORY:
	Version 1, richard.schwartz@gsfc.nasa.gov, 22-sep-1998, Level 0, skeleton
	This routine falls under David Smith's dominion, but we'll put some q&d fixes 
	in to get this running under Level 0.
	Version 1.1, added energy_range input argument.
	


hessi_pileup_sim $SSW/hessi/idl/spectra/hessi_pileup_sim.pro
[Previous] [Next]
 PROJECT: HESSI
 NAME:   hessi_pileup_sim

 PURPOSE:  Simulate deadtime and pileup effects on a model spectrum.
           The spectrum should be folded through an appropriate response
           matrix before applying these effects.  This takes a smooth
           function for the energy spectrum and returns integer counts
           (with appropriate statistics) in the same energy bands.


 CATEGORY: HESSI spectral analysis

 CALLING SEQUENCE:

 hessi_pileup_sim,tottime,eedges,modelspec,perchan=perchan,$
       perkev=perkev,persec=persec,seed=seed,segment=segment,$
       outspec,pilefrac,truelive,readlive

 INPUTS:

      tottime    Total time over which the model spectrum was "accumulated".
                 Because the events are generated in 0.1-second intervals,
                 this currently must be an integer multiple of 0.1 seconds.

      eedges         boundaries of energy channels, keV

      modelspec      Input model spectrum in counts/channel
                     (per second if persec set, per keV if perkeV set)
      
 OPTIONAL INPUTS:

      perchan        Input/output in counts/channel (default)

      perkeV         Input/output in counts/keV

      persec         Input/output in counts/(keV or channel)/s

      seed           Seed for random number generator

      segment        0-17 (NOT YET USED)

 OUTPUTS:

      outspec       Output spectrum in the same units as the
                    input spectrum (/channel or /keV; /second or not)

      pilefrac      Fraction of counts in the output spectrum which are
                    piled up (two photon energies added)

      truelive      Ratio of counts in the output spectrum to counts in
                    the input spectrum

      readlive      What the HESSI livetime counter would read in this case.


 CALLS: ***
	FIND_IX, edge_products, hsi_corrected_livetime
 MODIFICATION HISTORY:

 DMS 05-Nov-01: Version 1.0
 DMS 20-Nov-01: Added second order pileup


HESSI_READ_SPEC $SSW/hessi/idl/util/hessi_read_spc.pro
[Previous] [Next]
 PROJECT:
	HESSI
 NAME: 
	HESSI_READ_SPEC	

 PURPOSE:
	This procedure extracts the data from the BERKELEY spc format files.

 CATEGORY:
	UTIL, IO

 CALLING SEQUENCE:
	hessi_read_spc, file, em, edg2, counts, em_n, edg2_n, counts_n

 CALLS:
	HESSI_DATA_PATHS [1], HESSI_DATA_PATHS [2], READ_SEQFILE, edge_products
 INPUTS:
       File- File name, hessi_data_paths() used as search path.

 OPTIONAL INPUTS:
	none

 OUTPUTS:
	EM  - Average energy (MeV) per interval.
	EDG2- Low and High energy edges in interval.
	COUNTS- Counts/ interval. 
	EM_N- Average energy (MeV) per interval with fewer high energy points.
	EDG2_N- Low and High edges.
	COUNTS_N- Counts/ interval.

 OPTIONAL OUTPUTS:
	none

 KEYWORDS:
	none
 COMMON BLOCKS:
	none

 SIDE EFFECTS:
	none

 RESTRICTIONS:
	none

 PROCEDURE:
	none

 MODIFICATION HISTORY:
	Version 1, richard.schwartz@gsfc.nasa.gov, 11-aug-1998.


HESSI_REF_TIME $SSW/hessi/idl/util/time/hessi_ref_time.pro
[Previous] [Next]
 PROJECT:
	HESSI
 NAME: 
	HESSI_REF_TIME

 PURPOSE:
	This function returns the HESSI reference time, 4 July 2000, in any ANYTIM formal.

 CATEGORY:
	Util

 CALLING SEQUENCE:
	ref_time = hessi_ref_time( /mjd )
	ref_time = hessi_ref_time( )
	ref_time = hessi_ref_time( /yohkoh ) ;returns 04-Jul-00 00:00:00.000

 CALLS: ***
	anytim [1], anytim [2], anytim [3], anytim [4], anytim [5]
 INPUTS:
       none 

 OPTIONAL KEYWORD INPUTS:
	All keywords available through ANYTIM using keyword inheritance:
		
       out_style - Output representation, specified by a string:
               INTS    - structure with [msod, ds79]
               STC     - same as INTS
               2XN     - longword array [msod,ds79] X N
               EX      - 7 element external representation (hh,mm,ss,msec,dd,mm,yy)
               UTIME   - Utime format, Real*8 seconds since 1-jan-79, DEFAULT!!!!
               SEC     - same as Utime format
               SECONDS - same as Utime format
               TAI     - standard seconds from 1-jan-1958.  Includes leap seconds unlike "SECONDS" output. 
                       NB- The TAI format cannot be used as an input to ANYTIM because it will be interpreted as
                       number of days (in seconds) from 1-jan-1979.
               ATIME   - Variable Atime format, Yohkoh
                         Yohkoh style - 'dd-mon-yy hh:mm:ss.xxx'   or
                         HXRBS pub style  - 'yy/mm/dd, hh:mm:ss.xxx'
                         depending on atime_format set by 
                         hxrbs_format or yohkoh_format
               YOHKOH  - yohkoh style string 
               HXRBS   - HXRBS Atime format /pub, 'yy/mm/dd, hh:mm:ss.xxx'
               YY/MM/DD- same as HXRBS
               MJD     - UTC-type structure
                       = The UTC date/time as a data structure with the
                         elements:

                               MJD     = The Modified Julian Day number
                               TIME    = The time of day, in milliseconds
                                         since the start of the day.

                         Both are long integers.
               UTC_INT - Same as MJD
               UTC_EXT - UTC external format, a structure
                         containing the elements, YEAR, MONTH, DAY, HOUR, MINUTE,
                         SECOND, and MILLISECOND as shortword integers.
               CCSDS   - A string variable containing the calendar date in the
                        format recommended by the Consultative Committee for
                        Space Data Systems (ISO 8601), e.g.

                               "1988-01-18T17:20:43.123Z"

               ECS     - A variation on the CCSDS format used by the EOF Core
                        System.  The "T" and "Z" separators are eliminated, and
                        slashes are used instead of dashes in the date, e.g.
                               "1988/01/18 17:20:43.123"

               VMS     - Similar to that used by the VMS operating system, this
                        format uses a three-character abbreviation for the
                        month, and rearranges the day and the year, e.g.

                               "18-JAN-1988 17:20:43.123"

               STIME   - Based on !STIME in IDL, this format is the same as the
                        second accuracy, e.g.
                        VMS format, except that the time is only given to 0.01 
                        second accuracy, e.g.

                               "18-JAN-1988 17:20:43.12"

       or by keywords
               /ints   - 
               /stc
               /_2xn
               /external
               /utime
               /seconds
               /atimes
               /yohkoh
               /hxrbs
               /yymmdd
               /mjd
               /utc_int
               /utc_ext
               /ccsds
               /ecs
               /vms
               /stime
               /TAI     

       mdy     - If set, use the MM/DD/YY order for converting the string date

       date_only - return only the calendar date portion, 
                       e.g. anytim('93/6/1, 20:00:00',/date_only,/hxrbs) ==> '93/06/01'
       time_only - return only the time of day portion
                       e.g. anytim('93/6/1, 20:00:00',/time_only,/hxrbs) ==> '20:00:00.000'
       truncate - truncate the msec portion of the time displayed in strings.

	

 OUTPUTS:
       none explicit, only through commons;

 OPTIONAL OUTPUTS:
	none

 KEYWORDS:
	none
 CALLED BY:
	HESSI SCORE STRUCTURE DEFINITION
	HESSI SIMULATION INFO STRUCTURE DEFINITION, HSI_FILL_FASTRATE_PACKET
	HSI_MK_FASTRATE_PACKET, Plot, hsi_rd_ephfile
 COMMON BLOCKS:
	none

 SIDE EFFECTS:
	none

 RESTRICTIONS:
	none

 PROCEDURE:
	ANYTIM is used with the HESSI reference date, 4 July 2000.  This does not necessarily need to coincide with the
	zero of the spacecraft clock counter.

 MODIFICATION HISTORY:
	Version 1, richard.schwartz@gsfc.nasa.gov, 17-sep-1998.
       Version 2, jimm@ssl.berkeley.edu, 09-feb-2001, changed
                  reference time to the Explorer Reference time
                  of 24-may-1968 00:00


hessi_save_settings $SSW/hessi/idl/widgets/hessi_save_settings.pro
[Previous] [Next]
 Name:  hessi_save_settings

 Purpose:  Save object and plot parameters for hessi gui so that on re-entry
   everything is set up as you last had it.  Saves in geny file.

 Calling sequence: hessi_save_settings, state

 Keyword Inputs:
   None

 Outputs: geny file

 CALLS: ***
	savegenx
 CALLED BY:
	HESSI
 History:  Written Kim, 14-Apr-2002
 Modifications:
  21-Oct-2002, Kim.  Added writing GUI obs time/flare, and colors in a file
    so be default on entering GUI, user gets time and color used in last session.
	1-Mar-2005,  Kim.  Get objects from hessi_obj_common now instead of state (uvalue of main widget).


HESSI_SCTIME_FULL__DEFINE $SSW/hessi/idl/util/hessi_sctime_full__define.pro
[Previous] [Next]
 PROJECT:
	HESSI
 NAME: 
 	HESSI_SCTIME_FULL__DEFINE

 PURPOSE:
	Structure definition.

 CATEGORY:


 CALLING SEQUENCE:


 CALLS:
	none
 INPUTS:
       none explicit, only through commons;

 OPTIONAL INPUTS:
	none

 OUTPUTS:
       none explicit, only through commons;

 OPTIONAL OUTPUTS:
	none

 KEYWORDS:
	none
 COMMON BLOCKS:
	none

 SIDE EFFECTS:
	none

 RESTRICTIONS:
	none

 PROCEDURE:
	none

 MODIFICATION HISTORY:
	15-May-2001, richard.schwartz@gsfc.nasa.gov


hessi_setup_info $SSW/hessi/idl/gen/hessi_setup_info.pro
[Previous] [Next]
 PROJECT:
	HESSI
 NAME:
	hessi_setup_info

 PURPOSE:
	Accumulates info on the current HESSI DATA setup.

 METHOD:
	Gathers the following information:
	  Development or Release Version selected
	  Current values of env. var. and whether they are the default
	  List of directories that will be searched for data files
	  Any directories that contains files named hsi_200*_*_*.fits
	  Lists the contents of the following files, if they exist:
		$SSW/hessi/setup/setup.hessi_env
		$SSW/site/setup/setup.hessi_env
		$HOME/setup.hessi_env
		setup.hessi_env
		$SSW/site/setup/idl_startup.pro
		$SSW_PERSONAL_STARTUP
		idl_startup.pro
		$SSW/site/setup/sswidl.bat
		$HOME/.login
		$HOME/.cshrc
		$IDL_STARTUP (if unix)
	Current path
	All files in data path (if /full is set)

	If /file not set, then display output on screen.  Otherwise writes
	to a file in current directory called hessi_setup_info.txt.
	This file should be mailed to a HESSI s/w developer for assistance
	with setup problems.

 CATEGORY:
	UTIL

 CALLING SEQUENCE:
	hessi_setup_info [, /full, /file]

 CALLS: ***
	CHKLOG [1], CHKLOG [2], HESSI_DATA_PATHS [1], HESSI_DATA_PATHS [2], HSI_LOC_FILE
	LOC_FILE [1], LOC_FILE [2], LOC_FILE [3], OS_FAMILY, RD_ASCII [1], RD_ASCII [2]
	hessi_var, hessi_version, prstr [1], prstr [2]
 INPUTS:
       none

 OPTIONAL KEYWORD INPUTS:
	full - if set, then include (long) list of all files in data path
   file - if set, then write output to file instead of screen (file is
      called setup_info.txt in current directory)

 OUTPUTS:
       none

 OPTIONAL OUTPUTS:
	none

 KEYWORDS:
	none
 COMMON BLOCKS:
	none

 SIDE EFFECTS:
	Creates file setup_info.txt in current directory if file keyword is set

 RESTRICTIONS:
	none

 PROCEDURE:
	none

 MODIFICATION HISTORY:
	25-Jul-2001, Kim Tolbert.  Original version, hsi_diagnostics by R. Schwartz.
   17-Oct-2002, Kim Tolbert.  Added !version information


HESSI_SHUTTERS $SSW/hessi/idl/spectra/hessi_shutters.pro
[Previous] [Next]
 PROJECT:
	HESSI
 NAME: 
	HESSI_SHUTTERS

 PURPOSE:
	This procedure returns the X-ray path materials including all windows, filters, and structures
	found in hessi_shutters.txt in the !path.

 CATEGORY:
	HESSI, Response

 CALLING SEQUENCE:
	Hessi_shutters, windows

 CALLS: ***
	CHECKVAR [1], EDITOR, FILE_EXIST [2], FORM_FILENAME [1], FORM_FILENAME [2]
	HESSI_DATA_PATHS [1], HESSI_DATA_PATHS [2], LOC_FILE [1], LOC_FILE [2]
	LOC_FILE [3], checkvar [2], curdir [1], curdir [2], file_exist [1], file_exist [3]
	prstr [1], prstr [2], rd_tfile [1], rd_tfile [2]
 INPUTS:
       none explicit, only through commons;

 OPTIONAL INPUTS:
	none

 OUTPUTS:
       none explicit, only through commons;

 OPTIONAL OUTPUTS:
	none

 KEYWORD INPUTS:
	THIN - Add thinner shutter to xray path.
	THICK - Add thickest shutter to xray path. /THICK AND /THIN may be used together.
	MODIFY - Calls IDL editor to edit file describing shutters.
	ALL  - returns a structure with all four filter combinations.
 CALLED BY:
	COMPARE_SHUTTERS, HESSI_ATTENUATOR_SPECTRA, HESSI_FILTERS
	NEW_EFFECTIVE_AREAS_CODE, PLOT_HESSI_FILTERS
 COMMON BLOCKS:
	none

 SIDE EFFECTS:
	none

 RESTRICTIONS:
	none

 PROCEDURE:
	The shutter file is found, read, and the info is placed into a structure readable
	by hessi_filters().

 MODIFICATION HISTORY:
	Version 1, richard.schwartz@gsfc.nasa.gov, 8-jan-1998.
	Version 2, richard.schwartz@gsfc.nasa.gov, 10-aug-1998.
	Version 3, richard.schwartz@gsfc.nasa.gov, 22-jun-1999. 
		Increased regions to five from four to accommodate central disk oversizing on thick disk
		central region.
	Version 3.1, richard.schwartz, 28-jun-1999.  Add flexibility to HESSI_WIN structure w/o pointers.
	18-april-2001, richard.schwartz@gsfc.nasa.gov, support files without thin or thick elements.


hessi_splash $SSW/hessi/idl/widgets/hessi_splash.pro
[Previous] [Next]
 Name: hessi_splash

 Purpose:  Put up a splash screen on initial window in hessi GUI

 Call:  hessi_splash

 Kim Tolbert, May 2000
 CALLS:
 CALLED BY
	HESSI


hessi_telem_model $SSW/hessi/idl/sims/hessi_telem_model.pro
[Previous] [Next]
PROJECT:
	HESSI
PROCEDURE:   
	HESSI_Telem_model
PURPOSE:
	Reads the Model Counts from Richard Schwartz' Model of the HESSI reponse to
	the March 1989 Flare period (March 1-28)
	Outputs plots to the screen and IDL.PS
USAGE:
	HESSI_TELEM_MODEL
INPUTS:
  Model Counts files, etc.:
   $SSW_HESSI_SIMS/hessi_telem_sim.sav
   $SSW_HESSI_SIMS/counts_cutoff.sav
KEYWORDS:
CREATED BY:	David Curtis  97-11-10

VERSION:  1.
LAST MODIFICATION:  09-11-13
VERSION: 2
	Richard.schwartz@gsfc.nasa.gov, Changed name to HESSI_Telem_model from model
	Code needs revision after installation.  Not working yet. 6-aug-1998.


hessi_var $SSW/hessi/idl/gen/hessi_var.pro
[Previous] [Next]
 PROJECT:
	HESSI
 NAME:
	hessi_var

 PURPOSE:
	Shows values of all HESSI environment variables.

 METHOD:
   On windows, any variable set through setenv is not displayed through
   pr_env (or pr_logwindows) - only those that were set through set_logenv.
   This routine should show all of the HESSI env variables because it
   reads $SSW/hessi/setup/setup.hessi_env to find all HESSI env var
   names, translates them, and displays the list.
   On unix, the output is similar to pr_env,/hessi and pr_env,/hsi

 CATEGORY:
	UTIL

 CALLING SEQUENCE:
	hessi_var [, names=names, vals=vals, out=out, /nomore]

 CALLS: ***
	CHKLOG [1], CHKLOG [2], RD_ASCII [1], RD_ASCII [2], TRIM, fix_slash, prstr [1]
	prstr [2], str2cols [1], str2cols [2], strjustify, strnocomment
 INPUTS:
       none

 OPTIONAL KEYWORD INPUTS:
	nomore - if set, does not display list on screen

 OUTPUTS:
       none

 OPTIONAL KEYWORD OUTPUTS:
	names - list of env var names
   vals - list of env var values corresponding to names
   out - text string of names and values

 CALLED BY:
	hessi_setup_info
 COMMON BLOCKS:
	none

 SIDE EFFECTS:
	None

 RESTRICTIONS:
	none

 PROCEDURE:
	none

 MODIFICATION HISTORY:
	23-July-2001, Kim Tolbert
	10-Apr-2002, Kim - modified method for parsing setup file to handle
		cases where a value is blank


hessi_version $SSW/hessi/idl/gen/hessi_version.pro
[Previous] [Next]
 PROJECT:  HESSI

 NAME: hessi_version

 PURPOSE: Switch to development or release version of HESSI software.

 CATEGORY: HESSI

 CALLING SEQUENCE:  hessi_version, /dev   or    hessi_version, /release

 INPUTS:  None

 KEYWORDS:
   (if no keywords are set, then just prints message showing current version)
   dev - if set, then switch to development version
   release - if set, then switch to release version

 OUTPUTS:  None

 Calls: ***
	ADD_PATH [1], ADD_PATH [2], FILE_EXIST [2], FILE_STAT [1], FILE_STAT [2]
	OS_FAMILY, REMOVE_PATH, STR_LASTPOS [1], file_exist [1], file_exist [3]
	file_stat [3], fix_slash, get_logenv [1], get_logenv [2], set_logenv [1]
	set_logenv [2], str_lastpos [2], which_hessi_version
 CALLED BY:
	hessi_setup_info
 COMMON BLOCKS: None

 PROCEDURE:  Looks at current definition of HESSI_PATH to get root directory
   for HESSI s/w.   Removes all hessi directories from tree, then adds dev or release
   idl directories as requested, ensuring that atest is first.  Defines HESSI_PATH
	env variable, and then runs the following setup files to reset other HESSI
	env variables based on the value of HESSI_PATH:
		$SSW/hessi/setup/setup.hessi_env
		$SSW/site/setup/setup.hessi_env
		$HOME/setup.hessi_env  (if unix)

 RESTRICTIONS: Requires that HESSI_PATH point to HESSI s/w root directory.
   Also, will not have any effect on already compiled routines.  This should only be
   run at the beginning of an IDL session before compiling any HESSI routines.

 SIDE EFFECTS: Changes !path and HESSI env variables

 EXAMPLES:

 HISTORY:
	Kim Tolbert, Nov 8, 2000
	27-Mar-2002, Kim.  Changed to use HESSI_PATH instead of SSW_HESSI.  Previously was
		not re-running the hessi setup scripts.  Now it is.  Also, previously was
		redefining SSWDB_HESSI here, but now let scripts do it.


HESSI_WINDOW $SSW/hessi/idl/spectra/hessi_window.pro
[Previous] [Next]
 Project     : SDAC
                   
 Name        : HESSI_WINDOW 
               
 Purpose     : This procedure returns the current material specifications for the
		HESSI SMEX windows over each Ge detector. 
               
 Category    : HESI
               
 Explanation : 
               
 Use         : 
    
 Inputs      : 
               
 Opt. Inputs : None
               
 Outputs     : Window - a structure with materials, fractions, and dimensions.
		Date_created - date file was created.

 Opt. Outputs: None
               
 Keywords    : 

 Calls       :
 CALLED BY:
	GE_WINDOW [1], HESSI_FILTERS, NEW_WINDOWS
 Common      : None
               
 Restrictions: 
               
 Side effects: None.
               
 Prev. Hist  :

 Modified    : Version 1, RAS, 3-jun-1997
	Version 2, RAS, 2-nov-1997, change Cu to Carbon


HSI GSE PACKET Data structure definition $SSW/hessi/offline/hsi_packet_gse__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HSI GSE PACKET Data structure definition

 PURPOSE: 
       Defines the structure of the gse-wrapped 
       source packets, as described in the document
       http://hessi.ssl.berkeley.edu/internal/documents/hsi_

 CATEGORY:
       Hessi Utilities
 
 CALLING SEQUENCE: 
       var = {hsi_packet_gse}

 INHERITANCE
       HSI_Packet_Source

 CALLS: ***
	HSI_PACKET_GSE__DEFINE
 HISTORY:
       Version 1, June 22, 1999, for Release 3
           A Csillaghy, csillag@ssl.berkeley.edu


HSI SOURCE PACKET Data structure definition [1] $SSW/hessi/idl/util/hsi_gse_data__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HSI SOURCE PACKET Data structure definition

 PURPOSE: 
       Defines the structure of the source packets, as described in
       the document
       http://hessi.ssl.berkeley.edu/internal/documents/hsi_

 CATEGORY:
       Hessi Utilities
 
 CALLING SEQUENCE: 
       var = {hsi_packet_source}

 INHERITANCE
       HSI_Packet_Header_Byte

 CALLS: ***
	HSI_GSE_DATA__DEFINE
 HISTORY:
       Version 1, May 3, 1999, for Release 2
           A Csillaghy, csillag@ssl.berkeley.edu
       Extracted from Richard Schwartz' schwartz_struct_def
           (orig. name hsi_source_packet)


HSI SOURCE PACKET Data structure definition [2] $SSW/hessi/idl/util/hsi_packet_source__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HSI SOURCE PACKET Data structure definition

 PURPOSE: 
       Defines the structure of the source packets, as described in
       the document
       http://hessi.ssl.berkeley.edu/internal/documents/hsi_sys_007e.pdf

 CATEGORY:
       Utilities (hessi/idl/util)
 
 CALLING SEQUENCE: 
       var = {hsi_packet_source}

 INHERITANCE
       HSI_Packet_Header_Byte

 CALLS: ***
	HSI_PACKET_SOURCE__DEFINE
 HISTORY:
       Version 1, May 3, 1999, for Release 2
           A Csillaghy, csillag@ssl.berkeley.edu
       Extracted from Richard Schwartz' schwartz_struct_def
           (orig. name hsi_source_packet)


HSI SOURCE PACKET Data structure definition [3] $SSW/hessi/idl/util/hsi_packet_source_word__define.pro
[Previous] [Next]
 PROJECT:
       HESSI

 NAME:
       HSI SOURCE PACKET Data structure definition

 PURPOSE: 
       Defines the structure of the source packets, as described in
       the document
       http://hessi.ssl.berkeley.edu/internal/documents/hsi_sys_007e.pdf

 CATEGORY:
       Utilities (hessi/idl/util)
 
 CALLING SEQUENCE: 
       var = {hsi_packet_source}

 INHERITANCE
       HSI_Packet_Header_Byte

 HISTORY:
       Version 1, May 3, 1999, for Release 2
           A Csillaghy, csillag@ssl.berkeley.edu
       Extracted from Richard Schwartz' schwartz_struct_def
           (orig. name hsi_source_packet)


hsi_16bit_temps $SSW/hessi/idl/qlook_archive/hsi_16bit_temps.pro
[Previous] [Next]
 For quick plotting
pro hsi_16bit_temps, time_range, ICP1T, ICP2T, ICT1T, ICT2T, ITST, time_array
First get IDPU_DUMPADR, 
When IDPU_DUMPADR is 0x24E6, the pairs of bytes starting at offset 1066
represent the temperatures in order:  ICP1T, ICP2T, ICT1T, ICT2T, ITST.
 CALLS: ***
	HSI_ANY_SOHDATA, TEMP_AB2X
 CALLED BY:
	avsig_1 [1], avsig_1 [2]
Example: for the pair of bytes A = IDPU_MEM_DUMP0 and B = IDPU_MEM_DUMP1,
x = ((65536 - A - (B << 8))/128.0)
ICP1T = -1.2657e-07*x^4 + 6.8667e-05x^3 - 0.014402x^2 - 0.61089x + 486.82


hsi_1ay_sohdata_diff $SSW/hessi/idl/qlook_archive/hsi_1ay_sohdata_diff.pro
[Previous] [Next]
 This takes various 1 day averages of temperatures, and does
 some differences, and appends to the end of the arrays that are
 passed in, data[tag1]-data[tag2], Called from do_hsi_1day_sohdata
 jmm, 3-feb-2003


HSI_1D_PATTERN $SSW/hessi/offline/hsi_1d_pattern.pro
[Previous] [Next]
 PROJECT : HESSI

 NAME :    HSI_1D_PATTERN.PRO

 PURPOSE :     Returns the modulation pattern cross section for a
               set of harmonics (e.g. 1,2,...,hmax) and grid params

 CATEGORY :    Imaging

 EXPLANATION : Returns Fourier-series representation of a HESSI
               subcollimator #Ncoll using coefficients in structure grm

 SYNTAX :      Result=hsi_1d_pattern(Ncoll, grm1 [,harmonics] [,/verb] )

 CALLED BY:
	HSI_SCORE_BPROJ
 EXAMPLE :    tri= hsi_1d_pattern(8,grm_8,1+indgen(3))
               The array tri is a triangle waveform (possibly distorted)

 INPUTS :   Ncoll = collimator number (scalar 0-8)
            grm1   = structure containing at least 7 coefficients:
              0. gridtran (scalar)
              1. modampl    hmax-element vector of amplitudes
              2. modphz     hmax-element vector of phases

            harmonics = vector of positive integers
                   May be [1,3,5] or [2,4,6], for example
                   Any 0 element will be removed
                   if it exists in the harmonics array.
            harmonics   grm.(1)     what you'll get
              [0,1]     whatever       [1]
              [1,2,3]   whatever       [1,2,3]
              [1,3,5]   [1,2,3]        [1,3]
              [2,4,6]   [1,2,3,4,5]    [2,4]
              [2,3,4]   [1,2,3]        [2,3]
              []        [1,2,3,4,5]    [1,2,3,4,5] 
                X          Y           Intersection(X,Y)

 OPT. INPUTS : harmonics need not be specified.
               Default is to use all that appear in the stucture grm
             

 KEYWORDS : 
            TBL_SIZE=tablesize can be used to increase the table size
            F1D_PIXEL_SIZE= size in arcseconds of 1d pixel. Default is 1 arcsec.
            ANGLE1D   = Vector of input angles in arcsecond for returned 1d modulation.
            Use /VERB to get explicit info on harmonics actually used
 
 CALLS: ***
	HESSI_PARAMS
 COMMON : NONE


 WARNING:  Result can have negative values if slit < pitch/2 and harmonics
           are few. This can have undesirable consequences in some
           mapping programs.  Use /positive to enforce positivity.

 HISTORY :  Version 2, Based on mk_1d_patrn.pro
                      1998/12/02 Revised to use input GH's structure grm
                      Arbitrary set of harmonics (e.g. odd only)
            Version 2.1, richard.schwartz@gsfc.nasa.gov, revised to use hsi_grid_params
            in lieu of hessi_params, added f1d_pixel_size keyword. Changed internal independent
            variable S into ANGLE1D.
 NOTES :
       Be sure pitch is in units of angle (asec?)
       default x is in asec  (1 sec per pixel), changed with f1d_pixel_size keyword
       angpitch=?  hardwired or from hsi_grid_params?  Use hsi_grid_params for now

 CONTACT :  Ed Schmahl code 682, schmahl@hesperia.gsfc.nasa.gov


hsi_1day_sohdata_diff $SSW/hessi/idl/qlook_archive/hsi_1day_sohdata_diff.pro
[Previous] [Next]
 This takes various 1 day averages of temperatures, and does
 some differences, and appends to the end of the arrays that are
 passed in, data[tag1]-data[tag2], Called from do_hsi_1day_sohdata
 jmm, 3-feb-2003


hsi_1day_sohdata_diffs $SSW/hessi/idl/qlook_archive/hsi_1day_sohdata_diffs.pro