[Previous]
[Next]
PROJECT: SDAC
NAME: OP_COM
CATEGORY: SPEX
PURPOSE:
This procedure handles operator communications with a menu,
commands, and parameters.
EXPLANATION:
Displays parameters and command options.
User responds with COMMAND or PARAMETER,VALUE
Valid commands are passed back to the calling program.
Valid parameter changes are entered into the PARAMETER structure.
Index of the changed parameter is passed back to the calling program
A list of commands may also be passed parsed with the command-list-delimiter
This list is kept in a stack and used on subsequent calls to op_com until it
is finished.
Lists full menu by default. If /NOLIST is passed, then just requests
command or parameter change, doesn't list.
Parameter structures should be created by calls to create_param.
CALLING SEQUENCE:
op_com, prm, prm_info, commands, title=title, $
prompt=prompt, command_prompt=command_prompt, com_delim=com_delim, $
families=families, nolist=nolist, input_line=input_line,
com_line=com_line, com_sel=command, com_param=com_param, $
which_par=ipar, noinputread=noinputread, error=error
INPUT ARGUMENTS:
PRM - structure with parameter values, type, etc.
(See create_param for info about prm and prm_info)
PRM_INFO- structure with information about each family of parameters
COMMANDS- list of allowed commands
KEYWORDS:
TITLE - title for menu
PROMPT - prompt string on command line. default is ":"
COMMAND_PROMPT- optional command request string
COM_DELIM - Delimiter parsing consecutive command strings, default '!!'
FAMILIES - Families of parameters to display in menu. If omitted,
all families in parameter structure are displayed.
All parameters in structure can still be modified,
regardless of which are displayed.
NOLIST - If set, parameter menu is not listed
INPUT_LINE - String passed in to be treated as though it had been entered
interactively on the command line.
COM_LINE - Command line as entered by user (with case, spaces intact)
COM_SEL - command the user selected
COM_PARAM - additional parameter modifying command
command string must be different from all parameter names
WHICH_PAR - index of the changed parameter
NOREADINPUT - set when commands are generated external to op_com as in
using SPEX as a subroutine when driven by a GUI
command is returned as an 'EXIT' when the stack is empty
ERROR - If set, then there was an error in the command process
Below is an example of a menu, and a user's input:
Change options by entering item, comma, new value. After setting options,
enter one of the available commands. Parameters and commands may be
abbreviated to shortest unambiguous abbreviation and may be strung together
by inserting !! between entries.
Matrix Response Parameters
DET_NAME GRS_X2
AREA_CM2 7.94226
NAME_FUNCTION SIGMA
Z_WINDOW 1.00000 2.00000 3.00000 4.00000
NUM_BINS 100
COMMANDS: COMPUTE LIST EXIT
Change parameters or enter a command
z_w,1.,3,4 Sets parameter z_window to 1.,3.,4.,4.
z_w,,,,8. Sets fourth value in parameter z_window array to 8.
(Notice multiple comma syntax.)
det,bat!!num,200!!z_win,1,1,1,1 Sets three parameters
NON-STANDARD PROCEDURES:
CHECKVAR
PARSE_COMLINE
LIST_OP
programmer- ras, 92/03/26
ras, 13-feb-94 include command line prompt, and blank comma syntax
ras, 16-feb-94 enable command modifiers, com_param
Major modifications 9-mar-1994 by akt. Mainly to use prm and fam_info
structures created by create_param, and perform a variety of error
checks.
ras, 12-apr-94, made compatible with version 3.0 of READ, no
prompt keyword, only as inline parameter
ras, 16 aug 1996, clear odd blanks from com_stack
Version 6, ras, 28 oct 1996, send command lines to printx with /noprint
Version 7, ras, 24-jan-1996, trap naked PRINT, HELP, and XDOC commands
and reprocess them as part of the IDL command, works if IDL command
is included in the calling programs command processor.
Version 8, richard.schwartz@gsfc.nasa.gov, allow expressions to be trapped
and have idl pasted onto them and executed, 6-oct-1997 also
trap CHKARG, SPAWN.
CALLS:
CALLED BY
SPEX_COMMONS [2], SPEX_COMMONS [4], SPEX_PROC [1], SPEX_PROC [2]
[Previous]
[Next]
PROJECT: SDAC
NAME: OP_COM
CATEGORY: SPEX
PURPOSE:
This procedure handles operator communications with a menu,
commands, and parameters.
EXPLANATION:
Displays parameters and command options.
User responds with COMMAND or PARAMETER,VALUE
Valid commands are passed back to the calling program.
Valid parameter changes are entered into the PARAMETER structure.
Index of the changed parameter is passed back to the calling program
A list of commands may also be passed parsed with the command-list-delimiter
This list is kept in a stack and used on subsequent calls to op_com until it
is finished.
Lists full menu by default. If /NOLIST is passed, then just requests
command or parameter change, doesn't list.
Parameter structures should be created by calls to create_param.
CALLING SEQUENCE:
op_com, prm, prm_info, commands, title=title, $
prompt=prompt, command_prompt=command_prompt, com_delim=com_delim, $
families=families, nolist=nolist, input_line=input_line,
com_line=com_line, com_sel=command, com_param=com_param, $
which_par=ipar, noinputread=noinputread, error=error
INPUT ARGUMENTS:
PRM - structure with parameter values, type, etc.
(See create_param for info about prm and prm_info)
PRM_INFO- structure with information about each family of parameters
COMMANDS- list of allowed commands
KEYWORDS:
TITLE - title for menu
PROMPT - prompt string on command line. default is ":"
COMMAND_PROMPT- optional command request string
COM_DELIM - Delimiter parsing consecutive command strings, default '!!'
FAMILIES - Families of parameters to display in menu. If omitted,
all families in parameter structure are displayed.
All parameters in structure can still be modified,
regardless of which are displayed.
NOLIST - If set, parameter menu is not listed
INPUT_LINE - String passed in to be treated as though it had been entered
interactively on the command line.
COM_LINE - Command line as entered by user (with case, spaces intact)
COM_SEL - command the user selected
COM_PARAM - additional parameter modifying command
command string must be different from all parameter names
WHICH_PAR - index of the changed parameter
NOREADINPUT - set when commands are generated external to op_com as in
using SPEX as a subroutine when driven by a GUI
command is returned as an 'EXIT' when the stack is empty
ERROR - If set, then there was an error in the command process
Below is an example of a menu, and a user's input:
Change options by entering item, comma, new value. After setting options,
enter one of the available commands. Parameters and commands may be
abbreviated to shortest unambiguous abbreviation and may be strung together
by inserting !! between entries.
Matrix Response Parameters
DET_NAME GRS_X2
AREA_CM2 7.94226
NAME_FUNCTION SIGMA
Z_WINDOW 1.00000 2.00000 3.00000 4.00000
NUM_BINS 100
COMMANDS: COMPUTE LIST EXIT
Change parameters or enter a command
z_w,1.,3,4 Sets parameter z_window to 1.,3.,4.,4.
z_w,,,,8. Sets fourth value in parameter z_window array to 8.
(Notice multiple comma syntax.)
det,bat!!num,200!!z_win,1,1,1,1 Sets three parameters
NON-STANDARD PROCEDURES:
CHECKVAR
PARSE_COMLINE
LIST_OP
programmer- ras, 92/03/26
ras, 13-feb-94 include command line prompt, and blank comma syntax
ras, 16-feb-94 enable command modifiers, com_param
Major modifications 9-mar-1994 by akt. Mainly to use prm and fam_info
structures created by create_param, and perform a variety of error
checks.
ras, 12-apr-94, made compatible with version 3.0 of READ, no
prompt keyword, only as inline parameter
ras, 16 aug 1996, clear odd blanks from com_stack
Version 6, ras, 28 oct 1996, send command lines to printx with /noprint
Version 7, ras, 24-jan-1996, trap naked PRINT, HELP, and XDOC commands
and reprocess them as part of the IDL command, works if IDL command
is included in the calling programs command processor.
Version 8, richard.schwartz@gsfc.nasa.gov, allow expressions to be trapped
and have idl pasted onto them and executed, 6-oct-1997 also
trap CHKARG, SPAWN.
CALLS:
CALLED BY
SPEX_COMMONS [2], SPEX_COMMONS [4], SPEX_PROC [1], SPEX_PROC [2]
[Previous]
[Next]
option_changer
generate widget to change values of options & variables in SPEX
input:
option_name - string, descriptive name of option to change in SPEX
prog_name - string, internal name of option to change in SPEX
must match one of PARAMETERS (ARRAY) in SPEX
see SETUP_PARAMS.PRO
incommon - if set then option is a
string named variable in one of SPEX_COMMONS(.PRO)
twidget - if set then use twidget
snu - if set then use snu widget
direct - variable to use outside of SPEX commons and parameter list
FIELD_YSIZE - field widget ysize
FIELD_XSIZE - field widget xsize
NAME:
PURPOSE:
CATEGORY:
CALLING SEQUENCE:
CALLED BY:
CALLS TO:
none
INPUTS:
none explicit, only through commons;
OPTIONAL INPUTS:
none
OUTPUTS:
none explicit, only through commons;
OPTIONAL OUTPUTS:
none
CALLS: ***
ARR2STR [1], Arr2Str [2], CHECKVAR [1], CW_BGROUP, CW_FIELD, DEP150_EVENT, FCHECK, SNU
SPEX_PROC [1], SPEX_PROC [2], TWIDGET, XMANAGER, anytim [1], anytim [2], anytim [3]
anytim [4], anytim [5], checkvar [2], option_toggle [1], option_toggle [2]
spex_current [1], spex_current [2]
CALLED BY:
Model_components [1], Model_components [2], ROUTINE_NAME [4], ROUTINE_NAME [7]
spec_plot [1], spec_plot [2], spec_plot [3], spec_plot [4], spex_intervals [1]
spex_intervals [2], spex_spec_plot [1], spex_spec_plot [2], spex_spec_plot [3]
spex_spec_plot [4]
COMMON BLOCKS:
none
SIDE EFFECTS:
none
RESTRICTIONS:
none
PROCEDURE:
none
MODIFICATION HISTORY:
ras, jul-94
[Previous]
[Next]
option_changer
generate widget to change values of options & variables in SPEX
input:
option_name - string, descriptive name of option to change in SPEX
prog_name - string, internal name of option to change in SPEX
must match one of PARAMETERS (ARRAY) in SPEX
see SETUP_PARAMS.PRO
incommon - if set then option is a
string named variable in one of SPEX_COMMONS(.PRO)
twidget - if set then use twidget
snu - if set then use snu widget
direct - variable to use outside of SPEX commons and parameter list
FIELD_YSIZE - field widget ysize
FIELD_XSIZE - field widget xsize
NAME:
PURPOSE:
CATEGORY:
CALLING SEQUENCE:
CALLED BY:
CALLS TO:
none
INPUTS:
none explicit, only through commons;
OPTIONAL INPUTS:
none
OUTPUTS:
none explicit, only through commons;
OPTIONAL OUTPUTS:
none
CALLS: ***
ARR2STR [1], Arr2Str [2], CHECKVAR [1], CW_BGROUP, CW_FIELD, DEP150_EVENT, FCHECK, SNU
SPEX_PROC [1], SPEX_PROC [2], TWIDGET, XMANAGER, anytim [1], anytim [2], anytim [3]
anytim [4], anytim [5], checkvar [2], option_toggle [1], option_toggle [2]
spex_current [1], spex_current [2]
CALLED BY:
Model_components [1], Model_components [2], ROUTINE_NAME [4], ROUTINE_NAME [7]
spec_plot [1], spec_plot [2], spec_plot [3], spec_plot [4], spex_intervals [1]
spex_intervals [2], spex_spec_plot [1], spex_spec_plot [2], spex_spec_plot [3]
spex_spec_plot [4]
COMMON BLOCKS:
none
SIDE EFFECTS:
none
RESTRICTIONS:
none
PROCEDURE:
none
MODIFICATION HISTORY:
ras, jul-94
[Previous]
[Next]
CALLS: ***
FCHECK, TOGGLE_EVENT, XMANAGER
CALLED BY:
option_changer [1], option_changer [2]
procedure: switches = option_toggle(switch_initial, name=name_switch, $
modal=modal)
Bring up a widget of switches to Select (1) or Unselect (0) a
set of variables
inputs:
VALUE - initial values (0 or 1) of variable(s) to change
name - a string or array of strings describing the inputs in VALUE
change_message - more instructions on the toggle values, scalar
[Previous]
[Next]
CALLS: ***
FCHECK, TOGGLE_EVENT, XMANAGER
CALLED BY:
option_changer [1], option_changer [2]
procedure: switches = option_toggle(switch_initial, name=name_switch, $
modal=modal)
Bring up a widget of switches to Select (1) or Unselect (0) a
set of variables
inputs:
VALUE - initial values (0 or 1) of variable(s) to change
name - a string or array of strings describing the inputs in VALUE
change_message - more instructions on the toggle values, scalar
[Previous]
[Next]
Name: ospex_params
Purpose: Define structure with information for all OSPEX control and info parameters
Calling Sequence: ospex_params, param_struct
CALLED BY:
ospex_params_write_pro
NOTE: THIS ROUTINE IS GENERATED AUTOMATICALLY BY OSPEX_PARAMS_WRITE_PRO. Do not edit.
[Previous]
[Next]
Name: ospex_params
Purpose: Define structure with information for all OSPEX control and info parameters
Calling Sequence: ospex_params, param_struct
CALLED BY:
ospex_params_write_pro
NOTE: THIS ROUTINE IS GENERATED AUTOMATICALLY BY OSPEX_PARAMS_WRITE_PRO. Do not edit.
[Previous]
[Next]
Name: ospex_params_write_pro
Project: HESSI
Purpose: Write procedure ospex_params which defines structure with information
for all HESSI control and info parameters
Method: This routine generates the code in ospex_params.pro.
It examines the routines in the HESSI branch of the
ssw tree, and attempts to find all of the control and info parameters used.
Then it looks at the structure defined in ospex_params_manual for
information that can't be generated automatically (like descriptions). From those
two sources, all of the known information is accumulated, and the routine ospex_params
is written to create a structure with that information.
After calling ospex_params_write_pro to write the ospex_params.pro routine, you should
call ospex_params_write_htm. ospex_params_write_htm will ospex_params to construct the
structure with all of the parameter information and generate html documentation for them.
These programs should be run periodically to keep the documentation up-to-date.
Written: Kim Tolbert 7-Mar-2004, based on hsi_params_write_pro
Modifications:
CALLS:
[Previous]
[Next]
PROJECT:
SDAC
;
NAME: other_filters
PURPOSE: the transmission fraction of xrays through pmma and/or multilayer vs energy
CALLING SEQUENCE: result = other_filters( energy, /pmma ) or other_filters(energy,/multi)
INPUTS:
energy - in keV above 0.5 keV
KEYWORD INPUTS:
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.
/pmma - transmission through the pmma specified by Reid Brennen
/multi- transmission throught the multilayer specified by Reid Brennen
if both are requested, transmission is the product.
mikechoi - multilayer models specified for grids by Michael Choi, GSFC, code 724.3
-1 - 9.33 mils total Kapton, changed from 23.6/4 mils, ras, 10-aug-95
35200 Angstrom of Al
0 - 10 layers MLI fore and aft
1 - 15 layers
2 - 20 layers
OUTPUTS: the transmitted fraction, from 0 to 1.0
OPTIONAL OUTPUTS:
CALLED BY:
BATSE_SPEC_MODEL, FILTER_ATTEN, ROUTINE_NAME [1], get_slider, low_e_spec_eff [1]
low_e_spec_eff [2], out_spectra_4_designer, set_field
PROCEDURE: interpolates on a data array
CALLS: ***
FCHECK, INTERPOL, filter_cmpnd, xsec
COMMON BLOCKS:
RESTRICTIONS:
MODIFICATION HISTORY: ras, 22-feb-95
ras, 27-feb-95 added multilayer
ras, 19 apr added mikechoi models
ras, 10 aug 95, corrected multilayer inside and outside cryostat
richard.schwartz@gsfc.nasa.gov, 22-oct-1997, added pankow keyword