SAVE_DCDATA $SSW/smm/hxrbs/idl/save_dcdata.pro
[Previous] [Next]

 NAME:
	SAVE_DCDATA

 PURPOSE:
       To write time, y, and energy arrays into an XDR save file.  

 CATEGORY:
       HXRBS

 CALLING SEQUENCE:
   	SAVE_DCDATA, tarray, yarray

 CALLS: ***
	ATIME [1], ATIME [2], CHECKVAR [1], DEFAULTS_2, GETUTBASE [1], GETUTBASE [2]
	PARSE_ATIME [1], checkvar [2], parse_atime [2]
 INPUTS:
   	Tarray:	array of time values in seconds relative to the already set base
            	time (set by DCFREAD if DCFREAD was just called, otherwise need
            	to set it by calling setutbase,'basetime')
   	Yarray:	array of y values (npoints,nchannels) 

 OUTPUTS:
       XDR file.

 KEYWORDS:
	LOEDGES:	array of energies corresponding to low edges of 
			channels.
   	HIEDGES:	array of energies corresponding to high edges of 
			channels.
   	FILE:		output file name.
   	DATATYPE:	string containing type of data (e.g. 'HXRBS') to be 
			used in output file name if FILE keyword not provided.

 PROCEDURE:
	Assumes that the tarray is relative to the current utbase as set by
   	DCFREAD (or explicitly set by user).  If FILE is passed without an
   	extension, default extension is .SAV.  If FILE is not passed, output
   	file name is constructed from DATATYPE (if passed) and start time of
   	data (HXRBS_YYMMDD_HHMM.SAV).
   	Output file is written in XDR format and will contain the time array,
   	the y array, the base time in ascii and seconds, and, if provided, 
   	the low and high energy edges.

 MODIFICATION HISTORY:
	Written 12/92 by Kim Tolbert.
	Mod. 05/14/96 by RCJ. Mod. documentation.


SC4HREAD $SSW/smm/hxrbs/idl/sc4hread.pro
[Previous] [Next]
  Name:
       SC4HREAD
 PURPOSE: Read the first record of an SC4 file and return the descriptors.

 CALLING SEQUENCE:
 SC4READ,FILE,DESC,NX,NY,NV,NW,NEXT

 INPUT ARGUMENTS:
 FILE -             name of file to read (string)
                    Default volume/directory is HXRBS$DATA:, 
                    Default extension is .SC4

 OUTPUT ARGUMENTS:
 DESC -             array of 20 25-character strings containing the following 
                    descriptors:
                    title, zlabel, xlabel, ylabel, vlabel, wlabel, timestart, 
                    timeend, timecreate, instrument, and spares
 NX,NY,NV,NW,NEXT - dimensions of data arrays:
                    Z(NX,NY,NV,NW), X(NX,NEXT), Y(NY,NEXT), 
                    V(NV,NEXT), W(NW,NEXT)

 DATE: 89/5/16 
	Modified for IDL Version 2 by Richard Schwartz, Feb. 1991
 CALLS:


SC4READ $SSW/smm/hxrbs/idl/sc4read.pro
[Previous] [Next]
  Name:
       SC4READ
 PURPOSE: Read SC4 files.  !MTITLE, !XTITLE, AND !YTITLE are set to 
          the corresponding descriptors if they aren't already defined.

 CALLING SEQUENCE:
 SC4READ,FILE,DESC,Z,X,Y,V,W

 INPUT ARGUMENTS:
 FILE -      name of file to read (string)
             Default volume/directory is HXRBS$DATA, Default extension is .SC4

 OUTPUT ARGUMENTS:
 DESC -      array of 20 25-character strings containing the following 
             descriptors:
             title, zlabel, xlabel, ylabel, vlabel, wlabel, timestart, 
             timeend, timecreate, instrument, and spares
 Z,X,Y,V,W - data array and axis definition arrays
             Z(NX,NY,NV,NW), X(NX,NEXT), Y(NY,NEXT), V(NV,NEXT), W(NW,NEXT)
             where NX,NY,NV,NW, and NEXT are read from the second record
             of the file.

 DATE: 89/4/21, modified for IDL Version 2 by Richard Schwartz, Feb. 1991
 CALLS:


SC4SUMMARY $SSW/smm/hxrbs/idl/sc4summary.pro
[Previous] [Next]
  Name:
       SC4SUMMARY
 PURPOSE: Display short summary of all SC4 files on a data directory.

 CALLING SEQUENCE:
 SB4SUMMARY,[DATADIR]

 INPUT ARGUMENTS:
 DATADIR - (Optional) String containing data directory to search for SC4 files.
           If no argument passed, default is current definition of HXRBS$DATA.

 OUTPUT ARGUMENTS:
 NONE

 DATE: 90/1/11


SC4TREAD $SSW/smm/hxrbs/idl/sc4tread.pro
[Previous] [Next]
  Name:
       SC4TREAD
 PURPOSE: Read SC4 files that have time array in x axis. Sets UTBASE (for
          (UTPLOT package) to start of day of data, and adds offset to 
          time array to make it relative to start of day.  !MTITLE, !XTITLE, 
          and !YTITLE are set to the corresponding descriptors if they aren't
          already defined.  The more general version of this routine, SC4READ, 
          doesn't assume the x array is time.

 CALLING SEQUENCE:
 SC4TREAD,FILE,DESC,Z,X,Y,V,W,NOBTIME

 INPUT ARGUMENTS:
 FILE -      Name of file to read (string)
             Default volume/directory is HXRBS$DATA, Default extension is .SC4
 NOBTIME -   Presence of this argument means don't set UTBASE. Value is a 
             dummy.   
 Optional keyword input arguments:
 VERBOSE -   =0/1 means don't/do print file summary information after
             reading file.
 ERROR -     =0/1 means no error/error opening or reading file

 OUTPUT ARGUMENTS:
 DESC -      Array of 20 25-character strings containing the following 
             descriptors:
             title, zlabel, xlabel, ylabel, vlabel, wlabel, timestart, timeend,
             timecreate, instrument, and spares
 Z,X,Y,V,W - Data array and axis definition arrays
             Z(NX,NY,NV,NW), X(NX,NEXT), Y(NY,NEXT), V(NV,NEXT), W(NW,NEXT)
             where NX,NY,NV,NW, and NEXT are read from the second record
             of the file.

 DATE: 89/4/21
	Modified for IDL Version 2, by Richard Schwartz, Feb. 1991
 CALLS:
 CALLED BY
	HXARCHIVE


SCALECOM [2] $SSW/smm/gen/idl/graphics/scalecom.pro
[Previous] [Next]

 NAME: 
	SCALECOM

 PURPOSE:
	This is an include block to be used with CH_SCALE and PL_SCALE

 CATEGORY:
	GRAPHICS

 CALLING SEQUENCE:
  	@scalecom

 CALLS:
	none
 INPUTS:
       none explicit, only through commons;

 OPTIONAL INPUTS:
	none

 OUTPUTS:
       none explicit, only through commons;

 OPTIONAL OUTPUTS:
	none

 KEYWORDS:
	none
 COMMON BLOCKS:
	scalecom

 SIDE EFFECTS:
	none

 RESTRICTIONS:
	none

 PROCEDURE:
	none

 MODIFICATION HISTORY:
	ras, 10-June-1996	documented


SDAC $SSW/smm/gen/idl/widgets/sdac.pro
[Previous] [Next]
 NAME:  
             SDAC
 PURPOSE:
             to provide GUI interface to SDAC software
 CATEGORY:  
             widgets
 CALLING SEQUENCE: 
             SDAC
 CALLS: ***
	ACRIM, BCS, CP [2], FCS, GOES, HXIS, HXRBS, SELSIS, XMANAGER, XPDMENU, XREGISTERED, cp [1], uvsp
 RESTRICTIONS:
             requires X-windows
 MODIFICATION HISTORY:                           
              written Nov'91 by DMZ (ARC)


SDAC_CAT $SSW/smm/gen/idl/widgets/sdac_cat.pro
[Previous] [Next]
 NAME:  
             SDAC_CAT
 PURPOSE:
             to provide GUI interface to SMM catalogs
 CATEGORY:  
             widgets
 CALLING SEQUENCE: 
             SDAC_CAT
 CALLS: ***
	LISTBCS, XMANAGER, XPDMENU, XREGISTERED
 RESTRICTIONS:
             requires X-windows
 MODIFICATION HISTORY:                           
              written Nov'91 by DMZ (ARC)


SEARCH_HXRBS_DB $SSW/smm/hxrbs/idl/search_hxrbs_db.pro
[Previous] [Next]

 NAME:
	SEARCH_HXRBS_DB

 PURPOSE:
       Search hxrbs db and return array of structures containing info on
	flares.

 CATEGORY:
       HXRBS

 CALLING SEQUENCE:
       SEARCH_HXRBS_DB,Search,List,Fldata

 CALLS: ***
	ASTROLIB, CHECKVAR [1], DBCLOSE [1], DBCLOSE [2], DBCLOSE [3], DBEXT [1], DBEXT [2]
	DBEXT [3], DBEXT [4], DBFIND [1], DBFIND [2], DBFIND [3], DBOPEN [1], DBOPEN [2]
	DBOPEN [3], checkvar [2]
 INPUTS:
       Search:	Search string. See PROCEDURE.

 OUTPUTS:
       List:	Long array containing entry numbers (result of search).
	Fldata:	Array of structures containing info on flare(s).

 KEYWORDS:
	SILENT: If =1 does not print number of entries found in db.

 CALLED BY:
	HXRBS
 PROCEDURE:
       Open HXRBS database, search according to input string (see The UIT
	Database System by W.B. Landsman for valid inputs), and return
	array of structures (fldata) containing all items in the db
	correspondent to the elements of list.
	Note that tag_names and array names are different, since items names
	in the db do not match array names in various programs.

 MODIFICATION HISTORY:
	Written 05/96 by RCJ.
	Mod. 06/07/96 by RCJ. To return not one structure but an array of
		structures.
	Mod. 02/04/97 by RCJ. Added keyword /silent.


SET_GRAPHICS [2] $SSW/smm/gen/idl/graphics/set_graphics.pro
[Previous] [Next]
 NAME:
	 SET_GRAPHICS

 PURPOSE: 
	Set screen and hardcopy output graphic devices for use with the 
	TEK_INIT, TEK_PRINT, and TEK_END procedures (which now 
	handle both Tektronix and PostScript format).

 CATEGORY:
	GRAPHICS

 CALLING SEQUENCE:
       SET_GRAPHICS[,SCREEN=SCREEN,PRINTER=PRINTER,ERROR=ERROR,QUERY=QUERY, $
		HELP=HELP]
 CALLS: ***
	CHECKVAR [1], CHKLOG [1], CHKLOG [2], STR_SEP, XDEVICE, checkvar [2]
 INPUTS:
       None.

 KEYWORDS:
   	SCREEN:		Screen device type.  Options are 'TEK', 'REGIS', 'X', 
			and 'NULL'. On return, SCREEN contains the screen 
			device type selected. Default is X in X-windows 
			machine, TEK otherwise.
   	PRINTER:	Printer device type.  Options are 'TEK' and 'PS'.  
			On return PRINTER contains the printer device type 
			selected. Default is PS.
   	ERROR:		0/1 means no error / error
   	QUERY:		0/1 means prompt/don't prompt user for device types 
			(only for device not selected via SCREEN or PRINTER 
			keyword)
   	HELP:		=1 means print current selection of device types on 
			screen.

 CALLED BY:
	DO_ARCHIVEPLOTS, DO_PSPLOTS, DRAW_FLARE, FLDISPLAY, FS_ARCHIVE_DRAW, FS_AUTO_LOG
	FS_GRAPH, FS_OVERLAY, HXARCHIVE, HXFITS, HXRBS, PLOTBATSE, PLOTBATSE_QL, QLDISPLAY
	QL_DAY_PLOT, QL_ORBIT_PLOT, SELECT_DEV, TEK_INIT [1], TEK_INIT [2], batse_menu
 COMMON BLOCKS:
       TEK_COMMON.

 PROCEDURE:
 	To make hardcopies of plots on Talaris 800, use IDL commands:
   	tek_init
    	plot commands ...
   	tek_end
   	tek_print
 	(tek_init calls set_graphics if you haven't called it explicitly)

 	Screen and printer device types are saved in sc_device and hard_device
 	in common tek_common.

 MODIFICATION HISTORY:
       Mod. 09/02/92 by AKT. Made PS the default for hard_device.
	Mod. 05/06/96 by RCJ . Added documentation.


SET_X [2] $SSW/smm/gen/idl/graphics/set_x.pro
[Previous] [Next]
 Project     : Generic  
                   
 Name        : SET_X   
               
 Purpose     : Set the device to 'X' with vector fonts.
               
 Category    : graphics
               
 Explanation : Uses "set_plot"
               
 Use         : SET_X
    
 Inputs      : None
               
 Opt. Inputs : None
               
 Outputs     : None

 Opt. Outputs: None
               
 Keywords    : None

 CALLS: ***
	HAVE_WINDOWS [1], HAVE_WINDOWS [2], OS_FAMILY
 CALLED BY:
	CHIANTI_NE, CHIANTI_TE, HESSI_ATTENUATOR_SPECTRA, PLOT_ANGC [1], PLOT_ANGC [2]
	PLOT_GD, PLOT_HESSI_FILTERS, QLDISPLAY, X [1], X [2], XPRINT [2], XPRINT [5]
 Common      : None
               
 Restrictions: 
               
 Side effects: !p.font set to -1
               
 Prev. Hist  : 

 Mod.        :
       version 1, ras 2-Mar-1996


SETLEVEL_EV $SSW/smm/hxis/hxissetlevel.pro
[Previous] [Next]

 NAME:
	SETLEVEL_EV

 PURPOSE:
	Event handler for HXISSETLEVEL

 CATEGORY:
	HXIS display

 CALLING SEQUENCE:
	SETLEVEL_EV, EVENT

 CALLED BY:
	HXISSETLEVEL (through the XMANAGER)

 CALLS TO:
	CALCONLEV

 INPUTS:
       none explicit, only through commons

 OPTIONAL INPUTS:
	none

 OUTPUT:
       none explicit, only through commons

 OPTIONAL OUTPUT:
	none

 CALLS: ***
	CALCONLEV, HXISSETLEVEL, XMANAGER
 CALLED BY:
	CALCONLEV, HXISSETLEVEL
 COMMON BLOCKS:
	HXISSETLEV	to pass contour level variables through XAMANAGER
	HXISWIDGET	for the ID of the comment widget

 SIDE EFFECTS:
	none

 RESTRICTIONS:
	none

 PROCEDURE:
	Recieve events from the XMANAGER and process.

 MODIFICATION HISTORY:
	DEC-92, Elaine Einfalt (HSTX) 


SETPULSETRAIN $SSW/smm/hxrbs/idl/setpulsetrain.pro
[Previous] [Next]

 NAME: 
       SETPULSETRAIN

 PURPOSE:
 Used in PILEUP.PRO (CALL: BONOMO:pileup:dobaseline:setpulsetrain);

 CATEGORY:
       HXRBS

 CALLING SEQUENCE:
	setpulsetrain, r,tsteps

 CALLS: ***
	POISPROB
 INPUTS:
       r - count rate (/sec)
       tsteps

 OPTIONAL INPUTS:
	none

 OUTPUTS:
       none explicit, only through commons;

 OPTIONAL OUTPUTS:
	none

 KEYWORDS:
	none
 CALLED BY:
	DOBASELINE
 COMMON BLOCKS:
	none

 SIDE EFFECTS:
	none

 RESTRICTIONS:
	none

 PROCEDURE:
	none

 MODIFICATION HISTORY:
	ras, 1987


SOLRAD $SSW/smm/xrp/idl/fcs/solrad.pro
[Previous] [Next]
 NAME:
            SOLRAD
 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:
	PLOTMAP, drot
 MODIFICATION HISTORY:
            written by GLS (ARC)
            modified by DMZ (ARC Aug'90)


SPECPROB $SSW/smm/hxrbs/idl/specprob.pro
[Previous] [Next]

 NAME: 
       SPECPROB

 PURPOSE:
 Used in PILEUP.PRO (CALL: BONOMO:pileup:dobaseline:specprob)

 CATEGORY:
       HXRBS

 CALLING SEQUENCE:
       specprob,sfn,esfn,spectrum

 CALLS:
	none
 INPUTS:
       sfn
       efn

 OPTIONAL INPUTS:
	none

 OUTPUTS:
       spectrum

 OPTIONAL OUTPUTS:
	none

 KEYWORDS:
	none
 CALLED BY:
	DOBASELINE, POISPROB
 COMMON BLOCKS:
	none

 SIDE EFFECTS:
	none

 RESTRICTIONS:
	none

 PROCEDURE:
	none

 MODIFICATION HISTORY:
	ras, 1987


st_img $SSW/smm/xrp/idl/fcs/st_img.pro
[Previous] [Next]
 NAME:
          st_img
 PURPOSE:
          insert image attributes as members in a structure of arbitrary
          name.
 CALLING SEQUENCE:
          img=st_img(data)
 INPUTS:
          data = image array
 KEYWORDS (optional)
          dx,dy = pixel spacing in x and y directions (arcsecs)
          xp,yp = pointing coordinates of center of image 
                  (arcsecs relative to solar origin: +N, +W)
          id = string name identifying image (in UTPLOT format)
          time = string time of data
          exps = exposure time per pixel (secs)
          pitch,yaw,roll = spacecraft pitch, yaw, and roll (deg)
          wave = wavelength of observation
          stname = string name for structure IMG  
          maxd=max size of 1-d buffer array [def=2000]
 OUTPUTS:
          img={stname:data:data,nx:nx,ny:ny,xp:xp,yp:yp,id:id,time:time,exps:exps, $
           pitch:pitch,yaw:yaw,roll:roll,wave:wave}
          img.data = 1-d array containing count rates
          img.nx,ny = 2-d dimensions of image
          img.xp,yp = coordinates of image pixels (arcecs) relative to solar origin
          img.id = string name identifying image
          img.time = string time of data (e.g. 87/11/12 1235:00)
          img.exps = exposure time per pixel (secs)
          img.pitch,yaw,roll = spacecraft pitch, yaw, and roll (deg)
          img.wave = address or wavelength 
 CALLED BY:
	GET_UVSP, RDFCS, RDFIS, rdfis_img, st_merge
 PROCEDURE:
          2d data are placed into a 1-d buffer with initial maximum size MAXD
          If STNAME is entered then the EXECUTE function is used to 
          label IMG with this name.
MODIFICATION HISTORY:
          written June 1990 (DMZ, ARC) 
          modified Aug 1991 (DMZ) - converted xp,yp to arrays of coordinates
          modified Feb 1992 (DMZ) - made STNAME optional


st_merge $SSW/smm/xrp/idl/fcs/st_merge.pro
[Previous] [Next]
 NAME:
          st_merge
 PURPOSE:
          merge multiple image structures into a single structure
 CATEGORY:
          utility
 CALLING SEQUENCE:
          s1=st_merge(sname,st)
 INPUTS:
          sname = structure name (string)
          st = array of input structures
 OUTPUTS:
          s1 = output structure
 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], NINT [1], NINT [2], RUST, st_img
 PROCEDURE:
 MODIFICATION HISTORY:
          written Oct 1990 (DMZ, ARC) 


STARTUP_V2 $SSW/smm/hxrbs/idl/startup_v2.pro
[Previous] [Next]

 NAME: 
       STARTUP_V2

 PURPOSE:


 CATEGORY:
       HXRBS

 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:


stcname $SSW/smm/xrp/idl/fcs/stcname.pro
[Previous] [Next]
 NAME:
          stcname
 PURPOSE:
          check and make a structure name unique to avoid conflicts with
          duplicate structure names.
 CATEGORY:
          utility
 CALLING SEQUENCE:
         stcname,stname
 INPUTS:
         stname = string name for structure
 OUTPUTS:
         stname = new name
 CALLED BY:
	RDFCS
 PROCEDURE:
         - checks if STNAME already saved in COMMON STBANK
         - if so, then a new name is created by appending an index
         - e.g. new_name = stname_1
 RESTRICTIONS:
         up to 999 structure names can be saved.
 MODIFICATION HISTORY:
          written DMZ (ARC) Jun'91 


string name of the file to be found $SSW/smm/uvsp/idl/uvspdevck.pro
[Previous] [Next]

  FUNCTION UVSPDEVCK, FILE=FILE, [COMMENT=COMMENT, DISK=DISK]
    check all devices in list and return the first one that contains FILE

  KEYWORDS:
	FILE : string name of the file to be found
	COMMENT : is the widget ID of a text widget, where status messages
		  will appear
  	DISK : optionally may insert a disk(s) in front of hard code search path
  OUTPUT : 
	OPDEV : string name of the device with file found on it (if any)
		if an error occurs the string "any device with" is returned
	ERROR : 0 if file was found on any device
		1 if file was not found on any device 

 CALLS:


Sumf2str $SSW/smm/hxrbs/idl/sumf2str.pro
[Previous] [Next]
 NAME:
      Sumf2str
 CATEGORY:
      HXRBS
 PURPOSE:
      Read and extract parameters from summary file into a structure SUMFSTR.
 CALLING SEQUENCE:
      INT_SUM= Sumf2str(file[, HEADER=HEADER])
 INPUTS:
      File - File name.  HXRBS$DATA assumed if directory is specified.
 OUTPUTS:
      INT_SUM - Structure with Summary file info for each interval
       From READSUM:
       RINT = real*4 data array containing the following for each interval
      (where J is the interval counter):
	RINT(0,J) - chi-square for fit                            
	RINT(1,J) - 4 element array of best fit parameters 
	RINT(5,J) - 4 element array of uncertainties on best fit parameters
	RINT(9,J) - Ratio of parameter chosen in DCPSPEX to test for convergence
         	    Ratio of A(n) of last/previous fit
	RINT(10,J) - Total live time in seconds of flare interval
	RINT(11,J) - 15 element array of Y values (flux in 15 energy channels)
	RINT(26,J) - 15 element array of uncertainties on Y
	RINT(41,J) - 9 element array of spares
    HINT = integer*4 data array containing the following for each interval
      (where J is the interval counter):
	HINT(0,J) - Method used for subtracting background in DCPACCUM
  		    0 = no background subtracted
		    1 = one pre-flare background interval used
		    2 = one post-flare background interval used
		    3 = pre- and post-flare background intervals used
	HINT(1,J) - number of loops through DCPSPEX for this interval
	HINT(2,J) - Bit map indicating channels used in fit (bit 0 corresponds
	 	    to channel 1, bit = 1 means it was used)
	HINT(3,J) - number of degrees of freedom
	HINT(4,J) - interval number
	HINT(5,J) - start time of interval in msec relative to basetime
	HINT(6,J) - end time of interval in msec relative to basetime
	HINT(7,J) - pulse pile-up correction flag, 0/1 = disable/enable
	HINT(8,J) - fit weighting flag, 1/2/3/4 = stat/none/instr/yfit 
	HINT(9,J) - function used (1=1POWER; 2=1THERMAL; 3=1GAUSS; 4=G+P; 
 		5=G+T; 6=2G; 7=3G; 8=POLY; 9=2POW; 10=2THERM; 11=T+POW; 
		12=1EXP; 13=2EXP; 14=DPOW; 15=G+EXP; 16=M(G+T; 17=T+DPOW;  
		18=VTHERM; 19=2VTH; 20=VTH+POW; 21=VTH+DP; 22=G+VTH; 23=BPOW)
	HINT(10,J) - number of fit parameters
       HINT(11,J) - 9 element array of spares

 OPTIONAL OUTPUT PARAMETERS:
      Header=Header, Contains from READSUM:
    DHEAD = real*8 header array 
	DHEAD(0) - base time of file in R*8 seconds since 79/1/1,0000
	DHEAD(1) - start time of flare in R*8 seconds since 79/1/1,0000
	DHEAD(2) - peak time of flare in R*8 seconds since 79/1/1,0000
    RHEAD = real*4 header array 
	RHEAD(0) - 15 element array of low energy channel edges
	RHEAD(15) - 15 element array of high energy channel edges
    HHEAD = integer*4 header array 
	HHEAD(0) - Flare number
	HHEAD(1) - Duration of flare in seconds
	HHEAD(2) - Peak rate of flare in counts / second (no bkgd subtraction)
	HHEAD(3) - Total number of counts in flare
	HHEAD(4) - Active region number on sun of flare
	HHEAD(5) - Number of intervals of data available in this summary file

 KEYWORDS:
      ERROR - =1, passed from READSUM
 CALLS: ***
	READSUM
 COMMON BLOCKS:
      None
 SIDE EFFECTS:
      None.
 RESTRICTIONS:
      File name must be a scalar string.
 PROCEDURE:
      Uses READSUM and blocks the data into a structure.
 MODIFICATION HISTORY:
 R Schwartz  June 93


SXT_IMAGE $SSW/smm/gen/idl/graphics/sxt_image.pro
[Previous] [Next]
 NAME:
	SXT_IMAGE
 PURPOSE:
	Read a Yohkoh Soft X-ray Telescope (SXT) byte-scaled,
	photometrically corrected image from a FITS file, and return the
	descaled, floating-point image.

 CALLING SEQUENCE:
	descaled_image = SXT_IMAGE(filename = filename, [scaled_image =
			scaled_image,] [scale_factor = scale_factor,]
			[image_time = image_time,] [show_image = show_image])

 INPUTS:
	FILENAME = String containing the name of the FITS file to be read.

 OUTPUTS:
	Result = floating point image array (usually 512 x 512, but
		sometimes 256 x 256)

 OPTIONAL OUTPUT:
	SCALED_IMAGE = original contents of file
	SCALE_FACTOR = scaling for logarithmic scaling on the current X
		device
	IMAGE_TIME = string concatenating DATE-OBS and TIME-OBS from the
		FITS header

 OPTIONAL INPUT KEYWORD:
	SHOW_IMAGE - if present and non-zero, display the image on the
		currently selected graphics device

 EXAMPLE:
	Find the most current SXT image on the SXT image directory on
	SDAC, and display it on the current device:

	s = findfile("SDAC::SXT$DATA:SF_FITS*.*")
	n = n_elements(s)
	a = SXT_IMAGE(filename = s(n - 1), /show_image)

 CALLS: ***
	FXPAR [1], FXPAR [2], LOADCT, READFITS [1], READFITS [2], READFITS [3]
 RESTRICTIONS:
	(1)     Users with versions of IDL before 2.2.1 will have problems
		with the use of the TEMPORARY function.

 NOTES:
	The current version is developmental, and arguments and keywords
	may be added or removed.

 PROCEDURES USED:
	READFITS and FXPAR (Astronomy library)

 MODIFICATION HISTORY:
	D.M. fecit					26 September, 1993

	Corrected /SHOW_IMAGE response to use !D.WINDOW + 1 instead of 0,
	and REBINned all images to 512 x 512,		7 October, 1993.

	Changed /SHOW_IMAGE again to use /FREE instead of !D.WINDOW + 1.

	ras, 15-sep-1995, search for keywords using fxpar,
	  and if DATEOBS keyword isn't found, then DATE-OBS is used.

	Added test to see whether the file can be opened --- problem with
	anonymous ftp (Internet meltdown?), D.M. fecit.	1996 September 29