ADD_SCATTER_DRM $SSW/cgro/batse/idl/add_scatter_drm.pro
[Next]

 NAME: 
	ADD_SCATTER_DRM

 PURPOSE:
	Take the scatter matrix, binned at different resolution from the
	direct matrix, rescale it to the input and output channels of the
	direct matrix, and add the direct and new scatter matrix into a single
	detector response matrix.

 CATEGORY:
	BATSE, Spectroscopy

 CALLING SEQUENCE:
	add_scatter_drm, ddrm=ddrm, sdrm=sdrm, new_drm=new_drm, shead=shead, $
	dhead = dhead [nsmooth=nsmooth]

 INPUTS:
       ddrm - The direct response matrix, see Read_bdas_drm.pro, output
		rows in counts/cm2/keV
	sdrm - Another response matrix to add with different input and output
		binning, usually the atmospheric scattering matrix which 
		takes too long to produce at the full resolution.

	The following two input structures also come out of 
	READ_BDAS_DRM.PRO, but they only require the tags described:
	dhead - Structure with channel binning energy edges in
		dhead.nobins_in - number of input bins
		dhead.nobins_out - number of output bins
		dhead.e_in       - 2 x n input bin edges (keV), lo and hi
		dhead.e_out      - 2 x n output bin edges
	shead  - Structure like dhead for scattering matrix
				
 OPTIONAL INPUTS:
	nsmooth - average resultant scatter matrix over this number of rows.
		  The average is taken over the total effective area, and used
		  to scale the rows.  This removes the scalloped effect of
		  the interpolations.

 OUTPUTS:
	new_drm - Summed detector response matrix with edges of ddrm

 CALLS: ***
	CHECKVAR [1], Enorm_drm, GAUSSFIT [1], GAUSSFIT [2], GAUSSFIT [3], GAUSSFIT [4]
	GAUSSFIT [5], INTERPOL, SPLINE, X_EOUT_DRM [1], X_EOUT_DRM [2], checkvar [2]
 CALLED BY:
	Enorm_drm, LAD_DRM, Load_sher
 PROCEDURE:
	Input rows of SDRM are interpolated prior to align them
	along E_out(*)/e_in(i).  Then the rows are interpolated along
	the column energies to the inputs of DDRM.  Then finally
	interpolated to the e_out(*)/e_in(i) values of the edges of DDRM.
	Once interpolated, then the new SDRM is added to DDRM.

 MODIFICATION HISTORY:
	ras, 18 Aug 93


Aluminum $SSW/cgro/batse/idl/aluminum.pro
[Previous] [Next]
 PROJECT:
	SDAC
 NAME: 
	Aluminum

 PURPOSE:
	This procedure computes the correction factor for BATSE count rate attenuation due to an
	oblique angle through the Al entrance window.

 CATEGORY: 
	BATSE

 CALLING SEQUENCE:
	ALUMINUM, Cos_zenang, Correction

 CALLS: ***
	INTERPOL
 INPUTS:
       Cos_zenang: cosine of the angle between detector axis and Sun

 OPTIONAL INPUTS:
	none

 OUTPUTS:
	Correction: To compensate for decrease in rate with increasing angle
	due to increased absorption, the observed rate is divided by "Correction"

 OPTIONAL OUTPUTS:
	none

 KEYWORDS:
	none
 CALLED BY:
	FS_GEN_ARR, GET_PRAT_TCOUN
 COMMON BLOCKS:
	none

 SIDE EFFECTS:
	none

 RESTRICTIONS:
	none

 PROCEDURE:
	Interpolates on a pre-determined table for a power-law of 4

 MODIFICATION HISTORY:
	Version 1, ras, 1991
	Version 2, ras, 1996, documentation added


ANNOUNCEMENTS $SSW/cgro/batse/idl/announcements.pro
[Previous] [Next]

 NAME: 
       ANNOUNCEMENTS

 PURPOSE:
	This procedure outputs messages to users of BATSE_MENU	

 CATEGORY:
	BATSE

 CALLING SEQUENCE:


 CALLS: ***
	CHKLOG [1], CHKLOG [2], CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], MORE [1]
	MORE [2], READ_SEQFILE, concat_dir [4]
 INPUTS:
       none explicit, only through commons;

 OPTIONAL INPUTS:
	none

 OUTPUTS:
       none explicit, only through commons;

 OPTIONAL OUTPUTS:
	none

 KEYWORDS:
	none
 CALLED BY:
	batse_menu
 COMMON BLOCKS:
	none

 SIDE EFFECTS:
	none

 RESTRICTIONS:
	none

 PROCEDURE:
	none

 MODIFICATION HISTORY:
	RAS, 7-June-1996, documentation
       AES, 14-Aug-1997, moved news files to batse_news


ANY_CHANGE $SSW/cgro/batse/idl/any_change.pro
[Previous] [Next]

 NAME: 
       ANY_CHANGE

 PURPOSE:
	This procedure scans an attitude record and records changes
	of more than 1 degreee.

 CATEGORY:
	BATSE

 CALLING SEQUENCE:
 	istart,x_ra,x_dec,ichange

 CALLS:
	none
 INPUTS:
       istart: starting index into X_ra and X_dec
	X_ra: spacecraft right ascension along 1 axis
	X_dec: spaceraft declination along 1 axis
 OPTIONAL INPUTS:
	none

 OUTPUTS:
       ichange: the index of any change relative to the start of the array

 OPTIONAL OUTPUTS:
	none

 KEYWORDS:
	none
 CALLED BY:
	DET_POINT
 COMMON BLOCKS:
	none

 SIDE EFFECTS:
	none

 RESTRICTIONS:
	none

 PROCEDURE:
	Uses where to scan for an absoluted difference summed over both directions.

 MODIFICATION HISTORY:
	Version 2, RAS, 7-june-1996


ASC_HEX_2B $SSW/cgro/batse/idl/asc_hex_2b.pro
[Previous] [Next]

 NAME: 
       ASC_HEX_2B

 PURPOSE:
 Converts ASCII hexidecimal to binary value.
 Function appears to be obsolete.

 CATEGORY:
	BATSE, GEN

 CALLING SEQUENCE:
       result = asc_hex_2b( a_hex )

 CALLS: ***
	REVERSE
 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:
 Shelby Kennard                                5Feb1991


ASCII_RATES $SSW/cgro/batse/idl/ascii_rates.pro
[Previous] [Next]

Name:	
	ASCII_RATES

CALLING SEQUENCE:
	ASCII_RATES, FLARE = FLARE, FILE = FILENAME, OUTPUT=OUTPRINT, $
	   STARTTIME=ST_INPUT, ENDTIME = EN_INPUT, ERROR = ERROR

CATEGORY:
	BATSE

INPUTS:
KEYWORDS:
	FLARE - (keyword) BATSE database flare number
	FILE - (keyword) Input file name
	OUTPUT - (keyword) Output option: 0 means print on terminal,
		nonzero means print in file to be printed or mailed
	STARTTIME - (keyword) Start time for dump supplied in 
		double precision seconds since 79/1/1,0 or
		as ASCII string 'YY/MM//DD,HHMM:SS'.
 CALLED BY:
	pro ratesdump
		Example: starttime='91/6/4,0339'  or  starttime=dsec
	ENDTIME - (keyword) End time for dump.  See STARTTIME for
		format.
	ERROR - (keyword) 0/1 means no error/error
		
CALLS: ***
	ATIME [1], ATIME [2], FDBREAD, GETUTBASE [1], GETUTBASE [2], Mailfile, PAGE_PRINT
	REVERSE, SYS2UT
PROCEDURE:
	Writes the livetime- and overflow-corrected BATSE data into
	an ASCII file.  Includes the interval mid-time, detector
	aspect to the Sun, corrected DISCLA data, and the CPD
	for all eight BATSE Large Area Detectors.

SIDE EFFECTS:		
	Creates batse_rates.out 

PROGRAMMER:	Created by Richard Schwartz 91/10/03

MODIFICATIONS: Kim Tolbert 10/7/91 - Added file name, start time, end time 
               and error keyword arguments.  Modified format of output.
               Changed calls to PRINT to calls to PPRINT so that we can
               print on terminal (counting lines and prompting at the end
               of a page) and file simultaneously. Call mailfile to mail
               file to user when done.
               AES 6/30/94 - Changed channel numbers from 1-4 to 0-3.
               AES 7/7/94 - Changed Detector array to store detectors
                            as 0-7 rather than 1-8
               AES 7/11/94 - changed call from pprint to call to Page_print
		RAS, 1 APR 1996, IMPROVED DOCUMENTATION HEADER
...................................................................


ASCII_RAW $SSW/cgro/batse/idl/ascii_raw.pro
[Previous] [Next]
 Project:
	SDAC

  Name:
       ASCII_RAW

 PURPOSE:	Dump raw BATSE DISCLA, CONT, or DISCSP data on screen 
		or in file.
 CATEGORY:
	BATSE
 CALLING SEQUENCE:	Must be called from within RAWDUMP.PRO which 
			sets up variables in common.

 COMMON BLOCK:
		DUMPCOM	
 CALLS: ***
	ATIME [1], ATIME [2], BATSE_FILE2TIME, CONV_VAX_UNIX, FILE2FLARE, FIND_PACKET
	FS_OPEN [1], FS_OPEN [2], Mailfile, PAGE_PRINT, SC_SECONDS_ED, SIZE_STRUCT, SYS2UT
	USE_VAX_FLOAT
 CALLED BY:
	RAWDUMP
 MODIFICATION HISTORY:	
	Written by K. Tolbert
	Mod. 93/11/12 by KT.  Added cont and discsp data types.
       Mod. 94/06/28 by AES.  displayed detector id's as 0-7,
       channel id's as 0-(total channels-1).
       Mod. 94/07/11 by AES.  changed calls to pprint to
       calls to page_print (pprint was renamed.)
	Version 5, RAS, 12-apr-1997, changed file2time - batse_file2time
	Version 6, richard.schwartz@gsfc.nasa.gov, 4-sep-1997, get rec size using 
	size_structm add check for pad_byte, use conv_vax_unix.
       Version 7, richard.schwartz@gsfc.nasa.gov, 24-jun-1998, allow new VAX float format on read.


AUDIT_TRAIL_STR $SSW/cgro/batse/idl/audit_trail_str.pro
[Previous] [Next]

 NAME: 
       AUDIT_TRAIL_STR

 PURPOSE:
C       This structure is found in file : DD_AUDIT_TRAIL.STR
C
C  Record structure for the  audit trails in DAILY DATASET and other archived
C


 CATEGORY:
	BATSE

 CALLING SEQUENCE:
	Not a procedure or main program!

	@audit_trail_str

 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:
files             LAST CHANGE : 28-JUL-1992


AVERAGE_STEPS $SSW/cgro/batse/idl/occults/average_steps.pro
[Previous] [Next]
  Name:
       AVERAGE_STEPS
  Category:
	BATSE, OCCULTATION
	
 PURPOSE: average occultation steps using resistant mean and best
	step model based on standard deviation to fit of step
	
 CALLING SEQUENCE:
	average_steps, steps_in, average_step, sigma_cut = sigma_cu
 INPUTS: 
	steps_in- occultation steps dimensioned (2, nchan, n_durations, n_det, n_obs)
		or                  dimensioned (2, nchan, n_durations, n_obs)
		first row is step value and standard deviation from plot_occs.pro
		nchan - number of energy bins
		n_durations - number of durations used for models and/or fit order (0,1,2)
		n_det - number of detectors fit's saved, up to 4 for BATSE
		n_obs - number of occultations steps fit
		
	
 OPTIONAL INPUTS:
	sigma_cut - sigma_cut used in resistant mean, default 2
	
 OUTPUTS:
	Average_step - resultant average
 OPTIONAL OUTPUTS:

 CALLED BY:
	RESOLVE_NEW_OBS
 PROCEDURE:
	Preps the occultation results for use with RESISTANT_MEAN.

 CALLS: ***
	CHECKVAR [1], RESISTANT_Mean [3], Resistant_Mean [1], Resistant_Mean [2]
	checkvar [2]
 COMMON BLOCKS:

 RESTRICTIONS:

 MODIFICATION HISTORY: