DAG_INDEX $SSW/yohkoh/ucon/idl/hudson/dag_index.pro
[Previous] [Next]
 NAME:
       DAG_INDEX 
 PURPOSE:
       find dag images
 CALLING SEQUENCE
	dag = dag_index(index)
 INPUTS
	index or roadmap structure
 OUTPUT:
       subscript array for dag images 
 CATEGORY:
       Yohkoh stuff
 ROUTINES USED:
       GT_FILTB
 CALLS: ***
	gt_filtb
 CALLED BY:
	FAXABLE_SFD, SFD_TEK
 HISTORY: 
       HSH, 17 May 1994 (written)


daily_forecast [1] $SSW/yohkoh/sxt/idl/util/daily_forecast.pro
[Previous] [Next]
NAME:
	daily_forecast
PURPOSE:
	To select the daily images to be sent to the forecast stations and
	send them.
SAMPLE CALLING SEQUENCE:
	daily_forecast
	daily_forecast, /qdebug, /noftp
       daily_forecast, /ftponly		; skips image creation

OPTIONAL INPUT:
	infil	- The list of SFR files to chose from when selecting the
		  images to send
OPTIONAL KEYWORD INPUT:
	indir	- The input directory to find the SFR files.  IF not defined,
		  it will use DIR_SITE_NEWDATA and $DIR_SITE_NEWDATA2
	ignorelog - If set, it will ignore the log file checks (see below).
	noftp	- If set, do not do the FTP step
       testing - If set, redirect output, inhibit ftp and log use, etc.
       useimage - User supplied times or index to match - may be an SFD
		   index with history composite times to duplicate.
       ftponly  - if switch, user selects files to send, and sites to receive
		   if file names, user selects sites to recieve

OPTIONAL KEYWORD OUTPUT:
	status	- The completion status
			1 = found and transfered files ok
			10 = The program ran successfully in the last 12 hours
			     and therefore will not run again until pass 4 or 5.
			11 = Could not find any matching images
			12 = The program ran successfully in the last 12 hours
			     and it was for pass 4 or 5.  Done for the day.
METHOD:
		The newest possible image is selected which is:
			1. AlMg
			2. Half Res
			3. Non-SAA
			4. Non-night image
			5. MBE 8 and 18 (DPE 15 and 25)
			6. Images must be newer than the last image sent

		The log file is checked to see when the program was last run 
		successfully and will not run if it was run within the 
		last 12 hours.  It also uses the log file to know the date and
		time of the last image sent and will only chose images new
		than that image.
HISTORY:
	Written 11-Oct-93 by M.Morrison (replacing NN_RD3_SXT_NOAA by Nitta)
	12-Oct-93 (MDM) - Added file purging of temporary files
			- Added removal of "Local Directory changed" messages
			  from the FTP_LOG that is mailed
	14-Oct-93 (MDM) - Added check that PERCENTD > 240
			- Save two pairs of images per
			- Added /NOFTP option
	16-Oct-93 (MDM) - Modified so that it could do two transmissions per day.
			  The program transmits TWO images at a time
	19-Oct-93 (MDM) - Modified so that a mail message is sent if there is
			  an error during the FTP
			- Put all of the site/account/password information
			  into a data file
	20-Oct-93 (MDM) - Changed to write the daily forecast images to the
			  ftp directory.
	26-Oct-93 (MDM) - Enabled sending mail message if there is an error during
			  FTP copy (prior to this time, it was being tested)
	 8-Nov-93 (MDM) - Implemented purging of the IDL run log files
	 6-Dec-93 (MDM) - Implemented the saving of composite (SFD) images.
	 3-Jan-94 (MDM) - modified the mailing list
       11-May-94 (SLF) - change rd_tfile call (allow free form commnents)
       22-Jun-94 (SLF) - add TESTING and NONORM keyword, /sfd switch 
			  added to sxt_composite call, scale logo to max data
       23-Jun-94 (SLF) - do registration in sxt_composite, not sxt_prep
       24-Jun-94 (SLF) - add USEIMAGE keyword
	25-Jun-94 (SLF) - add capability to vary image cadence for each institute
			  (specify contact numbers for each remote site)
	26-Jun-94 (SLF) - move file_append to agree with 25-jun changes to log
	26-Jun-94 (SLF) - add FTPONLY keyword
       27-Jun-94 (SLF) - add /nomore switch to prstr calls (avoid hang w/interctive)  
       29-Jun-94 (SLF) - call file_append for every message for real time monitoring
        8-Feb-95 (SLF) - add call to mk_pix (show_pix and http support)
       20-feb-95 (SLF) - procede even if cnum=lastcnum 
       28-APR-95 (SLF) - force pasnum > 1 < 4
        9-May-95 (SLF) - create FITS and GIF composites 
       11-May-95 (SLF) - changed output name to sfdYYMMDDHHMM.xxx 
                         where xxx={fits,gif,...}
       22-jan-97 (SLF) - check for $FORECAST_USESFD


daily_forecast [2] $SSW/yohkoh/sxt/idl/util/daily_forecast2.pro
[Previous] [Next]
NAME:
	daily_forecast
PURPOSE:
	To select the daily images to be sent to the forecast stations and
	send them.
SAMPLE CALLING SEQUENCE:
	daily_forecast
	daily_forecast, /qdebug, /noftp
       daily_forecast, /ftponly		; skips image creation

OPTIONAL INPUT:
	infil	- The list of SFR files to chose from when selecting the
		  images to send
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], DAILY_FORECAST2, DELVARX [1]
	DELVARX [2], DELVARX [3], DELVARX [4], FILE_EXIST [2], GET_INFO3, LOADCT, RD_XDA [1]
	RD_XDA [2], Rd_Roadmap [2], STRETCH, SXT2FITS, SXT_IMG_SUMMARY, WDEF [1], WDEF [2]
	anytim2ex [1], anytim2ex [2], concat_dir [4], data_chk [1], data_chk [2]
	delvarx [5], ex2fid [1], ex2fid [2], file_append [1], file_append [2]
	file_exist [1], file_exist [3], file_list [1], file_list [2], file_purge [1]
	file_purge [2], fmt_tim [1], fmt_tim [2], ftp_copy [1], ftp_copy [2]
	ftp_copy2sites, get_logenv [1], get_logenv [2], gt_filtb, gt_res, int2secarr [1]
	int2secarr [2], mail [1], mail [2], mk_pix [1], mk_pix [2], newfiles [1]
	newfiles [2], newfiles [3], prstr [1], prstr [2], rd_roadmap [1], rd_tfile [1]
	rd_tfile [2], str_replace [1], str_replace [2], tbeep [1], tbeep [2], tbeep [3]
	tim2orbit [1], tim2orbit [2], wmenu_sel [1], wmenu_sel [2], yesnox [1], yesnox [2]
OPTIONAL KEYWORD INPUT:
	indir	- The input directory to find the SFR files.  IF not defined,
		  it will use DIR_SITE_NEWDATA and $DIR_SITE_NEWDATA2
	ignorelog - If set, it will ignore the log file checks (see below).
	noftp	- If set, do not do the FTP step
       testing - If set, redirect output, inhibit ftp and log use, etc.
       useimage - User supplied times or index to match - may be an SFD
		   index with history composite times to duplicate.
       ftponly  - if switch, user selects files to send, and sites to receive
		   if file names, user selects sites to recieve

OPTIONAL KEYWORD OUTPUT:
	status	- The completion status
			1 = found and transfered files ok
			10 = The program ran successfully in the last 12 hours
			     and therefore will not run again until pass 4 or 5.
			11 = Could not find any matching images
			12 = The program ran successfully in the last 12 hours
			     and it was for pass 4 or 5.  Done for the day.
METHOD:
		The newest possible image is selected which is:
			1. AlMg
			2. Half Res
			3. Non-SAA
			4. Non-night image
			5. MBE 8 and 18 (DPE 15 and 25)
			6. Images must be newer than the last image sent

		The log file is checked to see when the program was last run 
		successfully and will not run if it was run within the 
		last 12 hours.  It also uses the log file to know the date and
		time of the last image sent and will only chose images new
		than that image.
HISTORY:
	Written 11-Oct-93 by M.Morrison (replacing NN_RD3_SXT_NOAA by Nitta)
	12-Oct-93 (MDM) - Added file purging of temporary files
			- Added removal of "Local Directory changed" messages
			  from the FTP_LOG that is mailed
	14-Oct-93 (MDM) - Added check that PERCENTD > 240
			- Save two pairs of images per
			- Added /NOFTP option
	16-Oct-93 (MDM) - Modified so that it could do two transmissions per day.
			  The program transmits TWO images at a time
	19-Oct-93 (MDM) - Modified so that a mail message is sent if there is
			  an error during the FTP
			- Put all of the site/account/password information
			  into a data file
	20-Oct-93 (MDM) - Changed to write the daily forecast images to the
			  ftp directory.
	26-Oct-93 (MDM) - Enabled sending mail message if there is an error during
			  FTP copy (prior to this time, it was being tested)
	 8-Nov-93 (MDM) - Implemented purging of the IDL run log files
	 6-Dec-93 (MDM) - Implemented the saving of composite (SFD) images.
	 3-Jan-94 (MDM) - modified the mailing list
       11-May-94 (SLF) - change rd_tfile call (allow free form commnents)
       22-Jun-94 (SLF) - add TESTING and NONORM keyword, /sfd switch 
			  added to sxt_composite call, scale logo to max data
       23-Jun-94 (SLF) - do registration in sxt_composite, not sxt_prep
       24-Jun-94 (SLF) - add USEIMAGE keyword
	25-Jun-94 (SLF) - add capability to vary image cadence for each institute
			  (specify contact numbers for each remote site)
	26-Jun-94 (SLF) - move file_append to agree with 25-jun changes to log
	26-Jun-94 (SLF) - add FTPONLY keyword
       27-Jun-94 (SLF) - add /nomore switch to prstr calls (avoid hang w/interctive)  
       29-Jun-94 (SLF) - call file_append for every message for real time monitoring
        8-Feb-95 (SLF) - add call to mk_pix (show_pix and http support)
       20-feb-95 (SLF) - procede even if cnum=lastcnum 
       28-APR-95 (SLF) - force pasnum > 1 < 4
        9-May-95 (SLF) - create FITS and GIF composites 
       11-May-95 (SLF) - changed output name to sfdYYMMDDHHMM.xxx 
                         where xxx={fits,gif,...}
       22-jan-97 (SLF) - simplify this ancient code to just use SFD files...
                         (in the spirit of single point maintenence)


daily_sfd_fits [1] $SSW/yohkoh/gen/idl/atest/daily_sfd_fits.pro
[Previous] [Next]
NAME:
	daily_sfd_fits
PURPOSE:
	To read the daily temporary SFD files and write a FITS image
HISTORY:
	Written 16-May-93 by M.Morrison
	26-May-93 (MDM) - Added FTP capability
	19-Aug-93 (MDM) - Changed mail to only send to Morrison (no /self)
	25-Aug-93 (MDM) - Modified to allow selection of images within 15
			  hours of desired time
	 3-Jan-94 (MDM) - Modified mailing list
       30-may-97 (SLF) - update CRL ip info


daily_sfd_fits [2] $SSW/yohkoh/gen/idl/reformat/daily_sfd_fits.pro
[Previous] [Next]
NAME:
	daily_sfd_fits
PURPOSE:
	To read the daily temporary SFD files and write a FITS image
HISTORY:
	Written 16-May-93 by M.Morrison
	26-May-93 (MDM) - Added FTP capability
	19-Aug-93 (MDM) - Changed mail to only send to Morrison (no /self)
	25-Aug-93 (MDM) - Modified to allow selection of images within 15
			  hours of desired time
	 3-Jan-94 (MDM) - Modified mailing list


DARK_FACTOR $SSW/yohkoh/ucon/idl/hudson/dark_factor.pro
[Previous] [Next]
 NAME:
     DARK_FACTOR
 PURPOSE
     compute multiplicative factor for total sunlight (limb darkening)
       during eclipses; to be used for Yohkoh stray-light corrections
 CALLING SEQUENCE
     fact = dark_factor(sep, param)
 INPUT PARAMETERS
     sep, the separation between Moon and Sun centers (tag .dd from
       SXT_ECLIPSE, divided by tag .r_sun). Can be a vector.
     param, the solar limb-darkening factor (default = 0.6)
 OUTPUT
     returns a factor describing the total solar irradiance at a
       given degree of obscuration (ie, 1 for no eclipse, 0 for total)
 METHOD
     We describe limb darkening as
        
           dark_factor = param*mu + (1-param)

       modeled on the gray-atmosphere formula (3*mu+2)/5, where
       mu is the cosine of the angle of incidence to the solar
       surface. The starting point for param, which depends upon
       the wavelength of the radiation, is therefore 0.6. The
       parameter cannot exceed 1.
 HISTORY
     HSH, written 21-Oct-95 for the celebrated Yohkoh eclipse 
       of 24-Oct-95, a date that shall reverberate in scientific
       history!
 CALLED BY
	ECL_FRAC


dark_orbit $SSW/yohkoh/ucon/idl/labonte/dark_orbit.pro
[Previous] [Next]

 Returns the SXT dark variation in DN for an input index.


FUNCTION dark_orbit, index, ixref, tim2fms=tim2fms


 INPUT PARAMETERS:
	index = image indices to compute orbital dark variation for.
	ixref = reference orbital phase.  Either an index structure,
		or a float specifying Time to First Minute of Sun.

 OPTIONAL INPUT KEYWORDS:
	tim2fms = Time to First Minute of Sun, float.  Default
		is to call TIM2ORBIT for the input index.
		
 RETURNS:
	array of dark corrections, DN, to subtract from the images
	specified by index to adjust them to the reference time.

 CALLS: ***
	gt_expdur [1], gt_expdur [2], gt_res, tim2orbit [1], tim2orbit [2]
 RESTRICTIONS:
	USES LINEAR APPROXIMATION TO ORBITAL TREND.

 HISTORY:
	Written  July 14, 1994  Barry LaBonte


dark_sub [1] $SSW/yohkoh/gen/galileo/idl/lmsal/dark_sub.pro
[Previous] [Next]
NAME:
	dark_sub
PURPOSE:
	Subtract the dark current from input FFI or PFI images
CALLING SEQUENCE:
	data_out = dark_sub(index, data, index_out)
	data_out = dark_sub(index, data, /update_index)
 
       udata_out = 1		;for uncertainties
	data_out = dark_sub(index, data, index_out, udata_out=udata_out)
INPUT:
	index	- The index structure for each image
	data	- The data array (NX x NY x N)
OUTPUT:
	data_out- The dark current subtracted image
	index_out- The updated index struture (history records appended)
 CALLS: ***
	FSTRING, MASK, get_dc_image [1], get_dc_image [2], get_dc_image [3], get_dc_rate
	get_res_offset, gt_corner, gt_dpe, gt_expdur [1], gt_expdur [2], gt_pfi_ffi, gt_res
	his_index, sxt_decomp [1], sxt_decomp [2], sxt_uvf_info [1], sxt_uvf_info [2]
	sxt_uvf_info [3], tbeep [1], tbeep [2], tbeep [3], tim2weekid
 CALLED BY:
	NAME [3], RD_AR, STRAY_CORR, leak_sub [1], leak_sub [2], leak_sub [3], sfc_prep [1]
	sfc_prep [2], termlite, wl_process
OPTIONAL KEYWORD INPUT:
       udata_in - the uncertainty in the input data array. You pass this in if
                  the data has been uncompressed already, if the data is of byte type,
                  dark_sub will obtain the uncertainty
       udata_out - The uncertainty in the output array, this will only be calculated
                   if a variable is set and passed in as the udata_out keyword.
	dc_only	- If set, the output is only the dark current
		  images that go with each index.
	dc_scalar - If set, then do not call GET_DC_IMAGE, just use
		  a scalar value for the background level.
	force_scalar - Same as "dc_scalar"
	dc_interpolate - If set, then find a short and long exposure dark image
		  of the same temperature around the time of the data, and
		  interpolate between those exposures to create the dark
		  frame.
	interpolate - Same as "dc_interpolate"
	float	- If set, return the data as floating point if necessary
		  (for the case where PFI startline correction needs to be made)
	norm_exp- If set, exposure normalize the data to DN/sec and return it as
		  floating point.
	shift_floor- If set, check the average of a 5x5 box in the lower 
		  left corner and shift the image by that amount in order to
		  adjust the image floor to the true zero.  This was 
		  introduced because for short exposure (DPE=0) a small
		  error in the "floor" is amplified quite a bit.
	new_floor - If shift_floor is set, it will adjust the floor to be
		  0 DN.  It can be shifted to a non-zero value by passing
		  that value in through the "new_floor" keyword.
	update_index - If set, then update the history portion of the
		  input index (not pass separate index variable out)
       orbit_correct - Use the orbital corrections for the dark current.
                       Must also specify the /interpolate keyword for this to
                       work.
OPTIONAL KEYWORD OUTPUT:
	match_qual - A structure which holds information on the
		  quality of the match for the dark image (number of
		  seconds between dark image and input image, how close
		  the exposure duration is, how close the temperature is)
METHOD:
	1. Call SXT_DECOMP if "data" is byte type
	2. Call GET_DC_IMAGE to get dark images
	3. For PFI, extract the relevant portion of the images
	4. Subtract off the dark current
HISTORY:
	Written 13-Oct-92 by M.Morrison
	15-Oct-92 (MDM) - Old method was to call GET_DC_IMAGE one time
			  outside the loop and to use IMAP.  For FR images
			  this can be a lot of images/memory, so it was 
			  changed to call GET_DC_IMAGE inside the loop and
			  to sort the order that images are subtracted so
			  that they are done in increasing DPE order.
	19-Nov-92 (GAL) - update to allow input of a single image.
	12-Mar-93 (MDM) - Modified to work in the cases when the
			  SDC database is not available
	18-Mar-93 (MDM) - Added /FORCE_SCALAR keyword
			- Added code to handle the case where the full
			  resolution PFI/OR falls outside of the dark current
			  image (since it is only 1024x512).
	12-May-93 (MDM) - Patch for case where whole full res PFI is outside
			  of the FFI dark frame
			- Modification to insert SUB_IMG into DATA_OUT using
			  (0,0,i) notation instead of (*,*,i) because of case
			  where there is something like a 64x64 imbedded in
			  a 128x128 data array.
	13-May-93 (MDM) - Added /FLOAT and /NORM_EXP options
	14-May-93 (MDM) - Correct DN_SHIFT calculation for FR FFI dark images
			  because they don't start at line 0.
			- Added /SHIFT_FLOOR option
V2.0	 6-Jun-93 (MDM) - Started tracking the version number
			  Added call to HIS_INDEX to track history.
	 8-Jun-93 (MDM) - Handle FR case where whole PFI falls outside
			  of the FFI dark frame
	10-Jun-93 (MDM) - Made exposure normalization in seconds 
			  instead of in msec.
	23-Jun-93 (MDM) - Put on-line
			- Added call to HIS_INDEX for when exposure normalized
			- Modified to use SHAPE_SAV instead of SHAPE_CMD
V2.01	 3-Aug-93 (MDM) - Modified to work with full frame strips
	16-Aug-93 (MDM) - Modified so that when DC_INDEX comes in defined, it
			  does not cause problems (since GET_DC_IMAGE will not
			  re-read the image if DC_INDEX comes in defined and is
			  the same image which is requested)
V2.02	16-Aug-93 (MDM) - Corrected an error caused when the full PFI or OR
			  fell outside of the reference dark frame.
			- Modified GET_DC_IMAGE to try to get the right 
			  FFI strip when in FR (top half of bottom half)
V2.03	16-Aug-93 (MDM) - Corrected bug introduced in 2.02
V3.00	25-Aug-93 (MDM) - Major changes to GET_DC_IMAGE and DARK_SUB
			- Added INDEX_OUT and /UPDATE_INDEX options
			- Added interpolation option
			- Allowed this one routine to be used for warm dark
			  image subtraction also
	26-Aug-93 (MDM) - Added $ys_dark_interp to switch interpolation on
			- Removed DC_INDEX and DC_IMAP outputs (since the
			  information is now saved in the history index)
	 6-Oct-93 (SLF) - Add output keyword MATCH_QUAL (from get_dc_image)
	13-Oct-93 (MDM) - Minor bug fix in the /DC_SCALAR option
V3.01  16-Dec-93 (MDM) - Modified SEL_DC_IMAGE to not chose dark images on
                         the "other side" of 13-Nov-92
V3.02	14-Jan-94 (MDM) - Added /DC_INTERPOLATE and /DC_SCALAR
			- Corrected error with history records when no
			  SDC datasets are found
V3.03	26-Jan-94 (MDM) - Corrected program version number variable (was
			  3.01 for 3.02 modification
	 9-Jun-94 (MDM) - Modified header (added information)
V3.04	30-Nov-94 (MDM) - Modified to use /ORIGINAL switch on GT_CORNER
			  call (because of how the DN shift is applied
			  and since RD_XDA will now allow the reading of
			  a portion of the image).
V3.05	12-Dec-94 (MDM) - Modified to pass FLOAT keyword through to
			  GET_DC_IMAGE
       08-Feb-95 (jmm) - Added the UDATA keywords
V3.10	27-Feb-95 (MDM) - Put McTiernan changes on-line
			- Check that the input is 2-D or 3-D
			- Put check that ROI location adjustment is done
			  properly (it was applying a negative adjustment)
V3.15  03-Feb-98 (TRM) - Added orbital correction code
       10-Feb-98 (SLF) - made ORBIT_CORRECT the default, added keyword
                            /NO_ORBIT_CORRECT to override  
       11-Feb-98 (SLF) - made NO_ORBIT_CORRECT the default 
V3.20  23-Jul-98 (SLF) - implement bug fix for ROI/PFI dn_shift correction
                         as suggested by shimojo san.
V3.25  02-Apr-99 (TRM) - changed val to a string so that extra values can
                         be included in the uniqueness test.  The new values
                         are the week id, to make sure that a new dark is
                         selected if a week boundary is passed, and tfms
                         which is used to force a new dark frame when 
                         orbit correction is used.
V3.26  14-Jul-99 (BNH) - Unbroke for /DC_SCALAR case.
V3.27  22-Sep-99 (SLF) - Use bit 15 in Version for ORBIT CORRECT history
V3.28  29-sep-00 (SLF) - Add calls to 'fstring' (allow more than 
                         1024 input 'index,data'
	29-Dec-01 (LWA) - Commented out '%DARK_SUB: applying SDC orbital correction'
	16-Aug-06 (Aki Takeda) - Reset /QNO_SDC at the top of the loop.


dark_sub [2] $SSW/yohkoh/sxt/idl/atest/dark_sub.pro
[Previous] [Next]
NAME:
	dark_sub
PURPOSE:
	Subtract the dark current from input FFI or PFI images
CALLING SEQUENCE:
	data_out = dark_sub(index, data, index_out)
	data_out = dark_sub(index, data, /update_index)
 
       udata_out = 1		;for uncertainties
	data_out = dark_sub(index, data, index_out, udata_out=udata_out)
INPUT:
	index	- The index structure for each image
	data	- The data array (NX x NY x N)
OUTPUT:
	data_out- The dark current subtracted image
	index_out- The updated index struture (history records appended)
 CALLS: ***
	FSTRING, MASK, get_dc_image [1], get_dc_image [2], get_dc_image [3], get_dc_rate
	get_res_offset, gt_corner, gt_dpe, gt_expdur [1], gt_expdur [2], gt_pfi_ffi, gt_res
	his_index, sxt_decomp [1], sxt_decomp [2], sxt_uvf_info [1], sxt_uvf_info [2]
	sxt_uvf_info [3], tbeep [1], tbeep [2], tbeep [3], tim2weekid
 CALLED BY:
	NAME [3], RD_AR, STRAY_CORR, leak_sub [1], leak_sub [2], leak_sub [3], sfc_prep [1]
	sfc_prep [2], termlite, wl_process
OPTIONAL KEYWORD INPUT:
       udata_in - the uncertainty in the input data array. You pass this in if
                  the data has been uncompressed already, if the data is of byte type,
                  dark_sub will obtain the uncertainty
       udata_out - The uncertainty in the output array, this will only be calculated
                   if a variable is set and passed in as the udata_out keyword.
	dc_only	- If set, the output is only the dark current
		  images that go with each index.
	dc_scalar - If set, then do not call GET_DC_IMAGE, just use
		  a scalar value for the background level.
	force_scalar - Same as "dc_scalar"
	dc_interpolate - If set, then find a short and long exposure dark image
		  of the same temperature around the time of the data, and
		  interpolate between those exposures to create the dark
		  frame.
	interpolate - Same as "dc_interpolate"
	float	- If set, return the data as floating point if necessary
		  (for the case where PFI startline correction needs to be made)
	norm_exp- If set, exposure normalize the data to DN/sec and return it as
		  floating point.
	shift_floor- If set, check the average of a 5x5 box in the lower 
		  left corner and shift the image by that amount in order to
		  adjust the image floor to the true zero.  This was 
		  introduced because for short exposure (DPE=0) a small
		  error in the "floor" is amplified quite a bit.
	new_floor - If shift_floor is set, it will adjust the floor to be
		  0 DN.  It can be shifted to a non-zero value by passing
		  that value in through the "new_floor" keyword.
	update_index - If set, then update the history portion of the
		  input index (not pass separate index variable out)
       orbit_correct - Use the orbital corrections for the dark current.
                       Must also specify the /interpolate keyword for this to
                       work.
OPTIONAL KEYWORD OUTPUT:
	match_qual - A structure which holds information on the
		  quality of the match for the dark image (number of
		  seconds between dark image and input image, how close
		  the exposure duration is, how close the temperature is)
METHOD:
	1. Call SXT_DECOMP if "data" is byte type
	2. Call GET_DC_IMAGE to get dark images
	3. For PFI, extract the relevant portion of the images
	4. Subtract off the dark current
HISTORY:
	Written 13-Oct-92 by M.Morrison
	15-Oct-92 (MDM) - Old method was to call GET_DC_IMAGE one time
			  outside the loop and to use IMAP.  For FR images
			  this can be a lot of images/memory, so it was 
			  changed to call GET_DC_IMAGE inside the loop and
			  to sort the order that images are subtracted so
			  that they are done in increasing DPE order.
	19-Nov-92 (GAL) - update to allow input of a single image.
	12-Mar-93 (MDM) - Modified to work in the cases when the
			  SDC database is not available
	18-Mar-93 (MDM) - Added /FORCE_SCALAR keyword
			- Added code to handle the case where the full
			  resolution PFI/OR falls outside of the dark current
			  image (since it is only 1024x512).
	12-May-93 (MDM) - Patch for case where whole full res PFI is outside
			  of the FFI dark frame
			- Modification to insert SUB_IMG into DATA_OUT using
			  (0,0,i) notation instead of (*,*,i) because of case
			  where there is something like a 64x64 imbedded in
			  a 128x128 data array.
	13-May-93 (MDM) - Added /FLOAT and /NORM_EXP options
	14-May-93 (MDM) - Correct DN_SHIFT calculation for FR FFI dark images
			  because they don't start at line 0.
			- Added /SHIFT_FLOOR option
V2.0	 6-Jun-93 (MDM) - Started tracking the version number
			  Added call to HIS_INDEX to track history.
	 8-Jun-93 (MDM) - Handle FR case where whole PFI falls outside
			  of the FFI dark frame
	10-Jun-93 (MDM) - Made exposure normalization in seconds 
			  instead of in msec.
	23-Jun-93 (MDM) - Put on-line
			- Added call to HIS_INDEX for when exposure normalized
			- Modified to use SHAPE_SAV instead of SHAPE_CMD
V2.01	 3-Aug-93 (MDM) - Modified to work with full frame strips
	16-Aug-93 (MDM) - Modified so that when DC_INDEX comes in defined, it
			  does not cause problems (since GET_DC_IMAGE will not
			  re-read the image if DC_INDEX comes in defined and is
			  the same image which is requested)
V2.02	16-Aug-93 (MDM) - Corrected an error caused when the full PFI or OR
			  fell outside of the reference dark frame.
			- Modified GET_DC_IMAGE to try to get the right 
			  FFI strip when in FR (top half of bottom half)
V2.03	16-Aug-93 (MDM) - Corrected bug introduced in 2.02
V3.00	25-Aug-93 (MDM) - Major changes to GET_DC_IMAGE and DARK_SUB
			- Added INDEX_OUT and /UPDATE_INDEX options
			- Added interpolation option
			- Allowed this one routine to be used for warm dark
			  image subtraction also
	26-Aug-93 (MDM) - Added $ys_dark_interp to switch interpolation on
			- Removed DC_INDEX and DC_IMAP outputs (since the
			  information is now saved in the history index)
	 6-Oct-93 (SLF) - Add output keyword MATCH_QUAL (from get_dc_image)
	13-Oct-93 (MDM) - Minor bug fix in the /DC_SCALAR option
V3.01  16-Dec-93 (MDM) - Modified SEL_DC_IMAGE to not chose dark images on
                         the "other side" of 13-Nov-92
V3.02	14-Jan-94 (MDM) - Added /DC_INTERPOLATE and /DC_SCALAR
			- Corrected error with history records when no
			  SDC datasets are found
V3.03	26-Jan-94 (MDM) - Corrected program version number variable (was
			  3.01 for 3.02 modification
	 9-Jun-94 (MDM) - Modified header (added information)
V3.04	30-Nov-94 (MDM) - Modified to use /ORIGINAL switch on GT_CORNER
			  call (because of how the DN shift is applied
			  and since RD_XDA will now allow the reading of
			  a portion of the image).
V3.05	12-Dec-94 (MDM) - Modified to pass FLOAT keyword through to
			  GET_DC_IMAGE
       08-Feb-95 (jmm) - Added the UDATA keywords
V3.10	27-Feb-95 (MDM) - Put McTiernan changes on-line
			- Check that the input is 2-D or 3-D
			- Put check that ROI location adjustment is done
			  properly (it was applying a negative adjustment)
V3.15  03-Feb-98 (TRM) - Added orbital correction code
       10-Feb-98 (SLF) - made ORBIT_CORRECT the default, added keyword
                            /NO_ORBIT_CORRECT to override  
       11-Feb-98 (SLF) - made NO_ORBIT_CORRECT the default 
V3.20  23-Jul-98 (SLF) - implement bug fix for ROI/PFI dn_shift correction
                         as suggested by shimojo san.
V3.25  02-Apr-99 (TRM) - changed val to a string so that extra values can
                         be included in the uniqueness test.  The new values
                         are the week id, to make sure that a new dark is
                         selected if a week boundary is passed, and tfms
                         which is used to force a new dark frame when 
                         orbit correction is used.
V3.26  14-Jul-99 (BNH) - Unbroke for /DC_SCALAR case.
V3.27  22-Sep-99 (SLF) - Use bit 15 in Version for ORBIT CORRECT history
V3.28  29-sep-00 (SLF) - Add calls to 'fstring' (allow more than 
                         1024 input 'index,data'
	29-Dec-01 (LWA) - Commented out '%DARK_SUB: applying SDC orbital correction'


dark_sub [3] $SSW/yohkoh/sxt/idl/util/dark_sub.pro
[Previous] [Next]
NAME:
	dark_sub
PURPOSE:
	Subtract the dark current from input FFI or PFI images
CALLING SEQUENCE:
	data_out = dark_sub(index, data, index_out)
	data_out = dark_sub(index, data, /update_index)
 
       udata_out = 1		;for uncertainties
	data_out = dark_sub(index, data, index_out, udata_out=udata_out)
INPUT:
	index	- The index structure for each image
	data	- The data array (NX x NY x N)
OUTPUT:
	data_out- The dark current subtracted image
	index_out- The updated index struture (history records appended)
 CALLS: ***
	FSTRING, MASK, get_dc_image [1], get_dc_image [2], get_dc_image [3], get_dc_rate
	get_res_offset, gt_corner, gt_dpe, gt_expdur [1], gt_expdur [2], gt_pfi_ffi, gt_res
	his_index, sxt_decomp [1], sxt_decomp [2], sxt_uvf_info [1], sxt_uvf_info [2]
	sxt_uvf_info [3], tbeep [1], tbeep [2], tbeep [3], tim2weekid
 CALLED BY:
	NAME [3], RD_AR, STRAY_CORR, leak_sub [1], leak_sub [2], leak_sub [3], sfc_prep [1]
	sfc_prep [2], termlite, wl_process
OPTIONAL KEYWORD INPUT:
       udata_in - the uncertainty in the input data array. You pass this in if
                  the data has been uncompressed already, if the data is of byte type,
                  dark_sub will obtain the uncertainty
       udata_out - The uncertainty in the output array, this will only be calculated
                   if a variable is set and passed in as the udata_out keyword.
	dc_only	- If set, the output is only the dark current
		  images that go with each index.
	dc_scalar - If set, then do not call GET_DC_IMAGE, just use
		  a scalar value for the background level.
	force_scalar - Same as "dc_scalar"
	dc_interpolate - If set, then find a short and long exposure dark image
		  of the same temperature around the time of the data, and
		  interpolate between those exposures to create the dark
		  frame.
	interpolate - Same as "dc_interpolate"
	float	- If set, return the data as floating point if necessary
		  (for the case where PFI startline correction needs to be made)
	norm_exp- If set, exposure normalize the data to DN/sec and return it as
		  floating point.
	shift_floor- If set, check the average of a 5x5 box in the lower 
		  left corner and shift the image by that amount in order to
		  adjust the image floor to the true zero.  This was 
		  introduced because for short exposure (DPE=0) a small
		  error in the "floor" is amplified quite a bit.
	new_floor - If shift_floor is set, it will adjust the floor to be
		  0 DN.  It can be shifted to a non-zero value by passing
		  that value in through the "new_floor" keyword.
	update_index - If set, then update the history portion of the
		  input index (not pass separate index variable out)
       orbit_correct - Use the orbital corrections for the dark current.
                       Must also specify the /interpolate keyword for this to
                       work.
OPTIONAL KEYWORD OUTPUT:
	match_qual - A structure which holds information on the
		  quality of the match for the dark image (number of
		  seconds between dark image and input image, how close
		  the exposure duration is, how close the temperature is)
METHOD:
	1. Call SXT_DECOMP if "data" is byte type
	2. Call GET_DC_IMAGE to get dark images
	3. For PFI, extract the relevant portion of the images
	4. Subtract off the dark current
HISTORY:
	Written 13-Oct-92 by M.Morrison
	15-Oct-92 (MDM) - Old method was to call GET_DC_IMAGE one time
			  outside the loop and to use IMAP.  For FR images
			  this can be a lot of images/memory, so it was 
			  changed to call GET_DC_IMAGE inside the loop and
			  to sort the order that images are subtracted so
			  that they are done in increasing DPE order.
	19-Nov-92 (GAL) - update to allow input of a single image.
	12-Mar-93 (MDM) - Modified to work in the cases when the
			  SDC database is not available
	18-Mar-93 (MDM) - Added /FORCE_SCALAR keyword
			- Added code to handle the case where the full
			  resolution PFI/OR falls outside of the dark current
			  image (since it is only 1024x512).
	12-May-93 (MDM) - Patch for case where whole full res PFI is outside
			  of the FFI dark frame
			- Modification to insert SUB_IMG into DATA_OUT using
			  (0,0,i) notation instead of (*,*,i) because of case
			  where there is something like a 64x64 imbedded in
			  a 128x128 data array.
	13-May-93 (MDM) - Added /FLOAT and /NORM_EXP options
	14-May-93 (MDM) - Correct DN_SHIFT calculation for FR FFI dark images
			  because they don't start at line 0.
			- Added /SHIFT_FLOOR option
V2.0	 6-Jun-93 (MDM) - Started tracking the version number
			  Added call to HIS_INDEX to track history.
	 8-Jun-93 (MDM) - Handle FR case where whole PFI falls outside
			  of the FFI dark frame
	10-Jun-93 (MDM) - Made exposure normalization in seconds 
			  instead of in msec.
	23-Jun-93 (MDM) - Put on-line
			- Added call to HIS_INDEX for when exposure normalized
			- Modified to use SHAPE_SAV instead of SHAPE_CMD
V2.01	 3-Aug-93 (MDM) - Modified to work with full frame strips
	16-Aug-93 (MDM) - Modified so that when DC_INDEX comes in defined, it
			  does not cause problems (since GET_DC_IMAGE will not
			  re-read the image if DC_INDEX comes in defined and is
			  the same image which is requested)
V2.02	16-Aug-93 (MDM) - Corrected an error caused when the full PFI or OR
			  fell outside of the reference dark frame.
			- Modified GET_DC_IMAGE to try to get the right 
			  FFI strip when in FR (top half of bottom half)
V2.03	16-Aug-93 (MDM) - Corrected bug introduced in 2.02
V3.00	25-Aug-93 (MDM) - Major changes to GET_DC_IMAGE and DARK_SUB
			- Added INDEX_OUT and /UPDATE_INDEX options
			- Added interpolation option
			- Allowed this one routine to be used for warm dark
			  image subtraction also
	26-Aug-93 (MDM) - Added $ys_dark_interp to switch interpolation on
			- Removed DC_INDEX and DC_IMAP outputs (since the
			  information is now saved in the history index)
	 6-Oct-93 (SLF) - Add output keyword MATCH_QUAL (from get_dc_image)
	13-Oct-93 (MDM) - Minor bug fix in the /DC_SCALAR option
V3.01  16-Dec-93 (MDM) - Modified SEL_DC_IMAGE to not chose dark images on
                         the "other side" of 13-Nov-92
V3.02	14-Jan-94 (MDM) - Added /DC_INTERPOLATE and /DC_SCALAR
			- Corrected error with history records when no
			  SDC datasets are found
V3.03	26-Jan-94 (MDM) - Corrected program version number variable (was
			  3.01 for 3.02 modification
	 9-Jun-94 (MDM) - Modified header (added information)
V3.04	30-Nov-94 (MDM) - Modified to use /ORIGINAL switch on GT_CORNER
			  call (because of how the DN shift is applied
			  and since RD_XDA will now allow the reading of
			  a portion of the image).
V3.05	12-Dec-94 (MDM) - Modified to pass FLOAT keyword through to
			  GET_DC_IMAGE
       08-Feb-95 (jmm) - Added the UDATA keywords
V3.10	27-Feb-95 (MDM) - Put McTiernan changes on-line
			- Check that the input is 2-D or 3-D
			- Put check that ROI location adjustment is done
			  properly (it was applying a negative adjustment)
V3.15  03-Feb-98 (TRM) - Added orbital correction code
       10-Feb-98 (SLF) - made ORBIT_CORRECT the default, added keyword
                            /NO_ORBIT_CORRECT to override  
       11-Feb-98 (SLF) - made NO_ORBIT_CORRECT the default 
V3.20  23-Jul-98 (SLF) - implement bug fix for ROI/PFI dn_shift correction
                         as suggested by shimojo san.
V3.25  02-Apr-99 (TRM) - changed val to a string so that extra values can
                         be included in the uniqueness test.  The new values
                         are the week id, to make sure that a new dark is
                         selected if a week boundary is passed, and tfms
                         which is used to force a new dark frame when 
                         orbit correction is used.
V3.26  14-Jul-99 (BNH) - Unbroke for /DC_SCALAR case.
V3.27  22-Sep-99 (SLF) - Use bit 15 in Version for ORBIT CORRECT history
V3.28  29-sep-00 (SLF) - Add calls to 'fstring' (allow more than 
                         1024 input 'index,data'
	29-Dec-01 (LWA) - Commented out '%DARK_SUB: applying SDC orbital correction'


dat2bsc $SSW/yohkoh/bcs/idl/bsc/dat2bsc.pro
[Previous] [Next]
 NAME:
	dat2bsc
 PURPOSE:
	convert wave and flux arrays to BSC format
 CALLING SEQUENCE:
	dat2bsc,wave,flux,bsc_index,bsc_data,chan=chan
 INPUTS:
	wave = wavelength (Ang) 
       flux = flux (photons cm-2 s-1 A-1 in second column)
 OUTPUTS:
       fake bsc_index and bsc_data arrays 
 KEYWORDS:
       chan = BCS channel 
 OPTIONAL KEYWORDS:
       counts = count data corresponding to flux
       error  = error data corresponding to errors inc counts
       time = ASCII string time in UTPLOT format (e.g. 6-SEP-92  09:04:57.771)
       accum = accumulation time of spectrum
 CALLS: ***
	MK_BSC_STR [1], MK_BSC_STR [2], anytim2ints [1], anytim2ints [2]
 EXAMPLE:
       dat2bsc,wave,flux,chan=3,bsc_index,bsc_data  
 MODIFICATION HISTORY:
       31 Jan 1994, written DMZ (ARC)
       19 Apr 1994, fixed bug in CHAN (DMZ)
       10 May 1994, added 2-d wave,flux capability
       20 Jul 1994, added unit errors, and counts/error keywords
                    made CHAN a keyword


data_compress [3] $SSW/yohkoh/gen/idl/atest/data_compress.pro
[Previous] [Next]
NAME:
	data_compress

PURPOSE:
	Compress and decompress data using UNIX compress or gzip by
	writing a temporary file.
INPUT:
	data	  - uncompressed data (unless /DECOMP is set in which
		    case it is the compressed data)
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_STAT [1], FILE_STAT [2]
	GET_NBYTES, concat_dir [4], curdir [1], curdir [2], diskfree [1], diskfree [2]
	file_compress [1], file_compress [2], file_stat [3], file_uncompress [1]
	file_uncompress [2], get_logenv [1], get_logenv [2], rdwrt [1], rdwrt [2]
	rdwrt [3], write_access [1], write_access [2]
 CALLED BY:
	RD_SDA_DATA [1], RD_SDA_DATA [2], sav_sda [1], sav_sda [2], sav_sda [3]
OPTIONAL KEYWORD INPUT:
	decomp	  - If set, then the input is compressed data and decompression
		    is supposed to be performed.
       type_comp - Indicates type of compression.    1=>gzip, 2=>Unix Compress
          t_comp - indicates type of decompression.  1=>gzip, 2=>Unix Compress

METHOD:
	A file must be created in a temporary directory to be decompressed/
	compressed.  The following logic is used to figure out which 
	directory to use:
		1. If $DIR_GEN_DECOMP is defined and has enough space
		2. If $DIR_GBO_TEMP is defined and has enough space
		3. If $HOME has enough space
		4. The current default directory
		5. If /tmp has enough space
HISTORY:
	Written 7-Mar-95 by M.Morrison 
       t_comp, type_comp added 11-Dec-97 by PGS      


data_paths2 [2] $SSW/yohkoh/gen/idl/util/data_paths2.pro
[Previous] [Next]
   Name: data_paths2

   Purpose: use /ydnn links to determine yohkoh data paths

   Keyword Parameters
      node - string containing remote node to determine paths
      link - if set, expands links  
      top  - if set only returns links (default is one level down)
      sortl - if set, sort by link name (default sort by low level)
      filter - strarry containing 'interesting patterns'
      noreformat - if set, do not include the "reformat" directories       
      gbo  - if set, return gbo files (filter forced to gbo9)

 CALLED BY:
	HXT_AUTOIMG, gbo_paths [1], gbo_paths [2], search_files
   History: slf, 2-Mar-1992
	     slf, 23-Mar-1992 added sort and filter keywords
	     mdm, 25-May-1992 added "noreformat" keyword
	     mdm, 28-May-1992 made adjustment for cases where the "ls"
			      command resulted in a trailing "/"
	     SLF, 25-Jun-1992 IRIX code to make link listing single column
	     slf, 15-jan-1993 generalized filter option, added gbo keyword
	     slf,  6-Jan-1994 sgi additions 
	     mdm, 21-Sep-1994 Added "unalias ls" command to the spawn command
			      Use /bin/ls instead of ls

   Restrictions: unix only for now - sgi code is kludge for now


DATAGET3_GRS $SSW/yohkoh/ucon/idl/hiraoka/dataget3_grs.pro
[Previous] [Next]
 NAME:
       DATAGET3_GRS
 PURPOSE:
       To allow a user to select the flare data and background data.
         ( under only out_grsphl? )
 CALLS: ***
	ERRPLOT [1], ERRPLOT [2], Int2Ex [1], Int2Ex [2], gt_day [1], gt_day [2]
	gt_time [1], gt_time [2], pprint [1], pprint [2], time_addxa, wmenu_sel [1]
	wmenu_sel [2]
 CALLED BY:
	OUT_GRSPHL1, OUT_GRSPHL2
 HISTORY:
       Written 9-dec-93 by T.Hiraoka ( Rikkyo Univ.)


DATAGET3_HXS $SSW/yohkoh/ucon/idl/hiraoka/dataget3_hxs.pro
[Previous] [Next]
 NAME:
       DATAGET3_HXS
 PURPOSE:
       To allow a user to select the data on display by mouse.
         ( under only out_hxsph )
 CALLS: ***
	ERRPLOT [1], ERRPLOT [2], Int2Ex [1], Int2Ex [2], gt_day [1], gt_day [2]
	gt_time [1], gt_time [2], pprint [1], pprint [2], time_addxa, wmenu_sel [1]
	wmenu_sel [2]
 CALLED BY:
	OUT_HXSPH
 HISTORY:
       Written 9-dec-93 by T.Hiraoka ( Rikkyo Univ.)


dataget_grs $SSW/yohkoh/ucon/idl/suga/dataget_grs.pro
[Previous] [Next]
  NAME:
       dataget_grs
  PURPOSE:
       To allow a user to select the flare data and background data.
         ( under only grs_plot )
 CALLS: ***
	DTCF_PH_GRS2L, ERRPLOT [1], ERRPLOT [2], dtcf_ph_grs1l, pprint [1], pprint [2]
	time_add1s, window_select, wmenu_sel [1], wmenu_sel [2]
 CALLED BY:
	ph_eff_grs1, ph_eff_grs2, ph_pow_grs1, ph_pow_grs2
  HISTORY:
       Written  1-jul-93 by T.Hiraoka
       Updated 12-jul-93 by T.Hiraoka ;change the graphic output


DAY_IN $SSW/yohkoh/ucon/idl/hudson/day_in.pro
[Previous] [Next]
 NAME:
     DAY_IN
 PURPOSE:
     Yohkoh in daylight?
 CATEGORY:
     Yohkoh
 CALLING SEQUENCE:
     day_in, fem_dat, tt
 INPUTS:
     fem_dat from rd_fem file
     tt - times in any approved format
 OPTIONAL (KEYWORD) INPUT PARAMETERS:
 OUTPUTS:
     returns 1 for sunlit times
 CALLS: ***
	gt_time [1], gt_time [2]
 CALLED BY:
	NEAR_CONJ, NOV93_ECLIPSE, NOV_ECLIPSE, SXT_ECLIPSE, may_eclipse
 MODIFICATION HISTORY:
     ca 1995 written (HSH)
     20-aug-98 improved input time format (HSH)


dayofyr [2] $SSW/yohkoh/ucon/idl/mctiernan/dayofyr.pro
[Previous] [Next]
 NAME:
	dayofyr
 CALLING SEQUENCE:
	dyr=dayofyr(iyr,imo,idm)
 PURPOSE:
 	Here's a routine that will give the day of the year, 
 INPUT:
	iyr=  year to determine whether it's a leap year
	imo= month as an integer, must be from 1 to 12 or else it's reset.
	idm= day of the month, 
 OUTPUT:
	dyr= The day of the year, for each day of month, idm may be an
            array, iyr and imo need not be, but can
 KEYWORDS:
       century= The century you want, remember to add 1, the 1500's are the
                16th century, in order to obtain the 1st century, use
                century=1. Negative centuries are not allowed!
                And century overrides any numbers gt 100 in iyr.
                The first year in the century is considered to be the 00 year,
                which is the way it should be...
 CALLS: ***
	leap_yr
 CALLED BY:
	AUTOCAL, Build_Schedule, DECODE, GETGPSLIST, GET_CALEPH, GET_LUNEPH, GET_REGN
	GET_SOLEPH, MAKE_SOLCALTRAJ, RADIOFLUX, READ_RSTN_FLUX, SYSDOY, TLSNOW
	UPDATE_TPRECS, UPTIME, dayofyrch
 HISTORY:
	JMcT Spring '92
       Rewritten to handle arrays, 19-oct-93 by JM


dayofyrch $SSW/yohkoh/ucon/idl/mctiernan/dayofyrch.pro
[Previous] [Next]
 NAME:
	dayofyrch
 CALLING SEQUENCE:
	dyr=dayofyrch(iyr,mo,imo,idm)
 PURPOSE:
 	Here's a routine that will give the day of the year, 
 INPUT:
	iyr=  year to determine whether it's a leap year
	mo= month as characters, bad ch variables are set to december
	idm= day of the month
 OUTPUT:
	dyr=The day of the year
	imo= month as an integer
 KEYWORDS:
       century= The century you want, remember to add 1, the 1500's are the
                16th century, in order to obtain the 1st century, use
                century=1. Negative centuries are not allowed!
                And century overrides any numbers gt 100 in iyr.
                The first year in the century is considered to be the 00 year,
                which is the way it should be...
 CALLS: ***
	DAYOFYR [1], dayofyr [2]
 HISTORY:
	JMcT Spring '92
       Enabled use of arrays, 19-oct-93, JM


days_2_xmas $SSW/yohkoh/ucon/idl/mctiernan/days_2_xmas.pro
[Previous] [Next]
 NAME:
       days_2_xmas
 PURPOSE:
       Gives the number of days until Christmas, for the given year
 CALLING SEQUENCE:
       days=days_2_xmas(date)
 INPUT:
       date= the date, in typical format , DD-MMM-YR.
             Date may also be an index or roadmap structure.
 OUTPUT:
       days= the number of days to christmas, including the
             given day, but not christmas itself.
 CALLS: ***
	anytim2ex [1], anytim2ex [2], anytim2ints [1], anytim2ints [2]
 CALLED BY:
	FIRST_LIGHT [1], FIRST_LIGHT [2], first_bcs
 HISTORY:
       19-Oct-93 By JMM
       20-oct-93, JRL, Rewritten
       3-dec-97, jmm, Was counting the days between the present day
                 and XMAS. changed code around to avoid it
                 instead of using addtime, go to anytim2ints
                 structures and subtract the .day fields


days_til_next_solar_max $SSW/yohkoh/ucon/idl/hudson/days_til_next_solar_max.pro
[Previous] [Next]
 NAME:
     days_til_next_solar_max.pro
 PURPOSE:
     print days remaining before the next maximum
 CATEGORY:
     Yohkoh
 CALLING SEQUENCE:
     days_til_solar_maximum
 INPUTS:
 OPTIONAL (KEYWORD) INPUT PARAMETERS:
     /cycle:  Allows free choice of cycle number for any future
       solar cycle. Not implemented yet.
 ROUTINES CALLED
     anytim 
 OUTPUTS:
 CALLS: ***
	anytim [1], anytim [2], anytim [3], anytim [4], anytim [5]
 COMMON BLOCKS:
 SIDE EFFECTS:
     prints to screen
 RESTRICTIONS:
 MODIFICATION HISTORY:
     HSH written 6-May-1993 (2400 days prior to Cycle 23 maximum)


dbase2disk $SSW/yohkoh/gen/idl/ys_util/dbase2disk.pro
[Previous] [Next]
   Name: dbase2disk

   Purpose: copy files from MO to output disk (magnetic or MO)

   Input Parameters:
      time0 - dbase times of interest OR start times of ranges
      time1 - (optional) stop time of ranges (dimension must equal time0)
   
   Optional Keyword Parameters:
      infile - time vector or time ranges in Yohkoh string format
               (may be used in place of time0 & time1)
      outdisk - directory name for output - or, one of the following codes...
                1:find mathching week directory 2:find matching month directory
      prefix  - instrument prefix(s) for selection
      select  - if set, menu selection of MO subset
      monode  - if set, mo nodename (default is local machine)
      drive   - if set, MO or Tape drive number (default=0)
      tape    - if set, loop through Tapes, not MOs (not yet implemented)
      verify  - if set, verify integrity of tranfered files
      
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], STR2ARR [1]
	STR2ARR [2], concat_dir [4], curdir [1], curdir [2], diskfree [1], diskfree [2]
	file_append [1], file_append [2], file_exist [1], file_exist [3], file_list [1]
	file_list [2], get_afile_size [1], get_afile_size [2], get_host [1]
	get_host [2], get_logenv [1], get_logenv [2], input [1], input [2], is_member [1]
	is_member [2], momount, prstr [1], prstr [2], str_perm, strjustify, tbeep [1]
	tbeep [2], tbeep [3], tim2dbase, wmenu_sel [1], wmenu_sel [2], yesnox [1]
	yesnox [2], yo_file_check [1], yo_file_check [2]
   Restrictions:
      UNIX only (MO is ISAS only for now - can be extended to exabyte tape)

   History:
      1-Dec-1994 (SLF) - derived from go_mo etc...
      3-Dec-1994 (SLF) - slightly more generic, call tim2dbase directly
      5-Dec-1994 (SLF) - comment, verify output, more diagnostics in logfile


DC_ORBIT_CORRECT $SSW/yohkoh/sxt/idl/atest/dc_orbit_correct.pro
[Previous] [Next]

function dc_orbit_correct,dcindex,imindex,imap

NAME:
     DC_ORBIT_CORRECT
PURPOSE:
     Compute the multiplicative correction to a dark frame required
     to correct for the orbital time difference between the dark frame
     and the data frame.
CATEGORY:
CALLING SEQUENCE:
     correction = dc_orbit_correct(dcindex,imindex)
INPUTS:
     dcindex = indices of dark frames
     imindex = indices of data frames
     imap = index of which DC image to use for each Data image
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS
OUTPUTS:
     correction = multiplicative correction to be applied to the dark data
 CALLS: ***
	sxt_uvf_info [1], sxt_uvf_info [2], sxt_uvf_info [3]
 CALLED BY:
	get_dc_image [2], get_dc_image [3]
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
MODIFICATION HISTORY:
     1998-Jan-28  T. Metcalf
     1998-Jan-28  S. Freeland - change 'get_tfms' to sxt_uvf_info(/tfms)
     1998-Jan-29  T. Metcalf - added imap index
     1999-Apr-01  T. Metcalf - added a lower limit of 4.5 minutes for the
                               image and dark TFMS.  If we ever compute 
                               a more accurate polynomial fit, this could
                               be lowered.


dd792ex $SSW/yohkoh/ucon/idl/morrison/dd792ex.pro
[Previous] [Next]
Name:
	dd792ex
Purpose:
	Convert decimal d79 to external time representation.
Input:
	DD79_ARR
Output:
	Returns a 7xN array of external times.
 CALLS: ***
	Int2Ex [1], Int2Ex [2], MAKVEC
 CALLED BY:
	clon2ex [1], clon2ex [2], clon2ex [3], get_ar
History:


de_spiker [2] $SSW/yohkoh/gen/idl/util/de_spiker.pro
[Previous] [Next]
 NAME: 
   de_spiker
 PURPOSE: 
   Default mode return images with spikes and dark holes removed via 
   median filter.  
 CALLING SEQUENCE:
   clean_img = de_spiker(image, threshold, [indices=indices, width=width,
			average=average, pos=pos, neg=neg])
 INPUTS:
   image	- image array to clean (may be 2-d or 3-d)
   threshold 	- sets the threshold level for which all
		  spikes are removed.  Suggest using a value
		  of 10.  Really bright or dark spikes can be
		  removed with a higher value such as 20+.
 CALLS: ***
	filter [1], filter [2], filter [3], sfd_comp, spikes [1], spikes [2]
 CALLED BY:
	sxt_comp_sharp, sxt_prep [1], sxt_prep [2], sxt_prep [3]
 OPTIONAL KEYWORD INPUT:
   width	- set the width of the median filter (3 is default)
   average	- use average filter instead of median.
   pos		- remove spikes only.
   neg		- remove holes only. Note: threhold must be less than 0.

 RETURNED:
   cleaned image with the same size and data-type as input image
 OPTIONAL KEYWORD OUTPUT:
   indices	- list of indices to the located spikes and dark holes.
 PROCEDURE:
   This routine calls the idl function SPIKES.  
   The spikes and dark holes are identified via the following method:

     spike_indices = where(abs(image-median(image,width)) gt threshold)

     If neg is used than:
     spike_indices = where((image-median(image,width)) lt threshold)

     Method: if decompressed data is pass, the data are compressed for
 	finding spikes and holes.  The filtered values of the holes
	and spikes are always computed from the input data.  The 
	filter data for the holes and spikes are than back substituted  
	into a copy of the orig. input data for the return.

 MODIFICATION HISTORY: 
   12-Jan-94, GAL, Written (replaced LWA's spikes_off routine)
   16-17 Mar-94, GAL, added code to handle decompressed images.
	added keywords to use upgraded version of spikes.
   11-April-94, gal, modified to preserve input data-type
   14-Apr-94, gal, modified to only sfd compress/decomp filter 
		spike/hole data for non-byte input.  The comp/decomp
		introduces about a 1% error to the filtered spike/hole
		data.
   20-Apr-94, gal, modified to only use sfd compression for finding
		spikes/holes in non-byte type data via spikes rountine.  
		The filter values used for replacement are not compressed 
		and are always generated via filter function.
   10-nov-96, slf, changed call to <filter> to <image_filterer> due
                   to function name change


DEC_SHIFT $SSW/yohkoh/ucon/idl/hudson/dec_shift.pro
[Previous] [Next]
 NAME:
 	DEC_SHIFT	
 PURPOSE:
	Shift a data cube by given (x,y) offsets at 1/10 pixel resolution
 CALLING SEQUENCE:
	dec_shift,data_in,x,y,data_out
 INPUTS
	data_in the unshifted data cube
	x,y the displacements, in the sense (later image position
	  minus earlier image position)
	data_out the shifted data cube, with later images registered
	  onto the coordinates of the first
 HISTORY:
	HSH, written May 1, 1992
	HSH, May 24, 1992, modified to take arbitrary image sizes


deciyr2ints $SSW/yohkoh/gen/idl/util/deciyr2ints.pro
[Previous] [Next]

 NAME
	deciyr2ints
 PURPOSE
	To convert time in the form of decimal year, e.g., 92.0126,
	to a Yohkoh time structure.
 CALLING SEQUENCE
	tstruct = deciyr2ints(input)
	time = deciyr2ints(93.6299)
 INPUT
	Single datum or floating point array with times in decimal
	form, e.g., 93.6299.
 OUTPUT
	Yohkoh time structure, Leap years are properly handled.
 HISTORY
	LWA 4-Jan-96, Wtitten to deal with SPO Ca sun-as-a-star data.

 CALLS:


dedupe_sort $SSW/yohkoh/ucon/idl/acton/dedupe_sort.pro
[Previous] [Next]
 NAME:
	dedupe_sort
 PURPOSE:
	Function to sort data into ascending order, and return the
	ordered indices of non-duplicate data.
 CALLING SEQUENCE:  
	result = dedupe_sort(array [, index, data, Asort=Asort, /info])
	result = dedupe_sort(intsecarr(roadmap))
	result = dedupe_sort(xxx,index,data,/info) ; This call will
		return index and data time-ordered and with no duplicates.
 INPUT:
	Array - array to be sorted
	/INFO = optional keyword to cause brief message about # equal values.
 OPTIONAL INPUT/OUTPUT:
	index - if index is given then Array is computed internally
		from int2secarr(index).  Deduped and sorted index is returned.
	data  - if both index and data are given then both are returned
		deduped and sorted.
 OUTPUT:
	result - sort subscripts are returned as function value
 OPTIONAL OUTPUT:
	Asort - sorted array of non_redundant values of Array.
 HISTORY
	11-May-95 LWA Adapted from Bsort.pro
	12-May-95 LWA Added index, data capability
 CALLS:
 CALLED BY
	termlite


def_save $SSW/yohkoh/gen/idl/ys_util/def_save.pro
[Previous] [Next]
   Name: def_save

   Purpose: return default yohkoh save set names

 CALLS: ***
	str_replace [1], str_replace [2], weekid [1], weekid [2], weekid [3]
 CALLED BY:
	sw_tape
   History: slf, 11/19/91
  	     slf, 2-15-92			; add ydb
	     slf, 3-8-92			; util switch
	     slf, 20-may-92			; change /ys to $ys
	     slf, 22-Jun-92			; add big_data
	     slf, 24-Nov-92			; add atest and ucon
	     slf,  1-Mar-93			; add idlfix


def_tapd [1] $SSW/yohkoh/gen/idl/atest/def_tapd.pro
[Previous] [Next]
   Name: def_tapd

   Purpose: define default tape drive names for various systems

   Calling Sequence:
      a = def_tapd(device_number)
      a = def_tapd(0)

   Input Parameters
      dev - (optional) if present, dev is used in place of '0'
            (allows use of drives 0,1,2,3,...

   Output: function returns system dependent drive

 CALLS: ***
	CHKLOG [1], CHKLOG [2], get_host [1], get_host [2], str_replace [1]
	str_replace [2]
 CALLED BY:
	ACOPY [1], RD_TAR, RdTap [1], RdTap [2], RdTap [3], arctap2tap, dotar, fitstap2tap [1]
	fitstap2tap [2], getm1ans, go_mk_cd, go_rdtap [1], go_rdtap [2], mk_gsn_obs
	mk_mo_disk, mk_mo_disk2, mk_ydbtape [1], mk_ydbtape [2], mktap, mo2wks, mo_patch
	mo_tap_dump, mtcmd [1], mtcmd [2], prep_week [1], prep_week [2], rd_ydbtap
	rd_ydbtapedir, soon2fits, sw_tape, tap2tap, vmscopytape, wrttcplog, ydbtap2tap
	ydbtapsets
   History: written by slf, 11/91 for solar-a data archive tapes
	     12/91 - added dev option and sunos default - slf
   26-mar-92, J.R. Lemen, Added names for SAG and FLARES.
   16-Apr-92, gal, added logic for bcs group at isas
		0 	defaults to mub0 
		1-9 	defaults to muc0
   12-Jan-93, slf  added risc/os (mips) option per isas mips 
   15-Nov-93, dmz  added case where none of the above are true (for vms)
   30-Nov-93, Andy Phillips/gal added "msslv2" node.
   12-Jan-93 (SLF) - check system variable !ys_deftape
   25-Mar-94, akt  for vms, check logicals mt0 through mt9 and display
                   devices that are actually available.
    5-Apr-94 (SLF) - add Solaris default=/dev/rmt/0bln
    12-May-94 akt - Merged akt change of 25-mar-94 with slf '94 changes 
    17-May-94 (SLF) - consolidate some vms code, add TESTOS keyword
    02-Dec-94 (RDB) - added OSF and mssly tape device
    08-Dec-94 (AES) - added device for general case of OSF operating system
    09-dec-94 (slf) - leading '/' added to osf /dev...
    06-nov-95 (jmm) - fixed solaris default, file_exist('/dev/rmt/0bln')
                      returns zero...
    20-may-97 (slf) - linux default


def_tapd [2] $SSW/yohkoh/gen/idl/tape/def_tapd.pro
[Previous] [Next]
   Name: def_tapd

   Purpose: define default tape drive names for various systems

   Calling Sequence:
      a = def_tapd(device_number)
      a = def_tapd(0)

   Input Parameters
      dev - (optional) if present, dev is used in place of '0'
            (allows use of drives 0,1,2,3,...

   Output: function returns system dependent drive

 CALLS: ***
	CHKLOG [1], CHKLOG [2], get_host [1], get_host [2], str_replace [1]
	str_replace [2]
 CALLED BY:
	ACOPY [1], RD_TAR, RdTap [1], RdTap [2], RdTap [3], arctap2tap, dotar, fitstap2tap [1]
	fitstap2tap [2], getm1ans, go_mk_cd, go_rdtap [1], go_rdtap [2], mk_gsn_obs
	mk_mo_disk, mk_mo_disk2, mk_ydbtape [1], mk_ydbtape [2], mktap, mo2wks, mo_patch
	mo_tap_dump, mtcmd [1], mtcmd [2], prep_week [1], prep_week [2], rd_ydbtap
	rd_ydbtapedir, soon2fits, sw_tape, tap2tap, vmscopytape, wrttcplog, ydbtap2tap
	ydbtapsets
   History: written by slf, 11/91 for solar-a data archive tapes
	     12/91 - added dev option and sunos default - slf
   26-mar-92, J.R. Lemen, Added names for SAG and FLARES.
   16-Apr-92, gal, added logic for bcs group at isas
		0 	defaults to mub0 
		1-9 	defaults to muc0
   12-Jan-93, slf  added risc/os (mips) option per isas mips 
   15-Nov-93, dmz  added case where none of the above are true (for vms)
   30-Nov-93, Andy Phillips/gal added "msslv2" node.
   12-Jan-93 (SLF) - check system variable !ys_deftape
   25-Mar-94, akt  for vms, check logicals mt0 through mt9 and display
                   devices that are actually available.
    5-Apr-94 (SLF) - add Solaris default=/dev/rmt/0bln
    12-May-94 akt - Merged akt change of 25-mar-94 with slf '94 changes 
    17-May-94 (SLF) - consolidate some vms code, add TESTOS keyword
    02-Dec-94 (RDB) - added OSF and mssly tape device
    08-Dec-94 (AES) - added device for general case of OSF operating system
    09-dec-94 (slf) - leading '/' added to osf /dev...
    06-nov-95 (jmm) - fixed solaris default, file_exist('/dev/rmt/0bln')
                      returns zero...


def_tapd [3] $SSW/yohkoh/ucon/idl/slater/get_tapd.pro
[Previous] [Next]
   Name: def_tapd

   Purpose: define default tape drive names for various systems

   Calling Sequence:
      a = def_tapd(device_number)
      a = def_tapd(0)

   Input Parameters
      dev - (optional) if present, dev is used in place of '0'
            (allows use of drives 0,1,2,3,...

   Output: function returns system dependent drive

 CALLS: ***
	CHKLOG [1], CHKLOG [2], GET_TAPD, get_host [1], get_host [2], str_replace [1]
	str_replace [2]
 CALLED BY:
	ACOPY [1], RD_TAR, RdTap [1], RdTap [2], RdTap [3], arctap2tap, dotar, fitstap2tap [1]
	fitstap2tap [2], getm1ans, go_mk_cd, go_rdtap [1], go_rdtap [2], mk_gsn_obs
	mk_mo_disk, mk_mo_disk2, mk_ydbtape [1], mk_ydbtape [2], mktap, mo2wks, mo_patch
	mo_tap_dump, mtcmd [1], mtcmd [2], prep_week [1], prep_week [2], rd_ydbtap
	rd_ydbtapedir, soon2fits, sw_tape, tap2tap, vmscopytape, wrttcplog, ydbtap2tap
	ydbtapsets
   History: written by slf, 11/91 for solar-a data archive tapes
	     12/91 - added dev option and sunos default - slf
   26-mar-92, J.R. Lemen, Added names for SAG and FLARES.
   16-Apr-92, gal, added logic for bcs group at isas
		0 	defaults to mub0 
		1-9 	defaults to muc0
   12-Jan-93, slf  added risc/os (mips) option per isas mips 
   15-Nov-93, dmz  added case where none of the above are true (for vms)
   30-Nov-93, Andy Phillips/gal added "msslv2" node.
   12-Jan-93 (SLF) - check system variable !ys_deftape
   25-Mar-94, akt  for vms, check logicals mt0 through mt9 and display
                   devices that are actually available.
    5-Apr-94 (SLF) - add Solaris default=/dev/rmt/0bln
    12-May-94 akt - Merged akt change of 25-mar-94 with slf '94 changes 
    17-May-94 (SLF) - consolidate some vms code, add TESTOS keyword
    02-Dec-94 (RDB) - added OSF and mssly tape device
    08-Dec-94 (AES) - added device for general case of OSF operating system
    09-dec-94 (slf) - leading '/' added to osf /dev...
    06-nov-95 (jmm) - fixed solaris default, file_exist('/dev/rmt/0bln')
                      returns zero...


DEF_UTPLOT $SSW/yohkoh/ucon/idl/shimizu/def_utplot.pro
[Previous] [Next]
 NAME:
       DEF_UTPLOT 

 PURPOSE:
	Set UTPLOT tick marks.
 CATEGORY:
	SETUP for Image Display
 CALLING SEQUENCE:
	DEF_UTPLOT, index, [yaxis=yaxis]

 INPUTS:
	Index: Index structure to get time information of the slice image. 

 KEYWORD PARAMETERS:

 OUTPUTS:
	None.

 CALLS: ***
	SET_UTPLOT [1], SET_UTPLOT [2], t_utplot [1], t_utplot [2]
 CALLED BY:
	TVF_SLICE
 COMMON BLOCKS:
	None.

 SIDE EFFECTS:
	!x parameters are set for UTPLOT display.
	CLEAR_UTPLOT to clear. 

 RESTRICTIONS:
	None.

 MODIFICATION HISTORY:
	19 Nov 94 written  T.Shimizu


DEFINE_SITE_PATH $SSW/yohkoh/bcs/idl/util/define_site_path.pro
[Previous] [Next]
 NAME:
	DEFINE_SITE_PATH
 PURPOSE:
	Routine that writes the routine SITE_PATH.PRO which when 
	executed defines !path for a site.
	This procedure should be executed using DEFINE_IDL_PATH.COM
	which temporarily defines IDL_PATH.

	Designed for VMS machines to speed IDL startup
 CALLING SEQUENCE:  
	Can only be run on entry by the command
		IDL DEFINE_SITE_PATH
 INPUTS:
	uses the string help in !path which is derived from IDL_PATH
	if this logical is set.
 OUTPUTS:
	writes file SITE_PATH.PRO to current directory
 OPTIONAL OUTPUTS:

 RESTRICTIONS:
	Currently only splits VMS !path

	Note:
	  1) Define the YOHKOH symbols and logicals by executing
	  YOHKOH_SETUP.COM prior to execution of DEFINE_IDL_PATH.COM.
	  2) Make sure to redefine the YOHKOH symbols and logicals
	  again after the .COM file has been used as they are left in 
	  non standard state!
 PROCEDURE:

 MODIFICATION HISTORY:
 	RDB, Thu Jan 23 14:49:43 1992


dejitter $SSW/yohkoh/ucon/idl/mcallister/dejitter.pro
[Previous] [Next]
       NAME: dejitter

       PURPOSE: Use a fixed dark feature (eg a sunspot) to dejitter a set of 
		 images.		 

       METHOD: Select a small area around the feature, find the darkest pixel
		in each image and shift the images to align these dark pixels.
		The factor keyword allows you to blow up the small region to get
		sub-pixel accuracy. 

       CALLING SEQUENCE: out=dejitter(cube,factor)

       PARAMETERS:	cube	input cube
			factor	factor to expand by for calculations. Should
				not be so large as to make the images larger 
				than the screen.

	KEYWORD:	max	use a maximum rather than a minimum for the fit

	CALLS: ***
	STR2ARR [1], STR2ARR [2], coord_l2v, draw_boxcorn [1], draw_boxcorn [2], new_win
	selpnt
       HISTORY: Drafted AMcA, November 3, 1994.
		 Modified to take average of area around the extreme 
		 pix. Added MAX keyword, AMcA, Dec 3, 1994.


deka_norm [1] $SSW/yohkoh/gen/galileo/idl/lmsal/deka_norm.pro
[Previous] [Next]
NAME:
        deka_norm
PURPOSE:
	Create time-series images normalized to an exposure of 100 seconds.
CATEGORY:
        Yohkoh/SXT analysis 
CALLING SEQUENCE:
	img = deka_norm(index, data)
INPUT:
	index	- index structure
	data	- data cube (if byte type will be sxt_decompressed)
OPTIONAL INPUT:
	none
 CALLS: ***
	gt_expdur [1], gt_expdur [2], his_index, sxt_decomp [1], sxt_decomp [2]
 CALLED BY:
	mk_ssc [1], mk_ssc [2]
OPTIONAL KEYWORD INPUT:
	none
OUTPUT:
	returns	- normalized data (floating point data type) in 
		  DN/dekasec
OPTIONAL KEYWORD OUTPUT:
	dekaindex = index structure with modified exposure in history
MODIFICATION HISTORY:
	10/20/96 [LWA]  Prepared from exp_norm.pro


deka_norm [2] $SSW/yohkoh/ucon/idl/acton/deka_norm.pro
[Previous] [Next]
NAME:
        deka_norm
PURPOSE:
	Create time-series images normalized to an exposure of 100 seconds.
CATEGORY:
        Yohkoh/SXT analysis 
CALLING SEQUENCE:
	img = deka_norm(index, data)
INPUT:
	index	- index structure
	data	- data cube (if byte type will be sxt_decompressed)
OPTIONAL INPUT:
	none
 CALLS: ***
	gt_expdur [1], gt_expdur [2], his_index, sxt_decomp [1], sxt_decomp [2]
 CALLED BY:
	mk_ssc [1], mk_ssc [2]
OPTIONAL KEYWORD INPUT:
	none
OUTPUT:
	returns	- normalized data (floating point data type) in 
		  DN/dekasec
OPTIONAL KEYWORD OUTPUT:
	dekaindex = index structure with modified exposure in history
MODIFICATION HISTORY:
	10/20/96 [LWA]  Prepared from exp_norm.pro


delete_week [2] $SSW/yohkoh/gen/idl/util/delete_week.pro
[Previous] [Next]
NAME:
	delete_week
PURPOSE:
	Delete all files from a given week using the File ID as the
	input to determine which week it falls in.
CALLING SEQUENCE:
	delete_week
	delete_week, '92_52'
       delete_week, '94_28', move='/yd10'	  ; creates sub: /yd10/94_28t
	delete_week, '92_51', indir='/yd3/reformat'
	delete_week, '93_03', indir='/yd3/reformat', move='/yd10/93_03t/.'
       delete_week, '94_28', /checksize ; print how much space is required
OPTIONAL INPUT:
	week	- The week ID to delete in string form YY_WW
 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], FILE_EXIST [2], FILE_STAT [1], FILE_STAT [2], UNIQ [1], UNIQ [2]
	UNIQ [3], anytim2ints [1], anytim2ints [2], break_file [4], concat_dir [4]
	diskfree [1], diskfree [2], fid2ex [1], fid2ex [2], file_exist [1], file_exist [3]
	file_list [1], file_list [2], file_stat [3], input [1], input [2], prstr [1]
	prstr [2], tbeep [1], tbeep [2], tbeep [3], tim2orbit [1], tim2orbit [2], yesnox [1]
	yesnox [2]
OPTIONAL KEYWORD INPUT:
	indir	- The input directory to use
	noconfirm - If set, do not ask for a confirmation before
		    deleting.
HISTORY:
	Written 5-Jan-93 by M.Morrison
	27-Jan-93 (MDM) - Added the MOVE option
	 4-Mar-93 (MDM) - Added /QSTOP option
	30-Aug-93 (SLF) - Use file filter template (avoid garbage)
        7-Jul-94 (SLF) - For moves, check sizes and abort if overflow predicted
			  Add CHECKSIZE keyword - Create subdir YY_WWt


delind [1] $SSW/yohkoh/gen/galileo/idl/lmsal/delind.pro
[Previous] [Next]
 NAME:
	delind
 PURPOSE
  	Return an array comprising an array of elements which are NOT
	common in the 2 input arrays.
 CALLING SEQUENCE
	C=delind(A,B)
 INPUTS
 	A, B are the 2 arrays, e.g., A=[1,2,4,6,8,12], B=[4,6]
 OUTPUT
	C is the output array, e.g., C=[1,2,8,12]
	If all elements of the 2 arrays are in common a -1 is returned.
 HISTORY
   LWA - (?) user contribution
   SLF - 25-oct-93 - dont clobber input (a)
   LWA - 10-Dec-95, Made "for" index a long variable to handle big arrays.
   LWA - 11-Dec-95, Completely changed to eliminate "for" loop.
		MUCH, MUCH faster with large arrays.
   LWA - 15-Jan-96, Treat the case with no common elements, changed header.
   LWA - 25-Oct-05, Treat the case with all common elements.
		     Add uniq screen at very beginning.
   LWA - 23-Jan-07, Handle special case of identical arrays with
		different sorting.
		Corrected my correction.
 CALLS:
 CALLED BY
	dedupe_sort, matchem [1], matchem [2], sxl_select


delind [2] $SSW/yohkoh/ucon/idl/acton/delind.pro
[Previous] [Next]
 NAME:
	delind
 PURPOSE
  	Return an array comprising an array of elements which are NOT
	common in the 2 input arrays.
 CALLING SEQUENCE
	C=delind(A,B)
 INPUTS
 	A, B are the 2 arrays, e.g., A=[1,2,4,6,8,12], B=[4,6]
 OUTPUT
	C is the output array, e.g., C=[1,2,8,12]
 HISTORY
   LWA - (?) user contribution
   SLF - 25-oct-93 - dont clobber input (a)
   LWA - 10-Dec-95, Made "for" index a long variable to handle big arrays.
   LWA - 11-Dec-95, Completely changed to eliminate "for" loop.
		MUCH, MUCH faster with large arrays.
   LWA - 15-Jan-96, Treat the case with no common elements, changed header.
 CALLS:
 CALLED BY
	dedupe_sort, matchem [1], matchem [2], sxl_select


dem_models $SSW/yohkoh/ucon/idl/mctiernan/dem_models.pro
[Previous] [Next]
 NAME:
    dem_models
 PURPOSE:
    The emission measure in units of 10^47 cm^(-3) 
    at different temperatures for the models
    with power law spectra in temperature space.
 CALLING SEQUENCE:
    em47 = dem_models(tyspec,a,t6,xxx=xxx,times_t=times_t,do_total=do_total, $
                      em47t=em47t,t6av=t6av,t6min=t6min,t6max=t6max)
 INPUT:
    tyspec = the spectral type, 96, 97, 98 or 99
    a = the model parameters, fltarr(ma, nfits)
    t6 = the temperatures at which the function is defined
 OUTPUT:
    em47 = the emission measure, defined at:
 KEYWORDS:
    xxx = the power of -T/a(2) in the tyspec = 98 exponential, default is 10
    times_t = multiplies times the temperature, for DEMS which are not per MK
    do_total= if set, do the total emission measure
    em47t = integrated EM, done numerically
    t6av = the average value of t6, integrated over the EM
    t6min = minimum value for t6 for integration, the default is 1.0
    t6max = maximum value for t6 for integration, the default is 100.0,
 HISTORY;
 2-nov-95, jmm
 CALLS:


dem_tr_er $SSW/yohkoh/ucon/idl/nitta/dem_tr_er.pro
[Previous] [Next]
 PURPOSE
   Calculate temperature and emission measure that SXT and HXT are
   expected to have from a distribution of emission measure with
   temperature (DEM).  With the delta keyword, the contributions
   can be regarded as the sum of discreet values.
 CALLING SEQUENCE
   dem_trial_error, te6, a, out_te6, out_em44, (delta=delta)
 INPUT PARAMETERS
   te6: Vector of values of temperature in MK at which emission
        measure is given.
   a:   Emission measure at te6
 OUPUT PARAMETERS
   out_te6: Vector of temperatures (in MK) obtained from various ratios
            0: Dagwood/Al.1,  1: Al.12/Al.1, 2: Be/Al.1, 3: Be/Al.12,
            4: M1/L, 5: M2/M1

   out_em44: Vector of emission measures associated with out_te6
 OPTIONAL KEYWORDS
   delta: If set, the flux is calculated as sum of discreet values
          (i.e. no integration with temperature).
   flux: flux in each 'channel'.
   power_law: Should consist of a vector like [t0,g0,t1,g1,t2,...,tn],
              where the slope of the power law of DEM is gn between tn
              and t(n+1).  The flux is normalized at t=t0.
              The total number of elements should be 2*n+1 for
              n power-laws.  If this keyword is set, t6 will be ignored.
 METHOD
   Straightforward.  Multiple applications of sxt_flux, hxt_count,
   sxt_teem and hxt_ratio.
 HISTORY
   Written by N. Nitta, 18 October 1995.
 CALLS:


dem_tr_er0 $SSW/yohkoh/ucon/idl/nitta/dem_tr_er0.pro
[Previous] [Next]
 PURPOSE
   Calculate temperature and emission measure that SXT and HXT are
   expected to have from a distribution of emission measure with
   temperature (DEM).  With the delta keyword, the contributions
   can be regarded as the sum of discreet values.
 CALLING SEQUENCE
   dem_tr_er0, out_te6, out_em44, delta=[5.0, 2.5, 20.0, 1.0]
        This means two components (T,EM)= (5.0, 2.5) and (20.0, 1.0).
           T in MK and EM in 10^44 cm^(-3).
   dem_tr_er0, out_te6, out_em44, power_law=[3.0,-2.0, 10.0, 0.0, 15.0]
        This means two power laws of slopes -2.0 (between 3 and 10 MK)
           and 0.0 (between 10 and 15 MK) connected at 10 MK.
   dem_tr_er0, out_te6, out_em44, pow_del=[3.0,-2.0, 10.0, 0.0, 15.0, 40.0, 0.3]
        This means two power laws same as the previous example plus an idsolated
           component of 40 MK with the flux 0.3 times that of the total of the 
           power laws. 
 INPUT KEYWORDS - One and only one of the following keywords is required.
  delta: If set, the flux is calculated as sum of discreet values
         (i.e. no integration with temperature).
         It should be delta=[t0,em0,t1,em1...]
  power_law: If set, power-law distribution(s) are used.
            Should consist of a vector like [t0,g0,t1,g1,t2,...,tn],
            where the slope of the power law of DEM is gn between tn
            and t(n+1).  The flux is normalized at t=t0.
            The total number of elements should be 2*n+1 for n power laws.
  pow_del:  If set power-law distribution(s) plus an isolated component
            are used.  The vector is similar to power_law, except that
            the last two elements mean the temperature of the isolated
            component and its flux relative to the total of the power law
            flux, respectively.
 OUPUT PARAMETERS
   out_te6: Vector of temperatures (in MK) obtained from various ratios
            0: Dagwood/Al.1,  1: Al.12/Al.1, 2: Be/Al.1, 3: Be/Al.12,
            4: M1/L, 5: M2/M1

   out_em44: Vector of emission measures associated with out_te6
 OPTIONAL INPUT KEYWORDS
   ntime: In order to improve the computational accuracy of integrating
          power law distributions, make more data points.  Ntime should
          be a vector and consist of the same number of elements as the
          number of power law assumed.  For example, ntime=[5,20,3] matches
          power_law=[t0, g0, t1, g1, t2, g2, t3] and the numbers of data
          points for power laws g0, g1 and g2 are 5, 20 and 3, respectively.
          If not set, the default is 10 for each power law.
   quiet: If set, some outputs are suppressed. 
   nohxt: If set, ignore HXT temperatures.
   show_time: If set, print out times of start and end of execution of the
              program.
   noflare: If set, low temperature background is included.  Should be like
            noflare=[t_nf, em_nf].  If em_nf < 0, em_nf=1.0 is assumed.
 OPTIONAL OUTPUT KEYWORDS:
   flux_tot:  The total flux of Al.1, Dag, Al.12, Be, L, M1 and M2.
   flux_fl:   The total flux excluding contributions from noflare.
   flare_nf:  The noflare flux (set to zero for HXT).
   flux_te:   A vector of 7 (different "filters") * nte, where nte is the
             number of temperature bins (i.e. finer bins for power laws).
             Stands for instrument response at each filter and temperature.
   flux_obs:  Same size as flux_te.  Stands for observed flux at
             each filter and temperature. 
   te6_d, em_d: Temperature(s) and EM(s) of discrete components, specified in 
                the delta keyword.
   te6_p, em_p: Temperaures and EMs of power law components.  Te6_p reflect
                the interpolation specified by ntime.  So "plot,te6_p, flux_te(0,*)"
                shows the observed flux in Al.1 with temperature.
   te6_sh, em_sh: Temperature and emission measure of the isolated component
                  specified in the pow_del keyword.
   te6_nf, em_nf: Temperature and emission measuere of the nonflare component
                  specified in the noflare keyword.
   em_fl: Total emission measure excluding that from the nonflare component.
   
 METHOD
   Straightforward.  Multiple applications of sxt_flux, hxt_count,
   sxt_teem and hxt_ratio.
 HISTORY
   Written by N. Nitta, 18 October 1995.
   Revised so that it can handle the three cases.  NN, 26-Oct-95.
 CALLS:


despike $SSW/yohkoh/ucon/idl/mcallister/despike.pro
[Previous] [Next]
       NAME: despike


       PURPOSE: to despike a cube of data


       METHOD: simply loop through a call to SPIKES


       CALLING SEQUENCE:  out=despike(in,cutoff,type='mmp')


       PARAMETERS:	in		input cube
			out		output cube (could be the same)
			cutoff  	cutoff value, as absolute of as a percentage

       KEYWORDS:	type            cutoff type, set to
                                       "mmp", for percentage of total range,
                                       "per", for percentage of local median,
                                       "abs", for absolute value,
                                              this is default.

	CALLS: ***
	spikes [1], spikes [2]
       HISTORY: Drafted by AMcA, following earlier version of Apr. 4 1994, Nov. 4 1994.



DETAB $SSW/yohkoh/ucon/idl/bentley/detab.pro
[Previous] [Next]
 NAME:
       DETAB
 PURPOSE:
       Removed tabs from text file, replacing original if required
 CALLING SEQUENCE:
       detab [,infil]
 INPUTS:
 OPTIONAL INPUTS:
       infil   string containing input filename
 KEYWORD INPUTS:
 OUTPUTS:
       temporary file 'detab.temp' created; renamed if requested
 OPTIONAL OUTPUTS:
 CALLS: ***
	remtab [1], remtab [2]
 RESTRICTIONS:
       Only works under unix and vms
 PROCEDURE:
       Removes tabs writting temporary file, then if requested renames
       temporary file to original after preserving original
       Flags length of all lines greater than 80 characters long
 MODIFICATION HISTORY:
       RDB  19-Aug-94  Written


DETECTOR_SUMM $SSW/yohkoh/bcs/idl/instr/detector_summ.pro
[Previous] [Next]
 NAME:
	DETECTOR_SUMM
 PURPOSE:
	Summary print of HK stuff in QS record
 CALLING SEQUENCE:  

 INPUT:

 OUTPUT:

 OPTIONAL OUTPUT:

 HISTORY
	RDB	19-Feb-92	Written


dfx_1pl $SSW/yohkoh/ucon/idl/mctiernan/dfx_1pl.pro
[Previous] [Next]
 NAME:
	dfx_1pl
 CALLING SEQUENCE:
	dfx_1pl,a,esc,dfda,nsc,ma
 PURPOSE:
	The derivative of the flux with respect to the fit parameters, 
	single power law, 
 INPUT:
	a= fit parameters a(0)=K, a(1)=gamma
	esc= energy in keV
	nsc= no. of energies
	ma= no. of fit parameters
 OUTPUT:
	dfda= d(photon flux)/da= fltarr(nsc,ma)
 CALLS: ***
	fx_1pl
 CALLED BY:
	dfx_phflux
 HISTORY:
	JMcT Spring '92


dfx_1pl_cut $SSW/yohkoh/ucon/idl/mctiernan/dfx_1pl_cut.pro
[Previous] [Next]
 NAME:
	dfx_1pl_cut
 CALLING SEQUENCE:
	dfx_1pl_cut,a,esc,dfda,nsc,ma
 PURPOSE:
	The derivative of the flux with respect to the fit parameters, 
	single power law, cuts-off below a given energy, e_cut
 INPUT:
	a= fit parameters a(0)=K, a(1)=gamma, a(2) = e_cut
	esc= energy in keV
	nsc= no. of energies
	ma= no. of fit parameters
 OUTPUT:
	dfda= d(photon flux)/da= fltarr(nsc,ma)
 CALLS: ***
	fx_1pl_cut
 HISTORY:
	11-apr-94, JMM
       Rewritten, to allow non-monotonic esc, 25-jun-1996, jmm


dfx_1pl_ecut $SSW/yohkoh/ucon/idl/mctiernan/dfx_1pl_ecut.pro
[Previous] [Next]
 NAME:
	dfx_1pl_ecut
 CALLING SEQUENCE:
	dfx_1pl_ecut,a,esc,dfda,nsc,ma
 PURPOSE:
	The derivative of the flux with respect to the fit parameters, 
	single power law, cuts-off below a given energy, e_cut,
       exponentially. 
 INPUT:
	a= fit parameters a(0)=K, a(1)=gamma, a(2) = e_cut
	esc= energy in keV
	nsc= no. of energies
	ma= no. of fit parameters
 OUTPUT:
	dfda= d(photon flux)/da= fltarr(nsc,ma)
 CALLS: ***
	fx_1pl_ecut
 CALLED BY:
	dfx_phflux
 HISTORY:
	11-apr-94, JMM
       Rewritten, to allow non-monotonic esc, 25-jun-1996, jmm


dfx_1pl_flat $SSW/yohkoh/ucon/idl/mctiernan/dfx_1pl_flat.pro
[Previous] [Next]
 NAME:
	dfx_1pl_flat
 CALLING SEQUENCE:
	dfx_1pl_flat,a,esc,dfda,nsc,ma
 PURPOSE:
	The derivative of the flux with respect to the fit parameters, 
	single power law, flattens below a given energy, e0
 INPUT:
	a= fit parameters a(0)=K, a(1)=gamma, a(2) = e0
	esc= energy in keV
	nsc= no. of energies
	ma= no. of fit parameters
 OUTPUT:
	dfda= d(photon flux)/da= fltarr(nsc,ma)
 CALLS: ***
	fx_1pl_flat
 CALLED BY:
	dfx_phflux
 HISTORY:
	29-mar-94, JMM


dfx_1th $SSW/yohkoh/ucon/idl/mctiernan/dfx_1th.pro
[Previous] [Next]
 NAME:
	dfx_1th
 CALLING SEQUENCE:
	dfx_1th,a,esc,dfda,nsc,ma
 PURPOSE:
	The derivative of the flux with respect to the fit parameters, 
	Thermal fit.
 INPUT:
	a= fit parameters , a(0)=E47, a(1)=T6
	esc= energy in keV
	nsc= no. of energies
	ma= no. of fit parameters
 OUTPUT:
	dfda= d(photon flux)/da= fltarr(nsc,ma)
 CALLS: ***
	fx_1th
 CALLED BY:
	dfx_phflux, dfx_thp2pl
 HISTORY:
	JMcT Spring '92
	A non-1 gauntt factor, (Mewe 1985) added,11/27/92, (JM)


dfx_1th_l $SSW/yohkoh/ucon/idl/mctiernan/dfx_1th_l.pro
[Previous] [Next]
 NAME:
	dfx_1th_l
 CALLING SEQUENCE:
	dfx_1th_l,a,esc,dfda,nsc,ma
 PURPOSE:
	Calculates the derivative of photon flux for the single thermal
       fit, includes SXR line spectra, as given by Jlemen's mewe_spec.pro.
 INPUT:
	a= fit parameters, a(0)=e47, a(1)=t6, 
	esc= energy in keV
       nsc= no. of energies
       ma= no. of fit parameters
       Common fdf10,fl10,dfl10,t610,nt610
               fl10=Log(emission) at EM47=1.0, for the Thermal SXR fit
               dfl10=dfl10/dt6 at EM47=1.0, for the Thermal SXR fit
               t610= Log(t6) for which we obtain fl10
               nt610= n_elements(t610)
 OUTPUT:
	dfda= d(photon flux)/da= fltarr(nsc,ma)
 CALLS: ***
	INTERPU_1D
 CALLED BY:
	dfx_phflux
 HISTORY:
	Feb. 93 J.McT


dfx_1th_lo $SSW/yohkoh/ucon/idl/mctiernan/dfx_1th_lo.pro
[Previous] [Next]
 NAME:
	dfx_1th_lo.pro
 CALLING SEQUENCE:
	dfx_1th_lo.pro,a,esc,dfda,nsc,ma,no_pts=no_pts
 PURPOSE:
	Calculates the derivative of photon flux for the single thermal
       fit, includes SXR line spectra, as given by Jlemen's mewe_spec.pro.
 INPUT:
	a= fit parameters, a(0)=e47, a(1)=t6, 
	esc= energy in keV
       nsc= no. of energies
       ma= no. of fit parameters
 OUTPUT:
	dfda= d(photon flux)/da= fltarr(nsc,ma)
 KEYWORD:
       no_pts= the number of points used to calculate the flux in MEWE_SPEC,
               the default is 300
 CALLS: ***
	INTERPU_1D, mewe_spec [1], mewe_spec [2]
 HISTORY:
	Feb. 93 J.McT
       This never gets used, but i've redone it to deal with
       the new MEWE_SPEC, 5-23-95. jmm


dfx_2pl $SSW/yohkoh/ucon/idl/mctiernan/dfx_2pl.pro
[Previous] [Next]
 NAME:
	dfx_2pl
 CALLING SEQUENCE:
	dfx_2pl,a,esc,dfda,nsc,ma
 PURPOSE:
	The derivative of the flux with respect to the fit parameters, 
	Double power law, 
 INPUT:
	a= fit parameters , a(0)=K1, a(1)=gamma1, a(2)=gamma2, a(3)=Ebr
	esc= energy in keV
	nsc= no. of energies
	ma= no. of fit parameters
 OUTPUT:
	dfda= d(photon flux)/da= fltarr(nsc,ma)
 CALLS: ***
	fx_2pl
 CALLED BY:
	dfx_phflux, dfx_thp2pl
 HISTORY:
	JMcT Spring '92
       Rewritten, to allow non-monotonic esc, 25-jun-1996, jmm


dfx_2th $SSW/yohkoh/ucon/idl/mctiernan/dfx_2th.pro
[Previous] [Next]
 NAME:
	dfx_2th
 CALLING SEQUENCE:
	dfx_2th,a,esc,dfda,nsc,ma
 PURPOSE:
	The derivative of the flux with respect to the fit parameters, 
	Double Thermal fit,
 INPUT:
	a= fit parameters , a(0)=E471, a(1)=T61, a(2)=E472, a(3)=T62
	esc= energy in keV
	nsc= no. of energies
	ma= no. of fit parameters
 OUTPUT:
	dfda= d(photon flux)/da= fltarr(nsc,ma)
 CALLS: ***
	fx_1th
 CALLED BY:
	dfx_phflux
 HISTORY:
	JMcT Spring '92
	A non-1 gauntt factor, (Mewe 1985) added,11/27/92, (JM)


dfx_2th_l $SSW/yohkoh/ucon/idl/mctiernan/dfx_2th_l.pro
[Previous] [Next]
 NAME:
	dfx_2th_l
 CALLING SEQUENCE:
	dfx_2th_l,a,esc,dfda,nsc,ma
 PURPOSE:
	Calculates the derivative of photon flux for the double thermal
       fit, includes SXR line spectra,
 INPUT:
	a= fit parameters, a(0)=e471, a(1)=t61, a(2)=e472, a(3)=t62
	esc= energy in keV
       nsc= no. of energies
       ma= no. of fit parameters
       Common fdf10,fl10,dfl10,t610,nt610
               fl10=Log(emission) at EM47=1.0, for the Thermal SXR fit
               dfl10=dfl10/dt6 at EM47=1.0, for the Thermal SXR fit
               t610= Log(t6) for which we obtain fl10
               nt610= n_elements(t610)
 OUTPUT:
	dfda= d(photon flux)/da= fltarr(nsc,ma)
 CALLS: ***
	INTERPU_1D
 CALLED BY:
	dfx_phflux
 HISTORY:
       6-nov-95, jmm


dfx_3pl $SSW/yohkoh/ucon/idl/mctiernan/dfx_3pl.pro
[Previous] [Next]
 NAME:
	dfx_3pl
 CALLING SEQUENCE:
	dfx_3pl,a,esc,dfda,nsc,ma
 PURPOSE:
	The derivative of the flux with respect to the fit parameters, 
	Triple power law. 
 INPUT:
	a= fit parameters , a(0)=K1, a(1)=gamma1, a(2)=gamma2, a(3)=gamma3
			    a(4)=Eb1, a(5)=Eb2
	esc= energy in keV
	nsc= no. of energies
	ma= no. of fit parameters
 OUTPUT:
	dfda= d(photon flux)/da= fltarr(nsc,ma)
 CALLS: ***
	fx_3pl
 CALLED BY:
	dfx_phflux
 HISTORY:
	JMcT Spring '92
       Rewritten, to allow non-monotonic esc, 25-jun-1996, jmm


dfx_95 $SSW/yohkoh/ucon/idl/mctiernan/dfx_95.pro
[Previous] [Next]
 NAME:
     dfx_95
 PURPOSE:
     Derivatives of the Differential EM wrt the fit parameters,
     for a model (see, Dere etal. sphys36, 459)
     em = c_1*exp(-c_2*(ln(T))^c_3), for T > 2MK
 CALLING SEQUENCE:
     dfx_95, a, esc, dfda, nsc, ma
 INPUT:
     a(0) = EM at 1 MK, c_1
     a(1) = c_2, see above
     a(2) = c_3, see above
     esc = the temperature grid
     nsc = n_elements(esc)
     ma = no. of fit parameters, = 3
 OUTPUT:
     dfda= d(dem)/da= fltarr(nsc,ma)
 HISTORY;
     25-jun-96
 CALLS:
 CALLED BY
	dfx_phflux


dfx_96 $SSW/yohkoh/ucon/idl/mctiernan/dfx_96.pro
[Previous] [Next]
 NAME:
     dfx_96
 PURPOSE:
     Derivatives of the Differential EM wrt the fit parameters,
     for a model which is a double power law in Temperature
     (tyspec=96), with a varying Temperature cutoff, and a break at 5 MK.
 CALLING SEQUENCE:
     dfx_96, a, esc, dfda, nsc, ma
 INPUT:
     a(0) = EM at 1 MK
     a(1) = Low T. pl. index of temperature variation.
     a(2) = High T. pl. index of temperature variation.
     a(3) = high T cutoff
     esc = the temperature grid
     nsc = n_elements(esc)
     ma = no. of fit parameters, = 4
 OUTPUT:
     dfda= d(dem)/da= fltarr(nsc,ma)
 KEYWORDS:
     xxx = the power of -T/a(3) in the exponential, default is 10
 HISTORY;
     19-jan-96
     Rewritten, to allow non-monotonic esc, 25-jun-1996, jmm,
     Major bug for this case...
 CALLS:
 CALLED BY
	dfx_phflux


dfx_97 $SSW/yohkoh/ucon/idl/mctiernan/dfx_97.pro
[Previous] [Next]
 NAME:
     dfx_97
 PURPOSE:
     Derivatives of the Differential wrt the fit parameters,
     for a model is a Gaussian in Temperature (tyspec=97)
 CALLING SEQUENCE:
     dfx_97, a, esc, dfda, nsc, ma
 INPUT:
     a(0) = EM at low Peak T
     a(1) = Peak T
     a(2) = width
     esc = the temperature grid
     nsc = n_elements(esc)
     ma = no. of fit parameters, = 3
 OUTPUT:
     dfda= d(dem)/da= fltarr(nsc,ma)
 HISTORY;
     31-jan-96
 CALLS:
 CALLED BY
	dfx_phflux


dfx_98 $SSW/yohkoh/ucon/idl/mctiernan/dfx_98.pro
[Previous] [Next]
 NAME:
     dfx_98
 PURPOSE:
     Derivatives of the Differential wrt the fit parameters,
     for a model which is a power law in Temperature
     (tyspec=98), with a varying Temperature cutoff.
 CALLING SEQUENCE:
     dfx_98, a, esc, dfda, nsc, ma
 INPUT:
     a(0) = EM at 1 MK 
     a(1) = pl. index of temperature variation.
     a(2) = Cutoff temperature
     esc = the temperature grid
     nsc = n_elements(esc)
     ma = no. of fit parameters, = 3
 OUTPUT:
     dfda= d(dem)/da= fltarr(nsc,ma)
 KEYWORDS:
     xxx = the power of -T/a(2) in the exponential, default is 10
 HISTORY;
     12-jan-96
 CALLED BY
	dfx_phflux


dfx_99 $SSW/yohkoh/ucon/idl/mctiernan/dfx_99.pro
[Previous] [Next]
 NAME:
     dfx_99
 PURPOSE:
     Derivatives of the Differential wrt the fit parameters,
     for a model which is a power law in Temperature
     (tyspec=99), with a Temperature cutoff at 30 MK
 CALLING SEQUENCE:
     dfx_99, a, esc, dfda, nsc, ma
 INPUT:
     a(0) = EM at 1 MK 
     a(1) = pl. index of temperature variation.
     esc = the temperature grid
     nsc = n_elements(esc)
     ma = no. of fit parameters, = 2
 OUTPUT:
     dfda= d(dem)/da= fltarr(nsc,ma)
 HISTORY;
     12-jan-96
 CALLS:
 CALLED BY
	dfx_phflux


dfx_phflux $SSW/yohkoh/ucon/idl/mctiernan/dfx_phflux.pro
[Previous] [Next]
 NAME:
      dfx_phflux.pro
 PURPOSE:
      Calculates the derivative of the expected photon flux with
      respect to the fit parameters for a given type of spectrum.
 CALLING SEQUENCE:
      dfx_phflux,tyspec,a,esc,dfda,nsc,ma
 INPUT:
      tyspec= type of spectrum
      a = fit parameters,
         tyspec=1, single p.l., a(0)=K, a(1)=gamma
		=2, double p.l., a(0)=K1, a(1)=gamma1, a(2)=gamma2, a(3)=ebr
			(ebr is the break energy in keV)
		=3, Thermal, a(0)=em/1.0e47, a(1)=T/1.0e6
		=4, Thermal + p.l., a(0)=em/1.0e47, a(1)=T/1.0e6, a(2)=K, 
			a(3)=gamma
               =5, Double Thermal, a(0)=em1/1.0e47, a(1)=T1/1.0e6, 
			a(2)=em2/1.0e47, a(3)=T2/1.0e6
		=6, p.l.+p.l., a(0)=K1, a(1)=gamma1, a(2)=K2, a(3)=gamma2
		=7, Thermal below Ebr, p.l. above Ebr, 
			a(0)=K, a(1)=gamma, a(2)=T/1.0e6, a(3)=Ebr
		=8 Thermal + double p.l., a(0)=em/1.0e47, a(1)=T/1.0e6, 
			a(2)=K1, a(3)=gamma1, a(4)=gamma2, a(5)=Ebr
		=9 Triple P.L.,  a(0)=K1, a(1)=gamma1, a(2)=gamma2, 
			a(3)=gamma3, a(4)=eb1 (between gamma1 & gamma2), 
			a(5)=eb2 (between gamma2 and gamma3)
		=10, Thermal, a(0)=em/1.0e47, a(1)=T/1.0e6, includes
                    SXR lines
		=11, Thermal + p.l., a(0)=em/1.0e47, a(1)=T/1.0e6, a(2)=K, 
			a(3)=gamma, includes  SXR lines
 		=12, single p.l. flattens below e0, a(0)=K, a(1)=gamma, a(2)=e0
 		=13, single p.l. cuts off below e0, a(0)=K, a(1)=gamma, a(2)=e0
               =14, Double Thermal, a(0)=em1/1.0e47, a(1)=T1/1.0e6, 
			a(2)=em2/1.0e47, a(3)=T2/1.0e6, includes lines
      esc= photon energies
      nsc= n_elements(esc)
      ma= no. of elements in a
 OUTPUT:
      dfda= the derivative of the flux wrt. a
 CALLS: ***
	dfx_1pl, dfx_1pl_ecut, dfx_1pl_flat, dfx_1th, dfx_1th_l, dfx_2pl, dfx_2th, dfx_2th_l
	dfx_3pl, dfx_95, dfx_96, dfx_97, dfx_98, dfx_99, dfx_plppl, dfx_thbpl, dfx_thp2pl
	dfx_thppl, dfx_thppl_l
 CALLED BY:
	Cdcda
 HISTORY:
      15-nov-93 by JMM


dfx_plppl $SSW/yohkoh/ucon/idl/mctiernan/dfx_plppl.pro
[Previous] [Next]
 NAME:
	dfx_plppl
 CALLING SEQUENCE:
	dfx_plppl,a,esc,dfda,nsc,ma
 PURPOSE:
	The derivative of the flux with respect to the fit parameters, 
	Sum of two p.l.'s
 INPUT:
	a= fit parameters , a(0)=K1,a(1)=gamma1,a(2)=K2,a(3)=gamma2
	esc= energy in keV
	nsc= no. of energies
	ma= no. of fit parameters
 OUTPUT:
	dfda= d(photon flux)/da= fltarr(nsc,ma)
 CALLS: ***
	fx_1pl
 CALLED BY:
	dfx_phflux
 HISTORY:
	JMcT Spring '92


dfx_thbpl $SSW/yohkoh/ucon/idl/mctiernan/dfx_thbpl.pro
[Previous] [Next]
 NAME:
	dfx_thbpl
 CALLING SEQUENCE:
	dfx_thbpl,a,esc,dfda,nsc,ma
 PURPOSE:
	The derivative of the flux with respect to the fit parameters, 
	Thermal fit below Ebr, p.l. above
 INPUT:
	a= fit parameters , a(0)=Log(K), a(1)=gamma, a(2)=T6, a(3)=Ebr
	esc= energy in keV
	nsc= no. of energies
	ma= no. of fit parameters
 OUTPUT:
	dfda= d(photon flux)/da= fltarr(nsc,ma)
 CALLS: ***
	fx_thbpl
 CALLED BY:
	dfx_phflux
 HISTORY:
	JMcT Spring '92
	A non-1 gauntt factor, (Mewe 1985) added,11/27/92, (JM)
       Rewritten, to allow non-monotonic esc, 25-jun-1996, jmm


dfx_thp2pl $SSW/yohkoh/ucon/idl/mctiernan/dfx_thp2pl.pro
[Previous] [Next]
 NAME:
	dfx_thp2pl
 CALLING SEQUENCE:
	dfx_thp2pl,a,esc,dfda,nsc,ma
 PURPOSE:
	The derivative of the flux with respect to the fit parameters, 
	Thermal plus double power law. 
 INPUT:
	a= fit parameters , a(0)=e47, a(1)=t6, a(2)=K1, a(3)=gamma1, 
			    a(4)=gamma2, a(5)=ebr
	esc= energy in keV
	nsc= no. of energies
	ma= no. of fit parameters
 OUTPUT:
	dfda= d(photon flux)/da= fltarr(nsc,ma)
 CALLS: ***
	dfx_1th, dfx_2pl
 CALLED BY:
	dfx_phflux
 HISTORY:
	JMcT Spring '92
	A non-1 gauntt factor, (Mewe 1985) added,11/27/92, (JM)


dfx_thppl $SSW/yohkoh/ucon/idl/mctiernan/dfx_thppl.pro
[Previous] [Next]
 NAME:
	dfx_thppl
 CALLING SEQUENCE:
	dfx_thppl,a,esc,dfda,nsc,ma
 PURPOSE:
	The derivative of the flux with respect to the fit parameters, 
	Thermal plus power law, 
 INPUT:
	a= fit parameters , a(0)=E47, a(1)=T6, a(2)=K, a(3)=gamma
	esc= energy in keV
	nsc= no. of energies
	ma= no. of fit parameters
 OUTPUT:
	dfda= d(photon flux)/da= fltarr(nsc,ma)
 CALLS: ***
	fx_1pl, fx_1th
 CALLED BY:
	dfx_phflux
 HISTORY:
	JMcT Spring '92
	A non-1 gauntt factor, (Mewe 1985) added,11/27/92, (JM)


dfx_thppl_l $SSW/yohkoh/ucon/idl/mctiernan/dfx_thppl_l.pro
[Previous] [Next]
 NAME:
	dfx_thppl_l
 CALLING SEQUENCE:
	dfx_thppl_l,a,esc,dfda,nsc,ma
 PURPOSE:
	Calculates the derivative of photon flux for the thermal + power law
       fit, includes SXR line spectra, as given by Jlemen's mewe_spec.pro.
 INPUT:
	a= fit parameters, a(0)=e47, a(1)=t6, a(2)=K, a(3)=gamma
	esc= energy in keV
       nsc= no. of energies
       ma= no. of fit parameters
       Common fdf10,fl10,dfl10,t610,nt610
               fl10=Log(emission) at EM47=1.0, for the Thermal SXR fit
               dfl10=dfl10/dt6 at EM47=1.0, for the Thermal SXR fit
               t610= Log(t6) for which we obtain fl10
               nt610= n_elements(t610)
 OUTPUT:
	dfda= d(photon flux)/da= fltarr(nsc,ma)
 CALLS: ***
	INTERPU_1D, fx_1pl
 CALLED BY:
	dfx_phflux
 HISTORY:
	Feb. 93 J.McT


dfx_thppl_lo $SSW/yohkoh/ucon/idl/mctiernan/dfx_thppl_lo.pro
[Previous] [Next]
 NAME:
	dfx_thppl_lo
 CALLING SEQUENCE:
	dfx_thppl_lo,a,esc,dfda,nsc,ma
 PURPOSE:
	Calculates the derivative of photon flux for the thermal + power law
       fit, includes SXR line spectra, as given by Jlemen's mewe_spec.pro.
 INPUT:
	a= fit parameters, a(0)=e47, a(1)=t6, a(2)=K, a(3)=gamma
	esc= energy in keV
       nsc= no. of energies
       ma= no. of fit parameters
 OUTPUT:
	dfda= d(photon flux)/da= fltarr(nsc,ma)
 KEYWORD:
       no_pts= the number of points used to calculate the flux in MEWE_SPEC,
               the default is 300
 CALLS: ***
	INTERPU_1D, fx_1pl, mewe_spec [1], mewe_spec [2]
 HISTORY:
	Feb. 93 J.McT
       This never gets used, but i've redone it to deal with
       the new MEWE_SPEC, 5-23-95. jmm


diff_file $SSW/yohkoh/gen/idl/tape/diff_file.pro
[Previous] [Next]
	NAME: diff_file
	
	TEST VER --- ALWAYS FINDS A DIFFERENCE!!!!!!!!!!

	PURPOSE: check for differences between current tape dir and 
		latest disk file.

 CALLS: ***
	Rd_TapDir
	HISTORY: written 19-Feb-92


DIFF_SCALE $SSW/yohkoh/ucon/idl/hudson/diff_scale.pro
[Previous] [Next]
 NAME:
     DIFF_SCALE
 PURPOSE:
     take an image with +- and scale it relative to the zero
       contour separately for + and - values with square roots
 CATEGORY:
 CALLING SEQUENCE:
     image = diff_scale(diff)
 INPUTS:
 OPTIONAL (KEYWORD) INPUT PARAMETERS:
     tv does a tvscale view
     plus_factor and minus_factor are separate multiplicative scalings
       for the positive and negative branches 
 OUTPUTS:
     compressed image
 CALLS: ***
	WDEF [1], WDEF [2]
 CALLED BY:
	LASTSFD_DIFF
 COMMON BLOCKS:
 SIDE EFFECTS:
     /tv grabs IDL 0
 RESTRICTIONS:
 MODIFICATION HISTORY:
     HSH, written May 1, 1997
     HSH, plus and minus scaling factors added Oct. 15, 1997


dir_list [2] $SSW/yohkoh/gen/idl/util/dir_list.pro
[Previous] [Next]
   Name: dir_list

   Purpose: find directories

   Input Paramters:
      toplev -  upper level path(s) to search (string/string array)
      dirspec - specification(s) to check     (string/string array)

 CALLED BY:
	adsdirs [1], adsdirs [2], mk_pix [1], mk_pix [2], ucon_check
   History:
      SLF - 1-apr-93

 CALLS: ***
	str_perm
   Restrictions:
      not recursive


disk2_mo [1] $SSW/yohkoh/gen/idl/mo_disk/disk2_mo.pro
[Previous] [Next]
	NAME: disk2_mo
	PURPOSE: Write reformatted data (ref. by wk_path and mo_wk_no)
		to an MO (mo_disk)

	CALLING SEQUENCE:
		disk2_mo, mo_disk, wk_path, mo_wk_no, progress

		mo_disk		"top" dir on MO or mount point
		wk_path		path to reformatted data
		mo_wk_no	selected index to the MO disk map.
		progress	wk status: wk 1 of 2, or 2 of 2.

 CALLS: ***
	Bell, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2]
	concat_dir [4], cp_fns [1], cp_fns [2], file_exist [1], file_exist [3], mk_fidlist
	rd_modb
 CALLED BY:
	mk_mo2 [1]
	HISTORY: written 13-May-93, gal
		26-May-93, gal, added mv for "m" type dirs.
		3-Oct-95, LS, changed path to new mo_mount style /mo/flareN.X
			changed default machine to flare15
			have to parse mo_disk 's new style
		1-Nov-95, LS, changed message about how long the process will take.
			with the larger capacity MOs, it takes more like 1.5 hrs.


disk2_mo [2] $SSW/yohkoh/ucon/idl/slater/disk2_mo_new.pro
[Previous] [Next]
	NAME: disk2_mo
	PURPOSE: Write reformatted data (ref. by wk_path and mo_wk_no)
		to an MO (mo_disk)

	CALLING SEQUENCE:
		disk2_mo, mo_disk, wk_path, mo_wk_no, progress

		mo_disk		"top" dir on MO or mount point
		wk_path		path to reformatted data
		mo_wk_no	selected index to the MO disk map.
		progress	wk status: wk 1 of 2, or 2 of 2.

 CALLS: ***
	Bell, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], CP_FNS_NEW, DISK2_MO_NEW
	FILE_EXIST [2], concat_dir [4], file_exist [1], file_exist [3], mk_fidlist
	rd_modb
 CALLED BY:
	mk_mo2 [1]
	HISTORY: written 13-May-93, gal
		26-May-93, gal, added mv for "m" type dirs.
		3-Oct-95, LS, changed path to new mo_mount style /mo/flareN.X
			changed default machine to flare15
			have to parse mo_disk 's new style
		1-Nov-95, LS, changed message about how long the process will take.
			with the larger capacity MOs, it takes more like 1.5 hrs.


disk_hog [2] $SSW/yohkoh/gen/idl/ys_util/disk_hog.pro
[Previous] [Next]
   Name: disk_hog

   Purpose: show disk usage, order by size

   Input Parameters:
      path - if set, path for summary search (default is local user area)

   Calling Sequence:
      disk_hog [,path] [/hc]

 CALLS: ***
	POPD, PUSHD, REVERSE, curdir [1], curdir [2], get_host [1], get_host [2]
	get_logenv [1], get_logenv [2], is_member [1], is_member [2], prstr [1], prstr [2]
	rd_tfile [1], rd_tfile [2], ssw_strsplit, strjustify, ut_time [1], ut_time [2]
 CALLED BY:
	ydb_use
   History:
      Circa 1-jan-1995 (SLF)
      20-dec-1995 (SLF) fix KB option for OSF


disk_monitor [2] $SSW/yohkoh/gen/idl/util/disk_monitor.pro
[Previous] [Next]
   Name: disk_monitor

   Purpose: monitor disk space on critical disks (run via cron job)

   Input Parameters:

   Keyword Parameters:
      infile - if set, use input file (def=$DIR_SITE_SETUPD/disk_monitor.dat)
      loud   - if set, report nominal disks (def=warning and critical)
      hc     - if set, produce hardcopy
      nomail - if set, dont mail message	(default for interactive)
      mail   - if set, mail message 		(default for batch)

   Calling Sequence:
      disk_monitor [infile=infile, /nomail , /loud , /hc]

 CALLS: ***
	ARR2STR [1], Arr2Str [2], CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3]
	STR2ARR [1], STR2ARR [2], concat_dir [4], diskfree [1], diskfree [2]
	get_logenv [1], get_logenv [2], mail [1], mail [2], prstr [1], prstr [2]
	rd_tfile [1], rd_tfile [2], uniqo [1], uniqo [2]
   History:
      22-Feb-1993 (SLF) 
       8-Jun-1994 (SLF) - look for bad status (-1) from diskfree.pro
			   add EXPAND & NOEXPAND keyword and reformat


DISK_SUMMARY $SSW/yohkoh/ucon/idl/bentley/disk_summary.pro
[Previous] [Next]
 NAME:
	DISK_SUMMARY
 PURPOSE:
	Summarizes contents of ydb and yd disks on vms system
 CATEGORY:
 CALLING SEQUENCE:
	disk_summary [,list=list]
	disk_summary,mail='msslvb::rdb'
 INPUTS:
	none
 KEYWORD INPUTS:
	list	if present, name of file for summary (def = tt:)
	mail	if present, gives mail address for summary file
 OUTPUTS:
 CALLS: ***
	STR2ARR [1], STR2ARR [2], anytim2ex [1], anytim2ex [2]
 SIDE EFFECTS:
	if keyword list set, writes specified file
 RESTRICTIONS:
	only works under vms and on a yohkoh software installation
 PROCEDURE:
	ydnn and ydb search strings used to make summary of database files
	on ydb and data files on yd.
 MODIFICATION HISTORY:
	RDB  18-May-93	Major rework of existing routine
	RDB   1-Jul-93	Small correction for yd* search
	RDB  13-Jul-93	Changed to a procedure and can write to file
			Added Mail keyword option
	RDB  23-Aug-93	Corrected error when stuff on ydx; some tidying
	RDB  25-Mar-94  Allowed remote disk in ydb summary
			changed "file" keyword to "list"
			added ydb keyword


diskbench $SSW/yohkoh/ucon/idl/freeland/diskbench.pro
[Previous] [Next]
   Name: diskbench

   Purpose: benchmark disk i/o using Yohkoh dbase rd/wrt routines

   Input Parameters:
      comment - text string describing test 
   
   Optional keyword Parameters:
      loops - 2 element array defining number of outer and inner loops resp.
      infile  - Yohkoh reformatted filename (including full path)
      outdir -  directory for output (output filename will be same as infile)
      rllops -  number of rd_xda calls per cycle  (default = 1)
      wloops -  number of sav_sda calls per cycle (default = 1)

   Method:
      uses Yohkoh data base access routines to baseline disk i/0
      uses call_procedure for read routine so any instrument data
      file may be used for read access tests - since only sav_sda is 
      available, any write tests should use sda files
   
   History - slf, 3-Aug-1992
 CALLS:


disp2suns $SSW/yohkoh/ucon/idl/morrison/disp2suns.pro
[Previous] [Next]
NAME:
	disp2suns
PURPOSE:
	To display two images of the sun (one at the peak, another at the
	minimum) with the light curve for the whole mission below it.
HISTORY:
	Written Summer 1992 by M.Morrison
	22-Sep-93 (MDM) - Changed to use 8-Jul-93 image as the image at min
	26-Oct-93 (MDM) - Changed the name (from KEITH1 to DISP2SUNS) and 
			  added documentation header
	14-Nov-94 (MDM) - Changed to use -94 image as the image at min
	15-Nov-94 (MDM) - Modified to use TV2 and such


disp_bda $SSW/yohkoh/ucon/idl/morrison/disp_bda.pro
[Previous] [Next]
NAME:
	disp_bda
PURPOSE:
	Display the BCS spectral data in image format
CALLING SEQUENCE:
	disp_bda, index, data
INPUT:
	index
	data
 CALLS: ***
	ext_bcschan [1], ext_bcschan [2], fmt_tim [1], fmt_tim [2]
HISTORY:
	written 7-Mar-92 by M.Morrison


disp_hda $SSW/yohkoh/ucon/idl/morrison/disp_hda.pro
[Previous] [Next]
NAME:
	disp_hda
PURPOSE:
	Display the HXT data in image format
CALLING SEQUENCE:
	disp_hda, index, data
INPUT:
	index
	data
 CALLS: ***
	fmt_tim [1], fmt_tim [2]
HISTORY:
	written 7-Mar-92 by M.Morrison


DISP_HXTIMG $SSW/yohkoh/ucon/idl/sakao/disp_hxtimg.pro
[Previous] [Next]
 NAME:
	DISP_HXTIMG
 PURPOSE:
	To display HXT images.
 CALLING SEQUENCE:
	disp_hxtimg,img,hdr,inf
	disp_hxtimg,img(6:56,6:56),hdr,inf
	disp_hxtimg,img,hdr,inf,/def
	disp_hxtimg,'synthesized_HXT_image.file'
 INPUT:
	img	- HXT image array read-in with RD_HXTIMG
	hdr	- Header structure for HXT images read-in with RD_HXTIMG
	inf	- Inf. 				"
  or,
	filename	-	Name of HXT image file.
 CALLS: ***
	CNV_HDRSTR, CNV_INFSTR, GT_CINEMA_LOC, PLOT_CINEMA2, PLOT_CINEMA_HDR, RD_HXTIMG
 OPTIONAL KEYWORD INPUT:
	default	- If set, then displays images with the HXT FOV size.
	s_film	- Specifies image # displayed at the beginning.
	e_film	- Specifies image # displayed at the end.
	psout	- If set, then prepares a PS file 'idl.ps' instead of 
			displaying images on your screen.
	filename- Shows image filename in the 'FILE' field in the display. 
	nlevels	- If set, then number of contour levels is specified (max. 9).
	level	- If set, then a 'custom contour level' is used instead of 
		  the default values of 
		  [12.5, 17.7, 25.0, 35.4, 50.0, 70.0] % (sqrt(2) step)
		  of the peak brightness.
 OUTPUT:
	none
 OPTIONAL KEYWORD OUTPUT:
	none
 RESTRICTIONS:
	Image data should follow HXT structure ver 2.1 (the latest version).
 SIDE EFFECTS:
	Shows images on your screen (by default).
 HISTORY:
	version 1.0	93.05.07 (Fri)	T.Sakao written
	version 1.1	93.08.23 (Mon)
		Modified so that the program gives correct FOV size in case 
		'Expansion Factor' is not 1.0. 
		Images with 'Default' HXT FOV are shown by the /default 
		option. 
		Usage : 
		IDL> disp_hxtimg,img,hdr,inf,/default 
	version 1.2	94.07.29 (Fri)
		Modified so that filenames of HXT image data can be passed 
		to the program directly.
		Options level and nlevels added.
	version 1.3	94.09.07 (Wed)
		A bug, which appeared when a single image was processed, 
		was fixed. 
	version 1.4	98.05.03 (Sun)
		Contour levels displayed. This version is for HXT NMP release.


disp_month $SSW/yohkoh/sxt/idl/util/disp_month.pro
[Previous] [Next]
NAME:
	disp_month
PURPOSE:
	To display a single SFD image per day for a single month
CALLING SEQUENCE:
	.run disp_month
COMMENTS:
	The first time that it is called, it will load a red color
	table which is stretched to enhance the contrast.
HISTORY:
	Written Feb-93 by M.Morrison
	 4-Mar-93 (MDM) - Adjusted to use environment variable for
			  directory.
			- Shortened question line, and changed WDEF call
	16-Mar-93 (MDM) - Added DISP_FACTOR and CHAR_FACTOR to adjust for
			  different screen size problems.  
			- Modified so that it could work to the Z buffer
	26-Mar-93 (MDM) - Corrected error caused when first image of the
			  month is missing.
	 9-Apr-93 (MDM) - Modified call to WDEF
	 6-May-93 (MDM) - Modified to work with VMS
	20-May-93 (MDM) - Made the FILE_LIST call *.* so it will work on VMS
	 2-Jun-93 (MDM) - Modified to not use color table saved in GENX file
	15-Jul-93 (MDM) - Changed default gamma from .4 to .5 (ISAS hardcopy should use 0.4)
	 5-Aug-93 (MDM) - Added GAMMA_FACTOR option
	18-Oct-93 (MDM) - GAMMA_FACTOR for ISAS hardcopy should use 0.4
			- GAMMA_FACTOR for LPARL hardcopy should use 0.3 (?)


disp_rot $SSW/yohkoh/sxt/idl/util/disp_rot.pro
[Previous] [Next]
NAME:
	disp_rot
PURPOSE:
	To display a single SFD image per day for a single month
CALLING SEQUENCE:
	.run disp_rot
COMMENTS:
	The first time that it is called, it will load a red color
	table which is stretched to enhance the contrast.
HISTORY:
	Written 25-Mar-93 by M.Morrison


disp_synop $SSW/yohkoh/sxt/idl/atest/disp_synop.pro
[Previous] [Next]
POSTIONALS
	CR_NUM - Carrington Number
KEYWORDS
	TIME - if set, input is interpreted as a time
	SSE - only sse
	SSC - only ssc (default)
	SSW - only ssw
	ALLSXT - sse,c,w
	GBOSXT - ssc,kphe,kpmag
	KPHEL - kphel
	KPMAG - kpmag
	XWIN - display window x dimension (default is 1024)
 CALLS: ***
	CARR2EX, CONGRID [1], CONGRID [2], CONGRID [3], FILE_EXIST [2], MTV, RD_XDA [1]
	RD_XDA [2], RFITS [1], RFITS [2], RFITS [3], TIM2CARR, file_exist [1]
	file_exist [3], fmt_tim [1], fmt_tim [2]
   History:
      Circa 1-Jan-1993 - G.L.Slater
       8-December-1999 - S.L.Freeland - add /ZBUFFER  


disp_wda $SSW/yohkoh/ucon/idl/morrison/disp_wda.pro
[Previous] [Next]
NAME:
	disp_wda
PURPOSE:
	Display the WBS PH spectra in image format
CALLING SEQUENCE:
	disp_wda, index, data
INPUT:
	index	- index structure
	data	- data structure
 CALLS: ***
	fmt_tim [1], fmt_tim [2]
HISTORY:
	written 7-Mar-92 by M.Morrison


dispout_pha $SSW/yohkoh/ucon/idl/phillips/dispout_pha.pro
[Previous] [Next]
Name: dispout_pha.pro
Author: Andy Phillips mssl
Purpose: Display on colour Xterm a scatter plot of pha width vs fwhm
   		data from readout.pro
Classification: BDA, housekeeping, Spikes correction.
History: Written atp jan 1992


dist_histo $SSW/yohkoh/ucon/idl/mctiernan/dist_histo.pro
[Previous] [Next]
 NAME:
      dist_histo
 PURPOSE:
      Given an array, dist_histo will return the histogram for
      the array, and the values of the bins used.
 CALLING SEQUENCE:
      f = dist_histo(array, minv=minv, maxv=maxv, binsize=binsize, $
                     bin_edg=bin_edg, bin_mid=bin_mid, n_binns=n_binns, $
                     normalize=normalize, plot=plot, title=title, $
                     xtitle=xtitle, ytitle=ytitle)
 INPUT:
      array = an array, if not floating point, it's converted.
 OUTPUT:
      f = the histogram of the array
 KEYWORDS:
      minv = the minimum value to consider, if not specified,
            then min(array) is used.
      maxv = the maximum value to consider, if not specified,
            then max(array) is used.
      binsize = size of the bin, the default is 1
      bin_edg = the edges of the bins obtained
      bin_mid = the midpoints of the bins.
      n_binns = number of bins, this will truncate the histogram
                at the end of the routine, regardless of the outcome,
                unless n_elements(f) is less than n_binns
      normalize, if set normalize the histogram by binsize
      plot = if set, put up a plot of the histogram
      title= a title for the plot
      xtitle= title for the x axis
      ytitle= title for the y axis
 CALLS: ***
	plot_histo_j
 CALLED BY:
	avsig_test
 HISTORY:
      20-jun-94 by JMM, i'm not satisfied with the histogram command


divyup $SSW/yohkoh/ucon/idl/acton/divyup.pro
[Previous] [Next]
 NAME:
	divyup
 PURPOSE
	To group and average a time sequence of data into equal
	time interval bins.
 CALLING SEQUENCE
	divyup,index,data,minsamp=2,deltasec,dout,tout,nout,dvout
	divyup,index,data,start='1-feb-92 00:00',(24.*60.*60.),dout,tout
	divyup,seconds,data,60,dout,tout,nout,dvout
 INPUTS
	index, either index structure OR array of times in seconds.
	data, one-dimensional array of data to be grouped and averaged.
	deltasec, group/average interval in sec.
 OPTIONAL KEYWORD INPUT
	start, start time for grouping in any format.  Default: index(0).
	minsamp, minimum samples in an interval required for processing,
		default = 1
	/loud prints out some diagnostic information
 OUTPUT
	dout, array of grouped averaged data with intervals of no data
	      set to -1.
 OPTIONAL OUTPUT
	tout, time structure matching the center times of the dout 
		grouping time bins.
	nout, number of data averaged for each value of dout.
	dvout, standard deviations of dout.  If there are less than
		3 samples in an interval dvout is set = -1.
 PROGRAMS CALLED
	size, int2secarr, where, total
 HISTORY
	8-Dec-95, LWA  Written for radiance analysis.
	11-Dec-95, LWA  Clarified header re/ tout.
	12-Dec-95, LWA  Used 'temporary' one place to save core.
	11-Jan-96, LWA  Added dvout.
	12-Jan-96, LWA  Added keyword minsamp.
	 4-Jul-99, LWA  Added keyword loud.
	21-Dec-02, LWA  Changed some fixed to longwords.
 CALLS:
 CALLED BY
	sxl2radiance, sxl_select


dn2ph $SSW/yohkoh/ucon/idl/shimizu/dn2ph.pro
[Previous] [Next]
Name:
    dn2ph

Purpose:
    Convert SXT DN into photon COUNTS.

Calling Sequence:
    Photon = sxt_dn2ph(DN)
    Photon = sxt_dn2ph(DN,Wave=Wave,gain=gain)

Inputs:
    DN	= scalar or array of compressed (byte-type) DN values
			or uncompressed (non-byte)  DN values

Optional Input Keywords:
    Gain	= Sxt Gain constant (electrons/DN)
		  If not supplied, defaults to 100.
    Wave	= Photon wavelength (Ang).  If not supplied, defaults to
		  10 ang. 
Output:
    Photon counts.
 CALLS: ***
	sxt_decomp [1], sxt_decomp [2]
 CALLED BY:
	UDN
Procedure:
	Assumes that 3.65 eV produces 1 electron-hole pair

	The equation is:
	 Photons = ( Wavelength (Ang) / 1.98648e-8 erg )
		    * 1.602192e-12 erg/eV * 3.65 eV/e * Gain (e/DN) * DN

History:
	11 Apr, 1994   T.Shimizu  (Univ.of Tokyo)   


dn_pix_sum $SSW/yohkoh/ucon/idl/mctiernan/dn_pix_sum.pro
[Previous] [Next]
 NAME:
	dn_pix_sum
 PURPOSE:
	Generates an nXn pixel sum of the DN in an image.
 CALLING SEQUENCE:
	dno = dn_pix_sum(n,dni,udata_in=udata_in, udata_out=udata_out)
 INPUT:
	n= the number of pixels to sum over
	dni= an array of data numbers
 OUTPUT:
	dno= summed array
 KEYWORDS:
       udata_in=unc. of data passed in, the output unc. will not
                be calculated if this is not set, thus to obtain
                the uncertainty, set both keywords, this one and:
       udata_out=the unc. in the output Data
 CALLED BY:
	box_lc_array, lc_array1 formerly actonpro
 HISTORY:
	Written May '92 by J McTiernan.
       3/6/95, changed name to dn_pix_sumfrom t6_pix_sum,
               changed arg. list, changed to use rebin function, jmm


do_ads $SSW/yohkoh/gen/idl/pointing/do_ads.pro
[Previous] [Next]

   Name: do_ads

   Purpose: ftp (get) specified ADS files from mainframe to workstation
	     (optionally insert ADS info into PNT files)

   Input Parameters:
	stfil - starting file number
       enfil - ending file number
       week  - form yy_ww - gets all files for that week

   Optional Keyword Parameters:
      main2 - passed through to get_ads (uses facom2 telnet address if set)
      odisk - passed throuth to get_ads (Optical disk naming convention)
      okftp - character string of successful ftps (null if failure)
      nopnt - if set, does not run ads_into_pnt (ftp only)

 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], RDFILE [1]
	RDFILE [2], ads_into_att, anytim2ints [1], anytim2ints [2], concat_dir [4]
	file_compress [1], file_compress [2], file_exist [1], file_exist [3]
	get_ads [1], get_ads [2], gt_day [1], gt_day [2], int2secarr [1], int2secarr [2]
	mail [1], mail [2], prstr [1], prstr [2], rd_ads_dir, rd_fem
 CALLED BY:
	do_adsftp [1], do_adsftp [2]
   HISTORY:
	(do_ads.pro)      Written Jul-92 by M.Morrison
       27-Aug-92 (MDM) - Added keyword WEEK
			- Also added RUN_TIME and FAIL
	31-Aug-92 (MDM) - Made RD_ADS_DIR use the /COPY switch to get the
			  newest directory listing from the mainframe
	14-Sep-92 (SLF) - Split ftp and ads_into_pnt logic for early
			  diagnosis of ftp transfer errors
			  added keywords to get_ads (odisk/main2)
			  added outftp for ads file output (ftp get target)
		          added references to environmental variables
	20-Oct-92 (slf) - changed get_ads2 references to get_ads
			  renamed do_ads2 to do_ads
			  (renamed get_ads2.pro to get_ads.pro)
			  add noindex retry keywords
	27-oct-92 (slf) - code to avoid copying existing files
			  minor mods to assist cronjob execution
	14-Nov-92 (slf) - mod to retry option/messages
	17-Aug-93 (MDM) - Changed ADS_INTO_PNT call into ADS_INTO_ATT
			  call.
	 1-Sep-93 (MDM) - Modified so that it recognizes compressed ADS
			  files and will not copy them over
	 3-Jan-94 (MDM) - Changed mail distribution
       21-Feb-94 (SLF) - Compress all new stuff 
        1-Mar-94 (SLF) - Fix bug; 1 file in INDEX does not exist
	14-Mar-94 (SLF) - file delimitors (embeded meta-character problem)
			  ads files have parens, like: PSK239.SAADF.A9311(T1900001).Z
       


do_adsftp [1] $SSW/yohkoh/gen/idl/pointing/do_adsftp.pro
[Previous] [Next]
   Name: do_adsftp

   Purpose: driver to handle ads online ads file queue on workstation
	     non-existant, required files are ftped from mainframe

   Optional Keyword Parameters:
	nodelete - if set, old queue data is not deleted
   
 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], adsdirs [1], adsdirs [2]
	break_file [4], do_ads
   History: slf, 27-oct-92
	     slf, 18-May-93  removed /nopnt switch in do_ads call
	     mdm, 21-May-93  Added /nopnt switch to do_ads call
	     mdm, 17-Aug-93  Removed /nopnt switch to do_ads call


do_adsftp [2] $SSW/yohkoh/gen/idl/pointing/do_adsftp2.pro
[Previous] [Next]
   Name: do_adsftp

   Purpose: driver to handle ads online ads file queue on workstation
	     non-existant, required files are ftped from mainframe

   Optional Keyword Parameters:
	nodelete - if set, old queue data is not deleted
   
 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], DO_ADSFTP2, adsdirs [1]
	adsdirs [2], break_file [4], do_ads
   History: slf, 27-oct-92


do_aip $SSW/yohkoh/gen/idl/pointing/do_aip.pro
[Previous] [Next]

   Name: do_aip

   Purpose: driver to call ads_into_pnt for each input file

   Input Parameters:
	adsfiles - list of ads files or directory containing ads files

   Optional Keyword Paramters:
      run_time - (output) approximate run time of this module

 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], ads_into_pnt, break_file [4], concat_dir [4]
   HISTORY:
	slf 24-sep-1992
	slf 18-nov-1992	; protect against empty directory
	mdm 17-May-1993 ; Modified to decompress files if necessary
			  


DO_TEEM $SSW/yohkoh/ucon/idl/metcalf/do_teem.pro
[Previous] [Next]
NAME:
     DO_TEEM
PURPOSE:
     Compute temperature and emission measure from SXT filter ratios.  This
     is a driver for sxt_teem.pro.
CATEGORY:
CALLING SEQUENCE:
     structure = do_teem(data,index,times,filt1,filt2)
INPUTS:
     data  = dejittered SXT data cube (counts as DN).  Byte data will be
             decompressed and have the background subtracted in sxt_teem.pro.
     index = SXT index array for the data cube
     times = A list of times.  The temperature is computed at times as
             close as possible to these times. Can be a string or a structure.
     filt1 = Filter 1 (2=Al.1,3=AlMg,4=Be119,5=Al12,6=Mg3)
     filt2 = Filter 2
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS
     time_tolerance = Filter pairs are rejected if the time seperation
                      between them is greater than time_tolerance seconds.
                      Default = 600 (10 minutes).
OUTPUTS:
     A structure containing the temperature and emission measure:
       .TE = log10(temperature)
       .UTE = Uncertainty in log10(temperature)
       .EM = log10(emission measure)
       .UEM = Uncertainty in log10(emission measure)
       .TIME1 = time of filter 1 (string)
       .TIME2 = time of filter 2 (string)
       .TIME = average of TIME1 and TIME2 (string)
 CALLS: ***
	MAKE_STR [1], MAKE_STR [2], SXT_TEEM [1], SXT_TEEM [2], anytim2ints [1]
	anytim2ints [2], fmt_tim [1], fmt_tim [2], get_def, gt_filtb, int2secarr [1]
	int2secarr [2]
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
     Calls SXT_TEEM T/EM software
EXAMPLE:

     te = do_teem(data,index,['3-DEC-91 22:00:00','4-DEC-91 22:00:00'],3,2)

MODIFICATION HISTORY:
     T. Metcalf  November 1992
     T. Metcalf  March 1993,  o Modified to use SXT_TEEM instead of
                                McTiernan's routines.
                              o No longer computes Te/EM over and over for
                                input times which are closer together in 
                                time than the filter pairs.


doc_cats [2] $SSW/yohkoh/gen/idl/util/doc_cats.pro
[Previous] [Next]
   Name: doc_cats

   Purpose: string array of currently registered documentation categories

   Output Parameters:
      function returns string array of requested categories
      count - number of elements returned

   Keyword Parameters:
      yohkoh, general, toplev, class - input switches for selection
      descript - output, desription of return values 
    
   Calling Sequence: 
	categors=doc_cats([/toplev] [descript=descript, /class] [/yohkoh] [general])

   Category: swmaint, documentaion, help

   History: slf, 25-Jul-92
            slf, 10-Dec-92 added count parameter, 
			    changed decript to keyword


doc_head [3] $SSW/yohkoh/gen/idl/util/doc_head.pro
[Previous] [Next]
   Name: doc_head

   Purpose: return idl documentation header from source file

   Input Paramters:
      source - file name containing idl source code and header
      
   Output Paramters:
      header - all text between  ;+ and ;-
      definition - procedure/function definition

 CALLS: ***
	rd_tfile [1], rd_tfile [2], remtab [1], remtab [2], wc_where [1], wc_where [2]
 CALLED BY:
	break_doc [1], break_doc [2], break_doc [3], fastdoc [1], fastdoc [2]
   History: slf, 8-feb-1993
   	     slf, 15-mar-1993	; add case check for definition
	     slf, 25-Jan-1993   ; allow comments = ;-----------------
            slf, 30-Mar-1994   ; case where 2 headers in one file, protect
	     MDM,  8-Mar-1995	; Fixed problem case
            slf,  9-mar-1995   ; definition termination criteria


dom $SSW/yohkoh/bcs/idl/util/dom.pro
[Previous] [Next]
  Procedure to calculate number of days into mission YohKoh
  from numerical day,month,year input

  Use:  supply the day, month and year (numerical) as first 3 parameters.
    
  Output:  4th parameter is returned as the Day-Of-Mission


  CDP   Oct 91

 CALLED BY
	PLOTBPC


dot_plotter $SSW/yohkoh/ucon/idl/labonte/dot_plotter.pro
[Previous] [Next]
  IDL routine to convert a byte image to a bit image

PRO dot_plotter, image, dots

 Input:
	image = byte image
 Output:
	dots = byte array, either 0 or 1, same dimensions as image

	Written April 1993  Barry LaBonte
	Based on the algorithm of John Boyden and Barry LaBonte
	Mount Wilson Observatory, 1978, for the powerful
	Raytheon 702 and a Printronix printer.
 CALLED BY
	MK_ROOT_BITMAP


dotar $SSW/yohkoh/gen/idl/ys_util/dotar.pro
[Previous] [Next]
   Name: dotar

   Purpose: create or extract tar tape (or file) and send mail when complete

   Input Parameters:
      path   -  string scaler containing a unix pathname 	  (**)
      tardev -  tape device# or file containing the tar data set (**)
		 case1: tardev=scaler string - unix tar file name
		 case2: tardev=integer,      - tape unit number 

   Keyword Parameters:
      extract - if set,    restores (extracts) tar set from tardev to path
		 if notset, creates tar set of path onto tardev
      users -   if set, string array of mail recipients (default is self)


      ** NOTE: intepretation of path and tardev depends on the state of the 
	        extract keyword - (sense of source and destination changes):
     -----------------------------------------------------------------------
     Effect of keyword_set(extract) state on parameter interpretaion
     -----------------------------------------------------------------------
       state	    path     tardev		dotar function
                   ------   ------   ---------------------------------------
   	FALSE(def)  source   dest.    create tar data set on tardev of 
				      directory tree under pathname=path

	TRUE	    dest.    source   extract tar data set from tardev - 
				      data is restored to pathname=path
    -------------------------------------------------------------------------

   Calling Examples:
      dotar,'/usr/people/freeland'  	(create tar tape on drive 0)
					  
      dotar,'~/backup' ,/extract	(extract tar data from from drive 0)
      					  [data restored to specified path] 
					
      dotar,path,1		     	(create tar tape to drive 1)
					  [path is string variable]

      dotar,path,users=['freeland','morrison']


 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], MESSGE, POPD, PUSHD, break_file [4]
	curdir [1], curdir [2], def_tapd [1], def_tapd [2], def_tapd [3], mail [1], mail [2]
   History: slf, 16-sep-92
	     slf, 10-dec-92 - update documentation, 
			      add extract option (switch) 
		  	      allow '~' syntax for home directory


doy2ex [2] $SSW/yohkoh/gen/idl/ys_util/doy2ex.pro
[Previous] [Next]
NAME:
	doy2ex
PURPOSE:
	To convert from day of year to internal structure format or string
	format
SAMPLE CALLING SEQUENCE:
	daytim = doy2ex(doy, year)
	print, doy2ex(doy, /string)
INPUT:
	doy	- The day of year
OPTIONAL INPUT:
	year	- The year.  If not passed, it assumes the current year
 CALLS: ***
	anytim2ex [1], anytim2ex [2], anytim2ints [1], anytim2ints [2], gt_day [1]
	gt_day [2]
 CALLED BY:
	TIM2UPOS, eis_ti2utc [1], eis_ti2utc [2], mk_daily_ints, rd_rasm
OPTIONAL KEYWORD INPUT:
	string	- If set, return the answer in a string format
HISTORY:
	Written 15-Dec-93 by M.Morrison


doydom $SSW/yohkoh/ucon/idl/mctiernan/doy_dom.pro
[Previous] [Next]
 NAME:
      doy-dom
 PURPOSE:
      Obtains the day and month for a day of the year
 CALLING SEQUENCE:
      dom = doy_dom(doy, year, month, /string)
 INPUT:
      doy = the day of the year
      year = the year
 OUTPUT:
      dom = the day of the month
      month = the month
 KEYWORD:
      string= if set, the month will come out as a string variable
 CALLS: ***
	DOY_DOM, leap_yr
 HISTORY:
      TS JUL-93
      Made to work on arrays, jmm, 6/21/95


dp_clock $SSW/yohkoh/gen/idl/reformat/dp_clock.pro
[Previous] [Next]
Name:
	dp_clock
Purpose:
	Given a DP clock time, return the MSOD and DS79
Input:
	dp_clock_ref
	index
Output:
	msod
	ds79
History
	Written Fall '91 by M.Morrison

 CALLS:


dp_clock_ref $SSW/yohkoh/gen/idl/reformat/dp_clock_ref.pro
[Previous] [Next]
Name:
	dp_clock_ref
Purpose:
	Creat the reference "tie point" between the
	DP clock and UT.
Input:
	rec1
	year
Output:
	dp_clock_ref	- structure
 CALLS: ***
	Ex2Int [1], Ex2Int [2], ttim2ex
History:
	Written Fall '91 by M.Morrison


dp_rmap_time $SSW/yohkoh/ucon/idl/pike/dp_rmap_time.pro
[Previous] [Next]
  Procedure to find which dp_sync records correspond to a given roadmap
  entry (within one dgi)

  Input:
           dp_sync     usual dp_sync structure
           roadmap     usual roadmap structure
           rm_idx      array of indices corrsponding to entries in roadmap
                       for which a match in dp_sync in required

  Output:
           dp_idx(n,2)      array of indices for which dp_sync time is within
                            the roadmap dgi. It is created with the size
                            (n_elements(roadmap.time),2) for convenience.
                            dp_idx(i,0) = first dp_sync datum in range
                            dp_idx(i,1) = last  dp_sync satum in range
                            if no dp_sync datum corresponding to the roadmap
                            time interval is found then the dp_idx entries
                            are set to -1.

   Use:
          IDL> dp_rmap_time,dp_sync,roadmap,rm_idx,dp_idx

  Performance:   Takes approx 25 secs to correlate a 1000 indices array.
                 Any suggestions for speed-up would be welcome.

    CDP   March 92    Written
          Jan   93    Bug (array subscript) fix 
 CALLED BY
	dt_factor


DPE_GUESS $SSW/yohkoh/ucon/idl/sxt_co/dpe_guess.pro
[Previous] [Next]
 NAME:
     DPE_GUESS
 PURPOSE:
     Use a half-res FFI to guess optimum exposure for a full-res PFI 
 CATEGORY:
     Yohkoh
 CALLING SEQUENCE:
 INPUTS:
     IMG_INDEX, IMG_DATA, the index and image array of the half-res
      FFI upon which to base the guess
 OPTIONAL (KEYWORD) INPUT PARAMETERS:
 OUTPUTS:
 CALLS: ***
	EXPTIM2DPE [1], EXPTIM2DPE [2], gt_expdur [1], gt_expdur [2], input [1], input [2]
	sho_max, tbeep [1], tbeep [2], tbeep [3]
 COMMON BLOCKS:
 SIDE EFFECTS:
 RESTRICTIONS:
 MODIFICATION HISTORY:
     11-may-98, DMcK, written in ad-hoc form 
     30-may-98, DMcK, revised textual prompts slightly.
     01-jun-98, DMcK, adopted function form of exptim2dpe


DPMODE_RMAP $SSW/yohkoh/bcs/idl/micro/dpmode_rmap.pro
[Previous] [Next]
 NAME:
	DPMODE_RMAP
 PURPOSE:
	Remaps value of dpmode for telem value to 1,2,3, etc
 CATEGORY:
 CALLING SEQUENCE:
	newval = dpmode_rmap(dpmode,dpms)
 INPUTS:
	dpmode
 OPTIONAL INPUT PARAMETERS:
 KEYWORD PARAMETERS:
 OUTPUTS:
	newval		remaped value of dp_mode
			dpmode     x   12   13    9    4   11   22
                       newval     1    2    3    4    5    6    7
 OPTIONAL OUTPUT PARAMETERS:
	dpms		string array with names associated with dpmode
 COMMON BLOCKS:
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:
	RDB   7-May-94	Written


dprate2sec [2] $SSW/yohkoh/gen/idl/util/dprate2sec.pro
[Previous] [Next]
NAME:
	dprate2sec
PURPOSE:
	Given a DP_RATE code, return the major frame rate in sec
CALLING SEQUENCE:
	rate = dprate2sec(roadmap)
	rate = dprate2sec(index)
INPUT:
	dprate	- the "dp_rate" field in a structure
OUTPUT:
	returns Major frame rate in seconds
 CALLS: ***
	gt_dp_rate [1], gt_dp_rate [2]
 CALLED BY:
	AVE_CTS2 [1], AVE_CTS2 [2], AVE_CTS2 [3], HXTPIXON, HXT_QLOOK, WBS_DB2, fix_hxtindex
	fort2hxi_tim, grs32_fsp, grsl1_dead [2], grsl2_dead, grsl_fsp, hxs_chsums, hxs_dead
	hxt_chsums, hxtaccumulate, mk_timarr [1], mk_timarr [2], plott_hi_sum
	plott_low_sum, plott_med1_sum, plott_med2_sum, rd_sxs_pha [1], rd_sxs_pha [2]
	rd_wbs_pha [1], rd_wbs_pha [2], read_yohkoh_4_spex [1], read_yohkoh_4_spex [2]
	time_vec [1], time_vec [2]
HISTORY:
	Written Fall 91 by M.Morrison
	19-Feb-92 (MDM) - fixed bug.  when checking to see if 
			  telemetry value had been /32, it was not
			  checking properly - if initial rate was low,
			  it thought the value had be /32 already
	31-May-92 (MDM) - Modified so that input can be structure with
			  .DP_RATE field (it will call GT_DP_RATE if so)


dps_tim2rec $SSW/yohkoh/ucon/idl/pike/dps_tim2rec.pro
[Previous] [Next]
  Code to translate a time interval into a data point range applicable
  to the dp_sync data.

  Output products:
            SS array contains all data numbers in time interval
            TTIME contains time (hours) of all data in interval
            DS_ST & DS_END contain start and stop data point numbers.


  Use:   idl> .run dps_tim2rec            and give time interval in hours.


DR $SSW/yohkoh/ucon/idl/morrison/dr.pro
[Previous] [Next]
 NAME:
       DR

 PURPOSE:
	Calculate the time and date corresponding to NROTS solar rotations
	(may be negative and/or fractional) from position at reference
	time (determined from INDEX).  Latitude dependence is not
	available for all rates.

 CATEGORY:
       Solar astronomy trivia.

 CALLING SEQUENCE:
	new_time = dr(index[, nrots=nrots, lat=lat, method=method])

 INPUTS:
       ITEM    	A structure (INDEX or ROADMAP) or time vector
			(7 element external time).  It can be an array.

 OPTIONAL INPUT PARAMETERS:
       None.

 KEYWORDS:
       NROTS:		Number of solar rotations (may be negative
			and/or fractional).
	LAT:		Latitude to use for latitude dependent rotation
			rates.
	METHOD:		Method used for rate determination.  Methods
			currently available are:
			- PHOTO: photosheric (spectroscopic) 
			- CARRI: Carrington rotation rate
			- CORHO: coronal holes
			- SPOTS: spot groups
		
 OUTPUTS:
	NEW_TIME	Time and date of occurrence in FMT_TIM format.

 CALLS: ***
	ADDTIME [1], ADDTIME [2], DR_CARR [1], DR_CARR [2], DR_CARR [3], DR_PHOTO [1]
	DR_PHOTO [2], DR_PHOTO [3], anytim2ex [1], anytim2ex [2], fmt_tim [1], fmt_tim [2]
 CALLED BY:
	TV_SSX
 COMMON BLOCKS:
       None.

 SIDE EFFECTS:
       None.

 RESTRICTIONS:
       None.

 PROCEDURE:
       For photospheric rotation, the rotation equation of Howard and
	Harvey (1970) is used:

	omega =  2.78(+/-0.003) - 0.351(+/-0.03)*sin(beta)^2
		+0.443(+/-0.05)*sin(beta)^4	microradians/sec

 EXAMPLE:

 MODIFICATION HISTORY:
       May, 1992.     Written by GLS, LMSC.


DR_CARR [3] $SSW/yohkoh/gen/idl/ys_util/dr_carr.pro
[Previous] [Next]
 NAME:
       DR_CARR

 PURPOSE:
	If ARG is a time interval (in decimal days) this routine
	calculates the Carrington differential rotation for the
	latitude specified by LAT (in degrees, default is 0).

	If ARG is an angle (in either degrees or radians), this
	routine calculates the time interval (in decimal days)
	required for Carrington rotation by that angle at a
	latitude specified by LAT.

 CATEGORY:
       Solar astronomy trivia.

 CALLING SEQUENCE:
	OUT = dr_carr([lat,arg,ang2tim=ang2tim,rad=rad])

 INPUTS:
	LAT:		Latitude in degrees
       ARG:		Either a time difference (if ANG2TIM is not
			present or is zero), or a rotation angle in
			degrees or radians (if ANG2TIM is present
			and non-zero).

 OPTIONAL INPUT PARAMETERS:
       None.

 KEYWORDS:
	ANG2TIM:	If present and non-zero then ARG is interpreted
			as a rotation angle, and the time in decimal days
			required for rotation by angle ARG (in either
			degrees or radians) is returned.
	RAD:		If present and non-zero then if ARG is non-zero
			the returned rotation angle is in radians. If ARG
			is absent then the returned rotation rate is in
			microradians per second.  If RAD is zero or absent
			then the returned rotation angle or rate is in
			degrees or degrees per day.
	PERIOD:		If present and non-zero then if ARG is absent
			the rotation period in days at latitude LAT is
			returned.  If PERIOD is zero or absent then if ARG
			is absent the rotation rate in microradians per sec
			is returned.

 OUTPUTS:
	OUT:		Either rotation angle or time in decimal days
			necessary to rotate by angle ARG, depending on the
			value of ANG2TIM.

 CALLED BY:
	BUILD_SSX, DR, GET_SSX_SLICE, MK_SSX, TV_SSX
 COMMON BLOCKS:
       None.

 SIDE EFFECTS:
       None.

 RESTRICTIONS:
       None.

 PROCEDURE:
       The sidereal Carrington rotation rate is 2.666 microradians/sec.
	We have borrowed the higher order coefficients for photospheric
	differential rotaion from Howard and Harvey (1970):

	omega_sidereal =  2.865 - 0.351(+/-0.03)*sin(beta)^2
			  - 0.443(+/-0.05)*sin(beta)^4	microradians/sec

 EXAMPLE:

 MODIFICATION HISTORY:
       Aug, 1992.     Written by GLS, LMSC.


DR_PHOTO [3] $SSW/yohkoh/gen/idl/util/dr_photo.pro
[Previous] [Next]
 NAME:
       DR_PHOTO

 PURPOSE:
	If ARG is a time interval (in decimal days) this routine
	calculates photosheric differential rotation for the
	latitude specified by LAT (in degrees, default is 0).

	If ARG is an angle (in either degrees or radians), this
	routine calculates the time interval (in decimal days)
	required for photosperic rotation by that angle at a
	latitude specified by LAT.

 CATEGORY:
       Solar astronomy trivia.

 CALLING SEQUENCE:
	OUT = dr_photo([lat,arg,ang2tim=ang2tim,rad=rad])

 INPUTS:
	LAT:		Latitude in degrees
       ARG:		Either a time difference (if ANG2TIM is not
			present or is zero), or a rotation angle in
			degrees or radians (if ANG2TIM is present
			and non-zero).

 OPTIONAL INPUT PARAMETERS:
       None.

 KEYWORDS:
	ANG2TIM:	If present and non-zero then ARG is interpreted
			as a rotation angle, and the time in decimal days
			required for rotation by angle ARG (in either
			degrees or radians) is returned.
	RAD:		If present and non-zero then if ARG is non-zero
			the returned rotation angle is in radians. If ARG
			is absent then the returned rotation rate is in
			microradians per second.  If RAD is zero or absent
			then the returned rotation angle or rate is in
			degrees or degrees per day.
	PERIOD:		If present and non-zero then if ARG is absent
			the rotation period in days at latitude LAT is
			returned.  If PERIOD is zero or absent then if ARG
			is absent the rotation rate in microradians per sec
			is returned.

 OUTPUTS:
	OUT:		Either rotation angle or time in decimal days
			necessary to rotate by angle ARG, depending on the
			value of ANG2TIM.

 CALLED BY:
	DR, GET_TRACUBE, mplot_nar, plot_ar_pfi, plot_nar [1], plot_nar [2], rot_pix2
 COMMON BLOCKS:
       None.

 SIDE EFFECTS:
       None.

 RESTRICTIONS:
       None.

 PROCEDURE:
       The sidereal photospheric rotation equation of
	Howard and Harvey (1970) is used:

	omega_sidereal =  2.78(+/-0.003) - 0.351(+/-0.03)*sin(beta)^2
			  - 0.443(+/-0.05)*sin(beta)^4	microradians/sec

 EXAMPLE:

 MODIFICATION HISTORY:
       May, 1992.     Written by GLS, LMSC.


draw_box_nn [1] $SSW/yohkoh/ucon/idl/metcalf/draw_box_nn.pro
[Previous] [Next]
 keywords color and linestyle added to draw_boxcorn
 CALLED BY
	PLOT_HSI, PLOT_HXT, hxt_images2ps, sxt_images2ps


draw_box_nn [2] $SSW/yohkoh/ucon/idl/nitta/draw_box_nn.pro
[Previous] [Next]
 keywords color and linestyle added to draw_boxcorn
 CALLED BY
	PLOT_HSI, PLOT_HXT, hxt_images2ps, sxt_images2ps


draw_circle [3] $SSW/yohkoh/ucon/idl/nitta/draw_circle_nn.pro
[Previous] [Next]
  Name:
    draw_circle
  Purpose:
    Draw a circle.
  Calling Sequence:
    draw_circle, x0, y0, radius [, npts=npts]
  Input Parameters:
    x0 =  Central x coordinate
    y0 =  Central y coordinate
    radius = Radius

  Optional input keywords:
    Npts   = Number of points (default = 10000)
    device = If set, plots will assume device coordinates
    data   = If set, plots will assume data   coordinates
    psym   = Plot symbol
    color  = Color
    linestyle = Line style

 CALLS: ***
	DRAW_CIRCLE_NN
 CALLED BY:
	MARK_POINT, stretch_circle, todays_targets, xy_lwa
  Modification History:
    Written, 26-feb-92, J. R. Lemen
    2-feb-95, JRL, Added thick keyword


DRAW_GRID [2] $SSW/yohkoh/sxt/idl/util/draw_grid.pro
[Previous] [Next]
 NAME:
       DRAW_GRID
 PURPOSE:
	Draw a Stonyhurst grid
	(Also can draw Carrington grid).
 CATEGORY:
 CALLING SEQUENCE:
	draw_grid
	draw_grid, center, fov
	draw_grid, center, fov, /tv2
 INPUTS:
   center	- [x,y] Center of the Stonyhurst plot in units 
			of solar radius (default = [0,0]).
   fov		- [x,y] Size of Stonyhurst plot in units of
			solar radius (default = [2.5,2.5]).
   item	- Time parameter for Carrington grid
 INPUT KEYWORDS PARAMETERS:
   TV2		- If set, does scaling needed for PS plotting
   img_siz	- [x,y] Size of the image (default=window size)
   img_pos	- [x,y] Location of lower left corner of Stonyhurst
			grid (default = [0,0]).
   roll	- To specify a non-zero roll angle degrees). Positive
		  will roll result grid counter clockwise.
   tilt	- To specify the B-angle (degrees).
   gridsep	- Grid separation (degrees).  Default = 15 degrees.
   nogrid	- To suppress grid (usually used in combination with 
		  the /draw_limb keyword).
   draw_limb	- Draw the limb (usually used in combination with the
		  /nogrid keyword).
   draw_eq	- Draw the equator (usually used in combination with the
		  /nogrid keyword).
   noerase	- If set, do not erase before plotting.
   color	- Specify the color of the grid.
   thick	- Specify the line thickness of the grid.
   latlon	- Array of size [2,N] giving coordinates of latitude 
		  longitude.  Circles will be drawn at the specified
		  coordinates.
   symsize	- Define (arbitrary) size of latlon circles (default = 1.)
   gridtype	- =1 for Stonyhurst (default) and =2 for Carrington grid.
   res		- ????
   mgridsize	- ????
   nosavrest	- If set then DO NOT execute save/restore commands.
 OUTPUTS:
   None.
 CALLS: ***
	MK_GRID_COORDS [1], MK_GRID_COORDS [2], S2C [1], S2C [2], TIM2CLON, restsys [1]
	restsys [2], savesys [1], savesys [2]
 CALLED BY:
	GRID_CURSOR, NORH_GRID [1], NORH_GRID [2], PLOT_CLON, SXT_GRID [1], SXT_GRID [2]
	mplot_nar, plot_ar_pfi, plot_nar [1], plot_nar [2], sun_grid
 COMMON BLOCKS:
	draw_grid_blk, tv2_blk
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 EXAMPLE:
 MODIFICATION HISTORY:
       July, 1992. - Written by GLS, LMSC.
	14-Jul-93 (MDM) - Added common block to save the xrange, yrange, and
			  position information (to be used by other routines
			  like PLOT_NAR, SXT_GRID, ...
	21-Jan-93 (GLS) - Added ITEM as positional parameter.  This is
			  an index or time parameter, used for Carrington
			  longitude calculation (see next item).
			  Added GRIDTYPE as a keyword parameter.  If it
			  is 1 (default), a heliographic grid is plotted.
			  If 2, Carrington grid is plotted.
	23-Feb-95 (RDB) - Added TV2 keyword and stuff associated with PS
			  plotted (see also ocontour, etc.)
	26-Jan-96 (JRL) - Added save/restore of system plot variables.
	29-Mar-96 (GLS)	- Added nosavrest keyword


DRAW_GRID [3] $SSW/yohkoh/ucon/idl/slater/draw_grid_2.pro
[Previous] [Next]
 NAME:
       DRAW_GRID
 PURPOSE:
 CATEGORY:
 CALLING SEQUENCE:
 INPUTS:
   POSITIONAL PARAMETERS:
   KEYWORDS PARAMETERS:
 OUTPUTS:
   POSITIONAL PARAMETERS:
   KEYWORDS PARAMETERS:
 CALLS: ***
	DRAW_GRID_2, MK_GRID_COORDS [1], MK_GRID_COORDS [2], S2C [1], S2C [2], TIM2CLON
 CALLED BY:
	GRID_CURSOR, NORH_GRID [1], NORH_GRID [2], PLOT_CLON, SXT_GRID [1], SXT_GRID [2]
	mplot_nar, plot_ar_pfi, plot_nar [1], plot_nar [2], sun_grid
 COMMON BLOCKS:
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 EXAMPLE:
 MODIFICATION HISTORY:
       July, 1992. - Written by GLS, LMSC.
	14-Jul-93 (MDM) - Added common block to save the xrange, yrange, and
			  position information (to be used by other routines
			  like PLOT_NAR, SXT_GRID, ...
	20-Jan-94 (KTS & GAL) - Corrected a bug in the sign convention to the 
				long. angle


DRAW_GRID2 $SSW/yohkoh/ucon/idl/slater/draw_grid2.pro
[Previous] [Next]
 NAME:
       DRAW_GRID2
 CALLS:


DRAW_YERRORBAR $SSW/yohkoh/ucon/idl/sakao/draw_yerrorbar.pro
[Previous] [Next]
 NAME:
	DRAW_YERRORBAR
 PURPOSE:
	To draw Y-error bars. 
 CALLING SEQUENCE:
	DRAW_YERRORBAR, value, sigma
	DRAW_YERRORBAR, value, sigma, xvalue=x_values, xbar=0.5, $
			do_plot=do_plot
 INPUT:
	value	- Y-values. 
	sigma	- Errors for the Y-values. 
 OPTIONAL KEYWORD INPUT:
	thick	- PLOT keyword; specifies thickness of the error bars. 
	x	- Specifies X-values.
	xbar	- If set, then horizontal bars are drawn on the top and the 
		  bottom of each error bar. The value of xbar specifies 
		  length of the horizontal bars. 
	do_plot	- If set, error bars are displayed only for data points 
		  specified by this variable. 
		  For example, if do_plot = [0,1,0,0,0,...,0], only the error 
		  bar for the second data point is displayed. Default is to 
		  display error bars for each data point, i.e., do_plot(*) = 1.
 OUTPUT:
	none
 SIDE EFFECT:
	Error bars are drawn in the active window. 
 NOTE:
	The program does not yet support drawing X-error bars.
 HISTORY:
	version 1.0	96.02.04 (Sun)	T.Sakao written.
		1.1	96.10.31 (Thu)	Renamed an optional keyword input 'x' 
					to 'xvalue'.
		1.2	98.04.23 (Thu)	Option do_plot added.


drexc [2] $SSW/yohkoh/gen/idl/spectra/drexc.pro
[Previous] [Next]
  NAME:
    drexc
  PURPOSE:
    Compute effective excitation rate due to dielectronic recombination.
    as a function of electron temperature in units of cm^3 s-1
  CALLING SEQUENCE:
     drexc,ato_data,Te6,wave,stage,exrate

     The line intensity is I (ph cm-3 s-1) = Ne * Nz * exrate where
     Ne (cm-3) and Nz (cm-3) are the electron density and the number density
     of the responsible stage.

  INPUTS:
     ato_data	= Structure containing atomic data (returned from rd_sec3)
     Te6	= Vector of electron temperatures in 1.e6 K
  OUTPUTS:
     wave	= Wavelength (in Ang) of lines
     stage	= Vector describing ion stage as number of electrons (1=H like)
     exrate	= Effective excitation rate (cm+3 s-1)
 CALLS: ***
	DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], delvarx [5]
 CALLED BY:
	bcs_line
  HISTORY:
     3-sep-93, J. R. Lemen (LPARL), Written
    27-sep-93, JRL, Fixed minor problem which occured when Te6 is a vector
     5-oct-94, JRL, Fixed the statistical weight of Fe XXIII d.r. lines


DS_SEPARATION $SSW/yohkoh/ucon/idl/sakao/ds_separation.pro
[Previous] [Next]
 NAME:
	DS_SEPARATION
 PURPOSE:
	To calculate separation of a pair of double sources from values 
	obtained by the Gaussian fitting procedure.
 CALLING SEQUENCE:
	separation = DS_SEPARATION(val, sig, sigma=sigma)
	separation = DS_SEPARATION(val, ds_pair=[0,2])
 INPUT:
	val	- Resultant values obtained by the Gaussian fitting. 
		  The values are read-in with RD_GAUS_FIT.
 OPTIONAL (KEYWORD) INPUT:
	sig		- One standard deviation error for each of the 
			  resultant values.
	filename	- If set, then specifies filename of the Gaussian 
			  fitting results. If this keyword is set, then 
			  the `val' and `sig' values in the file is used. 
 CALLS: ***
	RD_GAUS_FIT
 OPTIONAL KEYWORD INPUT:
	ds_pair	- Specifies IDs for two sources between which the separation 
		  is measures. This option is necessary when the Gaussian 
		  fitting is carried out with more than two sources. 
		  Default value is [0,1].
 OUTPUT:
	separation	- Separation of a pair of double sources in units of 
			  HXT imaginary `pixel' size (= 2.47 arcsec). 
 OPTIONAL OUTPUT:
	sigma	- If set, then returns one standard deviation values for each 
		  of the separation value. 
 HISTORY:
	version 1.0	96.01.30 (Tue)	T. Sakao written.
		1.1	98.02.17 (Tue)	Option filename added (@ GSFC).


DsetVec $SSW/yohkoh/gen/idl/dbase/dsetvec.pro
[Previous] [Next]
	NAME:
		DsetVec
	Purpose:
		For each "fnMap" request convert the input data-
		time vectors to roadmap-index vectors.
	CALLING SEQUENCE:
		err = DsetVec([fnMap=fnMap, tsxtf=tsxtf, tsxtp=tsxtp,
			toth3=toth3, dsxtf=dsxtf, dsxtp=dsxtp,
			[B
	Input/Keyword:
		fnMap	record of the users request for data.
		tsxtf	list of specific requested times
		tsxtp	list of specific requested times
		toth3	list of specific requested times
	Output/Keyword:
		dsxtf	list of roadmap-index values (0 to n-1)
		dsxtp	list of roadmap-index values
		doth3	list of roadmap-index values
 CALLS: ***
	GET_NBYTES, GetSDAVec, STR2ARR [1], STR2ARR [2], StrMap
 CALLED BY:
	CreDvec Create Data Vectors
	History:
		written 28-June-91 by GAL


dsk_locb $SSW/yohkoh/gen/idl/gbo/dsk_locb.pro
[Previous] [Next]
 NAME: 
        dsk_locb

 PURPOSE:
   To find the center and diameter of solar images. This is a crude 
   version of using a histogram technique. For clean images it will
   give quick results to within a pixel. 

 CALLING SEQUENCE:
                    dsk_locb,image,[KEYWORD=variable,..]

 PARAMETER:	image	input optical image.

 KEYWORDS:

          HORZCNT	horizontal center, floating point pixels.
	   VERTCNT      vertical center, floating point pixels.
	   HORZRAD      horizontal diameter, floating point pixels.
	   VERTRAD      vertical diameter, floating point pixels.
 	   EASTLIMB     east limb pixel index. 
	   WESTLIMB     west limb pixel index.
	   NPOLE        north pole pixel index.
	   SPOLE        south pole pixel index.
          CUT          cut off used to find limb.

 RETURN TYPE:

 CALLS: ***
	cut_lev
 CALLED BY:
	ALIGN1BIGGRAM, LAY1GKM, get_gbo_pfi
 HISTORY:  
           drafted by A. Mcallister, Apr., 1992.
           reworked to use cutoff and do sxt images crudely, may 1992.
           decreased cutoff factor to handle KP MG's, Nov. 1992. A.McA.
           reworked to handle negative numbers too, Dec. 1992. A.McA.
           added CUT keyword to return cutoff value, Dec. 1992. A.McA.
	    Modified to handle case of low contrast, 19-Apr-95 (MDM)


DSK_LOCG $SSW/yohkoh/gen/idl/gbo/dsk_locg.pro
[Previous] [Next]
       NAME: DSK_LOCG

       PURPOSE: A much better disk locator for spectral images

       METHOD:  Find a sequence of limb points and then use a chi
		 squared fitting technique to fit as circle or ellipse.


       CALLING SEQUENCE:	trgt = dsk_locg(specimg,np,/cir,/inter,/major)


       PARAMETERS:		specimg	input GBO image 
				np	number of limbpoints to use
				trgt	return fit parameters
					centroid: [x,y] 
					minor axis
					eccentricity  (for ellipse only)
					major axis angle: x-axis is 0. (for ellipse only)

       KEYWORDS:		inter	when set do interactive culling of 
					limb points turned on.
				major	set when major rather than minor
					axis is available
				cir	when set use circular fit
				quiet	when set DO NOT display work

	CALLS: ***
	circle_fit [1], circle_fit [2], circle_fn, circle_trgt, dskcntr, edit_pnts
	ellipse_fit, ellipse_fn, get_logenv [1], get_logenv [2], limbpnts
 CALLED BY:
	ELL2CIR, GEN_LOC
       HISTORY: Drafted by AMcA, August 1994.
		 Replaced circle fitter with Metcalf's CIRCLE_FIT, AMcA, Nov. 1994.
		 Fixed typo in CIRCLE_FIT call, AMcA, Mar. 1995.

                16-may-95 (SLF) - inhibit plot (via quiet) for background tasks


dskcntr $SSW/yohkoh/ucon/idl/mcallister/dskcntr.pro
[Previous] [Next]
       NAME: dskcntr


       PURPOSE: Simple rough locater of an spectral image center


       METHOD: Take moments of the intensity.


       CALLING SEQUENCE:  center=dskcntr(image)

       PARAMETERS:	image		input image
			center		center of image in pixel coords.

       KEYWORDS:

 CALLS: ***
	modd
 CALLED BY:
	DSK_LOCG
       HISTORY: Drafted by A. McAllister Nov. 23, 1993.
		 Based on V. Raben algorythm.
                24-sep-1995 (SLF) - changed return statement syntax


dsn_check [1] $SSW/yohkoh/gen/idl/atest/dsn_check.pro
[Previous] [Next]
 NAME:
    dsn_check
 PURPOSE:
    Make and print out the DSN data check sheet based on the final schedule
    Program will prompt the user about printing the file.

 CALLING SEQUENCE:
    dsn_check,Weekno
    dsn_check,48
    dsn_check,48,/asca			; For Asuka summary
 INPUT:
    weekno = DSN Week Number
 OPTIONAL INPUTS:
    outfile= output file.  If not specified, will write the file to
		the $DIR_GEN_ORBIT_RAW directory.
 OPTIONAL INPUT KEYWORD:
    yohkoh = yohkoh
    asca   = asca
 OUTPUT:
    none
 HISTORY
     2-dec-93, J. R. Lemen (LPARL), Written (based on H. Hara's dsnchk_sheet)
    28-Feb-95, (JRL), Added Wallops station
    15-May-95, (JRL), Added Santiago station
    11-Nov-96, H. Hara, Modified format of output
    17-Apr-97, JRL and DA, Added new Wallops and Goldstone stations
 CALLS:


dsn_check [2] $SSW/yohkoh/gen/idl/orbit/dsn_check.pro
[Previous] [Next]
 NAME:
    dsn_check
 PURPOSE:
    Make and print out the DSN data check sheet based on the final schedule
    Program will prompt the user about printing the file.

 CALLING SEQUENCE:
    dsn_check,Weekno
    dsn_check,48
    dsn_check,48,/asca			; For Asuka summary
 INPUT:
    weekno = DSN Week Number
 OPTIONAL INPUTS:
    outfile= output file.  If not specified, will write the file to
		the $DIR_GEN_ORBIT_RAW directory.
 OPTIONAL INPUT KEYWORD:
    yohkoh = yohkoh
    asca   = asca
 OUTPUT:
    none
 HISTORY
     2-dec-93, J. R. Lemen (LPARL), Written (based on H. Hara's dsnchk_sheet)
    28-Feb-95, (JRL), Added Wallops station
    15-May-95, (JRL), Added Santiago station
 CALLS:


DSN_CONFLICT [1] $SSW/yohkoh/gen/idl/orbit/dsn_conflict.pro
[Previous] [Next]
 NAME:
   DSN_CONFLICT
 PURPOSE:
   Identify ASCA/Yohkoh DSN conflicts from DSN strawman plan.
   Produce a suggested pass deletion plan for the strawman.
 CALLING SEQUENCE:
   IDL> .run dsn_conflict
 MODIFICATION HISTORY:
    4-aug-94, J. R. Lemen LPARL, V0.1 Written
   27-Jan-95, JRL, Fixed loop in formatter2 so last pass is printed
   22-Oct-95, JRL, V1.1 Changed printing to use pprint


dsn_conflict [2] $SSW/yohkoh/gen/idl/orbit/dsn_conflict.pro
[Previous] [Next]
 MODIFICATION HISTORY:
    4-aug-94, J. R. Lemen LPARL, Written


dsn_conflict [3] $SSW/yohkoh/gen/idl/orbit/dsn_conflict.pro
[Previous] [Next]
 MODIFICATION HISTORY:
    4-aug-94, J. R. Lemen LPARL, Written


dsn_conflict [4] $SSW/yohkoh/gen/idl/orbit/dsn_conflict.pro
[Previous] [Next]

 This routine does the following:
  
 1. Calls get_ksc_holiday to reads the KSC holiday schedule from 
         $DIR_GEN_ORBIT_RAW/ksc_holiday.dat
 2. Creates a use_code vector: Initializes to use_code =1
 3. Flags those KSC contacts that are in the holiday as use_code =2
 4. Sets DSN contacts that fall in non-holiday KSC contact times to use_code=0


 Calls ksc_groups to identify the groups of KSC contacts
 MODIFICATION HISTORY:
    4-aug-94, J. R. Lemen LPARL, Written


DSN_DMP_FINDER $SSW/yohkoh/ucon/idl/nitta/dsn_dmp_finder.pro
[Previous] [Next]
 NAME: DSN_DMP_FINDER
 PURPOSE: find out times of DSN dumps included in OP
 CALLING SEQUENCE: DSN_DMP_FINDER, date, (/ksc)
 INPUT PARAMETER: date ('24-sep-97')
 OPTIONAL KEYWORD: ksc to list KSC passes
 METHOD: access the OP file automatically generated by tohbans on flare20
 CALLS: ***
	ADDTIME [1], ADDTIME [2], anytim2ex [1], anytim2ex [2], anytim2ints [1]
	anytim2ints [2], fmt_tim [1], fmt_tim [2], int2secarr [1], int2secarr [2]
 HISTORY: written by NN (20-Apr-98)


dsn_downlink $SSW/yohkoh/gen/idl/orbit/dsn_conflict.pro
[Previous] [Next]
 NAME:
  dsn_downlink
 PURPOSE:
  Compute the amount of DSN downlink time (in min)
 MODIFICATION HISTORY:
   4-aug-94, J. R. Lemen LPARL, Written.


DSN_FINAL $SSW/yohkoh/ucon/idl/sxt_co/dsn_final.pro
[Previous] [Next]
 NAME:  DSN_FINAL
 PURPOSE: Count the number of downlinks at each NASA station,
          using the most updated information (the highest version
          of solass.wNN files)
 CALLING SEQUENCES: dsn_final, week, year=year,goldstone=goldstone, $
    canberra=canberra, madrid=madrid, santiago=santiago, wallops=wallops
 INPUT:  week:  integer like 35 for week 35, not a vector
 OPTIONAL INPUT: year, default is the present year
 OPTIONAL OUTPUTS: goldstone, canberra, madrid, santiago, wallops  --
         these return numbers of downlinks
 CALLS: ***
	ADDTIME [1], ADDTIME [2], anytim2ex [1], anytim2ex [2], rd_tfile [1], rd_tfile [2]
	week2ex [1], week2ex [2]
 CALLED BY:
	GO_DSN_FINAL [1], GO_DSN_FINAL [2]
 HISTORY: Written by NVN, 25-May-00
          12-Jun-00, trapped errors resulting from lack of SOLASS (HSH)
           3-Jul-00, added NASA total to print
        


dsn_input $SSW/yohkoh/gen/idl/orbit/dsn_input.pro
[Previous] [Next]
  Name:
    dsn_input

  Purpose:
    Allow user to input DSN stations for op_first_guess

  Inputs:
    start_time	= Start time in Yohkoh format
    end_time   = End   time in Yohkoh format

  Outputs:
    dsn_num	= Number of selections
    dsn_select = Structure of times, day of years

  Method:

 CALLS: ***
	ADDTIME [1], ADDTIME [2], Date2DOY [1], Date2DOY [2], anytim2ex [1], anytim2ex [2]
	anytim2weeks [1], anytim2weeks [2], doytim2ex [1], doytim2ex [2], dsn_show
	gt_day [1], gt_day [2], input [1], input [2], rd_rasm, timstr2ex [1], timstr2ex [2]
  History:
    Written, 14-nov-91, J. Lemen
    Updated, 12-dec-91, J. Lemen - Added start_time keyword
    Updated, 22-sep-92, JRL:  Read the contacts from RASM final schedule file.
    Updated, 13-nov-92, JRL:  Search for PASS (instead of TKG PASS since it
			       sometimes can be TRK PASS instead
    24-apr-93, JRL, Read the solass file instead.  Use rd_rasm.pro
    29-apr-93, JRL, Identify passes using WRK CAT field
    26-nov-93, JRL, Fixed bug which prevented all DSN passes from being manually deleted.
    11-mar-95, JRL, Add station contact to the output dsn_select structure
		     Added temporary patch to eliminate Wallops passes
    28-mar-95, JRL, Enabled Wallops passes to be accepted
    15-may-95, JRL, Enabled Santiago passes to be accepted


dsn_pass_opt $SSW/yohkoh/gen/idl/orbit/dsn_conflict.pro
[Previous] [Next]
 NAME:
  dsn_pass_opt
 PURPOSE:
  Optimize the selection of DSN passes by ASCA and Yohkoh
 CALLING SEQUENCE:
  use_code_new = dsn_pass_opt(pass,use_code,elapse_total,elapse_exclude)
  use_code_new = dsn_pass_opt(pass,use_code,elapse_total,elapse_exclude,/asca)

 ASCA Algorithm:
   1. Compute e2 = elapse_time (between EOT and next BOT) - T_SAA
   2. Do not use pass unless e2 >= 80. min

 Yohkoh Algorithm:
   1. Compute e2 = elapse_time (between EOT and next BOT) - T_Night
   2. Do not use pass unless e2 >= 42. min
   3. If more than one pass has e2 >= 42. and e2 <= 84. min, choose
      the pass that is in night or within 5. min of night.

 MODIFICATION HISTORY:
   4-aug-94, J. R. Lemen LPARL, Written


dsn_show $SSW/yohkoh/gen/idl/orbit/dsn_show.pro
[Previous] [Next]
  Name:
    dsn_show

  Purpose:
    Show the requested dsn contacts

 CALLS: ***
	fmt_tim [1], fmt_tim [2]
 CALLED BY:
	dsn_input
  History:
    Written, 12-nov-91, J. Lemen
    Updated, 12-dec-91, J. Lemen


dsnchk_sheet $SSW/yohkoh/gen/idl/orbit/dsnchk_sheet.pro
[Previous] [Next]
 NAME:
    dsnchk_sheet
 PURPOSE:
    Make and print out the DSN data check sheet based on the final schedule
 IDL> .run dsnchk_sheet

 INPUT:
    none
 OUTPUT:
    none
 HISTORY:
    Jan 15, 1993   by  H.Hara
       24-apr-93, J.R. Lemen,  Force output to $ydb/orbit_raw
	 4-Jun-93 (MDM) - Modified to work for ASCA also
        2-dec-93 (JRL) - Call dsn_check (which calls rd_rasm to read the ss file)


DSNFIL_TRIM $SSW/yohkoh/ucon/idl/hudson/dsnfil_trim.pro
[Previous] [Next]
 NAME:
     DSNFIL_TRIM
 PURPOSE:
     bring n_pts worth of DSNFIL output into the session,
       extract radial distance, longitude, and latitude,
       and then delete the file
 CATEGORY:
 CALLING SEQUENCE:
 INPUTS:
 OPTIONAL (KEYWORD) INPUT PARAMETERS:
 OUTPUTS:
 CALLS: ***
	rd_tfile [1], rd_tfile [2]
 CALLED BY:
	GET_YOHKOH_POS
 COMMON BLOCKS:
 SIDE EFFECTS:
 RESTRICTIONS:
 MODIFICATION HISTORY:
     HSH, written 29-Jan-97


dt_corr $SSW/yohkoh/bcs/idl/util/dt_corr.pro
[Previous] [Next]
   Procedure to solve the dead time equation:-
   observed = real*exp(-tau*real) for the real count rate given
   the observed rate (c/s) and the deadtime tau in microsecs
   Just a transcription from Fortran routine by AF


  Input:
           tau   - the deadtime value in microseconds
           cobs  - the array of observed counts

  Output:
           creal - the deadtime-corrected counts array

  Use:
           IDL>  dt_corr,tau,cobs,creal


  CDP  Nov 91

 CALLED BY
	bcs_dtfac [1], bcs_dtfac [2], dt_factor


dt_factor $SSW/yohkoh/ucon/idl/pike/dt_factor.pro
[Previous] [Next]

  Routine to calculate the deadtime correction factor by which to
  multiply the spectral intensities.

  Assumes the correction factor is LIM/ACC (type = 1) or SUM(LIM)/SUM(ACC)
  (type = 2) where the summation is taken over channels 1 & 2 or 3 & 4. The
  counts are corrected for their own deadtime before use. 

  Must have run test_rd first and requested reading of dp_sync data
  or alternatively used the routines:

        IDL> rd_roadmap,infil,roadmap
        IDL> rd_bda_dp,infil,dp_sync

             where infil = data file name

  Input:
           dp_sync     usual structure
           roadmap     usual structure
           [type]      define form of correction (1 or 2) default is 1 if not
                       supplied.
           [stime, etime]  optional hours UT within which factors are found
                           if not given then whole file is processed (can
                           take a long time)

  Output:
           dt_fac(4,n)     deadtime factors by which to multiply spectral
                           counts. The dimension n is kept the same as
                           roadmap for ease of application even if not all
                           elements were requested.

  Use:

        IDL> dt_factor, dp_sync, roadmap, dt_fac [type, stime, etime]


  CDP March 92   Written
      Jan   93   Set factor on error to 1.0 not 0.0

 CALLS:


dtcf_pc_hxs $SSW/yohkoh/wbs/idl/util/dtcf_pc_hxs.pro
[Previous] [Next]
NAME:
	dtcf_pc_hxs
PURPOSE:        
       Deadtime correction factor for HXS-PC1 and PC2.  The correction
       is not exact when  the deadtime-corrected count of total PC exceeds
       about 100,000 counts/sec. It is due to instrument limitation.
CALLING SEQUENCE:
	subs = dtcf_pc_hxs(float)
INPUTS:
	float - (HXS-PC1 + HXS-PC2) [counts/sec]
 CALLED BY:
	MK_HXSPC
HISTORY:
	26-Jun-93  (K.Suga) First written.
       2-Aug-93 Updated by T.Hiraoka  ;Expression can be an array.
       25-nov-93 Revised by J.Sato, K.Morimoto and M.Yoshimori


dtcf_ph_grs1l $SSW/yohkoh/wbs/idl/util/dtcf_ph_grs1l.pro
[Previous] [Next]
NAME:
	dtcf_ph_grs1l
PURPOSE:        
       Dead Time Correction Factor for observed GRS-PHL1 to
	incident one.
CALLING SEQUENCE:
	subs = dtcf_ph_grs1l(float)
INPUTS:
	float - ( GRS-PHL1(SUM( 0-127 ch.) ) [counts/sec]
 CALLED BY:
	MK_GRSPHL1, OUT_GRSPHL1, dataget_grs, ph_eff_grs1, ph_pow_grs1
HISTORY:
	26-Jun-93  (K.Suga) First written.


dtcf_ph_hxs $SSW/yohkoh/wbs/idl/util/dtcf_ph_hxs.pro
[Previous] [Next]
NAME:
	dtcf_ph_hxs
PURPOSE:        
       Deadtime correction factor for HXS-PH. The correction is not exact
       when the deadtime-corrected count of total PH exceeds about 35,000
       counts/sec. In addition, spectral distorsion occurs when the deadtime-
       corrected count of total PH exceeds about 21,000 counts/sec. It is due
       to instrument limitation.
CALLING SEQUENCE:
	subs = dtcf_ph_hxs(float)
INPUTS:
	float - ( HXS-PH(SUM( 0-31ch.) ) [counts/sec]
 CALLED BY:
	MK_HXSPH, OUT_HXSPH
HISTORY:
	26-Jun-93  (K.Suga) First written.
       25-nov-93  Revised by J.Sato,K.Morimoto and M.Yoshimori


dude $SSW/yohkoh/ucon/idl/mctiernan/dude.pro
[Previous] [Next]
 NAME:
      dude
 PURPOSE:
      Prints out "dude" to the screen
 CALLING SEQUENCE:
      dude, inp_string, /caps, /before, /after
 INPUT:
      inp_string (optional), a string variable
 OUTPUT:
      none
 KEYWORDS:
      caps= if set, will print out an upper case DUDE
      before = if set, inp_string will be put in front of the dude
      after = if set, inp_string will be put after, this is the default
              but if both before and after are set, then both will be
              done.
 CALLED BY:
	Fsp_mrqmin, align_hxi, box_sxthxt_fsp, fsp_proc, hxi_channels, sxt_fsp, sxt_thfsp
	sxtbox_fsp, sxtbox_teem, sxthxt_fsp
 HISTORY:
      1/27/95, jmm


dummy [8] $SSW/yohkoh/bcs/idl/atest/dummy.pro
[Previous] [Next]
   Name: dummy

   Purpose: force otherwise empty directory to be included in IDL path
 CALLS:


dummy [9] $SSW/yohkoh/gen/idl/atest/dummy.pro
[Previous] [Next]
   Name: dummy

   Purpose: force otherwise empty directory to be included in IDL path
 CALLS:


dummy [10] $SSW/yohkoh/gen/idl/ys_util/dummy.pro
[Previous] [Next]
   Name: dummy

   Purpose: force otherwise empty directory to be included in IDL path
 CALLS:


dummy [11] $SSW/yohkoh/gen/script/dummy.pro
[Previous] [Next]
   Name: dummy

   Purpose: force otherwise empty directory to be included in IDL path
 CALLS:


dummy [12] $SSW/yohkoh/hxt/idl/atest/dummy.pro
[Previous] [Next]
   Name: dummy

   Purpose: force otherwise empty directory to be included in IDL path
 CALLS:


dummy [13] $SSW/yohkoh/sxt/idl/atest/dummy.pro
[Previous] [Next]
   Name: dummy

   Purpose: force otherwise empty directory to be included in IDL path
 CALLS:


dummy [14] $SSW/yohkoh/wbs/idl/atest/dummy.pro
[Previous] [Next]
   Name: dummy

   Purpose: force otherwise empty directory to be included in IDL path
 CALLS:


Dummy_rd [3] $SSW/yohkoh/ucon/idl/mctiernan/dummy_rd.pro
[Previous] [Next]
 NAME:
       Dummy_rd
 PURPOSE:
       This will find out how many lines at the start of
       an ASCII file start with the charcter ";", so that
       they can be ignored when inputting. There may be
       a better way to do this.
 CALLING SEQUENCE:
       n_dummy=Dummy_rd(filen0)
 INPUT:
       filen0= an input filename
 OUTPUT:
       n_dummy= the number of lines at the start of the file
                that start with semicolons.
 CALLED BY:
	Responses [1], Responses [2], Responses [3], fsp_proc
 HISTORY:
       14-SEP-93 by JM


DUMP_COMPARE [1] $SSW/yohkoh/bcs/idl/atest/dump_compare.pro
[Previous] [Next]
 NAME:
	DUMP_COMPARE
 PURPOSE:
	Extracts a microprocessor memory dump from the BDA file and 
	compare it with the specified memory load, within the 
	specified address range.
 CALLING SEQUENCE:  
	.run dump_compare
 INPUT:
	YODAT should just be used to extract the BCS DHK data (option 
	-888 and Y to DHK). 
	Select required record numbers from range indicated (determined 
	from DP_SYNC data). If not already extracted, the data is 
	extracted from the BDA file. 
	The comparison should be normally made between 0 and 35FF (hex).
 OUTPUT:
	List of non-compares printed to screen
 OPTIONAL OUTPUT:
	If hardcopy of non-compares is required, set TTL=2 and rerun
	the programme. Produces file "mem_comp.lis" on current directory
 SIDE EFFECTS:
	If required data is not already extracted an "SS" vector of the 
	required records is created and the data is then extracted (it 
	is not necessary to re-run YODAT).
 HISTORY
	RDB, 1990, with enhancements
	rdb, 16-Feb-92	Updated for per-orbit files
			Does not print if large no. of non-compares
			Extracts the parameter area
	rdb  22-Feb-92  Extract data from BDA file if not present.
			Syncs with start of dump.
	RDB  10-May-92	Added code to allow for byte slipped dump
	RDB  21-Jun-92	Capitalzed $DIR_BCS_MICRO for Unix
			Used call to CONCAT_DIR
	RDB  23-Jul-92	Allow bad block in middle of dump
	RDB  29-Jan-94	Added extra comments
	RDB  11-May-94  Also extract area that holds default seqns and flops
			Use rd_full_load to get memory load
	RDB  17-May-94	Added comparison to plan_area image
       RDB   1-Sep-94  Small correction
	rdb  28-Nov-97	Allowed other filename for full_load
			Lists available files for loadingll.ll


DUMP_COMPARE [2] $SSW/yohkoh/bcs/idl/micro/dump_compare.pro
[Previous] [Next]
 NAME:
	DUMP_COMPARE
 PURPOSE:
	Extracts a microprocessor memory dump from the BDA file and 
	compare it with the specified memory load, within the 
	specified address range.
 CALLING SEQUENCE:  
	.run dump_compare
 INPUT:
	YODAT should just be used to extract the BCS DHK data (option 
	-888 and Y to DHK). 
	Select required record numbers from range indicated (determined 
	from DP_SYNC data). If not already extracted, the data is 
	extracted from the BDA file. 
	The comparison should be normally made between 0 and 35FF (hex).
 OUTPUT:
	List of non-compares printed to screen
 OPTIONAL OUTPUT:
	If hardcopy of non-compares is required, set TTL=2 and rerun
	the programme. Produces file "mem_comp.lis" on current directory
 SIDE EFFECTS:
	If required data is not already extracted an "SS" vector of the 
	required records is created and the data is then extracted (it 
	is not necessary to re-run YODAT).
 HISTORY
	RDB, 1990, with enhancements
	rdb, 16-Feb-92	Updated for per-orbit files
			Does not print if large no. of non-compares
			Extracts the parameter area
	rdb  22-Feb-92  Extract data from BDA file if not present.
			Syncs with start of dump.
	RDB  10-May-92	Added code to allow for byte slipped dump
	RDB  21-Jun-92	Capitalzed $DIR_BCS_MICRO for Unix
			Used call to CONCAT_DIR
	RDB  23-Jul-92	Allow bad block in middle of dump
	RDB  29-Jan-94	Added extra comments
	RDB  11-May-94  Also extract area that holds default seqns and flops
			Use rd_full_load to get memory load
	RDB  17-May-94	Added comparison to plan_area image
       RDB   1-Sep-94  Small correction