DC_FILESUMMARY $SSW/smm/hxrbs/idl/dc_filesummary.pro
[Previous] [Next]

 NAME:
	DC_FILESUMMARY

 PURPOSE:
       This procedure opens the DC-format files for the instrument specified 
	in INSTR on the directory specified by DIR and prints the start and 
	end times of the files. 

 CATEGORY:
       HXRBS

 CALLING SEQUENCE:
       DC_FILESUMMARY

 CALLS: ***
	ATIME [1], ATIME [2]
 INPUTS:                          
       Through keywords, so you don't have to remember the input order.

 OUTPUTS:
       Start and end times of files on the screen.

 KEYWORDS:
       DIR:	Directory containing the DC-format files.
	INSTR:	Instrument requested.
	OUTFILE:If OUTFILE is specified, writes the file names and start/end 
		times in an IDL save file.
       
 MODIFICATION HISTORY:
       Written 03/26/93 by Kim Tolbert.
	Mod. 05/14/96 by RCJ. Added documentation.


dc_getfile $SSW/smm/hxrbs/idl/dc_getfile.pro
[Previous] [Next]
 NAME:
	dc_getfile
 PUROSE:
	Called by DCFREAD to find the correct DC file to read based on
	user-selected times.  Finds all of the DC files on the specified
	directory (HXRBS$DATA if none specified) containing data for
	specified instrument.  Saves start and end times for each file.
	Finds any files that overlap with the start/end times specified
	(or if just one time was specified, the files that contain that time).
       If more than one file is found, or no file is found but several files
	are close, the list of possible files is displayed and the user is
	prompted for his selection.
 INPUTS:
	STIME - User-specified start time in r*8 MILLIseconds since 79/1/1,0
	ETIME - User-specified end time in r*8 MILLIseconds since 79/1/1,0
	CINSTR - Instrument. Type of DC file to read. (HXR, GOE, V13, etc)
	CDIR - Directory to search for files
       SPAN_FILES - (keyword parameter) 1 means assume DC files are continuous
       in time and if hit eof before reaching requested end time, open
       the next sequential file and continue accumulating data. 0 otherwise.
 OUTPUTS:
	FILES_FOUND - Name of file(s) containing times requested by user.  
       Includes directory specification.
	ERROR - 0/1 indicates no error/error
       ERR_MSG - ASCII string containing error message if error = 1
 
 CALLS: ***
	ATIME [1], ATIME [2], FIND_GOES_DATA
 CALLED BY:
	DCFREAD
 MODIFICATION HISTORY:
	Written by Eric Carzon and K. Tolbert August 1992
       Mod. 3/36/93 by KT. For GOES data, call find_goes_data which will
         determine if the disk with the requested data is available, and
         return the file names and start and end times.
       Mod 7/2/93 by KT to add err_msg keyword parameter.


DC_HEADER $SSW/smm/hxrbs/idl/dc_header.pro
[Previous] [Next]

 NAME:
	DC_HEADER

 PURPOSE:
	Called by DCFREAD to read the header of a DC file and return some
	general information about the file.

 CATEGORY:
       HXRBS

 CALLING SEQUENCE:
       DC_HEADER, Lun, Dcfile, Npts, Nchusd, Loedges, Hiedges, Nptprec, 
		Nrec, Deltat, Fstart, Fend

 CALLS: ***
	ATIME [1], ATIME [2]
 INPUTS:
	Lun:	Logical unit assigned to file to read
	Dcfile:	Name of DC file to read

 OUTPUTS:
	Npts:	Total number of data intervals in the file
	Nchusd:	Number of channels
	Loedges:Low edges of energy channels (units depend on type of data)
	Hiedges:High edges of energy channelss (units depend on type of data)
	Nptrec:	Number of data intervals per physical record
	Nrec:	Number of data records (doesn't count the two header records)
	Deltat:	Delta t of data intervals in milliseconds
	Fstart:	Start time of file in r*8 MILLIseconds since 79/1/1,0
	Fend:	End time of file in r*8 MILLIseconds since 79/1/1,0

 KEYWORDS:
	HEAD:	Returns entire header structure 

 CALLED BY:
	DCFREAD
 MODIFICATION HISTORY:
	Written by Shelby Kennard and K. Tolbert
       Mod. 06/22/93 by K. Tolbert to not set base time (this is now done
          in dcfread if user didn't set nosetbase keyword), and not return
          the seconds into the day of the start of the data.
       Mod. 04/21/94 by KT to handle files that weren't closed properly.
          Those files have an end time, number of data points, and JTERM
          equal to 0.  Before would crash.  Now use fstat to guess how
          many data points there are from the number of records.
       Mod. 07/13/94 by KT to add HEAD keyword argument.
	Mod. 05/09/96 by RCJ. Added documentation.


DC_USERTIMES $SSW/smm/hxrbs/idl/dc_usertimes.pro
[Previous] [Next]

 NAME:
	DC_USERTIMES

 PURPOSE:
	Procedure to find the physical record number and logical record within
   	that physical record of a DC file that corresponds with the user's
	selected start time.

 CATEGORY:
       HXRBS

 CALLING SEQUENCE:
	DC_USERTIMES, Zz, Fstart, Fend, Deltat, Stime, Etime, Nptprec, 
		Npts, Nrec, Lrec_tot, Prec, Lrec, Error

 INPUTS:
	Zz:	Associated variable tied to input DC file.
	Fstart:	Start time of file in r*8 MILLIseconds since 79/1/1,0.
	Fend:	End time of file in r*8 MILLIseconds since 79/1/1,0.
	Deltat:	Number of MILLIseconds in each data interval.
	Stime:	Start time selected by user in r*8 MILLIseconds since 79/1/1,0.
	  	If 0., will be set to start of file on return.
	Etime:	End time selected by user in r*8 MILLIseconds since 79/1/1,0.
	Nptrec:	Number of data intervals (logical records) per physical record
	Npts:	Number of data intervals in the file
	Nrec:	Number of physical records in the file

 OUTPUTS:
   	Lrec_tot:	Maximum number of logical records (data intervals) to 
	   		be read (used to initially dimension arrays T and Y)
   	Prec:		First physical record number to be read
   	Lrec:		First logical record in PREC to begin reading at
   	Error:		0/1 means no error/error.

 KEYWORDS:
       ERR_MSG:	ASCII string containing error message if ERROR=1

 CALLS: ***
	ATIME [1], ATIME [2]
 CALLED BY:
	DCFREAD
 MODIFICATION HISTORY:
 	Written by Eric Carzon and K. Tolbert, August 1992
       Mod. 7/2/93 by KT to add ERR_MSG keyword parameter.
	Mod. 05/09/96 by RCJ. Added documentation.


DCFREAD $SSW/smm/hxrbs/idl/dcfread.pro
[Previous] [Next]
 NAME:
      DCFREAD
 CALLED PROCEDURES:
      DC_GETFILE, DC_HEADER, DC_USERTIMES
 PURPOSE:
      Read HXRBS DC file and return array of times, y values, and livetimes.
 INPUT KEYWORD PARAMETERS:
      FILE - Input DC file name.  Default disk/directory is HXRBS$DATA.
          If not supplied, user is either prompted for input file (if
          no start/stop times are supplied), or DCFREAD searches the 
          the default directory (or DIR, see below) for a file/files that
          contain or are near the specified start/end times (if only
          one time is specified, the search routine sets start/end 
          times to the file's start/end times once it is found).  
      STIME - Start time of data to accumulate from file in format
          'YY/MM/DD,HHMM:SS.XXX'. If the file is not specified explicitly in
	   the FILE keyword, and the end time is not specified in ETIME
 	   keyword, then this time is used just to find the file, but the whole
	   file is read.
      ETIME - End time of data to accumulate from file in format 
          'YY/MM/DD,HHMM:SS.XXX'
      ERROR - 0/1 means no error / error.  Text of error message is in ERR_MSG
      ERR_MSG - ASCII string containing error message if ERROR = 1
      INSTR - The 3 letter instrument suffix for the data files to be
          searched (if FILE is not set), set to 'goe' as default.
      DIR   - set to 'HXRBS$DATA' as a default, specifies where you would
          like DCFREAD to search for your file.  Specify in format
          'LOG$NAME' or 'dev::disk:[file.spec]'.
      SPAN_FILES - If set, and start and end time keyword parameters are
          passed, then DCFREAD will read across file boundaries (if the
          appropriate files are available) until it reaches the end time.
          (Needed mainly for GOES data which is continuous.)
      NOSETBASE - If set, don't set base time in common utcommon (used by
          utplot package.)  If not set, base time in common utcommon will be
          set to start of day of data returned in array T.
 OUTPUTS:
      T - Time array in double precision seconds relative to start of day,
          dimensioned to number of time intervals in file or between
          start and end time specified by user.  Times are the midpoints 
          of the data accumulation intervals.
      Y - Channel data from DC file, dimensioned to (m,n) - m is the number 
          of time intervals in the file or between start and end time 
          specified by user; n is the number of channels in the DC file 
          plus one.  The livetime is placed in the nth 'channel'.
 OUTPUT KEYWORD PARAMETERS:
      LOEDGES - Array of lower edges of energy channels, dimensioned to number
                of channels used when writing the DC file.
      HIEDGES - Array of upper edges of energy channels, dimensioned to number
                of channels used when writing the DC file.
      BASE_ASCII - Base time in ASCII yy/mm/dd, hhmm:ss.xxx.  Base time is 
          start of day of data.  Time array (T) is relative to BASE_ASCII (or
          BASE_SEC).
      BASE_SEC - Base time in seconds since 79/1/1,0.  Base time is start of 
          day of data.  Time array (T) is relative to BASE_SEC (or BASE_ASCII)
      HEAD - Structure containing header of DC file.
 CALLS: ***
	ATIME [1], ATIME [2], CHECKVAR [1], DC_HEADER, DC_USERTIMES, DEFAULTS, SETUT [1]
	SETUT [2], UTIME [1], UTIME [2], checkvar [2], dc_getfile
 CALLED BY:
	DCFSUMMARY, HXR_DC2FITS
 SIDE EFFECTS:
      Unless the NOSETBASE keyword is passed, the base time (in common 
      UTCOMMON, used in the UTPLOT package) is set to the start of the 
      day of the beginning of the data.  Times returned in T are relative 
      to this time. To plot channel 1 type:
      UTPLOT,T,Y(*,0).  To plot the count rate (livetime corrected) of all 
      channels summed, type: UTPLOT, T, REBIN(Y(*,0:14),N,1)*15 / Y(*,15)
      where N is the number of time intervals in the T and Y arrays, i.e.
      N = N_ELEMENTS(T)
 RESTRICTIONS:
      UP to four different data types may be read in the same IDL session.
      There is no restriction on the number of files allowed for each data 
      type.  A data type is distinguished only by the number of different
      channels.
 MODIFICATION HISTORY:
      Rewritten for IDL version 2 by Kim Tolbert June 10, 1991.
      Modified to allow multiple data types by Richard Schwartz Sept. 27, 1991.
      REPLACED EOF WITH ON_IOERROR, RAS, 82/4/16
      Mod. by Kim Tolbert 4/24/92 to check what error it actually got when 
        goes to label pointed to in on_ioerror,
      Mod. by Eric Carzon 8/12/92 to allow for specification of start and 
           end times for data and for automatic file searching when start/
           end times are specified (added called procedures DC_GETFILE,
           DC_HEADER, and DC_USERTIMES).
      Mod. by Kim Tolbert 6/22/93 to add nosetbase, base_sec, and base_ascii
        keywords arguments.
      Mod. by KT 7/2/93 to add ERR_MSG keyword parameter.
      Mod. by KT 4/21/94 to check value if lgr2<=0 before trying to read more.
      Mod. by KT 6/22/94 to avoid opening a second file if first file 
           contains endtime.
      Mod. by KT 7/13/94 to add HEAD keyword argument.


DCFSUMMARY $SSW/smm/hxrbs/idl/dcfsummary.pro
[Previous] [Next]
  Name:
       DCFSUMMARY
 Procedure to summarize the DC files on current definition of HXRBS$DATA.
 Reads all the files that match the wildcard specification passed in as 'file'
 then sorts them by time, and prints a list of filenames and start and
 end times of the files. (We're actually reading the whole file because
 sometimes the file wasn't closed properly and the header info isn't
 correct.  Reading the file and then looking at the first and last time in the
 time array gives us the true times contained in the file.)

 Kim Tolbert 4/94

 CALLS:


DECHECK $SSW/smm/xrp/idl/fcs/decheck.pro
[Previous] [Next]
 NAME:
       DECHECK
 PURPOSE:
      remove checkerboard pattern from FIS white light images
 CATEGORY:
      FIS
 CALLING SEQUENCE:
      decheck,ch8
 INPUTS:
      ch8 = data array with white light values
 OUTPUTS:
      ch8 = suitably interpolated white light data
 CALLED BY:
	RDFIS, rdfis_img
 PROCEDURE:
      interpolation
 MODIFICATION HISTORY:     
      Hawley (LMSC) June'91


DefIdxStr $SSW/smm/xrp/idl/fcs/defidxstr.pro
[Previous] [Next]
	NAME: DefIdxStr.pro

	Purpose:	Define and return the Data-Block Index structure.

	FORMAL Parameters: 
		DEFIDXSTR, ix, ix2

		ix (output)	is part I of the index structure.
		ix2 (output)	is part II of the index structure.
		For definitions of subfields see the XRP File Control
		Document, section 8.3.1.
	
 CALLED BY:
	RDFISDataBlk
	History:	written 29-MAY-1990, GAL.


DEM $SSW/smm/xrp/idl/fcs/dem.pro
[Previous] [Next]
 NAME:
	DEM
 PURPOSE:
	computes difference in emission measures as a function of temperature
       for two ions.
 CALLING SEQUENCE:
       dem,temp
 INPUTS:
       temp = temperature (MK)
 OUTPUTS:
       none
 CALLS: ***
	INTERPOL
 PROCEDURE:
	used by TEMCAL to iterate for isothermal temperature
 MODIFICATION HISTORY:
	Written Apr'92 by DMZ (ARC)


DESPIKE_1D $SSW/smm/gen/idl/graphics/despike_1d.pro
[Previous] [Next]

 NAME:
	DESPIKE_1D

 PURPOSE:
	Remove spikes in a 1-D array above n standard deviations(n_sigma).

 CATEGORY:
	HXRBS

 CALLING SEQUENCE:
	Result = DESPIKE_1D( Array )

 INPUTS:
	Array:	1-D array to be despiked.

 OUTPUTS:
	Result:	Despiked 1-D array.

 OPTIONAL OUTPUTS:
	Wspike:		array containing spikes indexes
	No_wspike:	array containing no-spikes indexes

 KEYWORDS:
	N_SIGMA:	# standard deviations to define outliers.

 CALLS: ***
	CHECKVAR [1], F_DIV, checkvar [2]
 PROCEDURE:
	Compute mean over moving box-cars using smooth, subtract center values,
	compute variance using smooth on deviations from mean,
	check where pixel deviation from mean is within variance of box,
	replace those pixels in smoothed image (mean) with original values,
	return the resulting partial mean image.

 MODIFICATION HISTORY:
	Written, 04/96 by RCJ.


DOBASELINE $SSW/smm/hxrbs/idl/dobaseline.pro
[Previous] [Next]

 NAME: 
       DOBASELINE

 PURPOSE:
	This procedure is part of the pileup calculation.
	The following baseline correction is done only for rt>1e5/s 
 
 	Used in PILEUP.PRO (CALL: BONOMO:pileup:dobaseline)


 CATEGORY:
       HXRBS

 CALLING SEQUENCE:
	dobaseline,r,sfn,esfn,f0a,f0b

 CALLS: ***
	BASELINES, COMDIM, PULSEPROFILE, SETPULSETRAIN, SPECPROB
 INPUTS:
       none explicit, only through commons;

 OPTIONAL INPUTS:
	none

 OUTPUTS:
       none explicit, only through commons;

 OPTIONAL OUTPUTS:
	none

 KEYWORDS:
	none
 CALLED BY:
	PILEUP
 COMMON BLOCKS:
	none

 SIDE EFFECTS:
	none

 RESTRICTIONS:
	VMS on SDAC only (need Bonomo)

 PROCEDURE:
	none

 MODIFICATION HISTORY:
	ras, 1987
	Version 2, June 1996, ras


DRAWBUTTON $SSW/smm/gen/idl/widgets/drawbutton.pro
[Previous] [Next]

 NAME:
   	DRAWBUTTON

 PURPOSE:
 	Create widgets to get parameters of the button to be created.
	And create drawing board widget.

 CATEGORY:
       Widget

 CALLING SEQUENCE:
	DRAWBUTTON, [GROUP_LEADER=GROUP]

 CALLED BY:
   	none

 CALLS TO:
       none

 INPUTS:
       none

 OPTIONAL INPUTS:
       none

 OUTPUTS:
       none 

 OPTIONAL OUTPUTS:
       none

 CALLS: ***
	CONGRID [1], CONGRID [2], CONGRID [3], DRAWBUTTON_EV, XMANAGER
 CALLED BY:
	DRAWBUTTON_EV
 COMMON BLOCKS:
       DRAWBUTBASE 	for passing widget ID's to event handler
	DRAWBUTVARI 	for passing initial program variables 

 SIDE EFFECTS:
       Create widgets

 RESTRICTIONS:
       Widgets must be available

 PROCEDURE:
       Create widget to prompt user for button size (pixels) and 
	magnification to make it easier to draw.  Next the drawing
	board is created and control is passed to the event handler.

 MODIFICATION HISTORY:
       APR 93 - Elaine Einfalt (HSTX)


DRAWBUTTON_EV $SSW/smm/gen/idl/widgets/drawbutton.pro
[Previous] [Next]

 FILE DRAWBUTTON.PRO -- includes DRAWBUTTON_EV, DRAWBUTTON



 NAME:
	DRAWBUTTON_EV

 PURPOSE:
	The event handler for DRAWBUTTON.PRO

 CATEGORY:
	Widgets

 CALLING SEQUENCE:
	DRAWBUTTON_EV, EVENT

 CALLED BY:
 	DRAWBUTTON

 CALLS TO:
       none

 INPUTS:
       none explicit, only through commons;

 OPTIONAL INPUTS:
       none

 OUTPUTS:
       none explicit, only through commons;

 OPTIONAL OUTPUTS:
       none

 CALLS: ***
	CONGRID [1], CONGRID [2], CONGRID [3], DRAWBUTTON, XMANAGER
 CALLED BY:
	DRAWBUTTON
 COMMON BLOCKS:
       DRAWBUTBASE 	for passing widget ID's to event handler
	DRAWBUTVARI 	for passing program variables 

 SIDE EFFECTS:
       Creates widgets and possibly files.

 RESTRICTIONS:
       Widgets must be available
                                     
 PROCEDURE:
	Handle events as generated by the user of DRAWBUTTON.  
	The user is to draw a picture that will be a widget button.
	Display the button picture after each modification.  
	If the save option is chosen, create widget to prompt for filename 
	and save to a file.  A single assignment of a variable called
	BUTTON_8_23_61 is made. The file is to be called in batch mode in 
	any desired widget creation programs.
      
	Example: 
			; select desired button file
			  @MYBUTTON.WIDGET

			; define base for button
			  mybase=widget_base()

			; define your button
			  var = widget_base(mybase, value=button_8_23_61)

			; realize the widget  
			  widget_control, mybase, /realize
			  end
	

 MODIFICATION HISTORY:
       APR 93 - Elaine Einfalt (HSTX)


DREAD $SSW/smm/hxrbs/idl/dread.pro
[Previous] [Next]

 NAME: 
       DREAD

 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
 CALLED BY:
	PILEUP
 COMMON BLOCKS:
	none

 SIDE EFFECTS:
	none

 RESTRICTIONS:
	none

 PROCEDURE:
	none

 MODIFICATION HISTORY:


drot $SSW/smm/xrp/idl/fcs/drot.pro
[Previous] [Next]
 NAME:
          drot
 PURPOSE:
          differntially rotate image contained within structure created 
           by ST_IMG
 CATEGORY:
          utility
 CALLING SEQUENCE:
         rimg=drot(img,dt)
 INPUTS:
         img = input image structure
         dt = decimal hours by which to rotate (+ for E to W)
 OUTPUTS:
          rimg= differentially rotated output structure 
 PROCEDURE:
          uses synodic rotation rate in sunspot zone (Allen p.180):
          rate = 13.45 - 3.0 * sin(lat)^2 degrees per day
 CALLS: ***
	ATIME [1], ATIME [2], RUST, SOLRAD, UTIME [1], UTIME [2], XYTOLB
 RESTRICTIONS: 
          only coordinate arrays are transformed. Image data is not changed.
 MODIFICATION HISTORY:
          written Aug 1991 (DMZ, ARC) 


DURLST_EV $SSW/smm/hxis/hxisduralst.pro
[Previous] [Next]
 file hxisduralst.pro

 NAME:
	DURLST_EV

 PURPOSE:
	THE event handler for HXISDURALST

 CATEGORY:
	HXIS display

 CALLING SEQUENCE:
	DURLST_EV 

 CALLED BY:
	DURLST_EV (through the XMANAGER)
 
 CALLS TO:
	none

 INPUTS: 
       none explicit, only through commons

 OPTIONAL INPUTS:
	none

 OUTPUTS:
       none explicit, only through commons

 OPTIONAL OUTPUTS:
	none

 CALLS: ***
	HXISDURALST, HXISWRITE_TIMES, XMANAGER
 CALLED BY:
	HXISDURALST
 COMMON BLOCKS:
	HXISASREAD	for passing values through the event handler
			
 SIDE EFFECTS:
	none

 RESTRICTIONS:
	none

 PROCEDURE:
	Recieve events from XMANAGER and process.

 MODIFICATION HISTORY:
	OCT-1990, Paul Hick (ARC)
	DEC-1992, Elaine Einfalt (HSTX) - converted to widgets


DWRITE $SSW/smm/hxrbs/idl/dwrite.pro
[Previous] [Next]

 NAME: 
       DWRITE

 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
 CALLED BY:
	PILEUP
 COMMON BLOCKS:
	none

 SIDE EFFECTS:
	none

 RESTRICTIONS:
	none

 PROCEDURE:
	none

 MODIFICATION HISTORY: