[Previous]
[Next]
NAME:
HARDWARE_FONTS
PURPOSE:
Changes the default widget hardware font and/or the device hardware
font, to be one of the user's choosing.
If no hardware font matches are found, then the previous font is not
changed.
CATEGORY:
widget or device font
CALLING SEQUENCE:
var = HARDWARE_FONTS([FONT=font, /INTER, /WIDGET, /DEVICE])
CALLED BY:
none
CALLS TO:
XFONT
INPUTS:
none
OPTIONAL INPUTS:
DEVICE : if set, change the device font to the selected font.
See WIDGET.
FONT : String or string array of font names. Wildcard
designations are allowed, the first match is used.
If not present, then INTER is assumed.
INTER : If set, a call the XFONT will be made, and the result
will be the selected font.
If the FONT keyword is also set, then XFONT will only
be called if no font matches are found.
WIDGET : if set, change the default widget font to the
selected font. See DEVICE. If neither /WIDGET nor
/DEVICE is set then /WIDGET is the assumed.
OUTPUTS:
Returns the selected font as a string.
OPTIONAL OUTPUTS:
none
CALLS: ***
XFONT
COMMON BLOCKS:
none
SIDE EFFECTS:
The size of the selected font will effect vector drawn fonts.
A temporary pixmap window is created.
If INTER is set then a possible call to XFONT will create a widget.
RESTRICTIONS:
Need X window device.
If INTER is set, then need widget capablility.
PROCEDURE:
Search the hardware fonts for a match with the user's input.
Switch either the default widget font or the device font to the
resulting match.
MODIFICATION HISTORY:
May-1993, Elaine Einfalt (HSTX)
[Previous]
[Next]
NAME:
HELIOG
PURPOSE:
plot solar heligraphic grid and solar limb
CATEGORY:
plotting
CALLING SEQUENCE:
heliog,radius,bangle,roll,grid=grid,glabel=glabel,/noeras
INPUTS:
radius = solar radius (arcsecs)
bangle = solar bangle (deg)
OPTIONAL INPUT:
roll = spacecraft roll (deg) clockwise from solar north
OPTIONAL OUTPUTS:
lat,lon = latitude and longitude arrays
KEYWORDS:
grid = spacing (deg) of lat-long (def = 15 deg);
for grid le 0, only the solar limb is plotted
glabel = label lat-long grid with coordinate values (def = no labels)
noeras = control erasing of previously drawn plot. Setting this
to 1 will cause grid to be overlaid on a drawn plot
OUTPUTS:
solar latitude-longitude grid
CALLS: ***
NINT [1], NINT [2], XYTOLB
CALLED BY:
HXISLIMB, PLOTMAP
PROCEDURE:
uses heliographic formulae from "Textbook on Spherical Astronomy", by
W.M. Smart (see page 174).
MODIFICATION HISTORY:
Written by DMZ (ARC) Nov 1990
[Previous]
[Next]
NAME:
HFLARE
PURPOSE:
Hflare provides a widget interface to allow a user to select a HXRBS
flare by either setting buttons to the flare number, selecting a day,
and then choosing among the flares on that day, or by typing a
flare number.
Used in HXRBS and GOES widget programs.
CATEGORY:
HXRBS
CALLING SEQUENCE:
HFLARE,Flare
CALLS: ***
ATIME [1], ATIME [2], CHOOSE_FL, CLEANPLOT [1], CLEANPLOT [2], CLEANPLOT [3]
FSELECT, HFLARE_EVENT, READ_MINICAT, TWIDGET, UTIME [1], UTIME [2], WIDG_TYPE
XMANAGER, XREGISTERED
OUTPUTS:
Flare: Flare number selected.
KEYWORDS:
GROUP_LEADER: Widget ID of widget that called HFLARE.
COMMON BLOCKS:
HXR_FLARE
RESTRICTIONS:
Need X windows. At this time this routine only runs under VMS.
MODIFICATION HISTORY:
AKT 11/92
Mod. 05/08/96 by RCJ. Added documentation.
[Previous]
[Next]
NAME:
HXARCHIVE
PURPOSE:
Display the time profile of any HXRBS flare.
CATEGORY:
HXRBS
CALLING SEQUENCE:
HXARCHIVE, Flare=xxx
CALLS: ***
CH2KVT, CHECKVAR [1], CHKLOG [1], CHKLOG [2], CH_SCALE, GETUTBASE [1], GETUTBASE [2]
GET_CHAN_NUM, GET_DAYN, IGAIN, PL_SCALE, SC4TREAD, SETUTBASE [1], SETUTBASE [2]
SET_GRAPHICS [1], SET_GRAPHICS [2], SET_UTLABEL, TEK_END [1], TEK_END [2]
TEK_INIT [1], TEK_INIT [2], UTIME [1], UTIME [2], UTPLOT [1], UTPLOT [2], UTPLOT [3]
UTPLOT [4], UTPLOT [5], UTPLOT [6], VERT_LINE, anytim [1], anytim [2], anytim [3]
anytim [4], anytim [5], checkvar [2], linecolors [1], linecolors [2]
INPUTS:
Flare: Flare number
OUTPUTS:
none explicit.
KEYWORDS:
Desc: Array of character strings describing data in SC4 file.
Tarray: Variable in which to return the time array. Times
are in seconds relative to the start of the day.
x=getutbase() contains the number of seconds to the
start of the day from 79/1/1,0000. i.e.
print,atime(tarray(0)+getutbase(0)) will print the ascii
time for the first point.
Yarray: Variable in which to return the three channel
combinations of PHS data for each time in TARRAY.
Yplotted: Variable in which to return the y array that was
plotted.
Edges: Channel edges in keV
Combinech: Channel groups to plot specified by two element vector
identifying first and last channel group to use (channel
groups are Channels 1-2, Channels 3-5, and
Channels 1-15): [0,0] indicates first channel group
(Channels 1-2) [0,1] indicates 1st and 2nd channel
group (Channels 1-5) [0,2] indicates 1st through 3rd
group (Channels 1-15) [2,2] indicates 3rd channel
group (Channels 6-15) etc.
Overlay: Channel groups to overlay on plot, specified by a
series of two element vectors identifying first and
last channel group for each overlay. (See COMBINECH
keyword description.)
[0,0] - overlay Channels 1-2
[[0,0], [1,2]] - overlay Channels 1-2, then overlay
Channels 3-15
Plotfile: If non-zero, a plot file will be created when you
plot on screen. Format of plotfile can be selected
by entering the SELECT_DEV procedure.
Verbose: If non-zero, information about the SC4 file is
displayed when it is opened.
Logplot: If non-zero, y axis is logarithmic.
Pointplot: If non-zero, a point plot is drawn. Otherwise,
histogram.
Error: Returns a 0 if no errors found, 1 otherwise.
Xrange: 2-element vector specifying limits for x axis
Yrange: 2-element vector specifying limits for y axis
COMMON BLOCKS:
HXARCHIVE, SAVESC4
RESTRICTIONS:
At this time only runs under VMS.
PROCEDURE:
Compact files containing a time array and three PHS channel
combinations (1-2, 3-5, and 6-15) have been saved on magnetic disk
for all HXRBS events in SC4 format. HXARCHIVE reads the file for
requested flare and plots the time profile with the following options:
plot any combination of the available channels
overlay any combination of the available channels
logarithmic or linear y axis
point or histogram plot
only plot data within x and/or y limits
If the devie is capable of X windows graphics (logical name
DEVICE_TYPE equals X) then X windows is the default screen graphics
device. Otherwise Tektronix is the default. PostScript is the
default printer format. The user can select the devices by typing
SELECT_DEV.
The time array, the 3 separate channel combinations of PHS data,
and the plotted y array are returned in keyword arguments.
Sample call:
HXARCHIVE,Flare=5,Tarray=T,Yarray=Y,Comb=[0,2],Over=[[1,1],[2,2]]
MODIFICATION HISTORY:
Written by Kim Tolbert 4/92
EDGES keyword added 1/25/93 by AKT
Mod. 05/10/96 by RCJ. Added documentation.
[Previous]
[Next]
NAME:
HXFITS
PURPOSE:
Display the time profile of any HXRBS flare.
CATEGORY:
HXRBS
CALLING SEQUENCE:
HXFITS, Flare=xxx
INPUTS:
In keyword format so you don't have to remember the input order.
OUTPUTS:
In keyword format so you don't have to remember the output order.
KEYWORDS:
Flare: Flare number (input)
Chgroups: Seven element flag array indicating what group of channels to plot.
Element 0 set: channels 1-2 (1-15).
Element 1 set: channels 1-5 (1-15).
Element 2 set: channels 1-15 (1-15).
Element 3 set: channels 3-5 (1-15).
Element 4 set: channels 3-15 (1-15).
Element 5 set: channels 6-15 (1-15).
Element 6 set: channels 10-15 (1-15).
N_pts: Box size to rebin tarray.(optional input)
Tarray: Variable in which to return the time array.
Times are in seconds relative to the start of the day.
x=getutbase() contains the number of seconds to the
start of the day from 79/1/1,0000. i.e.
print,atime(tarray(0)+getutbase(0)) will
print the ascii time for the first point. (output)
Yarray: Variable in which to return the PHS data as read from
the FITS file for each time in TARRAY. (output)
Yplotted: Variable in which to return the channel combinations
that were plotted. (output)
Edges_new: Channel edges in keV. (output)
Ut: Time in seconds since 1-jan-1979, middle of datapoint.
(output)
Deltat: Accumulation interval, scalar, in seconds. (output)
Orig_tarray: Time array used for plot. Not rebin'ed. (output)
Edges_orig: Original channel edges as read by rd_hxrbs_fits.(output)
Orig_livetime: Original livetime as read by rd_hxrbs_fits.(output)
Livetime: Rebin'ed orig_livetime. Box size = n_pts. (output)
Despike: If non-zero, yarray will be despiked by HXRBS_DEGLITCH.
Plotfile: If non-zero, a plot file will be created when you
plot on screen. Format of plotfile can be selected by
entering the SELECT_DEV procedure.
Logplot: If non-zero, y axis is logarithmic.
Pointplot: If non-zero, a point plot is drawn. Otherwise,
histogram.
Error: Returns a 0 if no errors found, 1 otherwise.
Xrange: 2-element vector specifying limits for x axis
Yrange: 2-element vector specifying limits for y axis
CALLS: ***
ARR2STR [1], Arr2Str [2], CHECKVAR [1], CHKLOG [1], CHKLOG [2], CH_SCALE
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FLIPDATE, FXPAR [1], FXPAR [2]
F_DIV, GETUTBASE [1], GETUTBASE [2], GET_DAYN, HXRBS_DEGLITCH, PL_SCALE
RD_HXRBS_FITS, SETUTBASE [1], SETUTBASE [2], SET_GRAPHICS [1], SET_GRAPHICS [2]
SET_UTLABEL, TEK_END [1], TEK_END [2], TEK_INIT [1], TEK_INIT [2], UTPLOT [1]
UTPLOT [2], UTPLOT [3], UTPLOT [4], UTPLOT [5], UTPLOT [6], VERT_LINE, anytim [1]
anytim [2], anytim [3], anytim [4], anytim [5], checkvar [2], concat_dir [4]
linecolors [1], linecolors [2]
CALLED BY:
HXRBS
COMMON BLOCKS:
HXFITS
PROCEDURE:
HXFITS reads the file for requested flare and plots the time profile
with the following options:
plot any combination of the available channels
overlay any combination of the available channels
logarithmic or linear y axis
point or histogram plot
only plot data within x and/or y limits
If the device is capable of X windows graphics (logical name
DEVICE_TYPE equals X) then X windows is the default screen graphics
device. Otherwise Tektronix is the default. PostScript is the
default printer format. The user can select the devices by typing
SELECT_DEV.
The time array, the 6 separate channel combinations of PHS data,
and the plotted y array are returned in keyword arguments.
MODIFICATION HISTORY:
Based on HXARCHIVE. Mod. by RCJ.
Mod. 06/03/96 by RAS. Replaced strmids on headers with fxpar.
Mod. 06/07/96 by RCJ. Clean up. Sorry for the inconvenience.
Version 4, RAS, 22-may-1997, revised documentation, cleaned channel sum functions.
Mod. 07/18/97 by RCJ. Fixed label to print average according to n_pts.
Version 6, RAS, 24-nov-1997, changed despike routine to hxrbs_deglitch.
[Previous]
[Next]
FILE HXIS.PRO -- The HXIS (SMM) display program using widget applications.
REQUIREMENTS : IDL Version 2 with widgets, or better.
X windows graphics device.
Poscript device if hardcopies are desired.
To test to see if widgets are available :
IDL> if (!D.FLAGS AND 65536) NE 0 THEN PRINT, 'WIDGETS ARE AVAILABLE.'
Required logical definitions:
define HXIS_DATA to data location
define HXIS_CAT to catalogs' location
the catalogs are:
HXIS_COARSE.RAT
HXIS_FINE.RAT
HXIS_UVCAT.D80
HXIS_UVCAT.T80
HXLOGO.IMG
HXIS program file names all have the form "HXIS*.PRO"
Common block file names all have the form "HXIS*.COMMON"
Non "HXIS*.PRO" files that are required:
ACKNOWLEDGE.PRO
GET_MY_WINDOW.PRO
HELIOG.PRO
LINECOLORS.PRO
OPSYS_LGCL.PRO
PSPLOT.PRO
RESPOND_WIDG.PRO
UTPLOT...and related programs
WINUP.PRO
Significant program paths:
HXIS->HXISSTRUC
->HXISWIDGET --> HXISDWIDG_EV ---> HXISREAD ----> HXISDEFAULTS
---> HXISCPLOT ----> HXISCALC_IMG
---> HXISTPLOT
---> HXISXPLOT
---> HXISTSPEC
---> additional secondary programs
are accessed through widget events
=============================================================================
NAME:
HXIS
PURPOSE:
Starts up the HXIS image processing.
Initializes the layout of the HXIS images to be displayed
CATEGORY:
HXIS display
CALLING SEQUENCE:
HXIS [,GROUP_LEADER=GROUP]
CALLED BY:
none required, but is setup to be called by another routine
CALLS TO:
LINECOLORS, HXISSTRUC, HXISNINT, HXISSTRLABEL, ATIME, HXISWIDGET
INPUTS:
none
OPTIONAL INPUTS:
GROUP_LEADER: is the widget id of a calling widget routine
This will clean up widgets if caller is killed
OUTPUTS:
none explicit, only through commons
OPTIONAL OUTPUTS:
none
CALLS: ***
ATIME [1], ATIME [2], HXISSTRUC, HXISWIDGET, UTIME [1], UTIME [2], hxisNINT
hxisSTRLABEL, linecolors [1], linecolors [2]
CALLED BY:
SDAC
COMMON BLOCKS:
hxisarea.common
hxiscolor.common
hxisgrid.common
hxisdata_info.common
hxislayout.common
hxiswindow.common
SIDE EFFECTS:
Temporarily creates an IDL window and loads a color table.
RESTRICTIONS:
Requires X windows device, and a postscript device for hard copies
PROCEDURE:
Variables are initialized and stored in common block
MODIFICATION HISTORY:
OCT-1990, Paul Hick (ARC)
DEC-1992, Elaine Einfalt (HSTX) - converted to widgets
[Previous]
[Next]
NAME:
HXISAREA
PURPOSE:
Define an area in one of the HXIS field of views. The area consists of
an integer number of pixels and is selected using the mouse.
CATEGORY:
HXIS display
CALLING SEQUENCE:
AREA, error=error, [/select_plot]
CALLED BY:
HXISHISTO, HXISSURF, HXISTPLOT, HXISTSPEC, HXISWIDGET, HXISXPLOT
CALLS TO:
RESPOND_WIDG, HXISNINT, HXISREM_DBLE, HXISCPLOT
INPUTS:
none explicit, only through commons
OPTIONAL INPUTS:
SELECT_PLOT if present and non-zero, a plot is selected not pixels
OUTPUTS:
none explicit, only through commons
OPTIONAL OUTPUTS:
none
CALLED BY:
HXISHISTO, HXISSURF, HXISTPLOT, HXISTSPEC, HXISWIDGET, HXISWIDG_EV, HXISXPLOT
COMMON BLOCKS:
hxisarea.common
hxiscolor.common
hxiscplot.common
hxisdata_info.common
hxislayout.common
hxiswidget.common
hxiswindow.common
SIDE EFFECTS:
none
RESTRICTIONS:
If selection is done on an image containing an overlay of fine and
coarse field of view, the coarse field of view area is chosen (i.e. the
FFOV is ignored). Need a mouse.
PROCEDURE:
Press the left mouse button to select a pixel. Pressing the middle
button stops the pixel selection. Before exiting double entries in the
list of selected pixels are removed.
MODIFICATION HISTORY:
JAN-91, Paul Hick (ARC)
JAN-93, Elaine Einfalt (HSTX) - converted to widgets
[Previous]
[Next]
NAME:
HXISBOOST
PURPOSE:
CATEGORY:
CALLING SEQUENCE:
HXISBOOST, DEST, APP
CALLED BY:
HXISCPLOT
CALLS TO:
none
INPUTS:
OPTIONAL INPUTS:
OUTPUTS:
OPTIONAL OUTPUTS:
CALLED BY:
HXISCPLOT
COMMON BLOCKS:
none
SIDE EFFECTS:
none
RESTRICTIONS:
PROCEDURE:
MODIFICATION HISTORY:
Paul Hick (ARC)
[Previous]
[Next]
NAME:
HXISBORESIGHT
PURPOSE:
Get corrected spacecraft boresight
CATEGORY:
I/O
CALLING SEQUENCE:
pro HXISBORESIGHT, TDOY, PITCH, YAW
INPUTS:
TDOY doy in 1980 (decimal fraction for time of day)
OUTPUTS:
PITCH s/c pitch (arcsec; south is positive)
YAW s/c yaw (arcsec; east is positive)
CALLS: ***
CONV_VAX_UNIX2, HXISOFF, HXISPOINT, acknowledge [1], acknowledge [2]
acknowledge [3], opsys_lgcl [1], opsys_lgcl [2]
CALLED BY:
HXISOFF, HXISPOINT
PROCEDURE:
The file HXIS_UVCAT.T80 (containing the times for all UVSP experiments
in 1980) is scanned to determine which record of the file HXIS_UVCAT.D80
contains the corrected pitch and yaw. The content of HXIS_UVCAT.T80 and
HXIS_UVCAT.D80 is extracted from the UVSP catalog CATALOG.CAT
MODIFICATION HISTORY:
FEB-91, Paul Hick (ARC)
Jan-94, E. Einfalt (HSTX) - made UNIX compatable
- added HXISCATA common to pass to HXIST_EM
[Previous]
[Next]
NAME:
HXISCALC_IMG
PURPOSE:
Calculate images.
CATEGORY:
HXIS display
CALLING SEQUENCE:
HXISCALC_IMG, ERROR=ERROR
CALLED BY:
HXISCPLOT
CALLS TO:
HXISREM_DBLE, HXISSELECT
INPUTS:
none explicit, only through commons
OPTIONAL INPUTS:
none
OUTPUTS:
ERROR: return 0 if calculation was successful
1 if calculation failed
OPTIONAL OUTPUT:
none
CALLS: ***
HXISREM_DBLE, HXISSELECT, hxisT_EM
CALLED BY:
HXISCPLOT
COMMON BLOCKS:
hxisarea.common
hxisasread.common
hxiscalc_img.common
hxisdata_info.common
hxislife_fnc.common
hxiswidget.common
SIDE EFFECTS:
none
RESTRICTIONS:
none
PROCEDURE:
Images are calculated using the energy channel settings in INFO.BLOW
and INFO.BUP. PROC_IMG array is created with the calculated images.
MODIFICATION HISTORY:
JAN-1991, Paul Hick (ARC)
[Previous]
[Next]
NAME:
HXISCPLOT
PURPOSE:
Draw HXIS contour maps
CATEGORY:
HXIS display
CALLING SEQUENCE:
HXISCPLOT [,error=error]
CALLED BY:
HXISWIDGET, HXISAREA
CALLS TO:
HXISCALC_IMG, HXISDATE_DOY, HXISSTRTIME, HXISSTRLABEL,
HXISLIMB, HXISBOOST, HXISSETLEVEL, HXISGETWINDOW, HXISHARD
INPUTS:
none explicit, only through commons
OPTIONAL INPUTS:
none
OUTPUT:
none explicit, only through commons
OPTIONAL OUTPUT:
ERROR: return 0 if calculation was successful, else 1 if failed
CALLS: ***
CONGRID [1], CONGRID [2], CONGRID [3], HXISBOOST, HXISCALC_IMG, HXISDATE_DOY
HXISGETWINDOW, HXISHARD, HXISLIMB, HXISSETLEVEL, HXISSTRTIME, hxisSTRLABEL
CALLED BY:
HXISWIDGET, HXISWIDG_EV
COMMON BLOCKS:
hxisarea.common
hxisasread.common
hxiscalc_img.common
hxiscolor.common
hxiscplot.common
hxisdata_info.common
hxislayout.common
hxissaveplot.common
hxiswindow.common
SIDE EFFECTS:
If info.hard is set the the images are printed.
RESTRICTIONS:
none
PROCEDURE:
The image data are extracted from the array PROC_IMG, using the
information in the INFO structure (INFO.BTYP,INFO.BLOW,INFO.BUP)
MODIFICATION HISTORY:
OCT-90, Paul Hick (ARC)
FEB-91, Paul Hick (ARC), plot solar limb and heliographic grid
DEC-92, Elaine Einfalt (HSTX) - converted to widgets
FEB-93, - heliographic grid handled in HXISLIMB
[Previous]
[Next]
NAME:
HXISDATE_DOY
PURPOSE:
Converts dates (YR,MON,DAY) to daynumber DOY and v.v. Dates before 5
october 1582 are interpreted as Julian dates; after 15 october as
Gregorian dates. 5 october 1582 (Julian) = 15 october 1582 (Gregorian).
For ID=0 (date --> doy) the input for the month may be given in the
form of a char-string CMON or as an integer MON. CMON takes precedence
over MON: first CMON is checked for valid input; if not found MON is
used (if MON is invalid too, the program is aborted).
!!! If possible use CMON for input. If you want to use MON, make sure
to clear CMON first. !!!!
Upon output the values of CMON and MON are consistent. The returned
value for CMON is in uppercase.
CALLING SEQUENCE:
hxisdate_doy, ID,YR,CMON,MON,DAYIN,DOYIN
INPUTS:
ID ID=0 date (yr,month,day) ----> doy of year
ID=1 doy of year ----> date (yr,month,day)
YR INT array year; the year xxxBC should be entered as
-xxx+1.
NO SHORT HAND PERMITTED, i.e. 80 is interpreted
as 80 AD, not 1980
CMON STRING array months (standard 3 char notation)
!! Either CMON or MON should be
MON INT array months (1-12)
!! specified. Set the other to -1
DAYIN array (ID = 0) day of months (fraction for time of
day)
DOYIN array (ID = 1) day of year (fraction for time of day)
OUTPUTS:
CMON,MON months; CMON and MON will be consistent
DAYIN (ID = 1) day of month (fraction for time of day).
Type is the same as DOYIN
DOYIN (ID = 0) day of year (fraction for time of day).
Type is the same as DAYIN
CALLED BY:
HXISCPLOT
MODIFICATION HISTORY:
DEC-90, Paul Hick (ARC) . Adapted from UCSD Fortran subroutine with
the same name.
MAR-91, Paul Hick (ARC) . Rewritten to accept array arguments
(the scalar version is still available as DATE_DOYX
[Previous]
[Next]
NAME:
HXISDEFAULTS
PURPOSE:
Resets values need for processing of new files.
CATEGORY:
HXIS display
CATEGORY:
HXIS display
CALLING SEQUENCE:
HXISDEFAULTS
CALLED BY:
HXISREAD
CALLS TO:
none
INPUTS:
none explicit, only through commons
OPTIONAL INPUTS:
none
OUTPUTS:
none explicit, only through commons
OPTIONAL OUTPUTS:
none
CALLED BY:
HXISREAD
COMMON BLOCKS:
hxisdata_info.common
hxisgrid.common
hxispass.common
SIDE EFFECTS:
none
RESTRICTIONS:
none
PROCEDURE:
Initial necessary value to befin displaying a new file
MODIFICATION HISTORY:
OCT-1990, Paul Hick (ARC)
DEC-1992, Elaine Einfalt (HSTX) - converted to widgets
[Previous]
[Next]
NAME:
HXISDURALST
PURPOSE:
User wants to select duration parameters
CATEGORY:
HXIS display
CALLING SEQUENCE:
HXISDURALST, GROUP_LEADER=GROUP
CALLED BY:
HXISWIDGETS
CALLS TO:
DURLST_EV
INPUTS:
GROUP_LEADER: is the widget id of a calling widget routine
This will clean up widgets if caller is killed
OPTIONAL INPUTS:
none
OUTPUTS:
none explicit, only through commons
OPTIONAL OUTPUTS:
none
CALLS: ***
DURLST_EV, HXISWRITE_TIMES, XMANAGER
CALLED BY:
DURLST_EV, HXISWIDGET, HXISWIDG_EV
COMMON BLOCKS:
hxisasread.common
hxisdata_info.common
hxispass.common
hxistime.common
SIDE EFFECTS:
Creates a widget and /MODELS other widgets
RESTRICTIONS:
none
PROCEDURE:
Create a widget to request a duration from user.
MODIFICATION HISTORY:
MAY-1991, Paul Hick (ARC)
DEC-1992, E. Einfalt (HSTX) - converted to widgets
[Previous]
[Next]
NAME:
HXISEDGE_IMG
PURPOSE:
Plots small contour plot in upper right corner of graphics screen
CATEGORY:
HXIS display
CALLING SEQUENCE:
HXISEDGE_IMG
CALLED BY:
HXISTPLOT, HXISTSPEC, HXISXPLOT
CALLS TO:
none
INPUTS:
none explicit, only through commons
OPTIONAL INPUTS:
none
OUTPUTS:
none
OPTIONAL OUTPUTS:
none
CALLED BY:
HXISTPLOT, HXISTSPEC, HXISXPLOT
COMMON BLOCKS:
hxisarea.common
hxiscolor.common
hxisdata_info.common
hxislayout.common
hxiswidget.common
SIDE EFFECTS:
none
RESTRICTIONS:
none
PROCEDURE:
The first image stored in the PROC_IMG array is used
MODIFICATION HISTORY:
JAN-1991, Paul Hick (ARC)
[Previous]
[Next]
NAME:
HXISGETTIME
PURPOSE:
CATEGORY:
CALLING SEQUENCE:
HXISGETTIME, ID, QSTRING,y=Y,mo=MO,d=D,h=H,mi=MI,s=S
FUNCTIONS/PROCEDURES:
INPUTS:
ID 0/1, 0: string to numerical, 1: numerical to string
OPTIONAL INPUT PARAMETERS:
OUTPUTS:
OPTIONAL OUTPUT PARAMETERS:
CALLED BY:
HXISSTRTIME
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
MODIFICATION HISTORY:
[Previous]
[Next]
NAME:
HXISGETWINDOW
PURPOSE:
Depending on the status of reuse create a new window or reuse the
current hxis window
CATEGORY:
HXIS display
CALLING SEQUENCE:
HXISGETWINDOW [,ERROR=ERROR]
CALLED BY:
HXISCPLOT, HXISLIFE, HXISSURF, HXISTPLOT, HXISTSPEC, HXISXPLOT
CALLS TO:
none
INPUTS:
none explicit, only through commons
OPTIONAL INPUTS:
none
OUTPUTS:
none
OPTIONAL OUTPUTS:
ERROR: Set to 1 if current_window (from common hxiswindow)
was no longer present. Will create a window anyway.
CALLS: ***
WINUP [5], winup [1], winup [2], winup [3], winup [4]
CALLED BY:
HXISCPLOT, HXISHISTO, HXISLIFE, HXISSURF, HXISTPLOT, HXISTSPEC, HXISXPLOT
COMMON BLOCKS:
hxisdata_info.common
hxiswindow.common
hxiswidget.common
SIDE EFFECTS:
May create an IDL window.
RESTRICTIONS:
Requires X windows device.
PROCEDURE:
Verify that the last created window is still there. If it is then
it is erased else a new window is created.
MODIFICATION HISTORY:
OCT-1990, Paul Hick (ARC)
DEC-1992, Elaine Einfalt (HSTX) - converted to widgets
[Previous]
[Next]
NAME:
HXISHARD.PRO
PURPOSE:
Print a hard copy
CATEGORY:
HXIS diplay
CALLING SEQUENCE:
HXISHARD, COLO=COLO, [/FILEOPEN, /FILECLOSE]
CALLED BY:
HXISCPLOT, HXISTPLOT, HXISXPLOT, HXISTSPEC
CALLS TO:
PSPLOT
INPUTS:
COLO : 0 mean black and white print
1 mean color print
OPTIONAL INPUTS:
FILEOPEN : if set, then open file to be printed
FILECLOSE : if set, then close file to be printed and print
OUTPUT:
none
OPTIONAL OUTPUT:
none
CALLS: ***
PSPLOT [1], PSPLOT [2]
CALLED BY:
HXISCPLOT, HXISHISTO, HXISLIFE, HXISSURF, HXISTPLOT, HXISTSPEC, HXISXPLOT
COMMON BLOCKS:
HXISDATA_INFO for the structure INFO
SIDE EFFECTS:
If FILEOPEN is set, then SET_PLOT is set to hardcopy device
If FILECLOSE is set, then SET_PLOT is set to X window device,
and a file is printed.
RESTRICTIONS:
none
PROCEDURE:
Set appropriate device, and if /CLOSEFILE is set then print
MODIFICATION HISTORY:
MAR 1993 - Elaine Einfalt (HSTX)
[Previous]
[Next]
NAME:
HXISHISTO
PURPOSE:
Make a histogram plot of a selected plot from the CPLOT display
(# pixels vs. count rate/temperature/emission measure)
CATEGORY:
HXIS display
CALLING SEQUENCE:
HXISHISTO
CALLED BY:
HXISWIDGET
CALLS TO:
HXISAREA, HXISSTRLABEL, HXISGETWINDOW, HXISHARD
INPUTS:
none
OPTIONAL INPUTS:
none
OPTIONAL OUTPUTS:
none
OUTPUTS:
none
CALLS: ***
HXISAREA, HXISGETWINDOW, HXISHARD, hxisSTRLABEL
CALLED BY:
HXISWIDGET, HXISWIDG_EV
COMMON BLOCKS:
hxisarea.common
hxiscolor.common
hxisdata_info.common
hxislayout.common
hxiswindow.common
localhisto
PROCEDURE:
If not already selected, the plot is selected using the mouse.
The necessary quantities are extracted from the structure INFO and the
array PROC_IMG
SIDE EFFECTS:
If info.hard is set then the plot is printed.
RESTRICTIONS:
none
MODIFICATION HISTORY:
NOV-1990, Paul Hick (ARC)
MAR-1993, Elaine Einfalt (HSTX) - converted to widgets
[Previous]
[Next]
NAME:
HXISLIFE
PURPOSE:
Calculate the lifetime function
CATEGORY:
HXIS display
CALLING SEQUENCE:
HXISLIFE
CALLED BY:
HXISWIDGET
CALLS TO:
UTPLOT, RESPOND_WIDG, HXISGETWINDOW, HXISHARD
INPUTS:
none explicit, only through commons
OPTIONAL INPUTS:
none
OUTPUTS:
none explicit, only through commons
OPTIONAL OUTPUTS:
none
CALLS: ***
ATIME [1], ATIME [2], HXISGETWINDOW, HXISHARD, RESPOND_WIDG, UTPLOT [1], UTPLOT [2]
UTPLOT [3], UTPLOT [4], UTPLOT [5], UTPLOT [6]
CALLED BY:
HXISWIDGET, HXISWIDG_EV
COMMON BLOCKS:
hxisasread.common
hxiscolor.common
hxisdata_info.common
hxislife_fnc.common
hxistime.common
hxiswidget.common
hxiswindow.common
SIDE EFFECTS:
If info.hard is set the plot is printed
RESTRICTIONS:
none
PROCEDURE:
Plot the flare mode, prompt user for two cursor clicks to form
a line. Other routines use the following equation to apply the
lifetime function: LIFEFNC(SI)/( LF1+RC*(TIMG(SI)-T1))
where SI are the images selected and LF1,RC and
T1 are determined in the routine.
MODIFICATION HISTORY:
OCT-1990, Paul Hick (ARC)
DEC-1992, Elaine Einfalt (HSTX) - converted to widgets
[Previous]
[Next]
NAME:
HXISLIMB
PURPOSE:
Plot solar limb and heliographic coordinate system on the plots of the
CPLOT display
CATEGORY:
HXIS display
CALLING SEQUENCE:
HXISLIMB, FIELD, IMAGE_NO=IMAGE_NO
CALLED BY:
HXISCLOT
CALLS TO:
HXISNINT, RESPOND_WIDG, HELIOG, HXISSOLRAD
INPUTS:
FIELD 0 for fine field of view, 1 for coarse field of view
IMAGE_NO a loop counter from calling routine
COLOR the index of the color to draw grid
and through common blocks
OPTIONAL INPUTS:
none
OUTPUTS:
none explicit, only through commons
OPTIONAL OUTPUTS:
none
CALLS: ***
HELIOG, HXISSOLRAD, RESPOND_WIDG, hxisNINT
CALLED BY:
HXISCPLOT
SIDE EFFECTS:
none
RETRICTIONS:
none
PROCEDURE:
The solar radius is calculated by the SOLRAD procedure.
The data units in the CPLOT images are CFOV pixels, i.e. one data unit
is 32 arcsec, with the origin (the point (0,0) in data units) at the
center of the image.
The HELIO procedure assumes data units of arcsec, i.e. one data unit
is 1 arcsec, with the origin at the center of the solar disk.
The necessary conversion is done explicitly by redefining the system
variables !X.S and !Y.S, then HELIO is used to draw the limb and
coordinate system.
The old scaling is reestablished before returning to caller.
MODIFICATION HISTORY:
FEB-91, Paul Hick (ARC)
FEB-93, Elaine Einfali (HSTX) - Conveted to widgets
[Previous]
[Next]
NAME:
hxisNINT
PURPOSE:
Returns nearest integers for the elements of argument X.
CALLING SEQUENCE:
I = nint(X)
INPUTS:
X array for which nearest integers are to be found
OUTPUTS:
NINT the nearest integers
CALLED BY:
HXIS, HXISLIMB, HXISREAD, HXISWRITE_TIMES
PROCEDURE:
The nearest integer of 2.5 is 3; the nearest integer of -2.5 is -3
[Previous]
[Next]
NAME:
HXISOFF
PURPOSE:
Get coordinates of HXIS center FOV for given time in 1980
CATEGORY:
I/O
CALLING SEQUENCE:
HXISPNTG, TDOY, PHX, YHX
SUBROUTINES/FUNCTIONS:
HXISOFF
INPUTS:
TDOY doy in 1980 (decimal fraction for time of day)
OUTPUTS:
(The pitch and yaw are the corrected 1980 values from the UVSP catalog)
PHX pitch offset between HXIS and SMM (arcsec; south is positive)
YHX yaw offset between HXIS and SMM (arcsec; east is positive)
CALLS: ***
CONV_VAX_UNIX2, HXISBORESIGHT, HXISPOINT, acknowledge [1], acknowledge [2]
acknowledge [3], opsys_lgcl [1], opsys_lgcl [2]
CALLED BY:
HXISBORESIGHT, HXISPOINT
PROCEDURE:
The offset is found by linear interpolation on a set of reference data
for the HXIS-SMM offset. The reference data are the sum of the
HXIS-UVSP offset as compiled by Marcos Machado and the UVSP-SMM offset
is extracted from the UVSP catalog CATALOG.CAT from the coalignment
experiments.
MODIFICATION HISTORY:
FEB-91, Paul Hick (ARC)
[Previous]
[Next]
FILE: HXISPOINT.PRO
routines HXISBORESIGHT, HXISOFF, HXISPOINT
CALLS:
CALLED BY
HXISBORESIGHT, HXISOFF, HXISREAD, HXISWIDGET, HXISWIDG_EV
[Previous]
[Next]
NAME:
HXISREAD
PURPOSE:
Reads HXIS data from a disk file.
CATEGORY:
HXIS display
CALLING SEQUENCE:
var = HXISREAD, A
CALLED BY:
HXISWIDGET
CALLS TO:
HXISGETTIME, HXISSEL_PRC, HXISSTRLABEL, HXISSTRTIME, HXISDEFAULTS,
HXISPOINT, HXISWRITE_TIME, CONV_VAX_UNIX2
INNPUTS:
A: character string containing file name to read
and through common blocks
OPTIONAL INPUTS:
none
OUTPUT:
Returns value of 0 if normal completion else returns a 1
and through common blocks
CALLS: ***
CONV_VAX_UNIX2, HXISDEFAULTS, HXISPOINT, HXISWRITE_TIMES, hxisNINT, hxisSTRLABEL
CALLED BY:
HXISWIDGET, HXISWIDG_EV
COMMON BLOCKS:
hxiswidget.common
hxisasread.common
hxisdata_info.common
hxispass.common
hxistime.common
SIDE EFFECTS:
Opens an associated file.
RESTRICTIONS:
none
PROCEDURE:
Opens the data file and associates it to array DATA and assigns file
parameters.
For flare mode 0 (normal mode) no DFM data (DFM=0)
Bands 2 and 6: DFM data for both flare mode 1 and 2
Bands 1 and 5: DFM data for flare mode 2 only (for mode 1 DFM=-16)
Bands 3 and 4: no DFM data
MODIFICATION HISTORY:
DEC-1990/JAN-1991, Paul Hick (ARC)
DEC 1992, E. Einfalt (HSTX) - converted to widgets
Jan 1994 E. Einfalt (HSTX) - fixed for UNIX
[Previous]
[Next]
NAME:
HXISREM_DBLE
PURPOSE:
Remove double entries from an array
CATEGORY:
Utility
CALLING SEQUENCE:
OUT = hxisrem_dble(in,length=n)
INPUTS:
IN input array
OUTPUTS:
OUT output array with double entries removed
OPTIONAL OUTPUT PARAMETERS:
N number of elements in OUT
CALLED BY:
HXISCALC_IMG, HXISSUM_AREA
MODIFICATION HISTORY:
MAY-1991, Paul Hick (ARC)
[Previous]
[Next]
file HXISSELECT.PRO -- routines HXISSEL_EV, HXISSELECT
NAME:
HXISSEL_EV
PURPOSE:
Handles events for HXISSELECT
CATEGORY:
HXIS display
CALLING SEQUENCE:
HXISSEL_EV, EVENT
CALLED BY:
HXISSELECT (through the XMANGAER)
CALLS TO:
none
INPUTS:
none explicit, only through commons
OPTIONAL INPUTS:
none
OUTPUTS:
none explicit, only through commons
OPTIONAL OUTPUTS:
none
CALLS: ***
HXISSELECT, XMANAGER
CALLED BY:
HXISSELECT
COMMON BLOCKS:
hxisdata_info.common
hxiswidget.common
hxisselraw.common
LOCALSELECT to pass variables through the XMANAGER
SIDE EFFECTS:
none
RESTRICTIONS:
none
PROCEDURE:
Recieves events from then XMANAGER and process.
MODIFICATION HISTORY:
OCT-1990, Paul Hick (ARC)
DEC-1992, Elaine Einfalt (HSTX) - converted to widgets
[Previous]
[Next]
NAME:
HXISSELECT
PURPOSE:
Selects the type of plots to be made when the input data are from a
HXIS image file. Up to six images can be selected. The images may be
for individual bands or for a combination of neighbouring bands and
may be for count rates, temperatures or emission measures.
CATEGORY:
HXIS display
CALLING SEQUENCE:
HXISSEL_RAW, ERROR=ERROR
INPUTS:
none explicit, only through commons
OPTIONAL INPUTS:
none
OUTPUTS:
ERROR: return 0 if calculation was successful
1 if calculation failed
and through common blocks
OPTIONAL OUTPUTS:
none
CALLS: ***
HXISSEL_EV, XMANAGER
CALLED BY:
HXISCALC_IMG, HXISSEL_EV, HXISWIDGET, HXISWIDG_EV
COMMON BLOCKS:
hxisarea.common
hxisdata_info.common
hxispass.common
hxisselraw.common
hxiswidget.common
LOCALSELECT to pass variables through the XMANAGER
SIDE EFFECTS:
Creates a widget.
RESTRICTIONS:
none
PROCEDURE:
Creats a widget allowing user to selcet images to be display.
MODIFICATION HISTORY:
27-OCT-1990, Paul Hick (ARC)
December 1992, E. Einfalt (HSTX) - converted to widgets
[Previous]
[Next]
NAME:
HXISSETLEVEL
PURPOSE:
Selected contour levels
CATEGORY:
HXIS display
CALLING SEQUENCE:
HXISSETLEVEL, LEVELS=levels, min=LMIN, max=LMAX, log=log,
im_num=ibs, error=error
INPUTS:
LMIN : minimum data value
LMAX : maximum data value
LOG : the current program scaling request (INFO.SCAL)
IM_NUM : the loop counter from calling routine
OPTIONAL INPUTS:
none
OUTPUTS:
LEVELS : the selected contour levels
ERROR : return 0 if sucessfully completed, else 1 if failed
OPTIONAL OUTPUTS:
none
CALLS: ***
CALCONLEV, SETLEVEL_EV, XMANAGER
CALLED BY:
CALCONLEV, HXISCPLOT, SETLEVEL_EV
COMMON BLOCKS:
hxisdata_info.common
hxissetlev.common
hxiswidget.common
SIDE EFFECTS:
Create a widget.
RESTRICTIONS:
none
PROCEDURE:
Create a widget that allows the user to select contour levels for
image display.
MODIFICATION HISTORY:
DEC-1992, Elaine Einfalt (HSTX) - converted to widgets
[Previous]
[Next]
NAME:
HXISSOLRAD
PURPOSE:
compute solar radius (arcsecs) and bangle (radians)
CATEGORY:
utility
CALLING SEQUENCE:
r=solrad(secs79,b0,p)
INPUTS:
secs79 = secs since 0 hrs UT on 1/1/79
OUTPUTS:
r = solar radius (arc secs)
OPTIONAL OUTPUT PARAMETERS:
b0,p = solar b and p angles (radians)
CALLED BY:
HXISLIMB
MODIFICATION HISTORY:
written by GLS (ARC)
modified by DMZ (ARC Aug'90)
[Previous]
[Next]
NAME:
hxisSTRLABEL
PURPOSE:
Return strings for plot title, quantity and cgs units
CALLING SEQUENCE:
hxisSTRLABEL,BTYP,BLOW,BUP,CLAB,QUANT,CUNIT
INPUTS:
BTYP band settings as selected by SELECT
BLOW (same meaning as INFO.BYP,INFO.BLOW,INFO.BUP)
BUP
OUTPUTS:
CLAB title: energy bands used (keV)
QUANT physical quantity (count rates, temp, etc.)
CUNIT cgs units of QUANT
CALLED BY:
HXIS, HXISCPLOT, HXISHISTO, HXISREAD, HXISSURF, HXISTPLOT, HXISXPLOT
MODIFICATION HISTORY:
OCT-90, Paul Hick (ARC)
[Previous]
[Next]
NAME:
HXISSTRTIME
PURPOSE:
Converts a floating point time in DOY to a character string time and
v.v. The output string has the form DOY:HH:MM:SS.SS or
YYYY/MM/DD,HH:MM:SS.SSS.
CALLING SEQUENCE:
C = STRTIME(TIME,/ut)
SUBROUTNES/FUNCTIONS:
DATE_DOY, HXISGETTIME
INPUTS/OUTPUTS:
TIME - floating point time in DOY (decimal fraction for time
of day)
- string time, either DOY:HH:MM:SS.SS or
YYYY/MM/DD,HH:MM:SS.SSS.
UT keyword. If the input is floating point and UT is set
and non-zero, the output string is of the form
YYYY/MM/DD,HH:MM:SS.SSS; otherewise it is
DOY:HH:MM:SS.SS
CALLS: ***
DATE_DOY, HXISGETTIME
CALLED BY:
HXISCPLOT, HXISTSPEC
RESTRICTIONS:
The floating point input should be in double precision to get an
accurate conversion for the seconds in the output string.
ALL components in the input string should be present. No shorthand
permitted.
PROCEDURE:
Depending on the type of the input TIME (string or floating point) a
floating point or string type is returned. In case of floating point
to string conversion the UT keyword decides what form the string time
will take.
MODIFICATION HISTORY:
OCT-1990, Paul Hick (ARC)
[Previous]
[Next]
file HXISSTRUC.PRO
NAME:
HXISSTRUC
PURPOSE:
Define the structure INFO
CATEGORY:
HXIS display
CALLING SEQUENCE:
HXISSTRUC, STRUC=INFO
CALLED BY:
HXIS
CALLS TO:
none
INPUTS:
none
OPTIONAL INPUTS:
none
OUTPUTS:
STRUC: A structure containing program parameters
OPTIONAL OUTPUTS:
none
CALLED BY:
HXIS
COMMON BLOCKS:
none
SIDE EFFECTS:
none
RESTRICTIONS:
none
PROCEDURE:
Defines the structure INFO, which is used to carry the essential
information about the data being processed and creates the common
block INFO, which occurs in almost all other procedures.
Variables are initialized and stored in common block
MODIFICATION HISTORY:
OCT-1990, Paul Hick (ARC)
DEC-1992, Elaine Einfalt (HSTX) - converted to widgets
[Previous]
[Next]
NAME:
HXISSUM_AREA
PURPOSE:
Calculate the INFO.BTYP quantities summed over the pixels in array
PIXELS and over images INFO.FRST_IMG though INFO.LAST_IMG
CALLING SEQUENCE:
HXISSUM_AREA, DATAREA
INPUTS: (from AREA through common block AREA)
FIELD 0 if the selected plot was for the FFOV; 1 for CFOV
(see restrictions)
PIXELS array containing the pixel numbers of all pixels in the
selected area
ICNT DO loop counter; if ICNT = LAST the buffer array is
destroyed
LAST Last value of DO loop counter (see ICNT)
OUTPUTS:
DATAREA quantities as given in INFO.BTYP, INFO.BLOW, INFO.BUP
for selected area
CALLS: ***
HXISREM_DBLE, hxisT_EM
CALLED BY:
HXISTPLOT, HXISTSPEC
COMMON BLOCKS:
common AREA, (BIN,) FIELD,PIXELS
common ASREAD, TIMG,IFLAG,IDUR,FLR_MOD,DFM
common DATA_INFO, INFO,PROC_IMG,DATA
MODIFICATION HISTORY:
JAN-91, Paul Hick (ARC)
[Previous]
[Next]
NAME:
HXISSURF
PURPOSE:
Plot surface map for one of the contour images displayed by CPLOT
CALLING SEQUENCE:
hxisSURF
CALLED BY:
HXISWIDGET
CALLS TO:
HXISSTRLABEL, HXISAREA
INPUTS:
none explicit, only through commons
OPTIONAL INPUTS:
none
OUTPUTS:
none
OPTIONAL OUTPUTS:
none
CALLS: ***
HXISAREA, HXISGETWINDOW, HXISHARD, RESPOND_WIDG, hxisSTRLABEL
CALLED BY:
HXISWIDGET, HXISWIDG_EV
COMMON BLOCKS:
hxisarea.common
hxiscolor.common
hxisdata_info.common
hxislayout.common
hxispass.common
hxiswindow.common
SIDE EFFECTS:
If info.hard is set then plot is printed
In case the selected plot is an overlay of a coarse and fine field of
view, the coarse field of view is selected
RESTRICTIONS:
none
PROCEDURE:
If no image position is selected the user is prompted for one.
Then a surface plot is plotted.
MODIFICATION HISTORY:
JAN-1991, Paul Hick (ARC)
MAR-1993, Elaine Einfalt (HSTX) - converted to widgets
[Previous]
[Next]
NAME:
hxisT_EM
PURPOSE:
Returns temperature (in MK) and emission measure (in E48 cm-3) for
given count rates in two HXIS energy bands
CALLING SEQUENCE:
hxisT_EM, FOV, GAIN, B1, B2, C1, C2, T, EM, EM1, EM2
INPUTS:
FOV identifies field of view (0=FFOV; 1=CFOV)
GAIN pixel gain (0.91-1.1) to be used in the calculation
(GAIN=0.91,0.92,...,1.1)
B1 first HXIS energy band (1,..,6)
B2 second HXIS energy band (1,..,6)
C1 count rate in B1 (in counts/sec)
C2 count rate in B2 (in counts/sec)
OUTPUTS:
T temperature (in MK)
EM emission measure (average of EM1 and EM2; in 10E48 cm-3)
EM1 emission measure from count rate in B1 (in 10E48 cm-3)
EM2 emission measure from count rate in B2 (in 10E48 cm-3)
CALLED BY:
HXISCALC_IMG, HXISSUM_AREA, HXISXPLOT
RESTRICTIONS:
C1 and C2 should both be larger than zero.
CALLS: ***
CONV_VAX_UNIX2
COMMON BLOCKS:
common TEMPOLD, CRPF, CRPC, CRP, FOVOLD, GAINOLD
(Inactive common block: used to save values)
PROCEDURE:
The calculation of temperature and emission measure uses the results of
a count rate prediction program for individual HXIS pixels. These CRP
count rates (counts/sec) are stored on the files FINE.RAT and
COARSE.RAT (for fine and coarse FOV respectively). Both files contain
20 groups of 100 records, one group for each pixel gain between 0.91
and 1.1 (steps of 0.1). The 100 records in each group give predicted
count rates for a set of 100 selected temperatures between 5 MK and
477 MK (the same for all gains). Each record contains 7 double
precision numbers: the temperature in MK, and the count rates (in
counts/sec) for each of the six HXIS channels. All count rates are for
an emission measure per pixel of 10E48 cm-3.
Temperature and emission measure are calculated on the assumption that
an observed count rate is linearly dependent on emission measure, i.e.
C = Y*f(T,g), where he proportionality factor is a function of
temperature and gain. Given the count rates in two different energy
bands and the gain, the temperature follows from the ratio of the
count rates (which will be independent of Y) by interpolating in the
CRP tables. The emission measure follows from the ratio of observed
count rate and predicted count rate at the calculated temperature.
MODIFICATION HISTORY:
NOV-1990, Paul Hick (ARC)
[Previous]
[Next]
NAME:
HXISTPLOT
PURPOSE:
Plots time series for sum of selected pixels
CATEGORY:
HXIS display
CALLING SEQUENCE:
HXISTPLOT
CALLED BY:
HXISWIDGET
CALLS TO:
HXISSUM_AREA, HXISGETWINDOW, HXISHARD, HXISSTRLABEL, UTPLOT,
HXISEDGE_IMG
INPUTS:
none explicit, only through commons
OPTIONAL INPUTS:
none
OUTPUTS:
none explicit, only through commons
OPTIONAL OUTOPUTS:
none
CALLS: ***
ATIME [1], ATIME [2], HXISAREA, HXISEDGE_IMG, HXISGETWINDOW, HXISHARD, HXISSUM_AREA
UTPLOT [1], UTPLOT [2], UTPLOT [3], UTPLOT [4], UTPLOT [5], UTPLOT [6], hxisSTRLABEL
CALLED BY:
HXISWIDGET, HXISWIDG_EV
COMMON BLOCKS:
hxisasread.common
hxisarea.common
hxiscolor.common
hxisdata_info.common
hxistime.common
hxistspec.common
hxiswidget.common
SIDE EFFECTS:
If info.hard set, then the plot is printed.
RESTRICTIONS:
none
PROCEDURE:
Check to see if time series arrays ain memory are still valid.
If not then recalculate time series. Plot the timeseries, and
the lifetime function if info.dead is set.
MODIFICATION HISTORY:
JAN-1991, Paul Hick (ARC)
JAN-1993, Elaine Einfalt (HSTX) - converted to widgets
[Previous]
[Next]
NAME:
HXISTSPEC
PURPOSE:
Plots count rate vs. band energy for area defined by the pixels
selected. A specified number of spectra are plotted evenly spaced
between given start and stop time.
CATEGORY:
HXIS display
CALLING SEQUENCE:
HXISTSPEC
CALLED BY:
HXISWIDGET
CALLS TO:
HXISAREA, HXISSUM_AREA, HXISGETWINDOW, HXISHARD, HXISEDGE_IMG
INPUTS:
none explicit, only through commons
OPTIONAL INPUTS:
none
OUTPUT:
none explicit, only through commons
OPTIONAL INPUTS:
none
CALLS: ***
HXISAREA, HXISEDGE_IMG, HXISGETWINDOW, HXISHARD, HXISSTRTIME, HXISSUM_AREA
CALLED BY:
HXISWIDGET, HXISWIDG_EV
COMMON BLOCKS:
HXISAREA for the currently program selection of pixel
HXISCOLOR for the line colors for spectra plots
HXISDATA_INFO for the structure INFO
HXISTSPEC for values and parameters of last calculated spectra
HXISWIDGET for program output to information widget
SIDE EFFECTS:
If info.hard is set then a hard copy will be printed.
RESTRICTIONS:
none
PROCEDURE:
Spectra are calculated at times START+(STOP-START)/(NSPEC-1)*I
(I=0,NSPEC-1). For each spectrum TOVER seconds are accumulated.
MODIFICATION HISTORY:
APR-1991, Paul Hick (ARC)
MAR-1993, Elaine Einfalt (HSTX) - converted to widgets
[Previous]
[Next]
file HXISWIDGET.PRO -- includes HXISWIDG_EV and HXISWIDGET
============================================================================
NAME:
HXISWIDG_EV
PURPOSE:
The event handler for HXISWIDGET.
CATEGORY:
HXIS display
CALLING SEQUENCE:
HXISWIDG_EV, EVENT
CALLED BY:
HXISWIDGET (through the XMANAGER)
CALLS TO:
XPALETTE, XLOADCT, WINUP, HXISTIME, HXISDURALST, RESPOND_WIDG,
HXISPOINT, HXISAREA, HXISREAD, HXISSELECT, HXISCPLOT, HXISTPLOT,
HXISXPLOT, HXISTSPEC, HXISHISTO, HXISLIFE, HXISSURF, HXISLOGO
INPUTS:
none explicit, only through commons
OPTIONAL INPUTS:
none
OUTPUTS:
none explicit, only through commons
OPTIONAL OUTPUTS:
none
CALLS: ***
HXISAREA, HXISCPLOT, HXISDURALST, HXISHISTO, HXISLIFE, HXISLOGO, HXISPOINT, HXISREAD
HXISSELECT, HXISSURF, HXISTIME, HXISTPLOT, HXISTSPEC, HXISWIDGET, HXISXPLOT
RESPOND_WIDG, WINUP [5], XLOADCT [1], XLOADCT [2], XLOADCT [3], XMANAGER, XPALETTE
XPDMENU, acknowledge [1], acknowledge [2], acknowledge [3], opsys_lgcl [1]
opsys_lgcl [2], winup [1], winup [2], winup [3], winup [4]
CALLED BY:
HXISWIDGET
COMMON BLOCKS:
hxisarea.common
hxiscolor.common
hxisdata_info.common
hxisgrid.common
hxispass.common
hxispoint.common
hxiswidget.common
hxiswindow.common
SIDE EFFECTS:
none
RESTRICTIONS:
none
PROCEDURE:
Recieve events for the XMANAGER and process.
MODIFICATION HISTORY:
DEC-1992, Elaine Einfalt (HSTX) - converted to widgets
[Previous]
[Next]
NAME:
HXISWIDGET
PURPOSE:
The event handler for HXISWIDGET.
CATEGORY:
HXIS display
CALLING SEQUENCE:
HXISWIDGWIDGET, GROUP_LEADER=GROUP
CALLED BY:
HXISWIDGET (through the XMANAGER)
CALLS TO:
OPSYS_LGCL, ACKNOWLEDGE, HXISWIDG_EV (through XMANAGER)
INPUTS:
GROUP_LEADER: is the widget id of a calling widget routine
This will clean up widgets if caller is killed
and through common
OPTIONAL INPUTS:
none
OUTPUTS:
none explicit, only through commons
OPTIONAL OUTPUTS:
none
CALLS: ***
HXISAREA, HXISCPLOT, HXISDURALST, HXISHISTO, HXISLIFE, HXISLOGO, HXISPOINT, HXISREAD
HXISSELECT, HXISSURF, HXISTIME, HXISTPLOT, HXISTSPEC, HXISWIDG_EV, HXISXPLOT
RESPOND_WIDG, WINUP [5], XLOADCT [1], XLOADCT [2], XLOADCT [3], XMANAGER, XPALETTE
XPDMENU, acknowledge [1], acknowledge [2], acknowledge [3], opsys_lgcl [1]
opsys_lgcl [2], winup [1], winup [2], winup [3], winup [4]
CALLED BY:
HXIS, HXISWIDG_EV
COMMON BLOCKS:
hxisdata_info.common
hxisgrid.common
hxispass.common
hxispoint.common
hxiswidget.common
localhxis to remeber current program request in event handler
SIDE EFFECTS:
Creates a widget
RESTRICTIONS:
none
PROCEDURE:
Create the main level HXIS display options menu.
MODIFICATION HISTORY:
DEC-1992, Elaine Einfalt (HSTX)
[Previous]
[Next]
NAME:
HXISWRITE_TIMES
PURPOSE:
Write out the new time values.
CATEGORY:
HXIS display
CALLING SEQUENCE:
HXISWRITE_TIMES [,NEWSTART=NEWSTART, /NEWDURATE]
CALLED BY:
HXISREAD, HXISTIME, HXISDURALST
CALLS TO:
HXISNINT
INPUTS:
none explicit, only through commons
OPTIONAL INPUTS:
NEWSTART : the image index of the start time image
NEWDURATE : write out a duration from common
OUTPUTS:
none explicit, only through commons
OPTIONAL OUTPUTS:
none
CALLS: ***
hxisNINT
CALLED BY:
DURLST_EV, HXISDURALST, HXISREAD
COMMON BLOCKS:
hxisasread.common
hxisdata_info.common
hxispass.common
hxistime.common
hxiswidget.common
SIDE EFFECTS:
none
RESTRICTIONS:
none
PROCEDURE:
Calculate and write to widget, then= start and end times.
MODIFICATION HISTORY:
DEC-1992, Elaine Einfalt (HSTX)
[Previous]
[Next]
NAME:
HXISXPLOT
PURPOSE:
Plot time series for individual pixels
CALLING SEQUENCE:
HXISXPLOT
CALLED BY:
HXISWIDGET
CALLS TO:
HXISAREA, HXISEDGE_IMG, HXISSTRLABEL, SET_UTPLOT
INPUTS:
none explicit, only through commons
OPTIONAL INPUTS:
none
OUTPUTS:
none explicit, only through commons
OPTIONAL OUTUTS:
none
CALLS: ***
ATIME [1], ATIME [2], CLEAR_UTPLOT [1], CLEAR_UTPLOT [2], HXISAREA, HXISEDGE_IMG
HXISGETWINDOW, HXISHARD, SET_UTPLOT [1], SET_UTPLOT [2], hxisSTRLABEL, hxisT_EM
CALLED BY:
HXISWIDGET, HXISWIDG_EV
COMMON BLOCKS:
hxisarea.common
hxisasread.common
hxiscolor.common
hxisdata_info.common
hxislife_fnc.common
hxislayout.common
hxistime.common
hxiswidget.common
hxiswindow.common
hxisxplot.common
SIDE EFFECTS:
If info.hard set, then the plot is printed.
RESTRICTIONS:
none
PROCEDURE:
Check to see if time series arrays in memory are still valid.
If not then recalculate time series. Plot the timeseries, and
the lifetime function if info.dead is set.
MODIFICATION HISTORY:
JAN-1991, Paul Hick (ARC)
FEB-1993, Elaine Einfalt (HSTX) - converted to widgets
[Previous]
[Next]
NAME:
HXR2FILE
PURPOSE:
Create a SMM/HXRBS FITS file for a specified time interval using
raw HXRBS telemetry data as input.
CATEGORY:
HXRBS
CALLING SEQUENCE:
hxr2file, stime=stime, etime=etime, infile=infile,
sampleave=sampleave, input=input, nofitsfile=nofitsfile,
archive=archive
CALLS: ***
ATIME [1], ATIME [2], CHECKVAR [1], HXR_DC2FITS, SETLOG, SET_SYMBOL, anytim [1]
anytim [2], anytim [3], anytim [4], anytim [5], checkvar [2]
INPUTS:
through keywords
OUTPUTS:
none explicit
KEYWORDS:
Stime: start time of data interval (in any of acceptable formats,
see anytim routine). Required if input = 'ODAF'.
Etime: end time of data interval. Required if input = 'ODAF'.
Input: type of input data - 'ODAF' or 'ADB'. Default is ODAF (one
hour compressed files originally stored on optical disk, but
currently available on optical disk or magnetic disk after
restoring from backup tape)
Infile: name of ADB file. Required if input = 'ADB'.
Sampleave:Number of .128s samples to bin together for each output point
Nofitsfile : If set, just create DC file, don't create FITS file.
Archive:If set, this output file will be part of HXRBS flare archive,
means flare data is written as 16-bit integers (otherwise, use
32-bit reals), files are named hxrbs_x.fits where x is the
flare number, and the flare information is stored in the
FITS file header.
Error: =1 if there was a problem.
CALLED BY:
HXRFITS_ARCHIVE
SIDE EFFECTS:
Creates fits file
RESTRICTIONS:
At this time only runs under VMS (set_symbol and setlog are two
reasons)
PROCEDURE:
Sample call:
pro hxr2file, stime='19-feb-94 07:45', etime='19-feb-94 07:55', $
sampleave=1, input='ODAF', /archive
MODIFICATION HISTORY:
Written 08/94 by AKT
[Previous]
[Next]
NAME:
hxr_cnt2phot
PURPOSE:
COMPUTE THE SCALING FACTORS TO CHANGE HXRBS COUNT RATES INTO PHOTON FLUXES
FOR AN ASSUMED POWER-LAW INPUT MODEL
CATEGORY:
HXRBS, SPECTROSCOPY
CALLING SEQUENCE:
scaling = hxr_cnt2phot(pl_exponent=pl_exponent,time=time [,edges=edges])
CALLS TO:
Bonomo - HXRBS Fortran Response Generator
INPUTS:
TIME - Date of HXRBS observation, i.e. 86/06/05 (YY/MM/DD)
PL_EXPONENT - Single power-law exponent, E^(-pl_exponent)
OUTPUTS:
SCALING - 15 Scaling Factors,
photon flux (ph/cm2/s/keV) = count rate (cnts/s) * scaling
EDGES - 16 edges of 15 HXRBS channels at TIME, optional
PROCEDURE:
Creates a control file, RUN_BONOMO.COM, with correct arguments
for TIME and PL_EXPONENT for a single power-law (see BONOMO).
Spawns a sub-process to run BONOMO and reads the subsequent
output file to get the energy edges and conversion factors. Reads
these values and computes the scaling factors.
CALLS: ***
CHECKVAR [1], checkvar [2]
RESTRICTIONS:
SDAC VMS ONLY, need BONOMO installed.
MODIFICATION HISTORY:
RAS, 1991(?)
[Previous]
[Next]
NAME:
HXR_DC2FITS
PURPOSE:
Create a HXRBS FITS format file from a HXRBS DC format file.
CATEGORY:
HXRBS
CALLING SEQUENCE:
HXR_DC2FITS,Dcfile
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], DCFREAD, GETUTBASE [1]
GETUTBASE [2], HXRFITS_EXT1, HXRFITS_EXT2, HXRFITS_HEAD, WRITEFITS [1]
WRITEFITS [2], break_file [4]
INPUTS:
Dcfile - name of input DC file (if disk not included, assumes
hxrbs$data)
KEYWORDS:
ARCHIVE: If set, this output file will be part of HXRBS
flare archive. Means flare data is written as
16-bit integers (otherwise, use 32-bit reals),
files are named hxrbs_x.fits where x is the
flare number, and the flare information is stored
in the FITS file header.
FITSFILE: Name of output FITS file.
CALLED BY:
HXR2FILE
COMMON BLOCKS:
ARCHIVECOM
SIDE EFFECTS:
Fits file is written to disk.
RESTRICTIONS:
At this time this program only runs under VMS.
PROCEDURE:
Uses DCFREAD to read the DC file, calls HXRFITS_HEAD, HXRFITS_EXT1,
HXRFITS_EXT2, and WRITEFITS to create the headers and write the
FITS file. Primary data contains the 15 channel data and the
livetime in 16-bit integers (if archive keyword is set) or 32-bit
reals. First extension contains the times as milliseconds in 32-bit
integers. Second extension contains the energy edges in 32-bit reals.
If archive keyword is set, file will be named hxrbs_fits:hxrbs_x.fits
where x is the flare number. If not, file will have same name as input
DC file with initial 'D' replaced by 'hxr' and extension changed
to '.fits'.
SAMPLE CALL: hxr_dc2fits, 'D9SEP06_1159.HXR', /archive,
fitsfile=fitsfile
MODIFICATION HISTORY:
Written August 1994, AKT
Mod. 05/07/96 by RCJ. Added documentation.
[Previous]
[Next]
NAME:
HXR_SPEC
PURPOSE:
Read HXRBS SUMMARY files and return spectral analysis parameters.
CATEGORY:
HXRBS
CALLING SEQUENCE:
hxr_spec, file=file, flare=flare, model=model, dir=dir, encutoff=enc, $
adaybase=adaybase, secbase=secbase, $
midtimes=midtimes, sttimes=sttimes, endtimes=endtimes,$
ydata=ydata, uydata=uydata, $
a1=a1, ua1=ua1, a2=a2, ua2=ua2, b1=b1, b2=b2, $
pow_thick=pow_thick, num_elec=num_elec, $
edgeslo=edgeslo, edgeshi=edgeshi, error=error
INPUTS:
None. Prompted for summary file if FILE or FLARE keyword not passed
OUTPUTS:
None
KEYWORDS:
FILE: (INPUT, STRING) Summary file to read. Default directory
specification is HXRBS$DATA unless you pass dir spec in FILE,
or in DIR keyword.
FLARE: (INPUT, INTEGER) If FILE keyword is not passed, finds the file
containining flare FLARE. Can only be used when files
are named according to the convention Sxxx_pl.atd,
Sxxx_th.atd, etc. where xxx is the flare number.
MODEL: (INPUT, STRING) Function used in summary file. Specify
PL, TH, BP, or BP2 for power law, thermal, broken power law,
and broken power law not using Channel 1.
DIR: (INPUT, STRING) Disk and directory specification for input
summary file.
ENCUTOFF: (INPUT, REAL) Energy cutoff for calculating thick-target
power law electron spectrum parameters. Default is 25 keV.
ADAYBASE: (OUTPUT, STRING) ASCII date of data in form YY/MM/DD.
SECBASE: (OUTPUT, DOUBLE) Number of seconds since 79/1/1 of start of
day that data is on.
MIDTIMES: (OUTPUT, DOUBLE) Midpoints of data intervals in seconds
into day ADAYBASE.
STTIMES: (OUTPUT, DOUBLE) Start times of data intervals in seconds
into day ADAYBASE.
ENDTIMES: (OUTPUT, DOUBLE) End times of data intervals in seconds
into day ADAYBASE.
YDATA: (OUTPUT, REAL) Flux in photons/cm**2/sec/kev for each channel
and each interval (nchan, nint)
UYDATA: (OUTPUT, REAL) Uncertainties on YDATA (nchan, nint)
A1: (OUTPUT, REAL) A1 best fit parameters for each data interval
UA1: (OUTPUT, REAL) Uncertainties on A1
A2: (OUTPUT, REAL) A2 best fit parameters for each data interval
UA1: (OUTPUT, REAL) Uncertainties on A2
B1: (OUTPUT, REAL) Thick-target electron power law coefficient
for each data interval (* 10^20) (power law summary files only)
B2: (OUTPUT, REAL) Thick-target electron spectral index
for each data interval (only for power law summary files)
POW_THICK: (OUTPUT, REAL) Thick-target electron power (*10^20 ergs/s) for
electrons with energy > the cutoff energy (ENCUTOFF keyword)
for each data interval (only for power law summary files).
NUM_ELEC: (OUTPUT, REAL) Number of electrons per second with energy
> the cutoff energy (* 10^20) (ENCUTOFF keyword)
EDGESLO: (OUTPUT, REAL) Low energy channel edges (kev).
EDGESHI: (OUTPUT, REAL) High energy channel edges (kev).
ERROR: (OUTPUT, INTEGER) =1 if an error occurred, 0 otherwise.
CALLS: ***
DEFAULTS_2, READSUM, thick
PROCEDURE:
Summary file to read is selected by
1. Passing the file name in keyword paramater FILE
2. Passing the flare and model in keyword parameters FLARE and
model (if flare is passed, but model isn't passed, you are
prompted for it)
3. If FILE and FLARE aren't passed, you are prompted for file.
Default directory specification is HXRBS$DATA unless you pass the
directory specification in FILE or in DIR keyword.
Uses READSUM procedure to read the summary file. Values specified in
keyword parameters will be returned to the user. Interval times are
returned in seconds since the start of day of the data. The day of
the data is returned in two forms (if you pass both keywords ADAYBASE
and SECBASE) - the ASCII date in the form YY/MM/DD, and double
precision seconds since 79/1/1 of the start of the day.
MODIFICATION HISTORY:
Written by Kim Tolbert 9/14/92
Mod by KT 7/7/93. If DIR keyword is not passed, check all optical
disk drives on node 15831 for AUTODCP0 disk. (All 6 opt. disk drives
are on 15831:: as of 6/30/93)
[Previous]
[Next]
NAME:
HXRBS
PURPOSE:
Provide a widget interface to plot HXRBS flare time profiles.
CATEGORY:
HXRBS
CALLING SEQUENCE:
HXRBS
CALLS: ***
CHECKVAR [1], CHOOSE_FL, CLEANPLOT [1], CLEANPLOT [2], CLEANPLOT [3], ERR_PLOT [1]
ERR_PLOT [2], FSELECT, GETUTBASE [1], GETUTBASE [2], HXFITS, HXRBS_EVENT, POINT [1]
SEARCH_HXRBS_DB, SET_GRAPHICS [1], SET_GRAPHICS [2], TEK_PRINT [1]
TEK_PRINT [2], TWIDGET, UTIME [1], UTIME [2], WCHECK_SET [1], WIDG_TYPE, XKILL
XMANAGER, XMENU [1], XMENU [2], XPDMENU, YOHKOH_FORMAT [1], YOHKOH_FORMAT [2]
ZOOM_COOR [1], anytim [1], anytim [2], anytim [3], anytim [4], anytim [5]
checkvar [2], hxrbs_format, linecolors [1], linecolors [2], point [2]
wcheck_set [2], yohkoh_format [3], zoom_coor [2]
INPUTS:
none explicit, only through commons;
OUTPUTS:
none explicit, only through commons;
KEYWORDS:
Group_leader: Widget ID of widget that called HXRBS
CALLED BY:
SDAC
COMMON BLOCKS:
HXRBS_WIDGETS, HXRBS_PLOT
PROCEDURE:
Data is read from fits files stored on magnetic disk by program
hxfits. The channel groups to be plotted are passed to that program
as a flag array.
Options are available to plot any of these channel groupings summed
or overlaid, log/linear plots, multiple plots, writing the data in
IDL XDR SAVE files or ASCII files, and more.
MODIFICATION HISTORY:
Written 06/92 by Kim Tolbert.
Mod. 08/02/94 by KT. When doing multiple plots and postscript output,
don't call device,/close unless !p.multi(0) eq 0. Then add a call
after looping through all flares to device,/close to make sure
it got closed.
Mod. 08/01/95 by AES. Changed size of widget.
Mod. 05/10/96 by RCJ. Added documentation.
Mod. 05/16/96 by RCJ. Added time resolution option, error bar button,
despike button, added channel range 10-15. If 'time' flare
selection, read IDL HXRBS db instead of minicatalog.
[Previous]
[Next]
NAME:
HXRBS_DEGLITCH
PURPOSE:
This function finds and replaces telemetry spikes in HXRBS data.
CATEGORY:
SMM, HXRBS
CALLING SEQUENCE:
new_counts = hxrbs_deglitch( old_counts, nsig, [ ratio, RECUR=RECUR] )
CALLS: ***
CHECKVAR [1], F_DIV, checkvar [2]
INPUTS:
OLD_COUNTS - Vector of counts with possible glitches.
NSIG - Poisson variance data must have before despiking.
OPTIONAL INPUTS:
Ratio - Threshold of spike to background ratio, default=3.
OUTPUTS:
none explicit, only through commons;
OPTIONAL OUTPUTS:
none
KEYWORDS:
none
CALLED BY:
HXFITS
COMMON BLOCKS:
none
SIDE EFFECTS:
none
RESTRICTIONS:
none
PROCEDURE:
none
MODIFICATION HISTORY:
richard.schwartz@hxrbs.nascom.nasa.gov,
based on numerous routines. 24-nov-1997.
[Previous]
[Next]
PROJECT:
SDAC
NAME:
HXRBS_ESC
PURPOSE:
This procedure extracts a day from the HXRBS Event Status Catalog
CATEGORY:
SMM, HXRBS, Housekeeping status.
CALLING SEQUENCE:
Hxrbs_esc, intime, esc
CALLS: ***
IEEE_TO_HOST [1], IEEE_TO_HOST [2], IEEE_TO_HOST [3], IEEE_TO_HOST [4]
LOC_FILE [1], LOC_FILE [2], LOC_FILE [3], SIZE_STRUCT, anytim [1], anytim [2]
anytim [3], anytim [4], anytim [5], curdir [1], curdir [2]
INPUTS:
Intime - a scalar time in anytim format.
OPTIONAL INPUTS:
none
OUTPUTS:
ESC - An array of 60 characters in 24 lines, one character/per minute
This isn't the complete Event Status Catalog, only the prioritized version.
EVENT SYMBOLS AND PRIORITIES:
1) F = MEMORY TRIGGERED
2) T = MEMORY IN TRIGGER MODE
3) U = CENTRAL DETECTOR VALID EVENT RATE EXCEEDS 1500 COUNTS / 16 SEC
4) L = CENTRAL DETECTOR VALID EVENT RATE EXCEEDS 1000 COUNTS / 16 SEC
5) M = MEMORY DUMP
6) A = SOUTH ATLANTIC ANOMALY
7) H = HIGH VOLTAGE OFF
8) N = NIGHT
9) < = REVERSE MODE DATA
10) > = FORWARD MODE DATA
11) S = SHIELD DATA
12) X = HXIS FLARE
OPTIONAL OUTPUTS:
none
KEYWORD INPUTS:
ON_TIME- If set, ESC is returned as a 0/1 mask for times of solar observing,
i.e. good telemetry, no saa, daylight, hv on, no mem dump
COMMON BLOCKS:
none
SIDE EFFECTS:
none
RESTRICTIONS:
mapesc_bin.dat must be installed in SSWDB_SMM
PROCEDURE:
The data file was extracted using the FORTRAN program, MAPESC.
MODIFICATION HISTORY:
Version 1, richard.schwartz@gsfc.nasa.gov
[Previous]
[Next]
NAME:
HXRBS_FILETIMES
PURPOSE:
Prompt user for a single time or a time interval
CATEGORY:
HXRBS
CALLING SEQUENCE:
HXRBS_FILETIMES, List, List_a
INPUTS:
List: Array containing [0]. (Also output)
List_a: Array containing [0]. (Also output)
OUTPUTS:
List: Array containing indices of flares for requested times.
List_a: Array containing indices of spectral analysis files.
CALLS: ***
UTIME [1], UTIME [2]
CALLED BY:
FLARES
COMMON BLOCKS:
FLRDIR, AUTODIR.
PROCEDURE:
HXRBS_FILETIMES is called by FLARES - prompts user for a single time or a time
interval, then searches through the info in common FLRDIR and returns
in LIST the indices of files containing the requested times.
MODIFICATION HISTORY:
Written by AKT, November 1989.
Mod. 03/15/91 by AKT. To search common AUTODIR and return in LIST_A
the indices of AUTODCP summary files containing the requested
times.
Version 1, February 1991
Mod. 05/06/96 by RCJ. Added documentation.
Version 3, ras, 21-mar-1997, changed filetimes to hxrbs_filetimes
[Previous]
[Next]
NAME:
HXRBS_OCC
PURPOSE:
This procedure finds the times of the HXRBS occultations over the
passed time intervals.
CATEGORY:
HXRBS, EPHEMERIDES
CALLING SEQUENCE:
CALLS: ***
ATIME [1], ATIME [2], DN_TRANS, GRWCH_ST, READ_EPHEMOUT, SPHCART, prstr [1], prstr [2]
INPUTS:
UTSTART - start time, ANYTIM format
UTEND - end time, ANYTIM format
OPTIONAL INPUTS:
none
OUTPUTS:
DAYMARKS - times of crossings into day in seconds from 1-jan-1979
NIGHTMARKS - times of crossings into night in seconds from 1-jan-1979
OPTIONAL OUTPUTS:
none
KEYWORDS:
none
COMMON BLOCKS:
none
SIDE EFFECTS:
none
RESTRICTIONS:
Implemented on VMS SDAC only.
PROCEDURE:
none
MODIFICATION HISTORY:
Version 1, RAS, 29-May-1996
[Previous]
[Next]
NAME:
hxrbs_response
PURPOSE:
hxrbs response function, count rate per channel as a function of
incident photon spectrum.
CATEGORY:
HXRBS, Spectral analysis, fitting
CALLING SEQUENCE:
hxrbs_response, flux=flux, em_flux=em_flux, ut_date=ut, gain=gain,
edges=edges, newflux=newflux, e_loss=energies,
omatrix=omatrix, con_factors=con_factors, un_con=un_con, error=error
CALLED BY:
drm_4_spex
CALLS TO:
none
Inputs:
FLUX - photons/cm2/s/keV defined at EM_FLUX,
optional- only needed to obtain conversion factors
EM_FLUX - energy in keV for FLUX
optional- default is the energies of the loss matrix
GAIN - HXRBS gain state
mandatory on the first call, remembered until changed
UT_DATE - Date of observation, any accepted anytim.pro format
mandatory on the first call, remembered until changed
RESOLUTION - HXRBS resolution coefficient to use, 0.75 at start of mission
1.3 at end
Inputs/Outputs:
EDGES(2,15)
- Energy edges of HXRBS 15 channels on date=UT in keV
These may be given as input values instead of the
UT_DATE and GAIN
NEWFLUX(I)
- Photon flux defined midpoints of EDGES,
- Interpolated to FLUX and EM_FLUX on midpoints of EDGES
- if not input
Outputs:
OMATRIX(I,J)
- Probability of an input flux in units of photon/cm^2/s in
- bin J resulting in a rate of counts/cm2/keV/s in bin I
E_LOSS(J)
- Energy edges for rows and columns of energy-loss matrix
CON_FACTORS(I)
- Conversion factors. Ratio of the (Integrated flux/bin width)
to NEWFLUX(I)
UN_CON(I)
- Uncertainties on the conversion factors. An expression
of the uncertainty in the detector response
ERROR - set if a parameter is entered out of range
CALLS: ***
ATIME [1], ATIME [2], CH2KVT, CHECKVAR [1], CHKLOG [1], CHKLOG [2], CONCAT_DIR [1]
CONCAT_DIR [2], CONCAT_DIR [3], FCHECK, INTERPOL, UTIME [1], UTIME [2]
X_EOUT_DRM [1], X_EOUT_DRM [2], anytim [1], anytim [2], anytim [3], anytim [4]
anytim [5], checkvar [2], concat_dir [4], edge_products
CALLED BY:
GE_WINDOW [1]
COMMON BLOCKS:
hxrbs_response, e_matrix_sav, inmatrix, res_coef_com
SIDE EFFECTS:
none
RESTRICTIONS:
none
PROCEDURE:
CALCULATE THE HXRBS RESPONSE MATRIX AND/OR COUNT RATE
FOR THE DETECTOR GAIN AND RESOLUTION ON THE DATE UT.
Intended use:
This procedure calculates the pulse-height response matrix for an
input date and gain state. The matrix is computed from an energy-loss matrix
obtained by running the HXRBS response program, BONOMO, for a set of 100
narrow line input functions. The energy loss matrix is broadened for the
resolution of the detector to yield the pulse-height response matrix for the
given date of observations. The pulse-height response matrix may be thought
as the detector pulse-height spectrum in each of the 15 energy channels for an
incident spectrum of a monoenergetic beam at one of the 100 incident energies.
The procedure reads in the energy-loss matrix and its associated energies on
its first call during an IDL session. This energy-loss matrix is resolution
broadened only when the input date is changed.
This procedure may be used in several ways:
To obtain a pulse-height response matrix for a given date:
HXRBS_RESPONSE, UT_DATE=UT_DATE, GAIN=GAIN, OMATRIX=OMATRIX, E_MATRIX=E_MATRIX, $
EDGES=EDGES
This gives the pulse-height response matrix, OMATRIX, the edges of its energy
input photon bins, E_MATRIX, the edges of the 15 HXRBS channels, EDGES. Using OMATRIX and
an incident flux integrated over the E_MATRIX bins, one can compute the count
rate in the 15 HXRBS channels, i.e.
COUNTS (counts/keV/cm2/sec) = OMATRIX#(FLUX (Ph/cm2/s/keV) * (E_MATRIX(1:*)-E_MATRIX))
This calculation of the count rate is extremely quick after OMATRIX is
obtained.
CONVERSION FACTOR calculation
CONVERSION FACTORS allow a simple transformation from the photon flux at a
given energy to the count rate in a given energy channel for a specified
model spectrum. In general, they are defined as the ratio
of the count rate spectrum in counts/s/keV/cm^2 to the photon spectrum in
photons/s/keV/cm^2 provided an incident spectrum is given. Specifically,
the CONVERSION FACTORS used in the DECONVOLVE section of DCPFIT are the ratio
of two quantities for a given channel I:
Count rate(counts/sec) in channel I
-----------------------------------
Model Photon Flux at EMID(I) * Area * Width(I)
where EMID(I) is the mid-point energy in channel I, Area is the HXRBS area
of 68.6 cm^2, and Width(I) is the channel width in keV.
This procedure will also return the CONVERSION FACTORS as follows:
On the first pass:
HXRBS_RESPONSE, UT_DATE=UT_DATE, GAIN=GAIN, E_MATRIX=E_MATRIX, EDGES=EDGES
Then, compute the photon flux, FLUX, on the midpoints of E_MATRIX and
the photon flux, NEWFLUX, on the midpoints of EDGES outside of this procedure.
The units of the photon flux must be photons/s/keV/cm^2.
you can get the conversion factors by calling:
HXRBS_RESPONSE, FLUX=FLUX, NEWFLUX=NEWFLUX, $
CON_FACTORS=CON_FACTORS, UN_CON=UN_CON
where the 15 CONVERSION FACTORS and their fractional uncertainties are given by
CON_FACTORS and UN_CON, respectively.
If the energy edges are already known, then these arguments FLUX, NEWFLUX,
CON_FACTORS, and UN_CON can be entered on the first pass throught the program.
As with the calculation of the response matrix , OMATRIX, detailed above,
this calculation is quick after the first pass.
The gain state is specified by the function IGAIN(SARS) where SARS is a
data word found in the DCFILE header.
NON-STANDARD LIBRARY ROUTINES NEEDED:
ATIME
CHECKVAR
CH2KVT
CH2MV
EDGE_PRODUCTS
X_EOUT_DRM
UTIME
YMD2SEC
SSWDB_SMM:HXRBS_MATRIX.DAT - data file with loss matrix
MODIFICATION HISTORY:
ras, 26-aug-94
ras, 20-sep-94 closed the matrix data file after reading
[Previous]
[Next]
NAME:
HXRFILE2FITS
PURPOSE:
Function to get the flare number from the HXRBS FITS archive file
names, i.e. hxrbs_flare.fits.
CATEGORY:
HXRBS
CALLING SEQUENCE:
Result = HXRFILE2FITS(Filename)
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], HXRFILE2FLARE, break_file [4]
INPUTS:
Filename: File name (!!)
OUTPUTS:
Result: Flare number
RESTRICTIONS:
At this time this routine only works under VMS. Reason: Filename.
PROCEDURE:
Returns flare number of 0 if it can't figure it out.
MODIFICATION HISTORY:
Written by K. Tolbert
Mod. 05/14/96 by RCJ. Added documentation.
[Previous]
[Next]
NAME:
HXRFITS_ARCHIVE
PURPOSE:
Create an archive of FITS files for all SMM/HXRBS events.
CATEGORY:
HXRBS
CALLING SEQUENCE:
HXRFITS_ARCHIVE, ODA=ODA, FLARE=FLARE
CALLS: ***
CH2KVT_GAIN, HXR2FILE, HXRFILE2FLARE, READ_SEQFILE, SETLOG, SMMCAT_READ, anytim [1]
anytim [2], anytim [3], anytim [4], anytim [5]
INPUTS:
Through keywords so you don't have to remember the input order.
OUTPUTS:
Fits files.
KEYWORDS:
ODA: ODA optical disk number (0-25). FITS files will be created for
all flares on the optical disk.
FLARE: flare number to create FITS file for.
COMMON BLOCKS:
SMMCAT, ARCHIVECOM
RESTRICTIONS:
At this time this routine only works under VMS.
PROCEDURE:
Reads HXRBS telemetry data from ODA optical disks by spawning
the FORTRAN program DCPCOPY, which creates an intermediate
DC-format file, then creates a FITS file from that.
If ODA keyword is passed, attempts to create FITS files for
all flares that are within the times covered by that ODA disk.
If FLARE keyword is set, just makes a FITS file for that flare.
Gets times required for flares by reading in the SMM flare catalog
using smmcat_read. FITS files created will contain full time and
energy resolution (.128sec, 15 channels).
Sample call: hxrfits_archive, oda=12
MODIFICATION HISTORY:
Written 08/94 by AKT.
Mod. 05/14/96 by RCJ. Added documentation.
[Previous]
[Next]
NAME:
HXRFITS_EXT1
PURPOSE:
HXRFITS_EXT1 composes the FITS header for the time array extension
for HXRBS FITS files.
CATEGORY:
HXRBS
CALLING SEQUENCE:
Result = HXRFITS_EXT1(Utstart, Utend, Ntimes, Dc_head)
CALLS: ***
ATIME [1], ATIME [2], PARSE_ATIME [1], SYS2UT, parse_atime [2]
INPUTS:
Utstart: Starting time in UT (sec relative to 79/1/1)
Utend: Ending time in UT (sec relative to 79/1/1)
Ntimes: Number of elements in time array.
Dc_head: Structure containing info about DC file.
OUTPUTS:
Returns fits extension header in result string array.
CALLED BY:
HXR_DC2FITS
MODIFICATION HISTORY:
Kim Tolbert Aug 17 1994.
Mod. 05/07/96 by RCJ. Added documentation.
[Previous]
[Next]
NAME:
HXRFITS_EXT2
PURPOSE:
HXRFITS_EXT2 composes the FITS header for the energy edges extension
for HXRBS FITS files.
CATEGORY:
HXRBS
CALLING SEQUENCE:
Result = HXRFITS_EXT2(Utstart, Utend, Nedges)
CALLS: ***
ATIME [1], ATIME [2], PARSE_ATIME [1], SYS2UT, parse_atime [2]
INPUTS:
Utstart: Starting time in UT (sec relative to 79/1/1)
Utend: Ending time in UT (sec relative to 79/1/1)
Nedges: Number of channels. Nedges is a 2 x 15 array
containing lower and higher edge for each channel.
OUTPUTS:
Returns fits extension header in result string array.
CALLED BY:
HXR_DC2FITS
MODIFICATION HISTORY:
Kim Tolbert Jul 14 1994.
Mod. 05/07/96 by RCJ. Added documentation.
[Previous]
[Next]
NAME:
HXRFITS_HEAD
PURPOSE:
HXRFITS_HEAD composes the primary FITS header for HXRBS FITS files.
CATEGORY:
HXRBS
CALLING SEQUENCE:
Result = HXRFITS_HEAD(Utstart, Utend, Ntimes, Dc_head, Numext)
CALLS:
ATIME [1], ATIME [2], PARSE_ATIME [1], SYS2UT, anytim [1], anytim [2], anytim [3]
anytim [4], anytim [5], crystal_res., parse_atime [2], time2dmy
INPUTS:
Utstart: Starting time in UT (sec relative to 79/1/1).
Utend: Ending time in UT (sec relative to 79/1/1).
Ntimes: Number of elements in time array.
Dc_head: Structure containing info about DC file.
Numext: Number of extensions.
OUTPUTS:
Returns fits primary header in result string array.
KEYWORDS:
ARCHIVE: See hxr_dcfits.pro for explanation.
CALLED BY:
HXR_DC2FITS
COMMON BLOCKS:
ARCHIVECOM
MODIFICATION HISTORY:
Kim Tolbert Jul 13 1994.
Mod. 05/07/96 by RCJ. Added documentation.