ma_labels $SSW/yohkoh/ucon/idl/mctiernan/ma_labels.pro
[Previous] [Next]
 NAME:
       ma_labels
 PURPOSE: 
	Given the type of spectrum, returns the number of free parameters,
       and labels for those parameters.
 CALLING SEQUENCE: 
	ma_labels,tyspec,ma,alabels
 INPUT:
	tyspec=the spectral type
	      = 1 for single p.l.
	      = 2 for double p.l.
	      = 3 for single thermal
	      = 4 for p.l. + thermal
	      = 5 for thermal + thermal
	      = 6 for p.l. + p.l.
	      = 7 thermal below Ebr, p.l. above Ebr
	      = 8 Thermal + double p.l.
	      = 9 Triple P.L.
             = 10 thermal including line emission
	      = 11 for p.l. + thermal, includes SXR lines
             = 12 for a p.l. that flattens below a value e0
             = 13 for a p.l. that cuts off exponentailly below a value e0
	      = 14 for thermal + thermal, including SXR lines
 OUTPUT:
	 ma= no. of parameters fit
 	 alabels = labels for the fit parameters
		tyspec  =1 a(0)=K, a(1)=gamma
			=2 a(0)=K1, a(1)=gamma1, a(2)=gamma2, a(3)=ebr
			=3 a(0)=em/1.0e47, a(1)=T/1.0e6
			=4 a(0)=em/1.0e47, a(1)=T/1.0e6, a(2)=K, a(3)=gamma
			=5 a(0)=em1/1.0e47, a(1)=T1/1.0e6, a(2)=em2/1.0e47, a(3)=T2/1.0e6
			=6 a(0)=K1, a(1)=gamma1, a(2)=K2, a(3)=gamma2
			=7 a(0)=K, a(1)=gamma, a(2)=T/1.0e6, a(3)=Ebr
	                =8 a(0)=em/1.0e47, a(1)=T/1.0e6, 
		           a(2)=K1, a(3)=gamma1, a(4)=gamma2, a(5)=Ebr
	                =9 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 a(0)=em/1.0e47, a(1)=T/1.0e6
                       =11 a(0)=em/1.0e47, a(1)=T/1.0e6, a(2)=K, a(3)=gamma
                       =12, a(0)=K, a(1)=gamma, a(2)=e0
                       =13, a(0)=K, a(1)=gamma, a(2)=e0
			=14, a(0)=em1/1.0e47, a(1)=T1/1.0e6, a(2)=em2/1.0e47, a(3)=T2/1.0e6
 CALLED BY:
	fix_pars0, fsp_11, fsp_mc, fsp_proc, hxt_anycomp, sxt_anycomp
 HISTORY:
	Written By JMM , 30-mar-94


magtv1 procedure $SSW/yohkoh/ucon/idl/naoj_mtk/magtv1.pro
[Previous] [Next]
 NAME :	magtv1 (procedure)
 PURPOSE :
	display vector mag.field and draw intensity contour
 CATEGORY :
	idl/lib/flare
 CALLING SEQUENCE :
	magtv1,img,q,u,v,h=h,/spline,/order,save=filename,/seq, $
		magnify=magnify,bin=bin,/nocont,x0=x0,y0=y0,/notitle, $
		/bw,bmax=bmax
  or	magtv1,img,Bx,By,Bl,/cal,h=h,/spline,/order,save=filename,/seq, $
		magnify=magnify,bin=bin,/nocont,x0=x0,y0=y0,/notitle, $
		/bw,bmax=bmax
 INPUTS :
	img     : image (*,*) or i,q,u,v as (*,*,4)
       q,u,v   : polarization degree*10000
       Bx,By,Bl: trans. & long. mag fields, gauss*10
 OPTIONAL INPUT PARAMETERS : 
	none
 KEYWORD PARAMETERS :
	h       : header array
       spline  : if set, draw spline contour
 	order   : if set, up-down direction is opposite
 	save=filename  : save tvrd to file 
 	/cal	: for calibrated data	Bl=>q,  Bx=>u, By=>v
 	/seq	: display seq.no
 	magnify : magnification factor
 	bin	: binning factor
 	nocont  : no contour of img
       x0,y0   : lower-left position for drwaing
       /notitle: omit title
	/bw     : black & white display
	bmax    : fix max of Bl or V 
 OUTPUTS :
	none
 CALLS: ***
	COLORTBL, CONGRID [1], CONGRID [2], CONGRID [3], JST2UT, LCT_RB, LOADCT, MAGTV1, MAGTV1C
	MAGTV1R, MIRROR, NKRSAVE, PIX_SIZE, STR_GPOS, TIMEINT
 COMMON BLOCKS : 	none
 SIDE EFFECTS : 	none
 RESTRICTIONS :	none
 PROCEDURE :
	if h(1).value eq 'Bl', it displays as calibrated data (/cal)
 MODIFICATION HISTORY :
	K.I. '92/02/08
	K.I. '92/05/01
	K.I. '92/10/20
	K.I. '92/10/28	change order of Bl & bx,by
	K.I. '92/11/19	change v sign
	K.I. '92/11/29	h.dx --> bin
	K.I. '92/12/06	x0,y0, notitle
	K.I. '92/12/30	bw keyword
	K.I. '93/01/06	bmax keyword
	K.I. '93/03/08	nstep=max([nstep/magnify,2])
	K.I. '93/12/21	rebin -> congrid


magtv1m procedure $SSW/yohkoh/ucon/idl/naoj_mtk/magtv1m.pro
[Previous] [Next]
 NAME       : magtv1m (procedure)
 PURPOSE    : display multi images of T1
 CALLING SEQUENCE :
	magtv1m,files,size=size,info=info
 INPUTS :
     files	-- filename array
 KEYWORD PARAMETERS :
     size	-- size factor
     info	-- information array
 OUTPUTS :
     none
 CALLS: ***
	F1DATA, MAGTV1, MAGTV1M, NKRGETH
 SIDE EFFECTS : 
 	display
 MODIFICATION HISTORY :
	K.Ichimoto, 1993/01/29


magtv2 procedure [1] $SSW/yohkoh/ucon/idl/naoj_mtk/magtv2.pro
[Previous] [Next]
 NAME :	magtv2 (procedure)
 PURPOSE :
	display vector mag.field as contour on sunspot image
 CATEGORY :
	idl/lib/flare
 CALLING SEQUENCE :
	magtv2,img,q,u,v,h=h,/spline,/order,save=filename,/seq, $
		magnify=magnify,bin=bin,/nocont,x0=x0,y0=y0,/notitle
  or	magtv2,img,Bx,By,Bl,/cal,h=h,/spline,/order,save=filename,/seq, $
		magnify=magnify,bin=bin,/nocont,x0=x0,y0=y0,/notitle
 INPUTS :
	img     : image (*,*) or i,q,u,v as (*,*,4)
       q,u,v   : polarization degree*10000
       Bx,By,Bl: long. & trans. mag fields, gauss*10
 OPTIONAL INPUT PARAMETERS : 
	none
 KEYWORD PARAMETERS :
	h       : header array
       spline  : if set, draw spline contour
 	order   : if set, up-down direction is opposite
 	save=filename  : save tvrd to file 
 	/cal	: filenamefor calibrated data	Bl=>q,  Bx=>u, By=>v
 	/seq	: display seq.no
 	magnify : magnification factor
 	bin	: binning factor
 	nocont  : no contour of img
       x0,y0   : lower-left position for drwaing
       /notitle: omit title
 OUTPUTS :
	none
 CALLS: ***
	COLORTBL, CONGRID [1], CONGRID [2], CONGRID [3], JST2UT, LOADCT, MAGTV2, MAGTV2C
	MAGTV2R, MIRROR, NKRSAVE, PIX_SIZE, STR_GPOS, TIMEINT
 COMMON BLOCKS : 	none
 SIDE EFFECTS : 	none
 RESTRICTIONS :	none
 PROCEDURE :
	if h(1).value eq 'Bl', it displays as calibrated data (/cal)
 MODIFICATION HISTORY :
	K.I. '92/02/08
	K.I. '92/05/01
	K.I. '92/10/20
	K.I. '92/10/28	change order of Bl & bx,by
	K.I. '92/11/19	change v sign
	K.I. '92/11/29	h.dx --> bin
	K.I. '92/12/06	x0,y0, /notitle
	K.I. '93/03/08	nstep=max([nstep/magnify,2])
	K.I. '93/12/21	rebin -> congrid


magtv2 procedure [2] $SSW/yohkoh/ucon/idl/naoj_nkr/rmtrend.pro
[Previous] [Next]
 NAME :	magtv2 (procedure)
 PURPOSE :
	remove trend from image
 CATEGORY :
	idl/lib/nkr
 CALLING SEQUENCE :
	img = rmtrend(img)
 INPUTS :
	img     : image (*,*) or i,q,u,v as (*,*,4)
 OPTIONAL INPUT PARAMETERS : 
	none
 KEYWORD PARAMETERS :
	degree	: degree of fitting polinomial, default=2
 OUTPUTS :
	none
 CALLS: ***
	RMTREND, SURFACE_FIT
 COMMON BLOCKS : 	none
 SIDE EFFECTS : 	none
 RESTRICTIONS :	none
 PROCEDURE :
 MODIFICATION HISTORY :
	K.I. '93/11/19


make_32 [1] $SSW/yohkoh/gen/idl/atest/op_edit.pro
[Previous] [Next]
 NAME:
   make_32
 PURPOSE:
   Align the event times on the nearest 32 sec boundaries.
   Adjust the offset times.
 INPUTS:
   event	= The event structure from op_get_event
 RETURNS:
   A new event structure with modified times.
 CALLS: ***
	ADDTIME [1], ADDTIME [2], BSORT [1], BSORT [2], BSORT [3], BSORT [4], Ex2Int [1]
	Ex2Int [2], OP_ADD_SPECIAL, contact_sum, fmt_pass, op_edit [1], op_edit [2]
	op_get_event [1], op_get_event [2], op_same_time [1], op_same_time [2]
	op_terminator [1], op_terminator [2], save_event [1], save_event [2], valid_pass
	valid_pass2, valid_pass3, valid_pass4 [1], valid_pass4 [2]
 CALLED BY:
	get_dn_rate [1], get_dn_rate [2], valid_pass4 [1], valid_pass4 [2]
 MODIFICATION HISTORY:
   12-oct-93, JRL, Written.
   21-feb-97, JRL, Changed calls to addtime to be with the /sec switch set


make_32 [2] $SSW/yohkoh/gen/idl/orbit/valid_pass4.pro
[Previous] [Next]
 NAME:
   make_32
 PURPOSE:
   Align the event times on the nearest 32 sec boundaries.
   Adjust the offset times.
 INPUTS:
   event	= The event structure from op_get_event
 RETURNS:
   A new event structure with modified times.
 CALLS: ***
	ADDTIME [1], ADDTIME [2], BSORT [1], BSORT [2], BSORT [3], BSORT [4], Ex2Int [1]
	Ex2Int [2], STR2ARR [1], STR2ARR [2], contact_sum, fmt_pass, fmt_tim [1]
	fmt_tim [2], get_dn_rate [1], get_dn_rate [2], input [1], input [2]
	op_saa_med [1], op_saa_med [2], save_event [1], save_event [2], str_replace [1]
	str_replace [2], valid_pass4 [1], valid_pass4 [2]
 CALLED BY:
	get_dn_rate [1], get_dn_rate [2], valid_pass4 [1], valid_pass4 [2]
 MODIFICATION HISTORY:
   12-oct-93, JRL, Written.


MAKE_TIMSTR $SSW/yohkoh/ucon/idl/sakao/make_timstr.pro
[Previous] [Next]
 NAME:
	MAKE_TIMSTR
 PURPOSE:
	To return a day/time string from a given 'time' array.
 CALLING SEQUENCE:
	time_str = MAKE_TIMSTR(tim, day=day, time=time, msec=msec)
 INPUT:
	tim	- An integer array that contains time information in the 
		  following format:
		  tim(0:2,*)	- [YY,MM.DD]
		  tim(3:6,*)	- [HH,MM,SS,MSEC]
 CALLED BY:
	GET_FRAME_TIME
 OPTIONAL KEYWORD INPUT:
	day	- If set, then only the YY/MM/DD part is returned.
	time	- If set, then only the HH:MM:SS part is returned.
	msec	- If set, then the HH:MM:SS.MSEC part is returned.
 OUTPUT:
	time_str	- An array of string generated from the above time 
			  array.
 SIDE EFFECTS:
	none
 CATEGORY:
	Yohkoh HXT data analysis.
 HISTORY:
	version 1.0	date unknown	T.Sakao written.
		1.1	98.05.03 (Sun)
			Modified so as to have time strings like 
			'03:23:05.002' instead of ' 3:23: 5.  2'. This version 
			is (partially) related to the HXT NMP release.


MAKE_VTRANGE $SSW/yohkoh/ucon/idl/sakao/make_vtrange.pro
[Previous] [Next]
 NAME:
	MAKE_VTRANGE
 PURPOSE:
	To prepare a VTRANGE (vertical-time-range) variable which is to be 
	used by HXT_4CHPLOT with the option VTRANGE. 
 CALLING SEQUENCE:
	vtrange = MAKE_VTRANGE(inf_or_file)
 INPUT:
	inf_or_file	- Either the INF structure variable (read out as 
			  RD_HXTIMG, img, hdr, inf, filename) or the name of 
			  the HXT image file itself.
 OUTPUT:
	vtrange		- A sting array with the format of 
			  STRARR([stime,etime],4ch) = STRARR(2,4). 
			  This variable is to be used by HXT_4CHPLOT in such 
			  a way as:
			  HXT_4CHPLOT, index, data, vtrange=vtrange.
 SIDE_EFFECT:
	none
 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], FILL_TIMEZERO, RD_HXTIMG
	anytim2ints [1], anytim2ints [2], gt_day [1], gt_day [2], gt_time [1], gt_time [2]
 RESTRICTIONS:
	(Of course) does not accept multiple array elements for the INF 
	structure variable.
 CATEGORY:
	Yohkoh HXT data analysis.
 HISTORY:
	version 1.0	98.05.07 (Thu)	T.Sakao written.


MAKE_WIDG_EV [2] $SSW/yohkoh/gen/idl/util/yo_tape_widg.pro
[Previous] [Next]

 NAME: 
 	MAKE_WIDG_EV

 PURPOSE:
       The event handler for YO_TAPE_WIDG

 CATEGORY:
       YOHKOH tape

 CALLING SEQUENCE:
       XMANAGER, 'YO_TAPE_WIDG', BASE, EVENT_HANDLER='MAKE_WIDG_EV'

 CALLED BY:
       YO_TAPE_WIDG

 CALLS TO:
	none

 INPUTS:
       none explicit, only through common and UVALUE
		UVALUE=BUTT	contains the widget ID for the buttons

 OPTIONAL INPUTS:
	none

 OUTPUTS:
       none explicit, only through commons

 OPTIONAL OUTPUTS:
	none

 CALLS: ***
	XMANAGER, YO_TAPE_WIDG [2], YO_TAPE_WIDG [4], yo_tape_widg [1], yo_tape_widg [3]
 CALLED BY:
	YO_TAPE_WIDG [2], YO_TAPE_WIDG [4], yo_tape_widg [1], yo_tape_widg [3]
 COMMON BLOCKS:
	COMMON EVENT,  $            	; needed for the event handler
			INDEX, $	; record the status of the buttons	
			IST,   $        ; remember the last selected button
			IEN,   $	; remember the second to last
			EXCLUS		; if set, simulate exclusive buttons
	
 SIDE EFFECTS:
	none

 RESTRICTIONS:
	none

 PROCEDURE:
	Handle the button events as they are clicked

 MODIFICATION HISTORY:
       OCT 93 - Elaine Einfalt (HSTX)


makestr $SSW/yohkoh/ucon/idl/metcalf/makestr.pro
[Previous] [Next]
NAME:
	makestr
PURPOSE:
	create a structure from a string definition
CATEGORY:
	
CALLING SEQUENCE:
	result = makestr(structure_definition)
INPUTS:
	structure_definition = string containing structure definition
 CALLED BY:
	BFITS, add2str [1], add2str [2], substruc
                              example:  '{name,one:fltarr(5),two:0.0}'
OPTIONAL INPUT PARAMETERS:
OPTIOAL KEYWORD PARAMETERS:
        status = returns 1 if successful, 0 if error occurred
OUTPUTS:
	result = new structure
 CALLS: ***
	SPLITSTR, SQUEEZE
COMMON BLOCKS:
	umakestrstr: unique = keeps track of number of times routine is
			       called for default value for insuring that the
			       structure name is unique. (Static Variable)
SIDE EFFECTS:
	None.
RESTRICTIONS:
       Lot's kludey stuff if the structure definition is too
       long for the "execute" command.  Untested on VMS systems ... works 
       for UNIX.
PROCEDURE:
	Defines a new structure from a string definition.  In principle this
       is trivial with the execute command, but the execute command does
       not allow strings over 131 characters.  To get around this problem
       the routine writes a procedure to create the structure and 
       runs it.  To write the procedure uses lots of UNIX specific stuff.
MODIFICATION HISTORY:
	11/91   T. Metcalf
       30-Jun-93 TRM Fixed the file generation so that it is less UNIX
                     specific.  In principle this will now work on VMS,
                     but it is untested.
       1995-12-01 TRM  IDL v. 4.0 no longer allows multiple structure tags
                       with the same name.  Check for this and add a number
                       to the tag name if necessary.


makimg0 $SSW/yohkoh/ucon/idl/metcalf/makimg0.pro
[Previous] [Next]
NAME:
	makimg0
PURPOSE:
	The image synthesis subroutine performs the image deconvolution 
       for HXT using the zeroth order regularization method.  
CALLING SEQUENCE:
	makimg0, ictrl, hxi_index, index1, fobs, sig, p, index_out, data_out $
             [, alpha]
INPUT:
	/ictrl = enables display of final image
	hxi_index = a structure containing everything we need to know about 
                   the hxt image.  nimages elements.
	Tags used:
	   hxi_index.grause(8)=Each element is either 0b or 255b, 
		If hxi_index.grause(j)=0b, then the Subcollimators with 
		spatial wave number j+1 aren't used in the calculation
	index1 = index structure of the first data set in each accumulation
	fobs = the observed counts in the SC's: fltarr(nSC,nimages)
	sig = the uncertainty in fobs = sqrt(fobs) kind of
	p = the 2-d modulation pattern, fobs(j)=total(b*p(*,*,j)), 
		where b is the brightness and j is the grid number
OPTIONAL INPUT:
       alpha = smoothing parameter (default = 0.1).  Larger smoothing gives
               a flatter imagem but it can become oversmoothed.
KEYWORD PARAMETERS:
       bin = binning factor (default = 2.0). Any float number GE 1.  
             Bigger = faster.
       /quiet = Don't print any diagnostics
       /verbose = print lots of diagnostics
OUTPUT:
	index_out= Hxi gen htx and hxi structure.  nimages elements
	data_out= the brightness, a 64X64 array of counts/cm^2/pixel^2, 
                 THE ANSWER.  fltarr(64,64,nimages)
DESCRIPTION:
	makimg uses the zeroth order regularization to compute the iamge
       from the SC modulation patterns, p, and the counts and variances in 
       the 64 sub-collimators, fobs and var.  Zeroth order regularization is
       similar to MEM, but it avoids the iteration.

       The output matches the MEM image quite well, although the MEM image
       will generally be flatter.

       The image is flipped N/S to match SXT.
 CALLS: ***
	STR_LOAD, ocontour [1], ocontour [2], ocontour [3], ocontour [4], ocontour [5]
	str_merge [1], str_merge [2], unpack_grause
 CALLED BY:
	HXT_QLOOK, hxt_multimg
MODIFICATION HISTORY:
	Translated from FORTRAN routine MAKIMG, of T. Sakao, by 
       J. McTiernan, July '92
	24-Aug-92 (MDM) - Added hxi_index.resolution = 1.97*1000
	30-Sep-92 (JM) - changed chilim form an absolute of 2.0 to 
			 0.40*Sqrt(total(var))/64, found semi-empirically
        9-Jun-93 (JM) -changed chilim back to 2.0
       22-Jun-93 (TRM) - Stripped JM's makimg.  Eliminated the MEM stuff
                         and added zeroth order regularization.
       25-Jun-93 (TRM) - Added code to handle multiple images efficiently
       16-Nov-95 (TRM) - Took out call to getvar
       1996-11-26 (JMM) - Added call to UNPACK_GRAUSE, which allows for
                          individual SC's to be left out of the fit


makimg_g0 $SSW/yohkoh/ucon/idl/mctiernan/makimg_g0.pro
[Previous] [Next]
NAME:
	makimg_g0
PURPOSE:
	Image synthesis subroutine, forward fitting, makimg_g tries to
       fit a user-defined number of gaussian sources to the HXT data.
CALLING SEQUENCE:
 Makimg_g0, ictrl, hxi_index, index1, image0, fobs, sig, p, index_out, data_out, $
              Chi_limit=chi_limit, n_sources=n_sources, Cyl=cyl, moff=moff, $
              ftol=ftol, alpha=alpha, beta=beta, gamma=gamma, itmax=itmax, $
              restart=restart, fixed_pos=fixed_pos, fixed_rad=fixed_rad, $
              source_pars=source_pars
INPUT:
	ictrl=1 enables us to look at intermediate data, or it 
		will, when implemented.
	hxi_index= a structure containing everything we need to know about the hxt image
	Tags used:
	hxi_index.grause(8)=Each element is either 0b or 255b, 
		If hxi_index.grause(j)=0b, then the Subcollimators with 
		spatial wave number j+1 aren't used in the calculation
	hxi_index.area= total area in cm^2 of scintillators
	hxi_index.gamma0= initial value of iteration gain
	hxi_index.laminc= initial value for lambda increment
	hxi_index.chilim= minimum value of chi^2 needed
	index1=index structure of the first data set in accumulation
       image0= and initial image, to find the ftootpoints...
	fobs= the observed counts in the SC's
	sig= the uncertainty in fobs = sqrt(fobs) kind of
	p= the 2-d modulation pattern, fobs(j)=total(b*p(*,*,j)), 
		where b is the brightness and j is the grid number
OUTPUT: (probably not used anymore)
	More tags for the structure hxi_index:
	hxi_index.lambda= final value of lambda, which controls the 
		iteration step size
	hxi_index.iteration= the number of iterations, for a given value of lambda
	hxi_index.delta= total((b(i)-b(i-1))^2)/Total(b(i)^2) for each iteration,	
		lambda is changed when delta is reduced to 0.030 or less
	hxi_index.chi2= chi^2, reduced = total((fobs(b(i))-fobs)^2/var)/usenum
		where usenum is the number of SC's used
	hxi_index.max_bright= maximum brightness of image
	hxi_index.x_max= Column of max. brightness
	hxi_index.y_max= row of max. brightness

	index_out= Hxi gen htx and hxi structure,...
	data_out= the brightness, a n_pixXn_pix array of
                 counts/cm^2/pixel^2, THE ANSWER. n_pix is obtained from
                 the mod pattern (18-jul-94, jmm)
KEYWORDS:
       n_sources= number of sources in the image, max is 3
       chi_limit = limiting chi^2, the default is 2.0
       source_pars= the source parameters, brightness, radius, x and y positions
      amoeba_x keywords, for downhill simplex minimization
       ftol = fractional tolerance that we'll iterate to, default is 1.0e-5
       alpha, beta, gamma= iteration parameters, i don't know what yet
                          defaults are 1.0, 0.5, 2.0, respectively.
       itmax= max number of iterations, default is 500
       restart= max. number of times to restart the algorithm
       cyl = if set, use cylindrical sources
       moff = if set, use cylindrical moffat fns, f=c/(1+r^2/r0^2)^moff(0)
       fixed_pos= if set, keep the position of the sources fixed at their
                  starting points
       fixed_rad=if set, keep the radii of the sources fixed
DESCRIPTION:
       Start with a gaussian, or number of gaussians near the middle of the
       image, vary the strength and positions of the gaussians to minimize
       chi^2. Uses the routine Amoeba_x for linear simplex minimization.
 CALLED BY:
	hxt_sources
MODIFICATION HISTORY:
       Stripped MAKIMG, built this, jmm, 14-mar-95
       Added initial image image0, 16-mar-95, jmm
       1-Aug-95  (jmm) - removed call to GETVAR, since the systematic error is added
                         in in HXTIMG_ACCUM now


makimg_g1 $SSW/yohkoh/ucon/idl/mctiernan/makimg_g1.pro
[Previous] [Next]
NAME:
	makimg_g1
PURPOSE:
	Image synthesis subroutine, forward fitting, makimg_g1 tries to
       fit a user-defined number of gaussian sources to the HXT data.
       makimg_g1 allows for a constant non-zero background level
CALLING SEQUENCE:
 Makimg_g1, ictrl, hxi_index, index1, image0, fobs, sig, p, index_out, data_out, $
              Chi_limit=chi_limit, n_sources=n_sources, Cyl=cyl, moff=moff, $
              ftol=ftol, alpha=alpha, beta=beta, gamma=gamma, itmax=itmax, $
              restart=restart, fixed_pos=fixed_pos, fixed_rad=fixed_rad, $
              source_pars=source_pars
INPUT:
	ictrl=1 enables us to look at intermediate data, or it 
		will, when implemented.
	hxi_index= a structure containing everything we need to know about the hxt image
	Tags used:
	hxi_index.grause(8)=Each element is either 0b or 255b, 
		If hxi_index.grause(j)=0b, then the Subcollimators with 
		spatial wave number j+1 aren't used in the calculation
	hxi_index.area= total area in cm^2 of scintillators
	hxi_index.gamma0= initial value of iteration gain
	hxi_index.laminc= initial value for lambda increment
	hxi_index.chilim= minimum value of chi^2 needed
	index1=index structure of the first data set in accumulation
       image0= and initial image, to find the ftootpoints...
	fobs= the observed counts in the SC's
	sig= the uncertainty in fobs = sqrt(fobs) kind of
	p= the 2-d modulation pattern, fobs(j)=total(b*p(*,*,j)), 
		where b is the brightness and j is the grid number
OUTPUT: (probably not used anymore)
	More tags for the structure hxi_index:
	hxi_index.lambda= final value of lambda, which controls the 
		iteration step size
	hxi_index.iteration= the number of iterations, for a given value of lambda
	hxi_index.delta= total((b(i)-b(i-1))^2)/Total(b(i)^2) for each iteration,	
		lambda is changed when delta is reduced to 0.030 or less
	hxi_index.chi2= chi^2, reduced = total((fobs(b(i))-fobs)^2/var)/usenum
		where usenum is the number of SC's used
	hxi_index.max_bright= maximum brightness of image
	hxi_index.x_max= Column of max. brightness
	hxi_index.y_max= row of max. brightness

	index_out= Hxi gen htx and hxi structure,...
	data_out= the brightness, a n_pixXn_pix array of
                 counts/cm^2/pixel^2, THE ANSWER. n_pix is obtained from
                 the mod pattern (18-jul-94, jmm)
KEYWORDS:
       n_sources= number of sources in the image, max is 3
       chi_limit = limiting chi^2, the default is 2.0
       source_pars= the source parameters, brightness, radius, x and y positions
                    and background
      amoeba_x keywords, for downhill simplex minimization
       ftol = fractional tolerance that we'll iterate to, default is 1.0e-5
       alpha, beta, gamma= iteration parameters, i don't know what yet
                          defaults are 1.0, 0.5, 2.0, respectively.
       itmax= max number of iterations, default is 500
       restart= max. number of times to restart the algorithm
       cyl = if set, use cylindrical sources
       moff = if set, use cylindrical moffat fns, f=c/(1+r^2/r0^2)^moff(0)
       fixed_pos= if set, keep the position of the sources fixed at their
                  starting points
       fixed_rad=if set, keep the radii of the sources fixed
DESCRIPTION:
       Start with a gaussian, or number of gaussians near the middle of the
       image, vary the strength and positions of the gaussians to minimize
       chi^2. Uses the routine Amoeba_x for linear simplex minimization.
 CALLED BY:
	hxt_sources
MODIFICATION HISTORY:
       Stripped MAKIMG, built this, jmm, 14-mar-95
       Added initial image image0, 16-mar-95, jmm
       1-Aug-95  (jmm) - removed call to GETVAR, since the systematic error is added
                         in in HXTIMG_ACCUM now


manual_toban $SSW/yohkoh/gen/idl/reformat/manual_toban.pro
[Previous] [Next]
NAME:
	manual_toban
PURPOSE:
	To give a mechanism for GO_TOBAN to be run manually.
HISTORY:
	Written 9-Feb-93 by M.Morrison
	10-Feb-93 (MDM) - Modified to have three options, not just the
			  SRSPAS option
	24-May-93 (MDM) - Added SRSGET/REFORMAT stage only option by
			  doing a "MTOBAN_NO_STEP2=1"
			  Only applicable in option 2
	18-Jun-93 (MDM) - Added MTOBAN_DSN option so that DSN data can
			  be reformatted if "MTOBAN_DSN=1"
	 7-Oct-93 (MDM) - Replaced /ys with $ys
	12-Nov-93 (MDM) - Modified header
	30-Nov-93 (MDM) - Modified to allow the job to be built and submitted
			  as a batch job.  If MTOBAN_BATCH=1, then build
			  the command and sumbit it as batch.  Only works for
			  option #1.
			- Made submitting it as a batch the default for option #1
	 1-Dec-93 (MDM) - Added check that if MTOBAN_SRSGET2=1, then run 
			  SRSGET2.


MANY_DAYS $SSW/yohkoh/ucon/idl/pike/many_days.pro
[Previous] [Next]
 NAME:
	MANY_DAYS
 PURPOSE:
	Runs bcs_24hr_plot over a period of many days
 CALLING SEQUENCE:  
	many_days,date,ndays
 INPUTS:
	date	start date for plots
	ndays	number of days to be plotted
 OPTIONAL INPUTS:
	nbid	if set, no blockid will be output (see BCS_24HR_PLOT)
 OUTPUTS:
	creates and prints plot file if to PS device
 OPTIONAL OUTPUTS:

 CALLS: ***
	BCS_24HR_PLOT [1], BCS_24HR_PLOT [2], BCS_24HR_PLOT [3], Ex2Int [1], Ex2Int [2]
	Int2Ex [1], Int2Ex [2], fmt_tim [1], fmt_tim [2], pprint [1], pprint [2]
	timstr2ex [1], timstr2ex [2]
 RESTRICTIONS:

 PROCEDURE:
	Calls BCS_24HR_PLOT for each day requested. NBID switch passed.
 MODIFICATION HISTORY:
	CDP  Aug 92
	RDB  27-Oct-92	Added NOBID switch
	RDB  04-Oct-93	Added /BDA to call to BCS_24HR_PLOT since now 
			defaults to OBServing logs.


map_bsc $SSW/yohkoh/bcs/idl/bsc/map_bsc.pro
[Previous] [Next]
 NAME:
	map_bsc
 PURPOSE:
	plot 2d maps of BSC data (time vs wavelength)
 CALLING SEQUENCE:
	map_bsc,bsc_index,bsc_data
 INPUTS:
       BSC_INDEX    - BSC index structures
       BSC_DATA     - BSC data structure
 KEYWORDS:
       CHAN         - channel to plot
       FILE         - file from which to read BSC index and data
       TSTART, TEND - string start and end times (e.g. '09:00')
       XSPACE,YSPACE- shift amounts in x and y directions
 CALLS: ***
	BSC_CHAN, BSC_CHECK [1], BSC_CHECK [2], GT_BSC_CRATE, GT_BSC_TIME, SEL_BSC, WDEF [1]
	WDEF [2], msplot
 PROCEDURE:
       based on JTM's MPLOT
 HISTORY:
       Written Mar'93 by D. Zarro (ARC)


MARKS2BOX $SSW/yohkoh/ucon/idl/hudson/marks2box.pro
[Previous] [Next]
 NAME:
	MARKS2BOX.PRO
 PURPOSE:
	show the locations of the LCUR_IMAGE boxes on an image
 CATEGORY:
	Yohkoh
 CALLING SEQUENCE:
	marks2box, image, marks, scale=scale
 INPUTS:
	an image
	marks returned from lcur_image, marks=marks
 OPTIONAL (KEYWORD) INPUT PARAMETERS:
	scale to magnify
 OUTPUTS:
	presents an image on the current window at the scale chosen
 CALLS: ***
	CLEAR_UTPLOT [1], CLEAR_UTPLOT [2], clearplot [1], clearplot [2]
	draw_boxcorn [1], draw_boxcorn [2]
 SIDE EFFECTS:
 RESTRICTIONS:
 MODIFICATION HISTORY:
	HSH 29-Aug-94, written
	JIK  5-Oct-94, fixed to outline the pixels properly
       HSH  5-Jan-95, added coordinate outputs via /print 


match_header $SSW/yohkoh/ucon/idl/bentley/match_header.pro
[Previous] [Next]

  Procedure to check that the fheader structure returned by test_rd
  has the same time values as those contained in the dp_sync structure.
  An error message is output if a problem is found.

  RDB?  91


match_index [1] $SSW/yohkoh/sxt/idl/atest/match_index.pro
[Previous] [Next]
   Name: match_index

   Purpose: return ss for 'closest' match of index1 in index2 array
            (fuzzy logic since it was written during ISAS visit)

   Input Parameters:
      index1, index2 - index or roadmap records 

   Keyword Parameters:
      dpe     - if set, match i1:i2 dpe 
      res     - if set, match i1:i2 resolution
      expmode - if set, match i1:specified mode
      point - if set, choose minimum pointing seperation (if multiple matches)
      delta -  (output), deltaT for matching records 
      pdelta - (output), delta Pointing (arcsecs), only if POINT is set
      ccdtemp - if set, match CCDTEMP (+/- specified degrees)
   Output:
      output are indices (lonarr) relative to index2 (-1 = no match)

   Calling Sequence:
      ss= match_index(index1,index2 , /res, /dpe) 		

   Match Criteria:
      filterA=flterA				    ; always
      filterB=filterB
      expmodeA=expmodeB
      if (dpe) then dpeB=dpe			    ; 
      if (res) then above AND resA=resB	    ;
      if (point) then minimal seperation satisfying above
      Then, choose closest time satisfying above     ; before/after date?
  
   9-Dec-1994 (SLF) - SDC matches originally , but useful elsewhere?
  10-dec-1994 (SLF) - tweaked etc...
  17-mar-1995 (SLF) - logic correction (courtesy kevin reardon)
  16-apr-1995 (SLF) - add SEPERATION keyword (output)
  10-oct-1996 (SLF) - add CCD TEMP check
  23-Jan-1998 (SLF) - include Solar Radius if /point is set
   4-Feb-1998 (SLF) - protect agains only one SFC per filter/era
  25-apr-1999 (SLF) - add /ROLL keyword (include roll in) made noroll default

 CALLS: ***
	gt_pix_size, his_index, sxt_cen [1], sxt_cen [2], tim2dset [1], tim2dset [2]
 CALLED BY:
	mk_sfc [1], mk_sfc [2], plot_sxg, sel_leak_image [1], sel_leak_image [3]
	sel_leak_image [4]
   Side effects: - history record will be appended to index2 if
                   keyword POINT is set and no history exists already


match_index [2] $SSW/yohkoh/sxt/idl/util/match_index.pro
[Previous] [Next]
   Name: match_index

   Purpose: return ss for 'closest' match of index1 in index2 array
            (fuzzy logic since it was written during ISAS visit)

   Input Parameters:
      index1, index2 - index or roadmap records 

   Keyword Parameters:
      dpe     - if set, match i1:i2 dpe 
      res     - if set, match i1:i2 resolution
      expmode - if set, match i1:specified mode
      point - if set, choose minimum pointing seperation (if multiple matches)
      delta -  (output), deltaT for matching records 
      pdelta - (output), delta Pointing (arcsecs), only if POINT is set
      ccdtemp - if set, match CCDTEMP (+/- specified degrees)
   Output:
      output are indices (lonarr) relative to index2 (-1 = no match)

   Calling Sequence:
      ss= match_index(index1,index2 , /res, /dpe) 		

   Match Criteria:
      filterA=flterA				    ; always
      filterB=filterB
      expmodeA=expmodeB
      if (dpe) then dpeB=dpe			    ; 
      if (res) then above AND resA=resB	    ;
      if (point) then minimal seperation satisfying above
      Then, choose closest time satisfying above     ; before/after date?
  
   9-Dec-1994 (SLF) - SDC matches originally , but useful elsewhere?
  10-dec-1994 (SLF) - tweaked etc...
  17-mar-1995 (SLF) - logic correction (courtesy kevin reardon)
  16-apr-1995 (SLF) - add SEPERATION keyword (output)
  10-oct-1996 (SLF) - add CCD TEMP check

 CALLS: ***
	gt_pix_size, his_index, sxt_cen [1], sxt_cen [2], tim2dset [1], tim2dset [2]
 CALLED BY:
	mk_sfc [1], mk_sfc [2], plot_sxg, sel_leak_image [1], sel_leak_image [3]
	sel_leak_image [4]
   Side effects: - history record will be appended to index2 if
                   keyword POINT is set and no history exists already


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


 PURPOSE: to convert a variable type to match another


 METHOD: use size on the target variable, then a case statement
	  for each type, and standard IDL conversion routines.

 CALLING SEQUENCE:  out=match_type(indat,tgrt)


 PARAMETERS:	indat	data to be converted
		trgt	data whose type you want to match
		out	a variable with type matching TRGT.       

 CALLED BY:
	rect_rot, rm_darklimb
 HISTORY: Drafted by A. McAllister, March 1993.


matchem [1] $SSW/yohkoh/gen/galileo/idl/lmsal/matchem.pro
[Previous] [Next]
 NAME:
	matchem

 PURPOSE:
	To find the common indices between arrays aa and bb.

 CALLING SEQUENCE:   
	iiaa = matchem(aa,bb)

 PROCEDURES CALLED
	delind

 CALLS: ***
	UNIQ [1], UNIQ [2], UNIQ [3], delind [1], delind [2]
 CALLED BY:
	sxt_clean [1], sxt_clean [2]
 HISTORY:  
	Written by LWA on 3-Jan-96.
	Rewritten using delind, LWA, 1/13/96.
	Updated header, LWA, 1/15/96
	   Handled case of aa larger than bb.
	   Handled case of no common elements.
	Case of non-unique elements, LWA, 1/27/96.
	Replaced delind with kill_index, LWA, 8/02/00.
	Back to use of delind.pro, now that it is fixed.  LWA  10/25/05
	   Handle case of all common elements.


matchem [2] $SSW/yohkoh/ucon/idl/acton/matchem.pro
[Previous] [Next]
 NAME:
	matchem

 PURPOSE:
	To find the common indices between arrays aa and bb.

 CALLING SEQUENCE:   
	iiaa = matchem(aa,bb)

 PROCEDURES CALLED
	delind

 CALLS: ***
	UNIQ [1], UNIQ [2], UNIQ [3], delind [1], delind [2]
 CALLED BY:
	sxt_clean [1], sxt_clean [2]
 HISTORY:  
	Written by LWA on 3-Jan-96.
	Rewritten using delind, LWA, 1/13/96.
	Updated header, LWA, 1/15/96
	   Handled case of aa larger than bb.
	   Handled case of no common elements.
	Case of non-unique elements, LWA, 1/27/96.


maxspect [2] $SSW/yohkoh/gen/idl/util/maxspect.pro
[Previous] [Next]
	NAME: maxspect

	Purpose: compute the maximum image size given the size of the
		image and display.

	Calling Sequence:
		maxspect, ximg, yimg, xwin, ywin, nxsize, nysize

	where,
	
	INPUT:
		ximg	is the image size in x-dim.
		yimg	is the image size in y-dim.
		xwin	is the window size in x-dim.
		ywin	is the window size in y-dim.
	OUTPUT:
		nxsize	is the new maximum size image with same aspect ratio
		nysize  is the new maximum size image with same aspect ratio

 CALLED BY:
	mk_movie [1], mk_movie [2], mk_ptv_movie
	History:
		written 30-Jun-94, gal


may_eclipse $SSW/yohkoh/ucon/idl/hudson/may_eclipse.pro
[Previous] [Next]
 NAME:
	may_eclipse
 PURPOSE:
	enter Soma-san's calculations for the May 1994 eclipse of Yohkoh
 CATEGORY:
	Yohkoh
 CALLING SEQUENCE:
	may_data, data,
 INPUTS:
	none. Uses hard-wired data file
 OPTIONAL (KEYWORD) INPUT PARAMETERS:
 OUTPUTS:
	structure with many things
 CALLS: ***
	DAY_IN, RDFILE [1], RDFILE [2], anytim [1], anytim [2], anytim [3], anytim [4]
	anytim [5], rd_fem, saa_in [1], saa_in [2]
 MODIFICATION HISTORY:
	HSH written 8 April 1994
	HSH added d/n and saa 10 April 1994


mbe2sec $SSW/yohkoh/sxt/idl/util/mbe2sec.pro
[Previous] [Next]
	Name:
		mbe2sec	
	Purpose:
	 	Convert the mailbox exposure level, mbe, to time in sec.
	Input:
		mbExpLevel	mailbox exposure level
	Output: 
		Function returns commanded exposure time in sec.
 CALLED BY:
	GetStrExpLev
	History:
		Written 18-Sep-91: JRL


mc_unc $SSW/yohkoh/ucon/idl/mctiernan/mc_unc.pro
[Previous] [Next]
NAME:
      mc_unc
PURPOSE:
      A brand new monte carlo test to obtain uncertainties in an SXT pixel
CALLING SEQUENCE:
      Mc_unc, te, em, s_te, s_em, fb1, fb2, dt1=dt1, dt2=dt2, niter=niter, $
              xxx=xxx, date=date, dnp_str=dnp_str, dnp_av=dnp_av, $
              no_mc=no_mc, b1=b1, b2=b2, i_values=i_values, goods = goods
INPUT:
      te= input temperature in Logs of t, note that this must be a scalar
      em= input em in logs of em, note that this must be a scalar
      fb1, fb2= filter numbers for the appropriate filters,
                may be index structures
OUTPUT:
      te= temperature in Logs of t, overwrites input te, i don't care.
      em= em in logs of em, overwrites input em, i don't care.
      s_te= uncertainty in te
      s_em= uncertainty in em
KEYWORDS:
      dt1, dt2= exposure times for the two filters in ms, as given
                by gt_expdur.pro, defaults are 10ms, may be arrays.
      niter= number of iterations for monte carlo calculation, default is 1000
      xxx=if not set, then use sxt_flux.pro to get ccd e's and p's, if set,
          uses sxt_dn_int to do calculation.
      date= time in any format (including structure). Used to
            determine entrance filter transmission. 
            this will override any date given if fb1 and fb2 are structures.
            The default is as of yet unknown.
      dnp_str= the distributions of dn's and photons, te's and em's,
               tags are te, em, dn1, dn2, p1, p2
      dnp_av= averages and dispersions in dn1, dn2, p1, p2
      no_mc= if set, don't bother with the iteration
      b1, b2= background DN's, defaults are b1, b2=13
      i_values= the initial values of te, em, s_te, s_em, dn1, dn2, p1, p2
                in a structure
      goods= subscripts of the array elements that are ok
 CALLS: ***
	POIDEV, SXT_TEEM [1], SXT_TEEM [2], sxt_comp, sxt_decomp [1], sxt_decomp [2]
	sxt_dn_int, sxt_flux [1], sxt_flux [2], sxt_flux [3]
RESTRICTIONS:
      DATE or FRAC_OPEN (if specified) must be length 1.  If the date is
      obtained from FILTER (= SXT index), the first time in the structure
      will be used to determine the entrance filter fraction.
 
      If the dates of interest span the time of 13-nov-92 16:50 UT, then 
      separate calls must be made for data before and after this date.
HISTORY: 
      6-JUN-94 by JMM
      12-jul-94, changed units from e47, t6 to em, te
      12-jan-94, changed dispersion calculation to
                 sigma=sqrt(total((x-xbar)^2)/(n-1)), jmm


MEM_CHECKSUM $SSW/yohkoh/bcs/idl/micro/mem_checksum.pro
[Previous] [Next]
 NAME:
	MEM_CHECKSUM
 PURPOSE:
	Calculates the checksum for the BCS micro memory
 CATEGORY:
 CALLING SEQUENCE:
	checksum = mem_checksum(full_memory)
 INPUTS:
	full_memory	Image of BCS micro memory
 OPTIONAL INPUT PARAMETERS:
 KEYWORD PARAMETERS:
 OUTPUTS:
	checksum	XOR checksum between 2000'x and 35ff'x
 OPTIONAL OUTPUT PARAMETERS:
 COMMON BLOCKS:
 SIDE EFFECTS:
 RESTRICTIONS:
	Image must start from at 0000'x and go at least to 035ff'x
 PROCEDURE:
 MODIFICATION HISTORY:
	RDB  20-Jul-92
	RDB  16-May-94	Split into seperate routine


MEMCHK_TIMES $SSW/yohkoh/bcs/idl/micro/memchk_times.pro
[Previous] [Next]
 NAME:
	MEMCHK_TIMES
 PURPOSE:
	Determines the times of changes in state of the MEM_CHECK flag
	Short transitions due to bad frames are filtered out.
 CALLING SEQUENCE:  
	MEMCHK_TIMES,DP_SYNC [,/print]
 INPUT:
	DP_SYNC		structure
 KEYWORD INPUT:
	PRINT		If set, the results are printed
 OUTPUT:
	produces "mem_chk.lis" on current directory
 OPTIONAL OUTPUT:

 HISTORY
	RDB,	19-Feb-92	Written
	RDB,	10-May-92	Added /PRINT option
 CALLS:
 CALLED BY
	FIND_SEU


merc_lwa $SSW/yohkoh/ucon/idl/acton/merc_lwa.pro
[Previous] [Next]
   Name: merc_lwa

   Purpose: read/display genx files 

 CALLS: ***
	DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], WDEF [1], WDEF [2], delvarx [5]
	prstr [1], prstr [2], restgen [1], restgen [2], wmenu_sel [1], wmenu_sel [2]
   Optional Keyword Input:
	/notv, set this if you only desire to read the text output.
	/no_rgb, set this if you wish to use your own color table.

   History:
      7-Nov-1993 (SLF) Written for mercury picture display
     10-Nov-1993 (SLF) allow r,g,b parameters, auto size window if too small
     10-Nov-1993 (LWA) added header info and no_rgb keyword
			and changed name to merc_lwa

   Side Effects:
      may open a new window


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

   Purpose: read/display genx files 

   History:
      7-Nov-1993 (SLF) Written for mercury picture display
     10-Nov-1993 (SLF) allow r,g,b parameters, auto size window if too small
     11-Nov-1993 (SLF) add norgb switch, add delvarx,r,g,b

 CALLS: ***
	DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], WDEF [1], WDEF [2], delvarx [5]
	prstr [1], prstr [2], restgen [1], restgen [2], wmenu_sel [1], wmenu_sel [2]
   Side Effects:
      may open a new window


mewe_solar $SSW/yohkoh/ucon/idl/lemen/mewe_solar.pro
[Previous] [Next]
  NAME:
    mewe_solar
  PURPOSE:
    Create the mewe_solar.genx spectral-line data file from the
    file /ys/sxt/resposne/mewe_cosmic.genx 

    Uses Meyer 1985 "adopted coronal" values.

  MODIFICATION HISTORY:
   25-feb-93, J. R. Lemen, LPARL


mewe_spec mewe_spec_lwa $SSW/yohkoh/ucon/idl/acton/mewe_spec_lwa.pro
[Previous] [Next]
  NAME:
    mewe_spec = mewe_spec_lwa
  PURPOSE:
    Compute a Mewe thermal spectrum (line + continuum) for EM=1.e44 cm^-3
  CALLING SEQUENCE:
    Flux = mewe_spec(Te6,wave)			; ph s-1 
    Flux = mewe_spec(Te6,wave,/photon)		; ph s-1
    Flux = mewe_spec(Te6,wave,/erg)		; erg s-1
    Flux = mewe_spec(Te6,wave,/cosmic)		; Cosmic abundances

  INPUTS:
    Te6	= Electron Temperature in MK (may be a vector)
    Wave	= Vector of wavelengths (Ang) (centers of the wavelength bins)
		  or, if keyword EDGES is set, either
		  a 2xN array of the 2 wavelength edges of N bins, or,
                 a 1-d vector of the bin edges (Ang).
		  Unequal wavelength bins and non-integer wavelengths
		  are acceptable.

  OUTPUTS:
    Flux	= Fluxes in ph s-1 or erg s-1 (total flux with each bin)
			Fluxes = fltarr(N_elements(Te6),N_elements(wave))

  OPTIONAL INPUT KEYWORDS:
    Photon	= If set, calculation is made in ph s-1 (default)
    Erg	= If set, calculation is made in erg s-1
    Cosmic	= If set, use cosmic abundances (solar is default)
    Edges	= If set, interpret Wave as a 2xN set of wavelength boundaries
    file_in	= To specify the input file for linflx explicity.
  OPTIONAL OUTPUT KEYWORDS:
    Abun       = Abundances used for calculation
    elem       = Elements corresponding to the abundances
    cont_flux	= Continuum flux alone (without line contribution).
    dwave	= Widths of wavelength bins (Ang)
    wave_range = Interval over which lines are extracted (Ang)
    wave4plot  = Bin-center wavelengths for plotting purposes (Ang)

  METHOD:
    Calls linflx and conflx.  Linflx reads the line data from either
    $DIR_SXT_SENSITIVE/mewe_cosmic.genx or $DIR_SXT_SENSITIVE/mewe_solar.genx

    The mewe_cosmic.genx file is taken from the following references:

    Mewe, Gronenschild, van den Oord, 1985, (Paper V)  A. & A. Suppl., 62, 197
    Mewe, Lemen, and van den Oord,    1986, (Paper VI) A. & A. Suppl., 65, 511

  PROGRAMS CALLED:
	conflx_binner, conflx, linflx, sort, rebin, transpose, total, reform

 CALLS: ***
	CONFLX [1], CONFLX [2], DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4]
	MEWE_SPEC_LWA, UNIQ [1], UNIQ [2], UNIQ [3], conflx_binner, delvarx [5], linflx [1]
	linflx [2]
  MODIFICATION HISTORY:
    29-oct-92, Written, J. R. Lemen, LPARL
    25-feb-93, JRL, Added /cosmic option
     7-jul-93, JRL, Added the file_in= keyword
     8-jun-94, JMM, Added IF block to avoid crashing when the line
                    flux comes out to be zero. 
    13-jul-94, JRL, Added /edges a la R. A. Schwartz cira 1993
     2-aug-94, JRL, Added the file_in= keyword (again!). Changed header.
    21-Jun-95, JRL, linflx changed to assume EM=1.e44 cm-3
     6-Jan-96, JRL, Added the Mewe et al references to the header
    11-Jun-96, LWA, Improved continuum calculation for cases of unequal
		     wavelength bin widths or wide bins.  Removed
		     requirement for 2xN wavelength array for /edges.
    13-Jun-96, LWA, Dumb repair to handle single temperature case.
		     Allowed the 2xN wave for /edges for consistency.
    25-Jun-96, LWA, Revised logic to split line flux between adjacent
		     wavelength bins when wavelength of line and bin
		     edge are at the same wavelength.


mewe_spec [2] $SSW/yohkoh/gen/idl/spectra/mewe_spec.pro
[Previous] [Next]
  NAME:
    mewe_spec
  PURPOSE:
    Compute a Mewe thermal spectrum (line + continuum) for EM=1.e44 cm^-3
  CALLING SEQUENCE:
    Flux = mewe_spec(Te6,wave)			; ph s-1 
    Flux = mewe_spec(Te6,wave,/photon)		; ph s-1
    Flux = mewe_spec(Te6,wave,/erg)		; erg s-1
    Flux = mewe_spec(Te6,wave,/cosmic)		; Cosmic abundances

  INPUTS:
    Te6	= Electron Temperature in MK (may be a vector)
    Wave	= Vector of wavelengths (Ang) (centers of the wavelength bins)
		  or, if keyword EDGES is set,
		  a 2xN array of the 2 wavelength edges of N bins.

  OUTPUTS:
    Flux	= Fluxes in ph s-1 or erg s-1 (total flux with each bin)
			Fluxes = fltarr(N_elements(Te6),N_elements(wave))

  OPTIONAL INPUT KEYWORDS:
    Photon	= If set, calculation is made in ph s-1 (default)
    Erg	= If set, calculation is made in erg s-1
    Cosmic	= If set, use cosmic abundances (solar is default)
    Edges	= If set, interpret Wave as a 2xN set of wavelength boundaries
    file_in	= To specify the input file for linflx explicity.
  OPTIONAL OUTPUT KEYWORDS:
    Abun       = Abundances used for calculation
    elem       = Elements corresponding to the abundances
    cont_flux	= Continuum flux alone (without line contribution).
    dwave	= Widths of wavelength bins (Ang)
    wave_range = Interval over which lines are extracted (Ang)

  METHOD:
    Calls linflx and conflx.  Linflx reads the line data from either
    $DIR_SXT_SENSITIVE/mewe_cosmic.genx or $DIR_SXT_SENSITIVE/mewe_solar.genx

    The mewe_cosmic.genx file is taken from the following references:

    Mewe, Gronenschild, van den Oord, 1985, (Paper V)  A. & A. Suppl., 62, 197
    Mewe, Lemen, and van den Oord,    1986, (Paper VI) A. & A. Suppl., 65, 511

    The solar coronal abundances in mewe_solar.genx a adapted from:

    Meyer, J.-P., 1985, ApJ Suppl., 57, 173.

 CALLS: ***
	CONFLX [1], CONFLX [2], DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], UNIQ [1]
	UNIQ [2], UNIQ [3], delvarx [5], linflx [1], linflx [2]
 CALLED BY:
	MAKE_GOES_RESP, ROUTINE_NAME [1], SXT_THERM, SXT_THERM_EBAR, SXT_WEIGHT
	THERMAL_KEV, dfx_1th_lo, dfx_thppl_lo, fdf10_init, fx_1th_lo, get_slider, model_spec
	out_spectra_4_designer, set_field, sxt_dn_int, sxt_erg_per_dn, sxt_etemp
	tem_thermal_power
  MODIFICATION HISTORY:
    29-oct-92, Written, J. R. Lemen, LPARL
    25-feb-93, JRL, Added /cosmic option
     7-jul-93, JRL, Added the file_in= keyword
     8-jun-94, JMM, Added IF block to avoid crashing when the line
                    flux comes out to be zero. 
    13-jul-94, JRL, Added /edges a la R. A. Schwartz cira 1993
     2-aug-94, JRL, Added the file_in= keyword (again!). Changed header.
    21-Jun-95, JRL, linflx changed to assume EM=1.e44 cm-3
     6-Jan-96, JRL, Added the Mewe et al references to the header
    16-Dec-96, LWA, Added the Meyer reference to the header.


minF_partan $SSW/yohkoh/ucon/idl/metcalf/minf_partan.pro
[Previous] [Next]
 NAME:
	minF_partan
 PURPOSE:
	Find the local minimum of a scalar function of several variables using 
	the Partan modification to the Conjugate Gradient method 
       (Fletcher-Reeves-Polak-Ribiere algorithm).
	Function may be anything with computable partial derivatives.
	Each call to minF_partan performs one iteration of algorithm,
	and returns an N-dim point closer to the local minimum of function.
 CALLING EXAMPLE:
	p_min = replicate( 1, N_dim )
	minF_partan, p_min, f_min, conv_factor, FUNC_NAME="name",/INITIALIZE

	while (conv_factor GT 0) do begin
		minF_partan, p_min, f_min, conv_factor, FUNC_NAME="name"
	endwhile
 INPUTS:
	p_min = vector of independent variables, location of minimum point
		obtained from previous call to minF_partan, (or first 
               guess).
 KEYWORDS:
	FUNC_NAME = function name (string)
		Calling mechanism should be:  F = func_name( px, gradient )
	  where:
		F = scalar value of function at px.
		px = vector of independent variables, input.
		gradient = vector of partial derivatives of the function
			with respect to independent variables, evaluated at px.
			This is an optional output parameter:
			gradient should not be calculated if parameter is not
			supplied in call (Unless you want to waste some time).
      /INIT must be specified on first call (whenever p_min is a guess),
			to initialize the iteration scheme of algorithm.
      /USE_DERIV causes the directional derivative of function to be used
			in the 1-D minimization part of algorithm
			(default is not to use directional derivative).
       /CONTINUED = Use continued ParTan rather than the default iterative 
                    ParTan.
	TOLERANCE = desired accuracy of minimum location, default=sqrt(1.e-7).
 OUTPUTS:
	p_min = vector giving improved solution for location of minimum point.
	f_min = value of function at p_min.
	conv_factor = gives the current rate of convergence (change in value),
			iteration should be stopped when rate gets near zero.
 EXTERNAL CALLS:
	pro minF_bracket,  to find 3 points which bracket the minimum in 1-D.
	pro minF_parabolic,  to find minimum point in 1-D.
	pro minF_parabol_D,  to find minimum point in 1-D, using derivatives.
 CALLS: ***
	MINF_BRACKET, MINF_PARABOLIC, MINF_PARABOL_D [2], minF_parabol_D [1]
 CALLED BY:
	HXTFPB, HXTFPB_FUZZY, PSFPIXON
 COMMON BLOCKS:
	common minf_partan, grad_conj, grad_save, gs_norm, last_p1,last_p2
	(to keep conjugate gradient, gradient and norm from previous iteration)
 PROCEDURE:
	Algorithm adapted from Numerical Recipes, sec.10.6 (p.305).
	Conjugate gradient is computed from gradient, which then gives
	the best direction (in N-dim space) in which to proceed to find
	the minimum point. The function is then minimized along
	this direction of conjugate gradient (a 1-D minimization).
	The algorithm is repeated starting at the new point by calling again.
 MODIFICATION HISTORY:
	Written, Frank Varosi NASA/GSFC 1992.
       T. Metcalf June 14, 1994  Modified minf_conj_grad.pro for the
            partan algorithm.


mk_aoslos $SSW/yohkoh/gen/idl/orbit/mk_aoslos.pro
[Previous] [Next]
 NAME:
    mk_aoslos
 PURPOSE:
    Create the AOSLOS raw ascii file for use by op_first_guess and 
    mk_dsn_predict.  This is a driver for run_dsnfil
 CALLING SEQUENCE:
   mk_aoslos,sttim,interval,num_interval,aoslos_file=aoslos_file,path=path
 INPUTS:
   sttim	= Starting time in any standard format
   interval	= Interval in sec
   num_interval= Number of intervals
 OPTIONAL INPUT KEYWORDS:
   path	= Output path of the aoslos file.
 OPTIONAL INTPUT KEYWORDS:
   keep	= Purge old versions, but keep this number.  
		  If not supplied or set to 0, no action.
 OPTIONAL OUTPUT KEYWORDS:
   aoslos_file = Name of the output file.
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], anytim2ex [1], anytim2ex [2]
	concat_dir [4], run_dsnfil
 CALLED BY:
	mk_op_file, mk_orbit_files
 MODIFICATION HISTORY:
   7-sep-92, J. R. Lemen, Written
  22-sep-92, JRL, Added keep keyword
   1-may-93, JRL, Added ASCA keyword
  13-Dec-99, JRL/SLF - remove file_purge (Y2K)


mk_att [1] $SSW/yohkoh/gen/idl/atest/mk_att.pro
[Previous] [Next]
NAME:
	mk_att
PURPOSE:
	To take the raw attitude summary file (ATR) and make the 
	processed pointing file (ATT)
INPUT:
	week_str- The week to process (ie: "93_24")
OPTIONAL KEYWORD OUTPUT:
	run_time- The number of minutes it took to run
 CALLS: ***
	ATT_STRUCT [1], ATT_STRUCT [2], CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3]
	FILE_EXIST [2], GEN_STRUCT [1], GEN_STRUCT [2], GET_NBYTES, HXA_PARMS [1]
	HXA_PARMS [2], HXA_PARMS [3], IRUHXASCAN2SXT [1], IRUHXASCAN2SXT [2]
	OBS_STRUCT [1], OBS_STRUCT [2], OPEN_DA_FILE, REF_STRUCT, Rd_NewOrb_p [1]
	Rd_NewOrb_p [2], Rd_Pointer [1], Rd_Pointer [2], Rd_fHeader [1], Rd_fHeader [2]
	Rd_fHeader [3], WRT1P_FH, anytim2ints [1], anytim2ints [2], concat_dir [4]
	file_exist [1], file_exist [3], fmt_tim [1], fmt_tim [2], rdwrt [1], rdwrt [2]
	rdwrt [3], read_genxcat, tim2orbit [1], tim2orbit [2]
HISTORY:
	Written 20-Jul-93 by M.Morrison
V1.1	10-May-94 (MDM) - Modified to not crash when two ADA files have
			  complete overlap and there is no new data to
			  write out
V1.2	29-Aug-94 (MDM) - Added print statement
			- Added OUTDIR and QSTOP option
V1.3	 2-Sep-94 (MDM) - Save ATT file with ATT prefix not ATR inside the
			  file header
			- Changed print statement to MK_ATT not MK_ATR finished
V1.4   24-Sep-94 (SLF) - set STATUS2 Correction Version number (currently,
			  only use hxa_params version number directly
V1.5	 8-Dec-94 (MDM) - Updated to work when there is no data, but there
			  is an orbit pointer entry
			- Also updated ProgVerNo which was not updated at V1.4
	31-Mar-99 (GLS) - Modified to include hxa_scan data in pointing solution.


mk_att [2] $SSW/yohkoh/gen/idl/reformat/mk_att.pro
[Previous] [Next]
NAME:
	mk_att
PURPOSE:
	To take the raw attitude summary file (ATR) and make the 
	processed pointing file (ATT)
INPUT:
	week_str- The week to process (ie: "93_24")
OPTIONAL KEYWORD OUTPUT:
	run_time- The number of minutes it took to run
 CALLS: ***
	ATT_STRUCT [1], ATT_STRUCT [2], CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3]
	FILE_EXIST [2], GEN_STRUCT [1], GEN_STRUCT [2], GET_NBYTES, HXA_PARMS [1]
	HXA_PARMS [2], HXA_PARMS [3], IRUHXASCAN2SXT [1], IRUHXASCAN2SXT [2]
	OBS_STRUCT [1], OBS_STRUCT [2], OPEN_DA_FILE, REF_STRUCT, Rd_NewOrb_p [1]
	Rd_NewOrb_p [2], Rd_Pointer [1], Rd_Pointer [2], Rd_fHeader [1], Rd_fHeader [2]
	Rd_fHeader [3], WRT1P_FH, anytim2ints [1], anytim2ints [2], concat_dir [4]
	file_exist [1], file_exist [3], fmt_tim [1], fmt_tim [2], rdwrt [1], rdwrt [2]
	rdwrt [3], read_genxcat, tim2orbit [1], tim2orbit [2]
HISTORY:
	Written 20-Jul-93 by M.Morrison
V1.1	10-May-94 (MDM) - Modified to not crash when two ADA files have
			  complete overlap and there is no new data to
			  write out
V1.2	29-Aug-94 (MDM) - Added print statement
			- Added OUTDIR and QSTOP option
V1.3	 2-Sep-94 (MDM) - Save ATT file with ATT prefix not ATR inside the
			  file header
			- Changed print statement to MK_ATT not MK_ATR finished
V1.4   24-Sep-94 (SLF) - set STATUS2 Correction Version number (currently,
			  only use hxa_params version number directly
V1.5	 8-Dec-94 (MDM) - Updated to work when there is no data, but there
			  is an orbit pointer entry
			- Also updated ProgVerNo which was not updated at V1.4


mk_bcs_spec $SSW/yohkoh/bcs/idl/bsc/mk_bcs_spec.pro
[Previous] [Next]
 NAME:
   mk_bcs_spec
 PURPOSE:
   Called by bcs_spec to compute a BCS spectrum (ph cm-2 s-1 Ang-1 at 1AU)
 CALLING SEQUENCE:
   spectrum = mk_bcs_spec(TDOPPW,ROCKW,wave1,wave0,intensity)
   spectrum = mk_bcs_spec(TDOPPW,ROCKW,wave1,wave0,intensity,vel=vel)

 INPUTS:
   TDOPPW	= FWHM of Gaussian line broadening term     (Ang)
   ROCKW	= FWHM of Lorentzian line broadening term   (Ang)
   Wave1	= A vector describing the start wavelength of a vector of bins. (Ang)
         	  bcs_spec will return n_elements(wave)-1 bins.
 		  Wave must be monotonically increasing or decreasing.
   wave0	= Vector of wavelengths corresponding to intensity. (Ang)
   intensity	= Vector of line or continuum intensities (photons s-1)
		  If TDOPPW=ROCKW=0, then assume intensity is ph s-1 Ang-1

 OPTIONAL INPUT KEYWORDS:
   velocity	= Line-of-sight velocity in km/s (negative is blue-shifted)
   Ashift	= Bulk wavelength shift

 OUTPUTS:
 CALLS: ***
	DSPLINE, WVOIGT
 CALLED BY:
	bcs_spec
   Note:  This routine normalizes to per Ang and puts the source at 1 AU
   Output spectrum is in photons/cm^2/sec/Ang at 1 AU

 MODIFICATION HISTORY:
  17-sep-93, J. R. Lemen (LPARL), Written
  29-oct-93, JRL, Fixed a bug with the Vel= option


MK_BSA $SSW/yohkoh/bcs/idl/bsc/mk_bsa.pro
[Previous] [Next]
 NAME:
	MK_BSA
 PURPOSE:
	to produce a BSA structure that contains information
       to guide the production of a BSC file via MK_BSC.
 CALLING SEQUENCE:
	MK_BSA,BDA_INDEX,BSA_INDEX
 INPUTS:          
	BDA_INDEX    - an array of BDA index (or roadmap) structures

       BSA_INDEX    - an initial BSC index structures with fields
                      set according to user specifications described below.
                      The BSA_INDEX will be input to MKBSC to create a BSC
                      file.
 KEYWORDS:
       CHANS        - channels to select:
                      e.g. CHANS=1 to select channel 1, 
                      CHANS=[1,4] to select channels 1 and 4, etc.
                      Default is [2,3,4] channels.

       ACCUM        - seconds of integration to accumulate spectrum:
                      e.g. ACCUM=3 to accumulate all desired channels 
                      with 3 second intervals; ACCUM=[3,10] to use 3 and 10
                      second intervals in channels selected via CHAN, etc.
                      Setting ACCUM=0 will deliver the highest available time
                      resolution. Default is 9 sec accumulation.

       THRESH       - threshold counts upon which to base accumulation time.
                      e.g. THRESH=100 to accumulate all desired channels
                      until 100 counts is reached; THRESH=[100,200] to 
                      accumulate data in channels selected via CHAN 
                      until 100 and 200 counts are reached, etc.
                      Default is NO threshold (THRESH=0).
      
       DEADTIME     - 0 = no deadtime correction
                      1 = use LIM/ACC DP_SYNC counts
                      2 = use SUM(LIM)/SUM(ACC) counts were SUM is taken over
                          channel 1 & 2, and 3 & 4.
       DT_INTERP    - 1 = interpolate zero deadtime factors
                        = do not interpolate

       FLUXCAL      - 1 = convert count rates to photon flux
                      0 = do not flux calibrate

       WAVECAL      - 1 = apply wavelength calibration to spectra
                      0 = do not wavelength calibrate
   
       BLOCKID      - Block ID to select (def=0; normal)

       MODEID       - Mode ID to select (def=all)

       XCORR        - 1 = apply crystal curvature corrections
                      0 = do not correct for curvature

       TRANGE       - [TSTART,TEND] time range to confine processing,
                      where TSTART.TIME=MSOD, TSTART.DAY=DS79, etc.
                      Default is to process all data times in BDA_INDEX.

       ERR          - 1 if failed else 0

 CALLS: ***
	MK_BSA_STC [1], MK_BSA_STC [2], mk_bsa_interv [1], mk_bsa_interv [2]
 PROCEDURE:
                      Calls MK_BSA_STC and MK_BSA_INTERV
 HISTORY:
                      Written Apr'93 by D. Zarro (Applied Research Corp).


mk_bsa_ans $SSW/yohkoh/bcs/idl/bsc/mk_bsa_ans.pro
[Previous] [Next]
 NAME:
       mk_bsa_ans
 PURPOSE:
       to create a low-level BSA structure
 CALLING SEQUENCE:
       bsa_ans=mk_bsa_ans()
 INPUTS:
       none
 OUTPUTS:
       bsa_ans = a structure
 CALLED BY:
	GET_BSA_ANS [1], GET_BSA_ANS [2], WBSA [1], WBSA [2]
 PROCEDURE:
   Creates a very low-level BSA answer structure
   that is later incorporated into the BSC_INDEX by MKBSA
 HISTORY:
   Written Jan'93 by DMZ (ARC)


mk_bsa_interv [1] $SSW/yohkoh/bcs/idl/atest/mk_bsa_interv.pro
[Previous] [Next]
 NAME:
	mk_bsa_interv
 PURPOSE:
      define accumulation time intervals for BSC data
 CALLING SEQUENCE:
	mk_bsa_interv,bda_index,bsa_index,trange=trange
 INPUTS:
	BDA_INDEX    - an array of BDA index (or roadmap) structures
       BSA_INDEX    - an array of initial BSC index structures with fields
                      set according to user specifications.

 OUTPUTS:          
       BSA_INDEX    - modified with start/stop intervals for accumulation

 KEYWORDS:
       ERR          - 1 if BSA_INTERV failed else 0
       TRANGE       - [TSTART,TEND] time range to confine processing,
                      where TSTART.TIME=MSOD, TSTART.DAY=DS79, etc.
                      Default is to process all data times in BDA_INDEX.
 CALLS: ***
	BSC_CHECK [1], BSC_CHECK [2], COMDIM2, fmt_tim [1], fmt_tim [2], gt_day [1]
	gt_day [2], gt_time [1], gt_time [2]
 CALLED BY:
	MK_BSA, MK_BSC [1], MK_BSC [2], WBDA [1], WBDA [2]
 PROCEDURE:
                      Uses TOTAL_CNTS in index to determine start and end
                      times for integration in each channel. Counts in each
                      channel will be integrated until summed accumulation
                      time is greater than or equal to specified  ACCUM.
                      If THRESH is set, then counts will be integrated until
                      summed counts are greater than or equal to specified THRESH.
                      If THRESH and ACCUM are both set, then accumulation is
                      increased until THRESH and ACCUM are reached.
                      (N.B. different channels can end up with different 
                      total numbers of accumulated samples).
 HISTORY:
                      - Written Apr'93 by D. Zarro (Applied Research Corp).
                      - removed concatanation to alleviate speed/memory probs.
                      - 12-Apr-94, Zarro, improved error checking
                      - 19-May-94, Zarro, added check for nonexistent channels
                      - 20-Jun-94, fixed potential overflow bug in total_cnts
                      - 26-Jan-95, added facility to flag BLOCKID change
                      - Apr'95   , switched off SAA/NIGHT check
                      - 31-Dec-2003, Zarro (L-3Com/GSFC) - made threshold/accumulation check 
                         consistent with documentation


mk_bsa_interv [2] $SSW/yohkoh/bcs/idl/bsc/mk_bsa_interv.pro
[Previous] [Next]
 NAME:
	mk_bsa_interv
 PURPOSE:
      define accumulation time intervals for BSC data
 CALLING SEQUENCE:
	mk_bsa_interv,bda_index,bsa_index,trange=trange
 INPUTS:
	BDA_INDEX    - an array of BDA index (or roadmap) structures
       BSA_INDEX    - an array of initial BSC index structures with fields
                      set according to user specifications.

 OUTPUTS:          
       BSA_INDEX    - modified with start/stop intervals for accumulation

 KEYWORDS:
       ERR          - 1 if BSA_INTERV failed else 0
       TRANGE       - [TSTART,TEND] time range to confine processing,
                      where TSTART.TIME=MSOD, TSTART.DAY=DS79, etc.
                      Default is to process all data times in BDA_INDEX.
 CALLS: ***
	BSC_CHECK [1], BSC_CHECK [2], COMDIM2, fmt_tim [1], fmt_tim [2], gt_day [1]
	gt_day [2], gt_time [1], gt_time [2]
 CALLED BY:
	MK_BSA, MK_BSC [1], MK_BSC [2], WBDA [1], WBDA [2]
 PROCEDURE:
                      Uses TOTAL_CNTS in index to determine start and end
                      times for integration in each channel. Counts in each
                      channel will be integrated until summed accumulation
                      time is greater than or equal to specified  ACCUM.
                      If THRESH is set, then counts will be integrated until
                      summed counts are greater than or equal to specified THRESH.
                      If THRESH and ACCUM are both set, then accumulation is
                      increased until THRESH and ACCUM are reached.
                      (N.B. different channels can end up with different 
                      total numbers of accumulated samples).
 HISTORY:
                      - Written Apr'93 by D. Zarro (Applied Research Corp).
                      - removed concatanation to alleviate speed/memory probs.
                      - 12-Apr-94, Zarro, improved error checking
                      - 19-May-94, Zarro, added check for nonexistent channels
                      - 20-Jun-94, fixed potential overflow bug in total_cnts
                      - 26-Jan-95, added facility to flag BLOCKID change
                      - Apr'95   , switched off SAA/NIGHT check


MK_BSA_STC [1] $SSW/yohkoh/bcs/idl/atest/mk_bsa_stc.pro
[Previous] [Next]
 NAME:
	MK_BSA_STC
 PURPOSE:
	to produce a BSA structure that contains information
       to guide production of a BSC file via MK_BSC.
 CALLING SEQUENCE:
	MK_BSA_STC, BSA_INDEX
 OUTPUTS:
       BSA_INDEX    - an initial BSC index structures with fields
                      set according to user specifications described below.
                      The BSA_INDEX is used in MK_BSC to create a BSC
                      file.
 KEYWORDS:
       CHANS        - channels to select:
                      e.g. CHANS=1 to select channel 1, 
                      CHANS=[1,4] to select channels 1 and 4, etc.
                      Default is [2,3,4] channels.

       ACCUM        - seconds of integration to accumulate spectrum:
                      e.g. ACCUM=3 to accumulate all desired channels 
                      with 3 second intervals; ACCUM=[3,10] to use 3 and 10
                      second intervals in channels selected via CHAN, etc.
                      Setting ACCUM=0 will deliver the highest available time
                      resolution. Default is 9 sec accumulation.

       THRESH       - threshold counts upon which to base accumulation time.
                      e.g. THRESH=100 to accumulate all desired channels
                      until 100 counts is reached; THRESH=[100,200] to 
                      accumulate data in channels selected via CHAN 
                      until 100 and 200 counts are reached, etc.
                      Default is NO threshold (THRESH=0).
      
       DEADTIME     - 0 = no deadtime correction
                      1 = use LIM/ACC DP_SYNC counts
                      2 = use SUM(LIM)/SUM(ACC) counts were SUM is taken over
                          channel 1 & 2, and 3 & 4.

       DT_INTERP    - 1 set zero deadtime factors to unity
                    - 2 keep zero deadtime factors as zero
                    - 3 interpolate out zero deadtime factors

       FLUXCAL      - 1 = convert count rates to photon flux
                      0 = do not flux calibrate

       WAVECAL      - 1 = apply wavelength calibration to spectra
                      0 = do not wavelength calibrate
   
       XCORR        - 1 = apply crystal curvature corrections
                      0 = do not correct for curvature

 CALLS: ***
	MK_BSC_STR [1], MK_BSC_STR [2]
 CALLED BY:
	MK_BSA, MK_BSC [1], MK_BSC [2], WBDA [1], WBDA [2]
 HISTORY:
        Written Apr'93 by D. Zarro (ARC)
        Modified Feb'94 by D. Zarro (ARC) -- added st$spacecraft tag to .BSC
        Modified Apr'95 by D. Zarro (ARC) -- added bad channel check
        Modified Mar'97 by D. Zarro (ARC) -- made DT_INTERP=0 the default


MK_BSA_STC [2] $SSW/yohkoh/bcs/idl/bsc/mk_bsa_stc.pro
[Previous] [Next]
 NAME:
	MK_BSA_STC
 PURPOSE:
	to produce a BSA structure that contains information
       to guide production of a BSC file via MK_BSC.
 CALLING SEQUENCE:
	MK_BSA_STC, BSA_INDEX
 OUTPUTS:
       BSA_INDEX    - an initial BSC index structures with fields
                      set according to user specifications described below.
                      The BSA_INDEX is used in MK_BSC to create a BSC
                      file.
 KEYWORDS:
       CHANS        - channels to select:
                      e.g. CHANS=1 to select channel 1, 
                      CHANS=[1,4] to select channels 1 and 4, etc.
                      Default is [2,3,4] channels.

       ACCUM        - seconds of integration to accumulate spectrum:
                      e.g. ACCUM=3 to accumulate all desired channels 
                      with 3 second intervals; ACCUM=[3,10] to use 3 and 10
                      second intervals in channels selected via CHAN, etc.
                      Setting ACCUM=0 will deliver the highest available time
                      resolution. Default is 9 sec accumulation.

       THRESH       - threshold counts upon which to base accumulation time.
                      e.g. THRESH=100 to accumulate all desired channels
                      until 100 counts is reached; THRESH=[100,200] to 
                      accumulate data in channels selected via CHAN 
                      until 100 and 200 counts are reached, etc.
                      Default is NO threshold (THRESH=0).
      
       DEADTIME     - 0 = no deadtime correction
                      1 = use LIM/ACC DP_SYNC counts
                      2 = use SUM(LIM)/SUM(ACC) counts were SUM is taken over
                          channel 1 & 2, and 3 & 4.

       DT_INTERP    - 1 = interpolate zero deadtime factors
                        = do not interpolate

       FLUXCAL      - 1 = convert count rates to photon flux
                      0 = do not flux calibrate

       WAVECAL      - 1 = apply wavelength calibration to spectra
                      0 = do not wavelength calibrate
   
       XCORR        - 1 = apply crystal curvature corrections
                      0 = do not correct for curvature

 CALLS: ***
	MK_BSC_STR [1], MK_BSC_STR [2]
 CALLED BY:
	MK_BSA, MK_BSC [1], MK_BSC [2], WBDA [1], WBDA [2]
 HISTORY:
        Written Apr'93 by D. Zarro (ARC)
        Modified Feb'94 by D. Zarro (ARC) -- added st$spacecraft tag to .BSC
        Modified Apr'95 by D. Zarro (ARC) -- added bad channel check


MK_BSC [1] $SSW/yohkoh/bcs/idl/atest/mk_bsc.pro
[Previous] [Next]
 NAME:
       MK_BSC
 PURPOSE:
       to make BSC data
 CALLING SEQUENCE:
       MK_BSC, BDA_INDEX, BDA_DATA,BSC_INDEX,BSC_DATA,DP_SYNC=DP_SYNC
 INPUTS:
       BDA_INDEX    - BDA index structures  (from YODAT)
       BDA_DATA     - BDA data array
 OUTPUTS:
       BSC_INDEX    - BSC index structure
       BSC_DATA     - BSC data structure
 KEYWORDS:
       DEF          - if set, then use defaults
       DP_SYNC      - input DP_SYNC array (needed for deadtime correction)
       LAST         - use information already contained in latest BSC index
       BSA          - just compute BSC index and stop
       SAVE         - save BCS index and/or data in a BSC file
                      (if FILE is not a string, then file name is constructed
                       from start time and date of BSC data)
       WID          - use widget option
       VERBOSE      - verbose output
       CHANS, ACCUM, THRESH - channels, accumulation times, thresholds
       MODEID       - modeid to select  [def = all]
       BLOCKID      - blockid to select [def = all]
       IMODEID      - modeid to ignore  [def = none]
       IBLOCKID     - blockid to ignore [def = 5]

 CALLED BY:
	first_bcs
 PROCEDURE:        
       Prompts user for starting parameters for MKBSC
       User can opt to write a BSA file (which contains just the BSC_INDEX)
       or a BSC file (which contains the BSC INDEX and DATA structures).

      
       Calls: ***
	BSC_CHECK [1], BSC_CHECK [2], DATATYPE [1], DATATYPE [2], DATATYPE [3]
	GET_BSA_ANS [1], GET_BSA_ANS [2], GT_BDA_MODE [1], GT_BDA_MODE [2]
	MK_BSA_STC [1], MK_BSA_STC [2], MK_BSC_DATA [1], MK_BSC_DATA [2], RD_BDA [1]
	RD_BDA [2], anytim2ex [1], anytim2ex [2], bcs_trange, mk_bsa_interv [1]
	mk_bsa_interv [2], sav_bsc
       Calls: ***
	BSC_CHECK [1], BSC_CHECK [2], DATATYPE [1], DATATYPE [2], DATATYPE [3]
	GET_BSA_ANS [1], GET_BSA_ANS [2], GT_BDA_MODE [1], GT_BDA_MODE [2]
	MK_BSA_STC [1], MK_BSA_STC [2], MK_BSC_DATA [1], MK_BSC_DATA [2], RD_BDA [1]
	RD_BDA [2], anytim2ex [1], anytim2ex [2], bcs_trange, mk_bsa_interv [1]
	mk_bsa_interv [2], sav_bsc
       Calls: ***
	BSC_CHECK [1], BSC_CHECK [2], DATATYPE [1], DATATYPE [2], DATATYPE [3]
	GET_BSA_ANS [1], GET_BSA_ANS [2], GT_BDA_MODE [1], GT_BDA_MODE [2]
	MK_BSA_STC [1], MK_BSA_STC [2], MK_BSC_DATA [1], MK_BSC_DATA [2], RD_BDA [1]
	RD_BDA [2], anytim2ex [1], anytim2ex [2], bcs_trange, mk_bsa_interv [1]
	mk_bsa_interv [2], sav_bsc
       Calls: ***
	BSC_CHECK [1], BSC_CHECK [2], DATATYPE [1], DATATYPE [2], DATATYPE [3]
	GET_BSA_ANS [1], GET_BSA_ANS [2], GT_BDA_MODE [1], GT_BDA_MODE [2]
	MK_BSA_STC [1], MK_BSA_STC [2], MK_BSC_DATA [1], MK_BSC_DATA [2], RD_BDA [1]
	RD_BDA [2], anytim2ex [1], anytim2ex [2], bcs_trange, mk_bsa_interv [1]
	mk_bsa_interv [2], sav_bsc
       Calls: ***
	BSC_CHECK [1], BSC_CHECK [2], DATATYPE [1], DATATYPE [2], DATATYPE [3]
	GET_BSA_ANS [1], GET_BSA_ANS [2], GT_BDA_MODE [1], GT_BDA_MODE [2]
	MK_BSA_STC [1], MK_BSA_STC [2], MK_BSC_DATA [1], MK_BSC_DATA [2], RD_BDA [1]
	RD_BDA [2], anytim2ex [1], anytim2ex [2], bcs_trange, mk_bsa_interv [1]
	mk_bsa_interv [2], sav_bsc
 HISTORY:
       Nov'92, DMZ (ARC) - written
       Apr'93, DMZ,  -- added COMMON for DP_SYNC
       Oct'93, DMZ   -- added check for valid_ans
       1-Nov-93, DMZ -- added CHANS, ACCUM, and THRESH keywords
      12-Apr-94, DMZ -- fixed bug introduced 1-Nov-93
      18-May-94, DMZ -- added modeid keyword
      16-Jun-94, DMZ -- added more error checking of inputs
      27-Jan-95, DMZ -- added BLOCKID keyword
       1-Apr-95, DMZ  -- added filter for MODE and BLOCK IDS
      29-Jun-95, DMZ  -- added ignore option for MODE and BLOCK ID filter
      18-Dec-95, DMZ  -- added check so that BSC_VALID uses correct NBINS
                         when /LAST is set
      17-Mar-97, DMZ  -- passed VERBOSE to MK_BSC_DATA


MK_BSC [2] $SSW/yohkoh/bcs/idl/bsc/mk_bsc.pro
[Previous] [Next]
 NAME:
       MK_BSC
 PURPOSE:
       to make BSC data
 CALLING SEQUENCE:
       MK_BSC, BDA_INDEX, BDA_DATA,BSC_INDEX,BSC_DATA,DP_SYNC=DP_SYNC
 INPUTS:
       BDA_INDEX    - BDA index structures  (from YODAT)
       BDA_DATA     - BDA data array
 OUTPUTS:
       BSC_INDEX    - BSC index structure
       BSC_DATA     - BSC data structure
 KEYWORDS:
       DEF          - if set, then use defaults
       DP_SYNC      - input DP_SYNC array (needed for deadtime correction)
       LAST         - use information already contained in latest BSC index
       BSA          - just compute BSC index and stop
       SAVE         - save BCS index and/or data in a BSC file
                      (if FILE is not a string, then file name is constructed
                       from start time and date of BSC data)
       WID          - use widget option
       VERBOSE      - verbose output
       CHANS, ACCUM, THRESH - channels, accumulation times, thresholds
       MODEID       - modeid to select  [def = all]
       BLOCKID      - blockid to select [def = all]
       IMODEID      - modeid to ignore  [def = none]
       IBLOCKID     - blockid to ignore [def = 5]

 CALLED BY:
	first_bcs
 PROCEDURE:        
       Prompts user for starting parameters for MKBSC
       User can opt to write a BSA file (which contains just the BSC_INDEX)
       or a BSC file (which contains the BSC INDEX and DATA structures).

      
       Calls: ***
	BSC_CHECK [1], BSC_CHECK [2], DATATYPE [1], DATATYPE [2], DATATYPE [3]
	GET_BSA_ANS [1], GET_BSA_ANS [2], GT_BDA_MODE [1], GT_BDA_MODE [2]
	MK_BSA_STC [1], MK_BSA_STC [2], MK_BSC_DATA [1], MK_BSC_DATA [2], RD_BDA [1]
	RD_BDA [2], anytim2ex [1], anytim2ex [2], bcs_trange, mk_bsa_interv [1]
	mk_bsa_interv [2], sav_bsc
       Calls: ***
	BSC_CHECK [1], BSC_CHECK [2], DATATYPE [1], DATATYPE [2], DATATYPE [3]
	GET_BSA_ANS [1], GET_BSA_ANS [2], GT_BDA_MODE [1], GT_BDA_MODE [2]
	MK_BSA_STC [1], MK_BSA_STC [2], MK_BSC_DATA [1], MK_BSC_DATA [2], RD_BDA [1]
	RD_BDA [2], anytim2ex [1], anytim2ex [2], bcs_trange, mk_bsa_interv [1]
	mk_bsa_interv [2], sav_bsc
       Calls: ***
	BSC_CHECK [1], BSC_CHECK [2], DATATYPE [1], DATATYPE [2], DATATYPE [3]
	GET_BSA_ANS [1], GET_BSA_ANS [2], GT_BDA_MODE [1], GT_BDA_MODE [2]
	MK_BSA_STC [1], MK_BSA_STC [2], MK_BSC_DATA [1], MK_BSC_DATA [2], RD_BDA [1]
	RD_BDA [2], anytim2ex [1], anytim2ex [2], bcs_trange, mk_bsa_interv [1]
	mk_bsa_interv [2], sav_bsc
       Calls: ***
	BSC_CHECK [1], BSC_CHECK [2], DATATYPE [1], DATATYPE [2], DATATYPE [3]
	GET_BSA_ANS [1], GET_BSA_ANS [2], GT_BDA_MODE [1], GT_BDA_MODE [2]
	MK_BSA_STC [1], MK_BSA_STC [2], MK_BSC_DATA [1], MK_BSC_DATA [2], RD_BDA [1]
	RD_BDA [2], anytim2ex [1], anytim2ex [2], bcs_trange, mk_bsa_interv [1]
	mk_bsa_interv [2], sav_bsc
       Calls: ***
	BSC_CHECK [1], BSC_CHECK [2], DATATYPE [1], DATATYPE [2], DATATYPE [3]
	GET_BSA_ANS [1], GET_BSA_ANS [2], GT_BDA_MODE [1], GT_BDA_MODE [2]
	MK_BSA_STC [1], MK_BSA_STC [2], MK_BSC_DATA [1], MK_BSC_DATA [2], RD_BDA [1]
	RD_BDA [2], anytim2ex [1], anytim2ex [2], bcs_trange, mk_bsa_interv [1]
	mk_bsa_interv [2], sav_bsc
 HISTORY:
       Nov'92, DMZ (ARC) - written
       Apr'93, DMZ,  -- added COMMON for DP_SYNC
       Oct'93, DMZ   -- added check for valid_ans
       1-Nov-93, DMZ -- added CHANS, ACCUM, and THRESH keywords
      12-Apr-94, DMZ -- fixed bug introduced 1-Nov-93
      18-May-94, DMZ -- added modeid keyword
      16-Jun-94, DMZ -- added more error checking of inputs
      27-Jan-95, DMZ -- added BLOCKID keyword
       1-Apr-95, DMZ  -- added filter for MODE and BLOCK IDS
      29-Jun-95, DMZ  -- added ignore option for MODE and BLOCK ID filter
      18-Dec-95, DMZ  -- added check so that BSC_VALID uses correct NBINS
                         when /LAST is set


MK_BSC_DATA [1] $SSW/yohkoh/bcs/idl/atest/mk_bsc_data.pro
[Previous] [Next]
 NAME:
	MK_BSC_DATA
 PURPOSE:
	to produce a BSC data structure from BDA data given control information
       in the variable BSC_INDEX
 CALLING SEQUENCE:
	MK_BSC_DATA,BDA_INDEX,BDA_DATA,BSC_INDEX,BSC_DATA,DP_SYNC=DP_SYNC
 INPUTS:
       BDA_INDEX    - BDA index structure
	BDA_DATA     - BDA data in [4,*] array (counts)
       BSC_INDEX    - BSC_INDEX created by MKBSA
       
 OUTPUTS:
       BSC_DATA     - BSC data structure 
       BSC_INDEX    - updated BSC_INDEX
 KEYWORDS:
       DP_SYNC      - input DP_SYNC array needed for dead-time correction
       ERRCAL       - compute data uncertainties
       NOVALID      - don't extract out valid bins (i.e. sin(theta) ne 0)
       VERBOSE      - be verbose
 CALLED BY:
	MK_BSC [1], MK_BSC [2], WBDA [1], WBDA [2]
 PROCEDURE:
                      Uses information in BSC_INDEX to determine
                      how BDA spectral data will be processed.
 CALLS: ***
	BCS_ACCUM [1], BCS_ACCUM [2], BSC_CHECK [1], BSC_CHECK [2], BSC_ERRCAL [1]
	BSC_ERRCAL [2], BSC_FLUXCAL, BSC_VALID, BSC_WAVECAL, BSC_XCORR, bcs_dtfac [1]
	bcs_dtfac [2]
 RESTRICTIONS:
                      It is assumed that the user has already read the
                      BDA data into main memory 
                      (e.g. with YODAT)
 HISTORY:
                    Written Sept. 1992 by D. Zarro (Applied Research Corp).
                    Modified Dec'92, modified for new BSC data structures
                    Modified Apr'93, added check that DP_SYNC and data times overlap
                    Modified Mar'97, added VERBOSE


MK_BSC_DATA [2] $SSW/yohkoh/bcs/idl/bsc/mk_bsc_data.pro
[Previous] [Next]
 NAME:
	MK_BSC_DATA
 PURPOSE:
	to produce a BSC data structure from BDA data given control information
       in the variable BSC_INDEX
 CALLING SEQUENCE:
	MK_BSC_DATA,BDA_INDEX,BDA_DATA,BSC_INDEX,BSC_DATA,DP_SYNC=DP_SYNC
 INPUTS:
       BDA_INDEX    - BDA index structure
	BDA_DATA     - BDA data in [4,*] array (counts)
       BSC_INDEX    - BSC_INDEX created by MKBSA
       
 OUTPUTS:
       BSC_DATA     - BSC data structure 
       BSC_INDEX    - updated BSC_INDEX
 KEYWORDS:
       DP_SYNC      - input DP_SYNC array needed for dead-time correction
       ERRCAL       - compute data uncertainties
       NOVALID      - don't extract out valid bins (i.e. sin(theta) ne 0)
 CALLED BY:
	MK_BSC [1], MK_BSC [2], WBDA [1], WBDA [2]
 PROCEDURE:
                      Uses information in BSC_INDEX to determine
                      how BDA spectral data will be processed.
 CALLS: ***
	BCS_ACCUM [1], BCS_ACCUM [2], BSC_CHECK [1], BSC_CHECK [2], BSC_ERRCAL [1]
	BSC_ERRCAL [2], BSC_FLUXCAL, BSC_VALID, BSC_WAVECAL, BSC_XCORR, bcs_dtfac [1]
	bcs_dtfac [2]
 RESTRICTIONS:
                      It is assumed that the user has already read the
                      BDA data into main memory 
                      (e.g. with YODAT)
 HISTORY:
                    Written Sept. 1992 by D. Zarro (Applied Research Corp).
                    Modified Dec'92, modified for new BSC data structures
                    Modif Apr'93, added check that DP_SYNC and data times overlap


MK_BSC_STR [2] $SSW/yohkoh/gen/idl/ref_access/mk_bsc_str.pro
[Previous] [Next]
NAME:
	MK_BSC_STR
PURPOSE:
	Build the BSC data structure definition
SAMPLE CALLING SEQUENCE:
	data = mk_bsc_str(1+2+4, 768)
	data = mk_bsc_str(1+2+4, 768, ncopy=205)
	data = mk_bsc_str(roadmap=roadmap)
	data = mk_bsc_str(index=index)
	index = mk_bsc_str(/sample_index)
	index = mk_bsc_str(/sample_index, /fit)
INPUT:
	datarectype - The bit pattern telling which data tags are
		      needed.
	length	- The length of the data arrays within the structure
		  (e.g.: the length of the wavelength/bin/counts array)
		  All tags will have the same number of elements
 CALLS: ***
	BSC_STRUCT [1], BSC_STRUCT [2], GEN_STRUCT [1], GEN_STRUCT [2], MAKE_STR [1]
	MAKE_STR [2], bits [1], bits [2], str_merge [1], str_merge [2]
 CALLED BY:
	BCS_ACCUM [1], BCS_ACCUM [2], BSC_FIELD, MK_BSA_STC [1], MK_BSA_STC [2]
	RD_BSC_DATA, dat2bsc, rdbda_smm
OPTIONAL KEYWORD INPUT:
	ncopy	- The number of copies of the structure to make.  It
		  simply replicates the output structure "ncopy" times
	roadmap	- The BSC roadmap can be passed instead of datarectype/length
	index	- The BSC index can be passed instead of datarectype/length
	sample_index - If set, return an index structure definition with
		  the nested .GEN and .BSC structures.
	fit	- If set, then return the nested .FIT structure when using
		  the /SAMPLE_INDEX option in addition to .GEN and .BSC
OUTPUT:
	returns a BSC structure
OPTIONAL KEYWORD OUTPUT:
	str	- The structure definition of the output
HISTORY:
	written 16-Dec-92 by Mons Morrison
	 3-Feb-93 (MDM) - Added DATA.FLUX capability
	31-Jul-93 (SLF) - added /down to str_merge call
	16-Sep-93 (MDM) - Added .WAVEC option (bit 6)
			- Added /FIT option
	 2-Oct-93 (MDM) - Changed .WAVEC to WAVE_FIT and
			  changed .FIT to .FLUX_FIT
			- Changed the order that the data tags are built
	 8-Nov-93 (MDM) - Added .FLUX_FIT2 (bit 8)


mk_bscfit_eps $SSW/yohkoh/bcs/idl/bsc/mk_fit_bsc_eps.pro
[Previous] [Next]
 NAME:
  mk_bscfit_eps
 PURPOSE:
  Generate a Portrait style BCS fitted spectrum.
 CALLING SEQUENCE:
  mk_fit_bsc_eps,filename
  mk_fit_bsc_eps,filename, subscript	; Subscript of spectrum in file to read

  mk_fit_bsc_eps, index, data		; index and data should be 
					  scalar bsc structures
  mk_fit_bsc_eps,filename,xoff=xoff,yoff=yoff,xsize=xsize,ysize=ysize

  mk_fit_bsc_eps,filename,/eps		; EPS PostScript file 
  mk_fit_bsc_eps,filename,/hc		; Send to printer
  mk_fit_bsc_eps,filename,/ps		; Generate a PostScript file (not printed)


 INPUTS:
  filename	= bsc file containing a fitted spectrum.  
  subscript	= Number of the spectrum in the file to plot (def=0)

  index,data	= Scalar BSC index and data structures
 
 OPTIONAL INPUT KEYWORDS:
  xoffs,yoffs	= (cm) Offsets of the plot
  xsize,ysize	= (cm) Size of the plot page. 
		  Defaults: xsize=2.54*6.5 cm,    ysize=2.54*5.5 cm
  xlen,ylen	= (cm) Length of x and y axes.
		  Defaults: xlen =xsize-1.5*2.54, ylen=ysize-1.25*2.54
  xoff_anno	= Fractional X position of fitting parameter annotation
  file		= specify the output .ps file name (def=idl.ps)
  xrange,yrange,charsize = Normal IDL plot keywords
  noatomic	= If set, suppress the atomic calculation information
  nodate	= If set (or absent), don't put the date on plot

 HINTS:
  1. Try starting with:
     mk_fit_bsc_eps,index,data,/noatomic,/ps	; Examine with previewer
     mk_fit_bsc_eps,index,data,/noatomic,xoffs=2.8,yoffs=3.0,/ps
  2. The default X and Y page sizes and axis lengths are set to
     fill a A4 sheet of paper.
  3. Note that xlen and xpage can be adjusted separately.  Study the defaults
     in the code below to get an idea how to change these values.

 CALLS: ***
	BCS_SPEC_PLOT, BSC_CHECK [1], BSC_CHECK [2], MK_FIT_BSC_EPS, rd_bsc
 MODIFICATION HISTORY:
  29-dec-93, J. R. Lemen, Written


mk_cd [1] $SSW/yohkoh/gen/idl/atest/mk_cd.pro
[Previous] [Next]
	NAME: mk_cd

	PURPOSE: Make a CD from data found in path "dpath".  Default
		is for making CD's from general/personal data sets.
		Use the /arcweek switch for making normal weely Yohkoh 
		archive discs.  Use the /ydb switch to archive sfd files
		and other weekly log files.

	Parameters:
		dpath		Input data path(s) (otherwise default dir)
		flist		list of files to archive to CD using "/gen"
		select		switch to allow interactive selection of
				files to premaster.
		ydb		to make CD archive from any of the
				Yohkoh databases, e.g. sfd, sfm, ...
		sfd		make CD archive f. an sfd db, same as ydb option
		arcweek		to make a Yohkoh-Archive week CD
		weekid		user specified week to archive 
		dupweek		switch to allow making duplicate copies
				of premastered data.
		dest		destination for CD, self (default), UH,
				SU, UCB, KH, UM, LPARL, NSSDC
		premaster	restart from premaster stage
		nopremaster	do not premaster or master data
		nomaster	do not master data
		noexec		do not execute script to make CD
		nolog		do not log CD making
		cdpath		list of root-level CD directories.  The
				"dpath" directories are appended to
				these directories. The number of
				elements in dpath must equal number of 
				elements in cdpath.
		mkrootdir	Use the "archdir" var to make a root level
				directory on the CD
		cp		use a cp command instead of mv to copy
				files to the /cdr_base area. This is useful
				when the source is a read-only device such
				a CD.
               stage_disk      area where input files are to be staged
                               defaults to /sxt8data5/stage_b1
               type_comp       type compression: none or 1 = Unix compress
                                                         2 = gzip
               cd_yes          flag to bypass 'do you want to burn CD' query.

               alt_my_cd     Alternate directory for writing my_cd script  


 CALLS: ***
	STR2ARR [1], STR2ARR [2], UNIQ [1], UNIQ [2], UNIQ [3], file_append [1]
	file_append [2], get_host [1], get_host [2], input [1], input [2], prep_dat [1]
	prep_dat [2], prep_gendat, prep_week [1], prep_week [2], prt_flst [1]
	prt_flst [2]
 CALLED BY:
	go_mk_cd
	History:	written, GAL, 24-May-95
		28-Nov-95, GAL, modified chmod command to -R a+wX/cdr_base/*
			from -R a+wxX /cdr_base/*.
		18-Mar-95, GAL, modified chmod command again.
		 1-Apr-96, GAL, added cdpath and muilt path CD making.
		2-Aug-96, GAL, yet another change to chmod now a+rwX/cdr_base
		27-Sep-96, GAL, make NO root level dir. the default for
			standard Yohkoh-Archive CDs.  Use the /mkrootdir
			switch to make a CD with files in that dir.
		29-Oct-96, GAL, bug fix to 'gen' or default mode.
		14-Feb-97, GAL, added a cp switch for case where the in
			input device was read-only.  /cp uses cp instead of mv.
               12-Jan-98, PGS added stage_disk, type_comp & cd_yes keywords.
               19-Jan-98  Changed cd 'size' indicator from 680 to 650 in script.
               21-Jan-98, PGS if arcweek, '_c' files are copied without '_c'
                          extension to /cdr_base
               05-Feb-98 PGS added alt_my_cd alternate directory for my_cd script
               16-Feb-98 PGS inserted tap_wrt_chk to compare stage_disk tapes with XBD files
                             Added -V keyword to script call to makedisc. (To make long volume name)
                             Added alt_my_cd: alternate location to write my_cd script.


mk_cd [2] $SSW/yohkoh/gen/idl/ys_util/mk_cd.pro
[Previous] [Next]
	NAME: mk_cd

	PURPOSE: Make a CD from data found in path "dpath".  Default
		is for making CD's from general/personal data sets.
		Use the /arcweek switch for making normal weely Yohkoh 
		archive discs.  Use the /ydb switch to archive sfd files
		and other weekly log files.

	Parameters:
		dpath		Input data path(s) (otherwise default dir)
		flist		list of files to archive to CD using "/gen"
		select		switch to allow interactive selection of
				files to premaster.
		ydb		to make CD archive from any of the
				Yohkoh databases, e.g. sfd, sfm, ...
		sfd		make CD archive f. an sfd db, same as ydb option
		arcweek		to make a Yohkoh-Archive week CD
		weekid		user specified week to archive 
		dupweek		switch to allow making duplicate copies
				of premastered data.
		dest		destination for CD, self (default), UH,
				SU, UCB, KH, UM, LPARL, NSSDC
		premaster	restart from premaster stage
		nopremaster	do not premaster or master data
		nomaster	do not master data
		noexec		do not execute script to make CD
		nolog		do not log CD making
		cdpath		list of root-level CD directories.  The
				"dpath" directories are appended to
				these directories. The number of
				elements in dpath must equal number of 
				elements in cdpath.
		mkrootdir	Use the "archdir" var to make a root level
				directory on the CD
		
 CALLS: ***
	STR2ARR [1], STR2ARR [2], UNIQ [1], UNIQ [2], UNIQ [3], file_append [1]
	file_append [2], get_host [1], get_host [2], input [1], input [2], prep_dat [1]
	prep_dat [2], prep_gendat, prep_week [1], prep_week [2], prt_flst [1]
	prt_flst [2]
 CALLED BY:
	go_mk_cd
	History:	written, GAL, 24-May-95
		28-Nov-95, GAL, modified chmod command to -R a+wX/cdr_base/*
			from -R a+wxX /cdr_base/*.
		18-Mar-95, GAL, modified chmod command again.
		 1-Apr-96, GAL, added cdpath and muilt path CD making.
		2-Aug-96, GAL, yet another change to chmod now a+rwX/cdr_base
		27-Sep-96, GAL, make NO root level dir. the default for
			standard Yohkoh-Archive CDs.  Use the /mkrootdir
			switch to make a CD with files in that dir.
		29-Oct-96, GAL, bug fix to 'gen' or default mode.
		


mk_close_vec $SSW/yohkoh/ucon/idl/slater/mk_close_vec.pro
[Previous] [Next]
  Name:
	mk_close_vec
  Purpose:
	Create a vector whose n elements are the indices for the
	elements of vector v1 with values closest in absolute value
	to the n elements of vector v0
  Calling Sequence:
	index_arr = mk_close_vec(v0,v1)
 CALLED BY
	go_nvs4


mk_coal_movie $SSW/yohkoh/ucon/idl/wuelser/mk_coal_movie.pro
[Previous] [Next]
 NAME:
        mk_coal_movie
 PURPOSE:
        Create a co-aligned sxt and gbo movie
 CATEGORY:
 CALLING SEQUENCE:
        mov = mk_coal_movie(i1,dat1,i2,dat2)
 INPUTS:
        i1 = time vector or index (if SXT) for 1st movie
        dat1 = 1st input movie data
        i2 = time vector or index (if SXT) for 2nd movie, optional
        dat2 = 2nd input movie data, optional
 KEYWORDS (INPUT):
        pp1 = transformation for 1st movie
        pp2 = transformation for 2nd movie
        key1 = trans.type for 1st movie
        key2 = trans.type for 2nd movie
        ref1 = reference index for 1st movie (use only if dat1 is SXT data)
               Causes automatic dejittering and solar rot. correction.
        ref2 = reference index for 2nd movie (use only if dat2 is SXT data)
               Causes automatic dejittering and solar rot. correction.
        xy1 = dejitter vector for 1st movie (for non-SXT data)
        xy2 = dejitter vector for 2nd movie (for non-SXT data)
        z = zoom factor
        s = size of output frames
        o = offset of corner of reference image in output frame.
            Allows a different FOV of the output frame other than the FOV
            of the co-alignment reference image.
        dselect = 1 or 2  (default = 1)
                  1 : select frames of dat2 closest to each frame of dat1
        contour = fltarr.  If set, overlay 2nd movie with contours at levels
                  indicated by the fltarr.
        /contour = Select contour levels automatically.
        c_color = color of contours (see oplot_b for details)
        c_line = linestyle of contours (see oplot_b for details)
        tcon = string vector.  Time or comment strings for each frame.
               Only works if the contour keyword is set.
        /nointerp = use nearest neighbor method when rebinning
 OUTPUTS:
        mov = overlay movie
 KEYWORDS (OUTPUT):
 CALLS: ***
	OVER_MOVIE, POLY_MOVIE, cont_movie, conv_a2p [1], conv_a2p [2], fmt_tim [1]
	fmt_tim [2], gt_center, gt_corner, gt_res, mod_res, tim2dset [1], tim2dset [2]
	track_h2a [1], track_h2a [2], track_h2a [3]
 COMMON BLOCKS:
        None.
 SIDE EFFECTS:
 RESTRICTIONS:
        All pp vectors referring to SXT coordinates must refer to full
        resolution SXT images/pixels.  If necessary, use mod_res.pro
        on SXT reference image before creating pp vector.
 PROCEDURE:
 MODIFICATION HISTORY:
        JPW, 13-oct-94
        JPW, 22-nov-94  added "key" keywords
	 JPW,  2-jun-95  added /nointerp


mk_daily_ints $SSW/yohkoh/ucon/idl/acton/mk_daily_ints.pro
[Previous] [Next]
 NAME:
	mk_daily_ints
 PURPOSE
	To create a one-per-day time structure.
 CALLING SEQUENCE
	tout = mk_daily_ints('15-sep-91','11-nov-95')
 INPUT
	sttim, entim - first and last days in any format.
 OUTPUT
	Yohkoh time structure for the time interval.
 PROCEDURES CALLED
	anytim2ex, anytim2doy, leap_yr, anytim2ints, str_concat
 HISTORY
	17-Jan-96, LWA, written.
 CALLS:


mk_desat $SSW/yohkoh/gen/idl/reformat/mk_desat.pro
[Previous] [Next]
NAME:
	mk_desat
PURPOSE:
	Given a set of files, read the roadmaps and find where there
	is a long and short exposure.  Make a composite image and remove
	the saturated pixels.  Write images to an output file.
INPUT:
	infil	- an array of input file names
	outdir	- the output directory where the file should be written
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], GetObsID, RD_XDA [1], RD_XDA [2]
	Rd_Roadmap [2], concat_dir [4], fmt_tim [1], fmt_tim [2], get_dc_image [1]
	get_dc_image [2], get_dc_image [3], gt_dpe, gt_expdur [1], gt_expdur [2]
	gt_expmode, gt_filtb, gt_res, int2secarr [1], int2secarr [2], mk_dset_str [1]
	mk_dset_str [2], rd_roadmap [1], sav_sda [1], sav_sda [2], sav_sda [3]
	sxt_decomp [1], sxt_decomp [2]
OPTIONAL KEYWORD INPUT:
	interactive- If set, display the results to the screen as the
		   processing occurs.
HISTORY:
	draft version: 28 January 1992 (KTS)
	20-Mar-92 (MDM) - Took Keith Strong's program "db_desat.pro"
			  and made the procedure "mk_desat"
	7-Apr-92 (KTS)  - Put IFLAG in to avoid error if first image
			  is rejected
	14-Apr-92 (KTS) - 'PREFIX' parameter hardwired for 'sfd' 
			- Added automatic week # feature
			- Better generated dark frame algorithm
			- Avoid night images algorithm
Ver 2.0 16-Apr-92 (KTS) - Added dark frame library read
       16-Apr-92 (MDM) - Changed file name definition to use the
                         "progverno" variable to determine the extension
			- Put the prefix parameter back in (so it would work
			  with old existing programs)
	20-Apr-92 (MDM) - Added RUN_TIME parameter
	21-Apr-92 (KTS) - Included LWA/MDM desat technique
			- Included MDM DC routine
Ver 2.1 22-Apr-92 (MDM) - Added "roadmap" to the RD_SDA calls (speeds
		 	  things up since it will not re-read the roadmap
			  for each call)
			- Adjusted the format of the code so MDM can 
			  read it more easily
			- Fixed DC subtraction to use the whole image,
			  not just one pixel
			- Put the call to GET_DC_IMAGE for the short
			  exposure images outside the loop.
			- Moved the check for apropriate short exposure
			  to before the RD_SDA (use the roadmap info)
			- Replaced RD_SDA with RD_XDA
       23-Apr-92 (MDM) - Added "ist" input option to skip to image
			  "ist" in the loop (for recovery from bombout)


mk_desat_wl $SSW/yohkoh/gen/idl/reformat/mk_desat_wl.pro
[Previous] [Next]
NAME:
       mk_desat_wl
PURPOSE:
       Given a set of files, read the roadmaps and find where there
       are complete narrow band images.  Write the subset to a datafile.
INPUT:
       infil   - an array of input file names
       outdir  - the output directory where the file should be written
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], GetObsID, RD_SDA [1], RD_SDA [2]
	RD_SDA [3], Rd_Roadmap [2], concat_dir [4], fmt_tim [1], fmt_tim [2], gt_day [1]
	gt_day [2], gt_expmode, gt_filta, gt_res, gt_time [1], gt_time [2], mk_dset_str [1]
	mk_dset_str [2], rd_roadmap [1], sav_sda [1], sav_sda [2], sav_sda [3]
OPTIONAL KEYWORD INPUT:
       interactive- If set, display the results to the screen as the
                  processing occurs.
HISTORY:
       draft version: 28 January 1992 (KTS)
       20-Mar-92 (MDM) - Took Keith Strong's program "db_wlext.pro"
                         and made the procedure "mk_desat_wl"
	14-Apr-92 (KTS) - Removed prefix option and set to 'sfw'
			- Changed so as to output week id (91_51a.01)
	16-Apr-92 (MDM) - Changed file name definition to use the 
			  "progverno" variable to determine the extension
	20-Apr-92 (MDM) - Added RUN_TIME parameter


mk_dset_str [1] $SSW/yohkoh/gen/idl/atest/mk_dset_str.pro
[Previous] [Next]
NAME:
	mk_dset_str
PURPOSE:
	Create a dataset structre for input to the "RD_xxx" routines
	from an "SS" array of roadmap indices
CALLING SEQUENCE:
	dset_arr = mk_dset_str(infil, ss)
	dset_arr = mk_dset_str(filidx, ss)
	dset_arr = mk_dset_str(infil, -1)	;select all dset in file(s)
	dset_arr = mk_dset_str(infil, dset_arr)
	dset_arr = mk_dset_str(fnmap, sxtp=dsxtp, files=files)
INPUT:
	filvar	- file name variable.  Can be
		1. a string array of filenames.  If this calling format is
		   used, then the range of ".dset" values is checked to make
		   sure that it is within range for each file and the ".ifil"
		   maximum is checked to be smaller than the number of file
		   names passed in.
		2. an integer vector of filename indicies (the optional
		   output from rd_roadmap)
		3. Filename map "FNMAP" structure from a search program.  If this
		   is used, then the "sxtp" or "sxtf" inputs should be used
		   to tell which filenames to extract.  The ss parameter is
		   not used in this case.
	ss	- a list of the indicies to extract
		1. Most common method is that "SS" is the indicie of 
		   the roadmap.  When used with filvar=filenames, this must be 
		   the indicie with respect to ALL datasets in ALL files 
		   available in "filenames"
		2. SS can equal -1, and then all datasets are selected
		   (the explicit extraction list is created).  "SS" is
		   modified in the program an returns a "INDGEN" with
		   the total # of datasets selected.
		3. If "SS" is a structure type, the routine assumes that
		   the conversion to a dataset structure has already occured
		   and returns the input.  It is checked first to make sure
		   that there ".dset" does not equal -1 anywhere and expands
		   it if it does.
 CALLS: ***
	Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3], get_fninfo
 CALLED BY:
	RD_ADA, RD_AR, RD_BDA [1], RD_XDA [1], RD_XDA [2], XMOVIE_SFM, get_sfm, mk_desat
	mk_desat_wl, mk_sdmi, mk_sdp, mk_sfd [1], mk_sfd [2], mk_sfd [3], mk_sfd [4], mk_sfs
	mk_sft [1], mk_sft [2], mk_sfw, mk_sl [1], mk_sl [2], mk_sot, mk_sxc, sel_dc_image [1]
	sel_dc_image [2], sel_dc_image [3], sxt_prep [1], sxt_prep [2], sxt_prep [3]
OPTIONAL KEYWORD INPUT:
	sxtp	- only used if "filvar" is FNMAP.  It is the PFI dataset # 
		  array (from credvec).  Should not be used sxtf option.
	sxtf	- only used if "filvar" is FNMAP.  It is the FFI dataset # 
		  array (from credvec).  Should not be used sxtp option
OPTIONAL KEYWORD OUTPUT:
	files	- when using the FNMAP option, the filename array to be
		  used with the ".ifil" field in the output is returned here.
RESTRICTION:
	The "SS" input cannot mix convensions 1 and 2 (passing a vector of
	roadmap indicies with a -1 in there somewhere).  A -1 can be mixed
	in the "SS" if it is a structure type (option 3), but if that
	option is used, then filvar must the the filename list (so that the
	number of datasets in the file can be known)
OUTPUT:
	returns the variable that can be passed directly to "RD_xxx" routines
HISTORY:
	Written 27-Feb-92 by M.Morrison
	 1-Mar-92 (MDM) - Added option to pass the filename map (FNMAP)
	 5-Mar-92 (MDM) - Adjustments to fix bug with FNMAP option
	19-Mar-92 (MDM) - Removed use of MAKE_STR function use, just use a
			  fixed structure name
	20-Apr-92 (MDM) - Fixed case where the input files passed in have
			  no datasets in them.  Return a structure with the
			  "ifil" and "dset" set to -1.
	21-Apr-92 (MDM) - Fixed case where one of the files listed has
			  no datasets in the file.
	11-Jun-92 (MDM) - Fixed case where first file has zero datasets
	20-Jun-94 (MDM) - Modified case where all files have zero datasets
	23-Apr-99 (LWA) - Changed integer to longword throughout
	18-Feb-01 (LWA) - Changed all "for" loops to longword type
			  and output data structure to longword type


mk_dset_str [2] $SSW/yohkoh/gen/idl/ref_access/mk_dset_str.pro
[Previous] [Next]
NAME:
	mk_dset_str
PURPOSE:
	Create a dataset structre for input to the "RD_xxx" routines
	from an "SS" array of roadmap indices
CALLING SEQUENCE:
	dset_arr = mk_dset_str(infil, ss)
	dset_arr = mk_dset_str(filidx, ss)
	dset_arr = mk_dset_str(infil, -1)	;select all dset in file(s)
	dset_arr = mk_dset_str(infil, dset_arr)
	dset_arr = mk_dset_str(fnmap, sxtp=dsxtp, files=files)
INPUT:
	filvar	- file name variable.  Can be
		1. a string array of filenames.  If this calling format is
		   used, then the range of ".dset" values is checked to make
		   sure that it is within range for each file and the ".ifil"
		   maximum is checked to be smaller than the number of file
		   names passed in.
		2. an integer vector of filename indicies (the optional
		   output from rd_roadmap)
		3. Filename map "FNMAP" structure from a search program.  If this
		   is used, then the "sxtp" or "sxtf" inputs should be used
		   to tell which filenames to extract.  The ss parameter is
		   not used in this case.
	ss	- a list of the indicies to extract
		1. Most common method is that "SS" is the indicie of 
		   the roadmap.  When used with filvar=filenames, this must be 
		   the indicie with respect to ALL datasets in ALL files 
		   available in "filenames"
		2. SS can equal -1, and then all datasets are selected
		   (the explicit extraction list is created).  "SS" is
		   modified in the program an returns a "INDGEN" with
		   the total # of datasets selected.
		3. If "SS" is a structure type, the routine assumes that
		   the conversion to a dataset structure has already occured
		   and returns the input.  It is checked first to make sure
		   that there ".dset" does not equal -1 anywhere and expands
		   it if it does.
 CALLS: ***
	Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3], get_fninfo
 CALLED BY:
	RD_ADA, RD_AR, RD_BDA [1], RD_XDA [1], RD_XDA [2], XMOVIE_SFM, get_sfm, mk_desat
	mk_desat_wl, mk_sdmi, mk_sdp, mk_sfd [1], mk_sfd [2], mk_sfd [3], mk_sfd [4], mk_sfs
	mk_sft [1], mk_sft [2], mk_sfw, mk_sl [1], mk_sl [2], mk_sot, mk_sxc, sel_dc_image [1]
	sel_dc_image [2], sel_dc_image [3], sxt_prep [1], sxt_prep [2], sxt_prep [3]
OPTIONAL KEYWORD INPUT:
	sxtp	- only used if "filvar" is FNMAP.  It is the PFI dataset # 
		  array (from credvec).  Should not be used sxtf option.
	sxtf	- only used if "filvar" is FNMAP.  It is the FFI dataset # 
		  array (from credvec).  Should not be used sxtp option
OPTIONAL KEYWORD OUTPUT:
	files	- when using the FNMAP option, the filename array to be
		  used with the ".ifil" field in the output is returned here.
RESTRICTION:
	The "SS" input cannot mix convensions 1 and 2 (passing a vector of
	roadmap indicies with a -1 in there somewhere).  A -1 can be mixed
	in the "SS" if it is a structure type (option 3), but if that
	option is used, then filvar must the the filename list (so that the
	number of datasets in the file can be known)
OUTPUT:
	returns the variable that can be passed directly to "RD_xxx" routines
HISTORY:
	Written 27-Feb-92 by M.Morrison
	 1-Mar-92 (MDM) - Added option to pass the filename map (FNMAP)
	 5-Mar-92 (MDM) - Adjustments to fix bug with FNMAP option
	19-Mar-92 (MDM) - Removed use of MAKE_STR function use, just use a
			  fixed structure name
	20-Apr-92 (MDM) - Fixed case where the input files passed in have
			  no datasets in them.  Return a structure with the
			  "ifil" and "dset" set to -1.
	21-Apr-92 (MDM) - Fixed case where one of the files listed has
			  no datasets in the file.
	11-Jun-92 (MDM) - Fixed case where first file has zero datasets
	20-Jun-94 (MDM) - Modified case where all files have zero datasets


mk_evn [1] $SSW/yohkoh/gen/idl/atest/mk_evn.pro
[Previous] [Next]
NAME:
	mk_evn
PURPOSE:
	To reduce the observing log information into a summary
	of events.
KEYWORD INPUT:
       week    - a string with the year/week if the format
                 91_49 where 91 is the year, 49 is the week
                 This is required input.
OUTPUT:
	outfil	- The output file name
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], EVN_STRUCT, GEN_STRUCT [1]
	GEN_STRUCT [2], GET_NBYTES, OBS_STRUCT [1], OBS_STRUCT [2], OPEN_DA_FILE
	REF_STRUCT, Rd_Pointer [1], Rd_Pointer [2], Rd_fHeader [1], Rd_fHeader [2]
	Rd_fHeader [3], WRT1P_FH, anytim2ints [1], anytim2ints [2], concat_dir [4]
	fmt_tim [1], fmt_tim [2], gt_dp_mode [1], gt_dp_mode [2], gt_total_cnts [1]
	gt_total_cnts [2], int2secarr [1], int2secarr [2], rd_fem, rd_obs, rdwrt [1]
	rdwrt [2], rdwrt [3], week2ex [1], week2ex [2]
 CALLED BY:
	yoyo_man2
OPTIONAL KEYWORD INPUT:
	outdir	- The output directory for the output file.
		  If undefined, write it to $DIR_GEN_EVN.
HISTORY:
	Written 1-May-92 by M.Morrison
Ver 1.01 26-May-92 (MDM) - Changed to write a temporary file and then
                           move it to on-line after finished generating it
Ver 1.02 26-May-92 (MDM) - Expanded the EVN structure to have the maximum
			    counting rate for the different instruments and
			    the SXT FOV location
          8-Jul-92 (MDM) - Added "outfil"
Ver 1.03 28-Aug-92 (MDM) - Made a correction caused by BCS not giving the 
			    proper DP mode
Ver 1.04 28-Aug-92 (MDM) - Further correction for BCS DP mode
Ver 1.05 11-Sep-92 (MDM) - Corrected mistake from 1.03/1.04 modification - it
			    was recording the incorrect DP mode.
         16-Oct-92 (MDM) - Modified to make the use of input "week" scalar
			  - Added runtime print statement
Ver 1.06  9-Mar-93 (MDM) - Modified to take the raw FOV_CENTER value instead
			    of the GT_FOV_CENTER value since it has processing
			    done to it
			    **************************************************
Ver 1.20 14-May-93 (MDM) - Modified to use the new OBS files (one per instrument)
Ver 1.21 15-Nov-93 (MDM) - Modified logic so that if one instrument is missing
			    it would work ok.
Ver 1.22 19-Nov-93 (MDM) - Modified to avoide SQRT(neg num).  (converted to
			    reals because integer^2 was negative.


mk_evn [2] $SSW/yohkoh/gen/idl/reformat/mk_evn.pro
[Previous] [Next]
NAME:
	mk_evn
PURPOSE:
	To reduce the observing log information into a summary
	of events.
KEYWORD INPUT:
       week    - a string with the year/week if the format
                 91_49 where 91 is the year, 49 is the week
                 This is required input.
OUTPUT:
	outfil	- The output file name
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], EVN_STRUCT, GEN_STRUCT [1]
	GEN_STRUCT [2], GET_NBYTES, OBS_STRUCT [1], OBS_STRUCT [2], OPEN_DA_FILE
	REF_STRUCT, Rd_Pointer [1], Rd_Pointer [2], Rd_fHeader [1], Rd_fHeader [2]
	Rd_fHeader [3], WRT1P_FH, anytim2ints [1], anytim2ints [2], concat_dir [4]
	fmt_tim [1], fmt_tim [2], gt_dp_mode [1], gt_dp_mode [2], gt_total_cnts [1]
	gt_total_cnts [2], int2secarr [1], int2secarr [2], rd_fem, rd_obs, rdwrt [1]
	rdwrt [2], rdwrt [3], week2ex [1], week2ex [2]
 CALLED BY:
	yoyo_man2
OPTIONAL KEYWORD INPUT:
	outdir	- The output directory for the output file.
		  If undefined, write it to $DIR_GEN_EVN.
HISTORY:
	Written 1-May-92 by M.Morrison
Ver 1.01 26-May-92 (MDM) - Changed to write a temporary file and then
                           move it to on-line after finished generating it
Ver 1.02 26-May-92 (MDM) - Expanded the EVN structure to have the maximum
			    counting rate for the different instruments and
			    the SXT FOV location
          8-Jul-92 (MDM) - Added "outfil"
Ver 1.03 28-Aug-92 (MDM) - Made a correction caused by BCS not giving the 
			    proper DP mode
Ver 1.04 28-Aug-92 (MDM) - Further correction for BCS DP mode
Ver 1.05 11-Sep-92 (MDM) - Corrected mistake from 1.03/1.04 modification - it
			    was recording the incorrect DP mode.
         16-Oct-92 (MDM) - Modified to make the use of input "week" scalar
			  - Added runtime print statement
Ver 1.06  9-Mar-93 (MDM) - Modified to take the raw FOV_CENTER value instead
			    of the GT_FOV_CENTER value since it has processing
			    done to it
			    **************************************************
Ver 1.20 14-May-93 (MDM) - Modified to use the new OBS files (one per instrument)
Ver 1.21 15-Nov-93 (MDM) - Modified logic so that if one instrument is missing
			    it would work ok.
Ver 1.22 19-Nov-93 (MDM) - Modified to avoide SQRT(neg num).  (converted to
			    reals because integer^2 was negative.


mk_fem [1] $SSW/yohkoh/gen/idl/atest/mk_fem.pro
[Previous] [Next]
NAME:
	mk_fem
PURPOSE:
	Generate a FEM file
INPUT:
	year	- year number (eg: 92)
	week	- week number
 CALLS: ***
	CHECK_TIME, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], Ex2Int [1], Ex2Int [2]
	FEM_STRUCT, Int2Ex [1], Int2Ex [2], MK_FEM_WRT, anytim2ints [1], anytim2ints [2]
	concat_dir [4], ex2dow [1], ex2dow [2], ex2week [1], ex2week [2], file_list [1]
	file_list [2], fmt_tim [1], fmt_tim [2], get_sunset, int2secarr [1]
	int2secarr [2], mk_fem_aoslos [1], mk_fem_aoslos [2], rd_fem, rd_orbit_event
 CALLED BY:
	mk_fem_file [1], mk_fem_file [2], mk_orbit [1], mk_orbit [2]
OPTIONAL KEYWORD INPUT:
	noaoslos - if set, do not run DSNFIL (AOSLOS) program - the file already
		  exists.  If it creates it, it will delete it automatically.
	dirout	- output directory for FEM file. If not defined, it goes into
		  $DIR_GEN_FEM.  It is used for temporary regeneration of
		  FEM files - not disturb on-line FEM files.
	asca	- If set, then read the ASCA spacecraft orbital solutions and
		  write the reults to the DIR_ASCA_FEM directory
RESTRICTION:
	CAUTION: The file IDs (FIDs) are derived from the first minute of sun
	as calculated on the ground MINUS FIVE MINUTES.  This is to insure
	that a spacecraft day is not split between two files.  As such, the
	date and week # of a FID might not match that of the FEM data.
HISTORY:
	Written Dec-91 by M.Morrison
	28-Feb-92 (MDM) - changed from MK_FID to MK_FEM
			  cleaned up the code since it no longer was using
			  random AOSLOS files that potentially overlapped in time
	17-Mar-92 (MDM) - Updated FEM structure to handle the SIRIUS path
			  name.
	26-Apr-92 (MDM) - Regenerated all files with no time difference between
			  the predicted first minute of sun and the FileID.
			  Previous values had the FileID 5 minutes before the
			  the predicted first minute of sun.
	26-May-92 (MDM) - Made MK_FEM_WRT always use /clobber
	27-Jul-92 (MDM) - corrected bug which was eliminating station contacts
			  from the FEM structure when the night/day transition
			  occurred when an SAA or station contact was happening
	 7-Apr-93 (MDM) - Added /ASCA option
V3.0	21-Feb-94 (MDM) - Increased the resolution of the day/night boundary
			  by incorporating a call to GET_SUNSET
			  (increase is from 15 sec to 1 sec resolution)
	16-Mar-94 (MDM) - Change to the way GET_SUNSET is called since the
			  new FEM file does not exist yet, and GET_SUNSET was
			  doing a RD_FEM within it.
V3.1	13-Apr-94 (MDM) - Corrected so that ASCA calculations do not use
			  GET_SUNSET 
V4.0	23-Mar-95 (MDM) - Updated to handle Wallops ground station.
			- Had to modify the FEM structure so a new extension
			  was used.  Eliminated the antenna fields.  Expanded
			  the possible number of station contacts within a
			  single orbit from 3 to 6
			- Added /VERSION keyword
       03-jan-00       - y2k fix


mk_fem [2] $SSW/yohkoh/gen/idl/orbit/mk_fem.pro
[Previous] [Next]
NAME:
	mk_fem
PURPOSE:
	Generate a FEM file
INPUT:
	year	- year number (eg: 92)
	week	- week number
 CALLS: ***
	CHECK_TIME, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], Ex2Int [1], Ex2Int [2]
	FEM_STRUCT, Int2Ex [1], Int2Ex [2], MK_FEM_WRT, anytim2ints [1], anytim2ints [2]
	concat_dir [4], ex2dow [1], ex2dow [2], ex2week [1], ex2week [2], file_list [1]
	file_list [2], fmt_tim [1], fmt_tim [2], get_sunset, int2secarr [1]
	int2secarr [2], mk_fem_aoslos [1], mk_fem_aoslos [2], rd_fem, rd_orbit_event
 CALLED BY:
	mk_fem_file [1], mk_fem_file [2], mk_orbit [1], mk_orbit [2]
OPTIONAL KEYWORD INPUT:
	noaoslos - if set, do not run DSNFIL (AOSLOS) program - the file already
		  exists.  If it creates it, it will delete it automatically.
	dirout	- output directory for FEM file. If not defined, it goes into
		  $DIR_GEN_FEM.  It is used for temporary regeneration of
		  FEM files - not disturb on-line FEM files.
	asca	- If set, then read the ASCA spacecraft orbital solutions and
		  write the reults to the DIR_ASCA_FEM directory
RESTRICTION:
	CAUTION: The file IDs (FIDs) are derived from the first minute of sun
	as calculated on the ground MINUS FIVE MINUTES.  This is to insure
	that a spacecraft day is not split between two files.  As such, the
	date and week # of a FID might not match that of the FEM data.
HISTORY:
	Written Dec-91 by M.Morrison
	28-Feb-92 (MDM) - changed from MK_FID to MK_FEM
			  cleaned up the code since it no longer was using
			  random AOSLOS files that potentially overlapped in time
	17-Mar-92 (MDM) - Updated FEM structure to handle the SIRIUS path
			  name.
	26-Apr-92 (MDM) - Regenerated all files with no time difference between
			  the predicted first minute of sun and the FileID.
			  Previous values had the FileID 5 minutes before the
			  the predicted first minute of sun.
	26-May-92 (MDM) - Made MK_FEM_WRT always use /clobber
	27-Jul-92 (MDM) - corrected bug which was eliminating station contacts
			  from the FEM structure when the night/day transition
			  occurred when an SAA or station contact was happening
	 7-Apr-93 (MDM) - Added /ASCA option
V3.0	21-Feb-94 (MDM) - Increased the resolution of the day/night boundary
			  by incorporating a call to GET_SUNSET
			  (increase is from 15 sec to 1 sec resolution)
	16-Mar-94 (MDM) - Change to the way GET_SUNSET is called since the
			  new FEM file does not exist yet, and GET_SUNSET was
			  doing a RD_FEM within it.
V3.1	13-Apr-94 (MDM) - Corrected so that ASCA calculations do not use
			  GET_SUNSET 
V4.0	23-Mar-95 (MDM) - Updated to handle Wallops ground station.
			- Had to modify the FEM structure so a new extension
			  was used.  Eliminated the antenna fields.  Expanded
			  the possible number of station contacts within a
			  single orbit from 3 to 6
			- Added /VERSION keyword


mk_fem_aoslos [1] $SSW/yohkoh/gen/idl/atest/mk_fem_aoslos.pro
[Previous] [Next]
NAME:
	mk_fem_aoslos
PURPOSE:
	Generate a AOSLOS file to be used by MK_FEM
INPUT:
	week
	year
OPTIONAL INPUT:
	interval - the resolution of the output file in sec.  If
		not passed it is 15 seconds.
OUTPUT:
	aoslos_file-filename of AOSLOS output
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], Ex2Int [1], Ex2Int [2], Int2Ex [1]
	Int2Ex [2], concat_dir [4], run_dsnfil, week2ex [1], week2ex [2]
 CALLED BY:
	mk_fem [1], mk_fem [2]
HISTORY:
	Written 19-Feb-92 by M.Morrison
	15-Mar-93 (MDM) - Added print statement
	 7-Apr-93 (MDM) - Added /ASCA option


mk_fem_aoslos [2] $SSW/yohkoh/gen/idl/orbit/mk_fem_aoslos.pro
[Previous] [Next]
NAME:
	mk_fem_aoslos
PURPOSE:
	Generate a AOSLOS file to be used by MK_FEM
INPUT:
	week
	year
OPTIONAL INPUT:
	interval - the resolution of the output file in sec.  If
		not passed it is 15 seconds.
OUTPUT:
	aoslos_file-filename of AOSLOS output
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], Ex2Int [1], Ex2Int [2], Int2Ex [1]
	Int2Ex [2], concat_dir [4], run_dsnfil, week2ex [1], week2ex [2]
 CALLED BY:
	mk_fem [1], mk_fem [2]
HISTORY:
	Written 19-Feb-92 by M.Morrison
	15-Mar-93 (MDM) - Added print statement
	 7-Apr-93 (MDM) - Added /ASCA option


mk_fem_file [1] $SSW/yohkoh/gen/idl/atest/mk_fem_file.pro
[Previous] [Next]
NAME:
	mk_fem_file
PURPOSE:
	To create the FEM file so that MK_FEM_WRT can write into it
INPUT:
	timarr - The time of one of the s/c day's in the week
		 It does not have to be the first s/c day
OPTIONAL INPUT:
	clobber
	dirout
 CALLS: ***
	CHECK_TIME, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], Ex2Int [1], Ex2Int [2]
	FEM_STRUCT, GEN_STRUCT [1], GEN_STRUCT [2], Int2Ex [1], Int2Ex [2], OPEN_DA_FILE
	WRT1P_FH, concat_dir [4], ex2dow [1], ex2dow [2], ex2week [1], ex2week [2]
	fmt_tim [1], fmt_tim [2], mk_fem [1], mk_fem [2], rdwrt [1], rdwrt [2], rdwrt [3]
HISTORY:
	Written Feb-92 by M.Morrison
	10-Mar-92 (MDM) - Changed orbit step size to 97 min (from 95 min)
	Ver 1.1 17-Mar-92 (MDM) - Write out the data structure version #
	Ver 2.0 26-Mar-92 (MDM) - changed FileID to be exactly the predicted
				  first minute of sun
	Ver 2.1 26-May-92 (MDM) - Changed MK_FEM_WRT to use orbit duration
				  of 97.5 instead of 98.0
	Ver 2.2 17-Jun-92 (MDM) - Simple mod to change new file protection to
				  666 (RW for everyone)
		 7-Apr-93 (MDM) - Added /ASCA option
V3.0   21-Feb-94 (MDM) - Increased the resolution of the day/night boundary
                         by incorporating a call to GET_SUNSET
                         (increase is from 15 sec to 1 sec resolution)
V3.2	14-Apr-94 (MDM) - Changed period between ASCA orbits to 96 minutes
			  (from 97 minutes)
			- Program version was being logged as 2.2
V3.21	15-Apr-94 (MDM) - Allowed 16*7 instead of 15*7 orbits in a week
			  for ASCA
V3.3	16-Jan-95 (MDM) - Patch for roll over to new year case
V4.0	23-Mar-95 (MDM) - Modified to add Wallops (see MK_FEM)
			- Modified to get the version from MK_FEM
V5.0    7-Apr-99 (SLF) - add ORBIT_PERIOD input keyword (allow orbit degradation)


mk_fem_file [2] $SSW/yohkoh/gen/idl/orbit/mk_fem_file.pro
[Previous] [Next]
NAME:
	mk_fem_file
PURPOSE:
	To create the FEM file so that MK_FEM_WRT can write into it
INPUT:
	timarr - The time of one of the s/c day's in the week
		 It does not have to be the first s/c day
OPTIONAL INPUT:
	clobber
	dirout
 CALLS: ***
	CHECK_TIME, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], Ex2Int [1], Ex2Int [2]
	FEM_STRUCT, GEN_STRUCT [1], GEN_STRUCT [2], Int2Ex [1], Int2Ex [2], OPEN_DA_FILE
	WRT1P_FH, concat_dir [4], ex2dow [1], ex2dow [2], ex2week [1], ex2week [2]
	fmt_tim [1], fmt_tim [2], mk_fem [1], mk_fem [2], rdwrt [1], rdwrt [2], rdwrt [3]
HISTORY:
	Written Feb-92 by M.Morrison
	10-Mar-92 (MDM) - Changed orbit step size to 97 min (from 95 min)
	Ver 1.1 17-Mar-92 (MDM) - Write out the data structure version #
	Ver 2.0 26-Mar-92 (MDM) - changed FileID to be exactly the predicted
				  first minute of sun
	Ver 2.1 26-May-92 (MDM) - Changed MK_FEM_WRT to use orbit duration
				  of 97.5 instead of 98.0
	Ver 2.2 17-Jun-92 (MDM) - Simple mod to change new file protection to
				  666 (RW for everyone)
		 7-Apr-93 (MDM) - Added /ASCA option
V3.0   21-Feb-94 (MDM) - Increased the resolution of the day/night boundary
                         by incorporating a call to GET_SUNSET
                         (increase is from 15 sec to 1 sec resolution)
V3.2	14-Apr-94 (MDM) - Changed period between ASCA orbits to 96 minutes
			  (from 97 minutes)
			- Program version was being logged as 2.2
V3.21	15-Apr-94 (MDM) - Allowed 16*7 instead of 15*7 orbits in a week
			  for ASCA
V3.3	16-Jan-95 (MDM) - Patch for roll over to new year case
V4.0	23-Mar-95 (MDM) - Modified to add Wallops (see MK_FEM)
			- Modified to get the version from MK_FEM


mk_fidlist $SSW/yohkoh/gen/idl/mo_disk/mk_fidlist.pro
[Previous] [Next]
	NAME: mk_fidlist

	PURPOSE: Make a complete list of fids given a first and a last fid. 

	Calling Sequence:
		fid_list = mk_fidlist( first_fid, last_fid)	;default dir
		fid_list = mk_fidlist( first_fid, last_fid, path=path) 
	or      fid_list = mk_fidlist( first_fid, last_fid, wid=wid) 

 CALLS: ***
	finddir [1], finddir [2], uniq_fid [1], uniq_fid [2]
 CALLED BY:
	disk2_mo [1], disk2_mo [2]
	History: written 5-May-93, gal.


mk_formt_html [3] $SSW/yohkoh/gen/idl/http/mk_formt_html.pro
[Previous] [Next]
   Name: mk_formt_html

   Purpose: make FORM-ready html segment for times (start [and stop])

   Input Paramters:
      start_select - set default start time
      stop_select  - set default stop time

   Calling Sequence:
      outarray=mk_formt_html(start_select [,stop_select], t0=tim0, t1=tim1)
 CALLS:
 CALLED BY
	html_form_addtime [1], html_form_addtime [2], html_form_addtime [3]


mk_gbe $SSW/yohkoh/gen/idl/gbo/mk_gbe.pro
[Previous] [Next]
NAME:
	mk_gbe
PURPOSE:
	Make the Yohkoh formated GRO/BATSE event log file (GBE)
 CALLS: ***
	mk_week1_file
HISTORY:
	Written 13-Apr-93 by M.Morrison
	18-May-93 (MDM) - Changed to use MK_WEEK1_FILE


mk_gbl $SSW/yohkoh/gen/idl/gbo/mk_gbl.pro
[Previous] [Next]
NAME:
	mk_gbl
PURPOSE:
	Make the Yohkoh formated GRO/BATSE light curve file (GBL)
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], GBO_STRUCT [1], GBO_STRUCT [2]
	GEN_STRUCT [1], GEN_STRUCT [2], GET_NBYTES, MIPSEB_DBLFIXUP, OBS_STRUCT [1]
	OBS_STRUCT [2], OPEN_DA_FILE, WRT1P_FH, anytim2ex [1], anytim2ex [2]
	anytim2ints [1], anytim2ints [2], concat_dir [4], ex2fid [1], ex2fid [2]
	rdwrt [1], rdwrt [2], rdwrt [3]
HISTORY:
	Written 13-Apr-93 by M.Morrison


mk_gev [1] $SSW/yohkoh/gen/idl/atest/mk_gev.pro
[Previous] [Next]
NAME:
	mk_gev
PURPOSE:
	Take the daily text GOES event summary file and make a 
	weekly binary log file
KEYWORD INPUT:
       week    - a string with the year/week if the format
                 91_49 where 91 is the year, 49 is the week
                 This is required input.
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], GBO_STRUCT [1], GBO_STRUCT [2]
	GEN_STRUCT [1], GEN_STRUCT [2], GET_NBYTES, OPEN_DA_FILE, RD_SELSIS2, WRT1P_FH
	anytim2ex [1], anytim2ex [2], concat_dir [4], ex2fid [1], ex2fid [2]
	file_list [1], file_list [2], gt_day [1], gt_day [2], pr_week2tim [1]
	pr_week2tim [2], rd_fem, rd_selsis, rdwrt [1], rdwrt [2], rdwrt [3], str_replace [1]
	str_replace [2], timegrid
OPTIONAL KEYWORD INPUT:
	outdir	- The output directory for the output file.
		  If undefined, write it to $DIR_GEN_GEV.
HISTORY:
	Written 4-Jun-92 by M.Morrison
	28-Aug-92 (MDM) - Modified how RD_FEM was called (call by week#)
       14-May-93 (MDM) - Changed to use $ydb_raw and $ys
	18-May-93 (MDM) - Minor patch in checking that there is data
        2-dec-96 (SLF) - SEL format change - use rd_selsis2 for new data
       13-Jan-2000 (SLF) - Y2K - apply 2-dec-96 to 2000+


mk_gev [2] $SSW/yohkoh/gen/idl/gbo/mk_gev.pro
[Previous] [Next]
NAME:
	mk_gev
PURPOSE:
	Take the daily text GOES event summary file and make a 
	weekly binary log file
KEYWORD INPUT:
       week    - a string with the year/week if the format
                 91_49 where 91 is the year, 49 is the week
                 This is required input.
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], GBO_STRUCT [1], GBO_STRUCT [2]
	GEN_STRUCT [1], GEN_STRUCT [2], GET_NBYTES, OPEN_DA_FILE, RD_SELSIS2, WRT1P_FH
	anytim2ex [1], anytim2ex [2], concat_dir [4], ex2fid [1], ex2fid [2]
	file_list [1], file_list [2], gt_day [1], gt_day [2], pr_week2tim [1]
	pr_week2tim [2], rd_fem, rd_selsis, rdwrt [1], rdwrt [2], rdwrt [3], str_replace [1]
	str_replace [2], timegrid
OPTIONAL KEYWORD INPUT:
	outdir	- The output directory for the output file.
		  If undefined, write it to $DIR_GEN_GEV.
HISTORY:
	Written 4-Jun-92 by M.Morrison
	28-Aug-92 (MDM) - Modified how RD_FEM was called (call by week#)
       14-May-93 (MDM) - Changed to use $ydb_raw and $ys
	18-May-93 (MDM) - Minor patch in checking that there is data
        2-dec-96 (SLF) - SEL format change - use rd_selsis2 for new data


MK_GRID_COORDS [2] $SSW/yohkoh/ucon/idl/slater/mk_grid_coords.pro
[Previous] [Next]
 NAME:
	MK_GRID_COORDS
 PURPOSE:
 CATEGORY:
 CALLING SEQUENCE:
 INPUTS:
   POSITIONAL PARAMETERS:
   KEYWORDS PARAMETERS:
 OUTPUTS:
   POSITIONAL PARAMETERS:
   KEYWORDS PARAMETERS:
 CALLS: ***
	REPVEC [1], REPVEC [2]
 CALLED BY:
	DRAW_GRID [1], DRAW_GRID [2], DRAW_GRID [3]
 COMMON BLOCKS:
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 EXAMPLE:
 MODIFICATION HISTORY:
       July, 1992. - Written by GLS, LMSC.


MK_GRID_COORDS2 $SSW/yohkoh/ucon/idl/slater/mk_grid_coords2.pro
[Previous] [Next]
 NAME:
	MK_GRID_COORDS2
 CALLS:
 CALLED BY
	DRAW_GRID2


MK_GRSPCH $SSW/yohkoh/ucon/idl/hiraoka/mk_grspch.pro
[Previous] [Next]
 
 NAME:
       MK_GRSPCH
 PURPOSE:
       To output the grs_pc( pc13-16,pc23-26 ) data for utplot.
 CALLING SEQUENCE:
       grspch = mk_grspch( index,data )
       grspch = mk_grspch( index,data,xtime=xtime )
        ( after the run of yodat and the extract of 'index' and 'data' )
 INPUTS:
       index - Wbs index structure from reformat data.
       data  - Wbs data structure from reformat data.
 OPTIONAL INPUTS:
       sec   - If set, count rate is 1 sec.
 OUTPUTS:
       grspch - Float array containing of grs_pc data.
                 ( pc13,pc14,pc15,pc16,pc23,pc24,pc25 and pc26 )
               grspch = fltarr( 8,8*N ). grspch(0,*) is grs_pc13, grspch(5,*)
               is grs_pc24.  ( N: number of wbs data. )
              -- example.--
                 utplot,xtime,grspch(0,*),index(0)
                   --> plot grs_pc11 time profile. 
                       count rate is 0.5sec. ( high bit rate )
 OPTIONAL OUTPUTS:
       xtime - This option gives corresponding time for each of 
               grs_pc data time.
                 ( for utplot )
 CALLED BY:
	PLOT_GRSPCH
 PROCEDURE:
       XTIME is the middle of observation time interval. the observation
       time is header time minus prestored time.
       Output array GRSPCH has no deadtime-corrected data.
 CALLS: ***
	HXT_DECOMP, gt_day [1], gt_day [2], gt_dp_rate [1], gt_dp_rate [2], gt_time [1]
	gt_time [2]
 RESTRICTIONS:
       The optional input SEC is restricted to high and medium bit rates.
 HISTORY:
       Written 4-dec-93 by T.Hiraoka ( Rikkyo Univ.)


MK_GRSPCL $SSW/yohkoh/ucon/idl/hiraoka/mk_grspcl.pro
[Previous] [Next]
 
 NAME:
       MK_GRSPCL
 PURPOSE:
       To output the grs_pc( pc11,12,21,22 ) data for utplot.
 CALLING SEQUENCE:
       grspcl = mk_grspcl( index,data )
       grspcl = mk_grspcl( index,data,xtime=xtime )
        ( after the run of yodat and the extract of 'index' and 'data' )
 INPUTS:
       index - Wbs index structure from reformat data.
       data  - Wbs data structure from reformat data.
 OPTIONAL INPUTS:
       sec   - If set, count rate is 1 sec.
 OUTPUTS:
       grspcl - Float array containing of grs_pc data.
                  ( pc11, pc12, pc21 and pc22 )
               grspcl = fltarr( 4,16*N ). grspcl(0,*) is grs_pc11, grspcl(3,*)
               is grs_pc22.  ( N: number of wbs data. )
              -- example.--
                 utplot,xtime,grspcl(0,*),index(0)
                   --> plot grs_pc11 time profile. 
                       count rate is 0.25sec. ( high bit rate )
 OPTIONAL OUTPUTS:
       xtime - This option gives corresponding time for each of 
               grs_pc data time.
                 ( for utplot )
 CALLED BY:
	PLOT_GRSPCL
 PROCEDURE:
       XTIME is the middle of observation time interval. the observation
       time is header time minus prestored time.
       Output array GRSPCL has no deadtime-corrected data.
 CALLS: ***
	HXT_DECOMP, gt_day [1], gt_day [2], gt_dp_rate [1], gt_dp_rate [2], gt_time [1]
	gt_time [2]
 RESTRICTIONS:
       The optional input SEC is restricted to high and medium bit rates.
 HISTORY:
       Written 4-dec-93 by T.Hiraoka ( Rikkyo Univ.)


MK_GRSPHH1 $SSW/yohkoh/ucon/idl/hiraoka/mk_grsphh1.pro
[Previous] [Next]
 
 NAME:
       MK_GRSPHH1
 PURPOSE:
       To return the grs_phh1 data for utplot.
 CALLING SEQUENCE:
       grsphh = mk_grsphh1( index,data )
       grsphh = mk_grsphh1( index,data,xtime=xtime )
        ( after the run of yodat and the extract of 'index' and 'data' )
 INPUTS:
       index - Wbs index structure from reformat data.
       data  - Wbs data structure from reformat data.
 OPTIONAL INPUTS:
       channel - The range of channel number. ( 0 - 15 )
              -- example.--
                 channel = 15  --> output the channel 15 of grs_phh.
                 channel = [ 5,10 ]  --> output the total of channel 5 to 10.
 OUTPUTS:
       grsphh - Float array containing of grs_phh data.
               grsphh = fltarr( 16,N ). grsphh(0,*) is channel 0 of grs_phh,
                 ( N: number of wbs data. )
              -- example.--
                 utplot,xtime,grsphh(5,*),index(0)
                   --> plot grs_phh channel 5 time profile.
                       count rate is 4 sec. ( high bit rate )
               If optional input channel is present, grsphh is one-dimensional
               float array.  grsphh = fltarr( N ).
 OPTIONAL OUTPUTS:
       xtime - This option gives corresponding time for each of
               grs_phh data time.
                 ( for utplot )
 CALLS: ***
	HXT_DECOMP, gt_day [1], gt_day [2], gt_dp_rate [1], gt_dp_rate [2], gt_time [1]
	gt_time [2]
 CALLED BY:
	PLOT_GRSPHH
 PROCEDURE:
       XTIME is the middle of observation time interval. the observation
       time is header time minus prestored time.
       Output array GRSPHH has no deadtime-corrected data.
 HISTORY:
       Written 4-dec-93 by T.Hiraoka ( Rikkyo Univ.)
       Updated 27-dec-93 by T.Hiraoka ; added channel option.


MK_GRSPHH2 $SSW/yohkoh/ucon/idl/hiraoka/mk_grsphh2.pro
[Previous] [Next]
 
 NAME:
       MK_GRSPHH2
 PURPOSE:
       To return the grs_phh2 data for utplot.
 CALLING SEQUENCE:
       grsphh = mk_grsphh2( index,data )
       grsphh = mk_grsphh2( index,data,xtime=xtime )
        ( after the run of yodat and the extract of 'index' and 'data' )
 INPUTS:
       index - Wbs index structure from reformat data.
       data  - Wbs data structure from reformat data.
 OPTIONAL INPUTS:
       channel - The range of channel number. ( 0 - 15 )
              -- example.--
                 channel = 15  --> output the channel 15 of grs_phh.
                 channel = [ 5,10 ]  --> output the total of channel 5 to 10.
 OUTPUTS:
       grsphh - Float array containing of grs_phh data.
               grsphh = fltarr( 16,N ). grsphh(0,*) is channel 0 of grs_phh,
                 ( N: number of wbs data. )
              -- example.--
                 utplot,xtime,grsphh(5,*),index(0)
                   --> plot grs_phh channel 5 time profile.
                       count rate is 4 sec. ( high bit rate )
               If optional input channel is present, grsphh is one-dimensional
               float array.  grsphh = fltarr( N ).
 OPTIONAL OUTPUTS:
       xtime - This option gives corresponding time for each of
               grs_phh data time.
                 ( for utplot )
 CALLS: ***
	HXT_DECOMP, gt_day [1], gt_day [2], gt_dp_rate [1], gt_dp_rate [2], gt_time [1]
	gt_time [2]
 CALLED BY:
	PLOT_GRSPHH
 PROCEDURE:
       XTIME is the middle of observation time interval. the observation
       time is header time minus prestored time.
       Output array GRSPHH has no deadtime-corrected data.
 HISTORY:
       Written 4-dec-93 by T.Hiraoka ( Rikkyo Univ.)
       Updated 27-dec-93 by T.Hiraoka ; added channel option.


MK_GRSPHL1 $SSW/yohkoh/ucon/idl/hiraoka/mk_grsphl1.pro
[Previous] [Next]
 
 NAME:
       MK_GRSPHL1
 PURPOSE:
       To output the grs_phl1 data for utplot.
 CALLING SEQUENCE:
       grsphl = mk_grsphl1( index,data )
       grsphl = mk_grsphl1( index,data,xtime=xtime )
        ( after the run of yodat and the extract of 'index' and 'data' )
 INPUTS:
       index - Wbs index structure from reformat data.
       data  - Wbs data structure from reformat data.
 OPTIONAL INPUTS:
       channel - The range of channel number. ( 0 - 127 )
              -- example.--
                 channel = 15  --> output the channel 15 of grs_phl.
                 channel = [ 15,20 ]  --> output the total of channel 15 to 20.
 OUTPUTS:
       grsphl - Float array containing of grs_phl data.
               grsphl = fltarr( 128,N ). grsphl(0,*) is channel 0 of grs_phl,
                 ( N: number of wbs data. )
              -- example.--
                 utplot,xtime,grsphl(5,*),index(0)
                   --> plot grs_phl channel 5 time profile.
                       count rate is 4 sec. ( high bit rate )
               If optional input channel is present, grsphl is one-dimensional
               float array.  grsphl = fltarr( N ).
 OPTIONAL OUTPUTS:
       xtime - This option gives corresponding time for each of
               grs_phl data time.
                 ( for utplot )
 CALLS: ***
	HXT_DECOMP, dtcf_ph_grs1l, gt_day [1], gt_day [2], gt_dp_rate [1], gt_dp_rate [2]
	gt_time [1], gt_time [2]
 CALLED BY:
	PLOT_GRSPHL
 PROCEDURE:
       XTIME is the middle of observation time interval. the observation
       time is header time minus prestored time.
       Output array GRSPHL has deadtime-corrected data.
 HISTORY:
       Written 4-dec-93 by T.Hiraoka ( Rikkyo Univ.)
       Updated 27-dec-93 by T.Hiraoka ; added channel option.


MK_GRSPHL2 $SSW/yohkoh/ucon/idl/hiraoka/mk_grsphl2.pro
[Previous] [Next]
 
 NAME:
       MK_GRSPHL2
 PURPOSE:
       To output the grs_phl2 data for utplot.
 CALLING SEQUENCE:
       grsphl = mk_grsphl2( index,data )
       grsphl = mk_grsphl2( index,data,xtime=xtime )
        ( after the run of yodat and the extract of 'index' and 'data' )
 INPUTS:
       index - Wbs index structure from reformat data.
       data  - Wbs data structure from reformat data.
 OPTIONAL INPUTS:
       channel - The range of channel number. ( 0 - 127 )
              -- example.--
                 channel = 15  --> output the channel 15 of grs_phl.
                 channel = [ 15,20 ]  --> output the total of channel 15 to 20.
 OUTPUTS:
       grsphl - Float array containing of grs_phl data.
               grsphl = fltarr( 128,N ). grsphl(0,*) is channel 0 of grs_phl,
                 ( N: number of wbs data. )
              -- example.--
                 utplot,xtime,grsphl(5,*),index(0)
                   --> plot grs_phl channel 5 time profile.
                       count rate is 4 sec. ( high bit rate )
               If optional input channel is present, grsphl is one-dimensional
               float array.  grsphl = fltarr( N ).
 OPTIONAL OUTPUTS:
       xtime - This option gives corresponding time for each of
               grs_phl data time.
                 ( for utplot )
 CALLS: ***
	DTCF_PH_GRS2L, HXT_DECOMP, gt_day [1], gt_day [2], gt_dp_rate [1], gt_dp_rate [2]
	gt_time [1], gt_time [2]
 CALLED BY:
	PLOT_GRSPHL
 PROCEDURE:
       XTIME is the middle of observation time interval. the observation
       time is header time minus prestored time.
       Output array GRSPHL has deadtime-corrected data.
 HISTORY:
       Written 4-dec-93 by T.Hiraoka ( Rikkyo Univ.)
       Updated 27-dec-93 by T.Hiraoka ; added channel option.


mk_gsn_obs $SSW/yohkoh/gen/idl/gbo/mk_gsn_obs.pro
[Previous] [Next]
NAME:
	mk_gsn_obs
PURPOSE:
	Generate the observing log file from a SOON/SPOT archive tape
SAMPLE CALLING SEQUENCE:
	mk_gsn_obs
OPTIONAL INPUT:
	tape_name - The name of the tape
		  The tape name can be derived from the tape contents, 
		  but this is not completely accurate.
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], GEN_STRUCT [1]
	GEN_STRUCT [2], OBS_STRUCT [1], OBS_STRUCT [2], OPEN_DA_FILE, SOON_STRUCT
	WRT1P_FH, anytim2ex [1], anytim2ex [2], anytim2ints [1], anytim2ints [2]
	concat_dir [4], def_tapd [1], def_tapd [2], def_tapd [3], ex2fid [1], ex2fid [2]
	file_exist [1], file_exist [3], get_logenv [1], get_logenv [2], int2secarr [1]
	int2secarr [2], mk_gsn_obs_s1, mtcmd [1], mtcmd [2], rdwrt [1], rdwrt [2], rdwrt [3]
OPTIONAL KEYWORD INPUT:
	dev	- The device number.  If not defined, it uses dev=0
	outfil	- The output filename to create, excluding the directory
		  portion.  If not passed, the tape_name is used.
	save_header - If set, then the FITS header for "save_header" images 
		  for each file will be saved to an output file.
	save_img - If set, then a FITS image for "save_img" images 
		  for each file will be saved to an output file.
OPTIONAL KEYWORD INPUT:
	outdir	- The output directory
RESTRICTION:
HISTORY:
	Written 7-Dec-93 by M.Morrison
V0.02	13-Dec-93 (MDM) - Changed the MK_GSN_OBS_S1 routine 
			- Added SITE and IMAGE_TYPE updating
			- Corrected angular calculation for PFI location
V0.03	 4-Jan-94 (MDM) - Added the list of observing sites
V0.04	26-Jul-94 (MDM) - Changed logic to write out temporary file and
			  to figure out the file name from the first image
			  on the tape.
			- Replaced SPAWN with call to MTCMD
V0.05	27-Jul-94 (MDM) - Added SAVE_IMG option
V0.06	27-Jul-94 (MDM) - Revised to save "per tape file" structure at the
			  end of the file like a "roadmap" instead of at the
			  beginning so that we don't have to waste space
			  (we were having to allocate the maximum amount of
			  space to insure it would fit).
			- Started saving .IMAGE_AVG
V0.10	28-Jul-94 (MDM) - Starting archiving a single full disk image per
			  tape file
V0.20	28-Jul-94 (MDM) - Corrected to save only full disk images
V0.30	 2-Aug-94 (MDM) - Corrected location derivation.  Previously it was
			  not correcting for the P-angle.
V0.40	 3-Aug-94 (MDM) - Change "IMAGE_TYPE" to "C" for large scale h-alpha
			  images.
V0.50	 3-Aug-94 (MDM) - Save bad headers when location and pixel size is not
			  good, as well as bad time/date field
			- Added retry on OPEN of drive unit
V0.51	 4-Aug-94 (MDM) - Changed the format of the BAD header output file
			  (list the bad pixel size)
V0.52	 4-Aug-94 (MDM) - Fixed incorrect location printing statements
V1.00	 8-Aug-94 (MDM) - Modified to save the AVERAGE center of image location
			  instead of the location for the last image.
			- Cap the deviation from the first position at
			  32000
V1.01	22-Sep-94 (MDM) - Patched GSN_INFO so that it used the site info
			  in the tape name if it is unknown in the FITS header
V1.02	03-Nov-95 (GLS) - Replaced reference to /ydb/ref_scratch to
			  get_logenv('DIR_REFORMAT_SC').


mk_gsn_obs_s1 $SSW/yohkoh/gen/idl/gbo/mk_gsn_obs_s1.pro
[Previous] [Next]
NAME:
	mk_gsn_obs_s1
PURPOSE:
	To build the SOON/SPOT observing log entries for a single tape file
	and the pointer/summary structure for that file
INPUT:
	lun	- the logical unit of the opened tape drive
	tape_name- the tape name
INPUT/OUTPUT:
	eot	- end of tape marker
	itapefile-the file number on the tape
	neof	- the number of consecutive end of file marks found
OUTPUT:
	obs	- the observing log entry array for that one tape file
	obshdr	- the pointer/summary structure for that tape file
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], CONV_A2H [1], CONV_A2H [2]
	CONV_H2A [1], CONV_H2A [2], CONV_H2HS [1], CONV_H2HS [2], FILE_EXIST [2]
	FXPAR [1], FXPAR [2], GSN_INFO, UNIQ [1], UNIQ [2], UNIQ [3], anytim2ex [1]
	anytim2ex [2], anytim2ints [1], anytim2ints [2], concat_dir [4], ex2fid [1]
	ex2fid [2], fid2ex [1], fid2ex [2], file_exist [1], file_exist [3], fmt_tim [1]
	fmt_tim [2], get_rb0p [1], get_rb0p [2], int2secarr [1], int2secarr [2], mail [1]
	mail [2], prstr [1], prstr [2], wrt_fits [1], wrt_fits [2]
 CALLED BY:
	mk_gsn_obs
OPTIONAL KEYWORD INPUT:
	qstop	- If set, then stop within the program (for debugging)
	save_head - If set, save the first "save_head" headers for each
		  file on the tape
	save_img - If set, then save the first "save_img" images for each
		  file on the tape
	archive_fulldisk - If set, then save the first full disk image in
		  each tape file to $DIR_GBO_SOON
HISTORY:
	Written Dec-93 by M.Morrison
	(See MK_GSN_OBS.PRO for a history)
	22-Sep-94 (MDM) - Added print statement of REF_TIME


mk_gx $SSW/yohkoh/gen/idl/gbo/mk_gx.pro
[Previous] [Next]
NAME:
	mk_gx
PURPOSE:
	Generate the GXT, G6D, G7D (GOES light curve) data files
SAMPLE CALLING SEQUENCE:
	mk_gx, 'gxt', infil
	mk_gx, 'g6d', week=week
	mk_gx, 'g7d', week=week, /append, /usefid
INPUT:
	prefix	- The prefix is required.  It must be GXT, G6D, or G7D
OPTIONAL INPUT:
	infil0	- A string array with a list of the input file names.
		  It should include the directory path.  
		  The inputfiles can be derived if the "week" option is used.
	outfil	- The output filename to create.  The output
		  file can be derived if the "week" option is used
 CALLS: ***
	ATT_STRUCT [1], ATT_STRUCT [2], BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3]
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], GBO_STRUCT [1]
	GBO_STRUCT [2], GEN_STRUCT [1], GEN_STRUCT [2], GET_NBYTES, MK_GOL_STR
	OBS_STRUCT [1], OBS_STRUCT [2], OPEN_DA_FILE, RD_GOESTEK, REF_STRUCT
	Rd_NewOrb_p [1], Rd_NewOrb_p [2], Rd_Pointer [1], Rd_Pointer [2], Rd_fHeader [1]
	Rd_fHeader [2], Rd_fHeader [3], SELSIS2FID, WRT1P_FH, anytim2ex [1], anytim2ex [2]
	anytim2ints [1], anytim2ints [2], break_file [4], concat_dir [4], ex2fid [1]
	ex2fid [2], fid2ex [1], fid2ex [2], file_exist [1], file_exist [3], file_list [1]
	file_list [2], finddir [1], finddir [2], gt_day [1], gt_day [2], rd_gbl_raw [1]
	rd_gbl_raw [2], rd_goes3sec [1], rd_goes3sec [2], rd_week_file [1]
	rd_week_file [2], rd_week_file [3], rd_week_file [4], rdwrt [1], rdwrt [2]
	rdwrt [3], str_replace [1], str_replace [2], week2ex [1], week2ex [2]
	where_arr [1], where_arr [2]
OPTIONAL KEYWORD INPUT:
	week	- a string with the year/week if the format
		  91_49 where 91 is the year, 49 is the week
	append	- If set, try to just append the files in "infil"
		  list which are not already in the GX file.
	usefid	- If set, use the FID time in the orbit pointer
		  (so that it can be recognized when used with
		  the /append switch)
	indir	- The input directory
	outdir	- The output directory
RESTRICTION:
	Cannot use /USEFID or /APPEND option with 'GBL' datatype
HISTORY:
	Written 13-Apr-93 by M.Morrison
	14-Apr-93 (MDM) - Expanded to handle GBL


mk_gxt $SSW/yohkoh/gen/idl/gbo/mk_gxt.pro
[Previous] [Next]
NAME:
	mk_gxt
PURPOSE:
	write binary file containing digitized daily GOES
	soft xray plots (derived from Tektronics plot files)
KEYWORD INPUT:
       week    - a string with the year/week if the format
                 91_49 where 91 is the year, 49 is the week
                 This is required input.
 CALLS: ***
	mk_week_file [1], mk_week_file [2]
OPTIONAL KEYWORD INPUT:
	outdir	- The output directory for the output file.
		  If undefined, write it to $DIR_GEN_GXT.
HISTORY:
	S.L.Freeland, 11-Sep-92 
	(Using mk_gev by M.Morrison as template)
	10-Oct-1992 - changed file name generation to avoid sort
	15-Apr-93 (MDM) - Replace with a call to MK_GX
	29-Apr-93 (MDM) - Replaced with a call to MK_WEEK_FILE


MK_HXSPC $SSW/yohkoh/ucon/idl/hiraoka/mk_hxspc.pro
[Previous] [Next]
 
 NAME:
       MK_HXSPC
 PURPOSE:
       To output the hxs_pc data for utplot.
 CALLING SEQUENCE:
       hxspc = mk_hxspc( index,data )
       hxspc = mk_hxspc( index,data,xtime=xtime )
        ( after the run of yodat and the extract of 'index' and 'data' )
 INPUTS:
       index - Wbs index structure from reformat data.
       data  - Wbs data structure from reformat data.
 OPTIONAL INPUTS:
       sec   - If set, count rate is 1 sec.
 OUTPUTS:
       hxspc - Float array containing of hxs_pc data.
               hxspc = fltarr( 2,32*N ). hxspc(0,*) is hxs_pc1, hxspc(1,*)
               is hxs_pc2.  ( N: number of wbs data. )
              -- example.--
                 utplot,xtime,hxspc(0,*),index(0)
                   --> plot hxs_pc1 time profile. 
                       count rate is 0.125sec. ( high bit rate )
 OPTIONAL OUTPUTS:
       xtime - This option gives corresponding time for each of
               hxs_pc data time.
                 ( for utplot )
 CALLED BY:
	PLOT_HXSPC
 PROCEDURE:
       XTIME is the middle of observation time interval. the observation
       time is header time minus prestored time.
       Output array HXSPC has deadtime-corrected data.
 CALLS: ***
	HXT_DECOMP, dtcf_pc_hxs, gt_day [1], gt_day [2], gt_dp_rate [1], gt_dp_rate [2]
	gt_time [1], gt_time [2]
 RESTRICTIONS:
       The optional input SEC is restricted to high and medium bit rates.
 HISTORY:
       Written 4-dec-93 by T.Hiraoka ( Rikkyo Univ.)


MK_HXSPH $SSW/yohkoh/ucon/idl/hiraoka/mk_hxsph.pro
[Previous] [Next]
 
 NAME:
       MK_HXSPH
 PURPOSE:
       To output the hxs_ph data for utplot.
 CALLING SEQUENCE:
       hxsph = mk_hxsph( index,data )
       hxsph = mk_hxsph( index,data,xtime=xtime )
        ( after the run of yodat and the extract of 'index' and 'data' )
 INPUTS:
       index - Wbs index structure from reformat data.
       data  - Wbs data structure from reformat data.
 OPTIONAL INPUTS:
       channel - The range of channel number. ( 0 - 31 )
              -- example.--
                 channel = 15  --> output the channel 15 of hxs_ph.
                 channel = [ 15,20 ]  --> output the total of channel 15 to 20.
 OUTPUTS:
       hxsph - Float array containing of hxs_ph data.
               hxsph = fltarr( 32,4*N ). hxsph(0,*) is channel 0 of hxs_ph,
                 ( N: number of wbs data. )
              -- example.--
                 utplot,xtime,hxsph(5,*),index(0)
                   --> plot hxs_ph channel 5 time profile.
                       count rate is 1 sec. ( high bit rate )
               If optional input channel is present, hxsph is one-dimensional
               float array.  hxsph = fltarr( 4*N ).
 OPTIONAL OUTPUTS:
       xtime - This option gives corresponding time for each of
               hxs_ph data time.
                 ( for utplot )
 CALLS: ***
	HXT_DECOMP, dtcf_ph_hxs, gt_day [1], gt_day [2], gt_dp_rate [1], gt_dp_rate [2]
	gt_time [1], gt_time [2]
 CALLED BY:
	PLOT_HXSPH
 PROCEDURE:
       XTIME is the middle of observation time interval. the observation
       time is header time minus prestored time.
       Output array HXSPH has deadtime-corrected data.
 HISTORY:
       Written 4-dec-93 by T.Hiraoka ( Rikkyo Univ.)
       Updated 27-dec-93 by T.Hiraoka ; added channel option.


mk_hxt_sbt_64 $SSW/yohkoh/ucon/idl/sato/mk_hxt_sbt_64.pro
[Previous] [Next]
 FUNCTION: mk_hxt_sbt_64

 Make background subtracted HXT data from given structures:
   hxt_flare and hxt_bgd.

 usage : hxt_data = mk_hxt_sbt(hxt_flare,hxt_bgd)

         hxt_flare, hxt_bgd : generated by mk_hxt_sum.pro


mk_hxt_sum_64 $SSW/yohkoh/ucon/idl/sato/mk_hxt_sum_64.pro
[Previous] [Next]
NAME:
mk_hxt_sum_64
PURPOSE:
 To make integrated cal-mode data, which is used in image synthesis
CALLING SEQUENCE:
hxt=mk_hxt_sum_64(infile,index_in,data_in,1,7)
 for L band integration
INPUTS:
 infile: hda file name, index_in, data_in
OPTIONAL INPUT:
 noaskcmt ; for comment
 CALLS: ***
	SENSOR2GRID, SET_HXT_STRUCT, gt_time [1], gt_time [2]
NOTE:
 Output data format is similar to hxt format used in hxtpro
 Output data is integrated data from channel (ch_l) to channel (ch_h) 
 Output data is SAME for all elements. (elements are corresponding to each channel data
                                        in case of non CAL-mode data)


MK_HXTDATA $SSW/yohkoh/ucon/idl/sakao/mk_hxtdata.pro
[Previous] [Next]
 NAME:
	MK_HXTDATA
 PURPOSE:
	Extracts HXT BGD/DATA data from a file or a reformatted data 
	displayed on the screen.
	Retrurns a structure 'hxt' that contains HXT count data and associated 
	information.
 CALLING SEQUENCE:
	hxt = MK_HXTDATA(index, data, ssss, infil, channel=0)
 INPUT:
	index	- HXT index.
	data	- HXT data.
	ssss	- HXT ssss.
	infil	- HXT infil.
 CALLS: ***
	MK_HXT_SUM, SELECT_HXT, wmenu_sel [1], wmenu_sel [2]
 OPTIONAL KEYWORD INPUT:
	channel	- Specifies HXT energy channel (L:0, M1:1, M2:2, H:3) whose 
		  time profile is displayed on the screen.
	hs	- If set, then the time profile is displayed with 0.5-s 
		  resolution. 
 OUTPUT:
	hxt	- HXT data structure variable. 
 CATEGORY:
	HXT data analysis.
 HISTORY:
  version 1.0          92.11.25 (Wed)	T.Sakao written
  version 1.1          92.11.26 (Thu)
    Program was modified according to the replace of mk_hxt_sum.pro.
  version 1.2          93.06.21 (Mon)
    Option display was added.
  version 1.3          93.06.23 (Wed)
    Option channel was added.
	version 1.4	97.07.05 (Sat)	Added documentation.

  Original in hxt_hs_data v1.3. 


mk_hxtpat $SSW/yohkoh/ucon/idl/sato/mk_hxtpat.pro
[Previous] [Next]
NAME:;
PURPOSE
   To display fanbeam pattern
CALLING SEQUENCE:
 mk_hxtpat, hxt_x, hxt_y, p
OUTPUT 
 p(I,J,K)  fan beam pattern 
 I=1,64 J=1,64, K is a number of C# ($DIR_HXT_CAL/para3.dat)
 K=0,15 correspond to C#1,16
HISTORY
 Written 96/05/27 by J.Sato
Comment
 $DIR_HXT_CAL/para3.dat parameter is used.
 formulation of beam pattern is due to inda's formulation.
 Filed of view is same as default HXT image.
 If you want to overlay fan_beam pattern with hard X-ray images, hxt_x and hxt_y should be same value used in HXT images.
 ****parameter and shape of beam is tentative.********* 
 CALLS:


mk_key $SSW/yohkoh/gen/idl/dbase/mk_key.pro
[Previous] [Next]
NAME:
	mk_key
PURPOSE:
	Use the routine WMKKEY to construct a search key
	WMKKEY uses widgets
OPTIONAL INPUT:
	input	- The structure to be searched.  For example,
		  roadmap, index, or observing log.
OPTIONAL OUTPUT:
	ss	- A vector of the dataset# where the key matches
		  "input".  It is only returned if "input" is passed
		  to the routine.  If the user has made many keys
		  while in WMKKEY, the "ss" result is only for the first
		  key.
OUTPUT:
	Returns the string key
 CALLS: ***
	KeySea [1], KeySea [2], XMANAGER, wmkkey [1], wmkkey [2]
HISTORY:
	Written 6-Mar-92 by M.Morrison


mk_key_stokes $SSW/yohkoh/ucon/idl/wuelser/mk_key_stokes.pro
[Previous] [Next]
 NAME:
        mk_key_stokes
 PURPOSE:
        Creates a "transtype" structure to be used for constrained
        transformations with caltrans (TRANSTYPE keyword), and in
        set_mwlt and pp_mwlt2sxt (KEY and K_IN keywords, respectively).
 CATEGORY:
 CALLING SEQUENCE:
        key = mk_key_stokes(date)
        key = mk_key_stokes(date,/lores,/xreverse)
 INPUTS:
        date = time of MWLT image in any Yohkoh format, e.g., '16-jan-94'.
 KEYWORDS (INPUT):
        /lores = if set, a low resolution stokes magnetogram with 5.6"
                 pixels is assumed.  Default: hires (2.8" pixels)
        /xreverse = if set, MWLT image is assumed to be reversed.
                    Default: non-reversed.
                    NOTE: all raw MWLT images are reversed.
                          JPEG compressed MWLT images are not revesed.
        type = transformation type ('g', 'i', or 's').  Default: 'i'.
               For details see doc_library,'caltrans'
 OUTPUTS:
        key = structure.  Constraints for transf.
 KEYWORDS (OUTPUT):
 CALLS: ***
	get_mwlt_roll
 COMMON BLOCKS:
        None.
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:
        JPW, 30-dec-94


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

 Make a flat field image using a set of spatially displaced
 data images.


PRO mk_kuhn_flat, images, thresh, flat, offsets=offsets, niter=niter


 INPUT PARMETERS:
	images = cube of images.  Temporal variations must be removed.
	thresh = threshold for selecting valid parts of images.  If
		thresh > 0, valid data > thresh.  If thresh < 0,
		valid data < |thresh|.

 INPUT KEYWORDS:
       offsets = vector of approximate positional offsets of the images,
               giving x,y shifts for all images. Dimensioned (2,nimages).
               Offset is defined to be the location of a common place in the
               images, in CCD pixels.  Offsets should be given to 
		fractional pixels, to get shifts between images correct.
		If the IDL Astronomy correlation procedures are used
		to measure the shifts between images, the offsets
		to this routine should be the negatives of the shifts.

 OUTPUT PARAMETERS:
	flat = flat field image, normalized.  Zero values => no data.

 OPTIONAL KEYWORDS:
	niter = Number of iterations to run.  Default = 10.

 CALLS: ***
	STDEV
 PROCEDURE:
	Uses the method of Kuhn, Lin, and Loranz, Pub. Astron.
	Soc. Pacific, 103:1097, 1991.

 HISTORY:
	Written October 1993  Barry LaBonte


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

   Purpose: create/update generic file which maps files into pathnames

   Input Parameters:

   Optional Keyword Paramters:
	sw	- if set, the current $ys... idl routines are mapped (default)
	data	- if set, the current online data is mapped

   Category:
       system, swmaint, unix_only

   History - slf,  8-Aug-1992
	      slf, 19-nov-1992	; some upgrades for data path function
	      slf,  7-jan-1993  ; use DIR_GEN_SETUPD (DIR_GEN_SETUP/data)
	      slf, 13-Jan-1993  ; use DIR_SITE_SETUPD if exists
	      slf, 13-may-1993  ; exclude /ys/atest_NNNNN directories

   Motivation - location of reformatted data sets and software modules are
	not so dynamic to justify repeated (and slow) execution of findfile.
       Instead, the file-pathname relation ship can generally be mapped 
	once and remain valid for the session.   Associated routines would 
	read these files on the first access into a common area.  Subsequent 
	calls are via a table lookup for high efficiency.
		 
   Calling Sequence:
     	mk_mapfile [, /sw, /data]


 *** this routine should be run as a cron job (via idl_batch) a 
     few times a day

 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], DATA_PATHS, STR2ARR [1], STR2ARR [2], UNIQ [1], UNIQ [2], UNIQ [3]
	break_file [4], concat_dir [4], file_list [1], file_list [2], savegen [1]
	savegen [2]
 CALLED BY:
	sw2tree [1], sw2tree [2], ucon_check
  Restrictions: unix only.  Assumes links are used for software (/ys) and
	data directories (/ydnn).  Should be upgraded to allow environmentals
       and VMS logicals for these


mk_mask $SSW/yohkoh/sxt/idl/util/mk_mask.pro
[Previous] [Next]
An sswhere_event subroutine, to make the bit masks given the menu vectors
the unique modes, and the roadmap or index.

   28-Oct-1993 (SLF) Added /original switch to gt_res call
 CALLS:


mk_mo $SSW/yohkoh/gen/idl/mo_disk/mk_mo.pro
[Previous] [Next]
	NAME: mk_mo

	PURPOSE: Make an MO archive disk from Exabyte Archive Tape.

	CALLING SEQUENCE:
		mk_mo, mo, mo_node, mo_dev, mt_dev, mag_disk
 CALLS: ***
	mail [1], mail [2], mk_mo_disk2, mo_prep
	examples:
		mk_mo, '058A', 'flare4', 0 	;archive fr "on-line data"
		mk_mo, '058B', 'flare4', 0	;to MO # 0 on flare4
		mk_mo, '003B', 'flare4', 0, [0,1]	;archive fr tapeS
		mk_mo, '006B', 'flare4', 0, [0], '/yd13/mo_a'
	
	INPUT:
	mo		MO number to make (eg. 000A, 000B, 010A)
	mo_node		Node name where MO device is located.
	mo_dev		MO device number...(eg. 0 or 1)
	mag_disk	Directories for staging tape data
			Default are: ['/yd13/mo_a','/yd13/mo_b'] 
			if input undefined-- assumes /yd13...
	mt_dev		Tape device number 0 or 1. if undefined
			uses dev=0.  IF dev is vector batch mode
			is assumed.... no user prompts!
			force batch mode with ONE tape by [0,0].

	Optional Input: (NOT WORKING YET!)
	start_week	When more than 4 per MO side...
			(eg for mo=' 007a', start_week='91_01')
	interactive	switch to force interactive run

	LIMITS:
		Only will dump a maxium of two archive weeks to MO.
		When more than two tape archive weeks are contained
		on an MO side must use "start_week" to dump the 3rd
		and 4th weeks to MO.

	HISTORY:
		written by gal 9-Apr-93
		mods, 6-May-93, gal


mk_mo2 [1] $SSW/yohkoh/gen/idl/mo_disk/mk_mo2.pro
[Previous] [Next]
	NAME: mk_mo2

	PURPOSE: Make an MO archive disk from online data or an 
		Exabyte Archive Tape.

	CALLING SEQUENCE:
		mk_mo2, mo, mo_node, mo_dev, mag_disk, mt_dev=[0,1]
 CALLS: ***
	PREFIXCK, disk2_mo [1], disk2_mo [2], finddir [1], finddir [2], list_mo_log [1]
	list_mo_log [2], mail [1], mail [2], mk_mo_log, mo_check, mo_fndirck, mo_patch
	mo_prep, mo_tap_dump, momount, wk_online
	Examples:
	  from online data:
		mk_mo2, '058A', 'flare4', 0 	;archive fr "on-line data"
		mk_mo2, '058B', 'flare4', 1	;to MO # 1 on flare4
	  from 8mm tape:
		mk_mo2, '003B', 'flare4', 0, mt_dev=[0,1] ;archive f/tapeS
	  from staging disk:
		mk_mo2, '006B', 'flare4', 0, '/yd13' ;archive f/mag_disk
	
	INPUT:
	mo		MO number to make (eg. 000A, 000B, 010A)
	mo_node		Node name where MO device is located.
	mo_dev		MO device number...(eg. 0 or 1)

	Optional Input: 
	mag_disk	Directories for staging tape data to MO
			Default are: ['/yd19'] 
			if input undefined-- assumes /yd19...
		  Also,	if define and mt_dev is undefined: data is
			copied from this disk to MO.
	mt_dev		if set will copy data from tape. 
			Tape device number 0 or 1, and can be a 
			vector e.g. mt_dev=[0,1]
	interactive	Normal mode is Batch mode, but if this switch 
			is set it forces an interactive run.
	start_week	(NOT WORKING YET!) When more than 4 per 
			MO side... (eg for mo=' 007a', start_week='91_01')

	LIMITS:
		Only will dump a maxium of two archive weeks to MO.
		When more than two tape archive weeks are contained
		on an MO side must use "start_week" to dump the 3rd
		and 4th weeks to MO.

	HISTORY:
		written by gal 9-Apr-93
		 6-May-93 (GAL) - general mods.
		15-May-93 (GAL) - More mods to mk_mo2
		26-May-93 (MDM) - Added WKS_STATUS keyword option
		31-May-93 (MDM) - Added call to MK_MO_LOG
		 1-Jun-93 (MDM) - Removed the 26-May-93 modification to
				  be able to do parts of an MO disk.
				- Added some print statements
		 2-Jun-93 (MDM) - Corrected typo introduced 1-Jun-93
		15-Jun-93 (MDM) - Changed default staging disk from /yd13
				  to /yd19
		 8-Jul-93 (MDM) - Modified to use /DIR_DATE option to MK_MO_LOG
		21-Dec-93 (MDM) - Added statements to create a text log file
				  of MOs that are made (call to LIST_MO_LOG)
		 4-Jan-94 (MDM) - Added a MOUNT/UMOUNT of the MO disk from the
				  local machine so that it can see the MO disk
				  to do the logging stage.
	         1-Jul094 (SLF) - replace spawn,'rm' with file_delete.pro
				  (avoid shell)
		11-Aug-94 (GAL) - added mo_check call and trap for the
				  case where bad files are found on the
				  mo and mo_patch would have to be run.
				  call to mo_patch is limited to 1st disk
				  in the list mag_disk.


mk_mo2 [2] $SSW/yohkoh/ucon/idl/slater/mk_mo2_new.pro
[Previous] [Next]
	NAME: mk_mo2

	PURPOSE: Make an MO archive disk from online data or an 
		Exabyte Archive Tape.

	CALLING SEQUENCE:
		mk_mo2, mo, mo_node, mo_dev, mag_disk, mt_dev=[0,1]
 CALLS: ***
	DISK2_MO_NEW, MK_MO2_NEW, PREFIXCK, finddir [1], finddir [2], list_mo_log [1]
	list_mo_log [2], mail [1], mail [2], mk_mo_log, mo_check, mo_fndirck, mo_patch
	mo_prep, mo_tap_dump, momount, wk_online
	Examples:
	  from online data:
		mk_mo2, '058A', 'flare4', 0 	;archive fr "on-line data"
		mk_mo2, '058B', 'flare4', 1	;to MO # 1 on flare4
	  from 8mm tape:
		mk_mo2, '003B', 'flare4', 0, mt_dev=[0,1] ;archive f/tapeS
	  from staging disk:
		mk_mo2, '006B', 'flare4', 0, '/yd13' ;archive f/mag_disk
	
	INPUT:
	mo		MO number to make (eg. 000A, 000B, 010A)
	mo_node		Node name where MO device is located.
	mo_dev		MO device number...(eg. 0 or 1)

	Optional Input: 
	mag_disk	Directories for staging tape data to MO
			Default are: ['/yd19'] 
			if input undefined-- assumes /yd19...
		  Also,	if define and mt_dev is undefined: data is
			copied from this disk to MO.
	mt_dev		if set will copy data from tape. 
			Tape device number 0 or 1, and can be a 
			vector e.g. mt_dev=[0,1]
	interactive	Normal mode is Batch mode, but if this switch 
			is set it forces an interactive run.
	start_week	(NOT WORKING YET!) When more than 4 per 
			MO side... (eg for mo=' 007a', start_week='91_01')

	LIMITS:
		Only will dump a maxium of two archive weeks to MO.
		When more than two tape archive weeks are contained
		on an MO side must use "start_week" to dump the 3rd
		and 4th weeks to MO.

	HISTORY:
		written by gal 9-Apr-93
		 6-May-93 (GAL) - general mods.
		15-May-93 (GAL) - More mods to mk_mo2
		26-May-93 (MDM) - Added WKS_STATUS keyword option
		31-May-93 (MDM) - Added call to MK_MO_LOG
		 1-Jun-93 (MDM) - Removed the 26-May-93 modification to
				  be able to do parts of an MO disk.
				- Added some print statements
		 2-Jun-93 (MDM) - Corrected typo introduced 1-Jun-93
		15-Jun-93 (MDM) - Changed default staging disk from /yd13
				  to /yd19
		 8-Jul-93 (MDM) - Modified to use /DIR_DATE option to MK_MO_LOG
		21-Dec-93 (MDM) - Added statements to create a text log file
				  of MOs that are made (call to LIST_MO_LOG)
		 4-Jan-94 (MDM) - Added a MOUNT/UMOUNT of the MO disk from the
				  local machine so that it can see the MO disk
				  to do the logging stage.
	         1-Jul094 (SLF) - replace spawn,'rm' with file_delete.pro
				  (avoid shell)
		11-Aug-94 (GAL) - added mo_check call and trap for the
				  case where bad files are found on the
				  mo and mo_patch would have to be run.
				  call to mo_patch is limited to 1st disk
				  in the list mag_disk.


mk_mo_disk $SSW/yohkoh/gen/idl/mo_disk/mk_mo_disk.pro
[Previous] [Next]
NAME:
	mk_mo_disk
PURPOSE:
	This is a program to copy the Yohkoh data from exabyte to
	MO Disk
SAMPLE CALLING SEQUENCE:
	mk_mo_disk, '/mo/flare15.0'
	mk_mo_disk, '/mo/flare15.0', dev=1
	mk_mo_disk, '/mo/flare15.0', dev=1, /qdebug
INPUT:
	mo_disk	- The MO directory name
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], RdTap [1]
	RdTap [2], RdTap [3], UNIQ [1], UNIQ [2], UNIQ [3], concat_dir [4], def_tapd [1]
	def_tapd [2], def_tapd [3], file_exist [1], file_exist [3], restgen [1]
	restgen [2], wmenu_sel [1], wmenu_sel [2], yesnox [1], yesnox [2]
OPTIONAL KEYWORD INPUT:
	dev	- The device name for the exabyte.  If not passed,
		  it uses device 0.
	qdebug	- If set, do not execute the spawn commands to 
		  create the directories and do not call RDTAP
HISTORY:
	Written 3-Feb-92 by M.Morrison (really 3-Feb-1993, gal)
	modified, 4-Feb-93, by GAL, corrected usage of tape dev var,
			and range switch on rd_tap.
	modified, 5-Feb-93, correct cd command, gal.
               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


mk_mo_disk2 $SSW/yohkoh/gen/idl/mo_disk/mk_mo_disk2.pro
[Previous] [Next]
NAME:
	mk_mo_disk2
PURPOSE:
	This is a program to copy the Yohkoh data from exabyte to
	MO Disk
SAMPLE CALLING SEQUENCE:
	mk_mo_disk2, '/mo/flare15.0'
	mk_mo_disk2, '/mo/flare15.0', '/yd13/mo_1', dev=1
	mk_mo_disk2, '/mo/flare15.0', '/yd13/mo_1', dev=1, 
		mo_wk_no=mo_wk_no, /batch, /qdebug, progress=progress
INPUT:
	mo_disk	- The MO directory name
	mag_disk- The mag disk directory name for staging to MO
 CALLS: ***
	Bell, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], RdTap [1]
	RdTap [2], RdTap [3], UNIQ [1], UNIQ [2], UNIQ [3], concat_dir [4], def_tapd [1]
	def_tapd [2], def_tapd [3], file_exist [1], file_exist [3], getwid, mail [1]
	mail [2], restgen [1], restgen [2], wmenu_sel [1], wmenu_sel [2], yesnox [1]
	yesnox [2]
 CALLED BY:
	mk_mo
OPTIONAL KEYWORD INPUT:
	dev	- The device name for the exabyte.  If not passed,
		  it uses device 0.
	mo_wk_no- If set, do not prompt user for MO and wk#. use value.
	batch	- If set, does not prompt user for tape!!! Tapes must
			already be in the drives!
	qdebug	- If set, do not execute the spawn commands to 
		  create the directories and do not call RDTAP
	progress- Gives the current week count and total to status
		  the job: (e.g. [1,2] is week 1 of 2, [2,2] is 
		  week 2 of 2 or last week on side.
HISTORY:
	Written 3-Feb-92 by M.Morrison (really 3-Feb-1993, gal)
	modified, 4-Feb-93, by GAL, corrected usage of tape dev var,
			and range switch on rd_tap.
	modified, 5-Feb-93, correct cd command, gal.
	modified, 9-Apr-93, for automated use.
	mods,	10-Apr-93, for batch mode
	mod,	29-Apr-93, to use mocreate account on flare machines
			for moving files to MO.
			Also added mail and status features.
	mod,	3-May-93, added feature to allow the 2nd tape dump 
		to proceed while the 1st move is occurring.  Since,
		the MO can not be removed until the last mv is complete
		the last mv command is NOT executed in the background.
	mod,	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
	mod,	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.


mk_mo_list $SSW/yohkoh/gen/idl/mo_disk/mk_mo_list.pro
[Previous] [Next]
NAME:
	mk_mo_list
PURPOSE:
	This is a program to write a list of the files that go on the MO disk
	archive.
SAMPLE CALLING SEQUENCE:
	mk_mo_list
	mk_mo_list, outfil='mk_mo_list.txt'
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], concat_dir [4], prstr [1]
	prstr [2], restgen [1], restgen [2]
 CALLED BY:
	list_mo_log [1], list_mo_log [2], mk_mo_log
HISTORY:
	Written 20-May-93 by M.Morrison 
	26-May-93 (MDM) - Corrected where it printed the label in the list
			  when there were three weeks on a MO side


mk_mo_log $SSW/yohkoh/gen/idl/mo_disk/mk_mo_log.pro
[Previous] [Next]
NAME:
	mk_mo_log
PURPOSE:
	To make a log entry when an MO disk is made to log the date, person,
	and reformatter version of the data on the MO disk.
SAMPLE CALLING SEQUENCE:
	mk_mo_log, 'flare13', 0
	mk_mo_log, 'flare4', 1, operator='linford', /dir_date, /mklog
INPUT:
	mo_node	- the name of the node which has the MO disk
	mo_dev	- the device number of the MO disk (0 or 1 normally)
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], GEN_STRUCT [1]
	GEN_STRUCT [2], Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3], anytim2ints [1]
	anytim2ints [2], concat_dir [4], file_exist [1], file_exist [3], file_info2 [1]
	file_info2 [2], file_list [1], file_list [2], int2secarr [1], int2secarr [2]
	list_mo_log [1], list_mo_log [2], mk_mo_list, prstr [1], prstr [2], restgen [1]
	restgen [2], savegen [1], savegen [2], str_copy
 CALLED BY:
	mk_mo2 [1], mk_mo2 [2]
OPTIONAL KEYWORD INPUT:
	operator - the name of the person who made the MO disk.  If not
		   passed, it uses "getenv('USER')"
	dir_date - if set, then do not use the current date as the time
		   that the MO disk was created, instead, use the lastest
		   date of the directories in /.../yohkoh
	mklog	 - if set, forces an update of the mos_made.log file.
HISTORY:
	Written 31-May-93 by M.Morrison
	 2-Jun-93 (MDM) - Minor modifications
	 10-Feb-94 (GAL) - bug fix for dir and week check
	 11-Feb-94 (gal) - added mklog switch to update ascii log
	 12-Feb-94 (gal) - apparently someone has changed break_file
			which change file_info... so add checks for
			using two tags of finfo.
        18-Jul-94 (SLF) - get rid of rm  (PLEASE USE FILE_DELETE!)
			   rm can hang the friggin thing
			   mo_dev = 0 by default
	 3-Oct-95 (LS) - changed path to new mo_mount style /mo/flareN.X


MK_MOSAIC $SSW/yohkoh/ucon/idl/metcalf/mk_mosaic.pro
[Previous] [Next]
NAME:
     MK_MOSAIC
PURPOSE:
     Makes a mosaic of PFI images as they would appear on the CCD.  Converts
     everything to full resolution.
CATEGORY:
CALLING SEQUENCE:
     newdata = mk_mosaic(data,index [,offset])
INPUTS:
     data = data cube to be mosaic'd
     index = index structure for data
OPTIONAL INPUT PARAMETERS:
     offset = integer offsets added to individual image positions in the 
              mosaic.  Integer array (2,*).
KEYWORD PARAMETERS
     colstart = starting x array index for each image 
     linstart = starting y array index for each image
     missing = value to set the blank areas to (same type as data)
     quiet = if set, work quietly
OUTPUTS:
     newdata = mosaic'd data, same data type as the input data
 CALLS: ***
	get_pix_coor, gt_res
 CALLED BY:
	ALIGN_AR
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
     Use get_pix_coord and index.sxt.corner_cmd to compute the position of
     each image on the CCD.  Make an array large enough to hold all the
     images in correct positions and fill this array with the data in "data".
MODIFICATION HISTORY:
     MDM,TRM  May 7, 1992


mk_movie [1] $SSW/yohkoh/gen/idl/movie/mk_movie.pro
[Previous] [Next]
  Name:
    mk_movie

  Purpose:
    Write a series of images to either peritek graphics board or disk
	for the nvs system at ISAS.

  Calling Sequence:
    mk_movie, num, index, data, 		$
		[Comment0,comment1=Comment1,	$
		color_tab1=color_tab1, color_tab2=color_tab2, $
		data2=data2, qdisplay=qdisplay, charsize=charsize, $
		infile=infile, idxsfd=idxsfd, ff=ff, sfd=sfd, $	
		nvsdev=nvsdev, fileout=fileout, no_center=no_center, $
		no_resize=nosize, delta_sec=delta_sec, $
		q_log=q_log, tvdisplay=tvdisplay, no_record=no_record
		margin_color=margin_color, totimg=totimg, file_log=file_log
               fileidx=fileidx
  Input Variables:
    Num	= A vector of label numbers (usually the index number of
		  the image from the original file).
    data  	= 3-d byte array contain images.
    index 	= SDA index structure corresponding to data

  Optional Input variables:
    Comment0	= Text string which is put into the text box of the display.

  Optional Input Keywords:
    Comment1	= Text string which is put into the text box of the display
		  Comment1 may be a vector of length n_elements(data(0,0,*))

    color_tab1	= a three dimension array of r,g,b colors 
			color_tab1 = bytarr(3,256)
    color_tab2 = a three dimension array of r,g,b colors for 2nd image
    data2	= 3-d byte array contain images for 2nd image.
    qdisplay	= 0 to display one image with title box.
		= 1 to display two images with title box.
		= 2 to diplay one image with no title box.
    charsize   = charsize to output.
    infile     = name of input file with image data (eg. sfd94_34...)
    idxsfd     = roadmap index number within the input file for an image.
    ff         = laser disk #, side and frame number to record.
    sfd        = flag set to 1 for sfd file input, 0 if not.
    nvsdev     = flag =1 to indicate output goes thru nvs system, 0 if not.
    fileout	= The leading part of the output filename for nvs system.
    no_center  = flag =1 to not auto center a single image.
    no_resize  = flag =1 to not resize image to max aspect.
    tvdisplay	= Debug flag, If set to 1, images displayed only and on
		  nvs system files are written but not sent to nvs-device.
    q_log      = flag =1 to log image info to a file.
    no_record  = flag =1 to NOT record images.
    margin_color color level for margin area around image. Default is 0.
		  particularly useful for reversed color tables.
    totimg	  total number of images to process.
    file_log	  file name of log file.
    file_idx	  running filelist index

    If color_tab1 is not specified, user will be prompted for selection.

 CALLS: ***
	COMMAND_PANA, CONGRID [1], CONGRID [2], CONGRID [3], GET_INFO2, STRETCH2, input [1]
	input [2], maxspect [1], maxspect [2], mk_ptv_title, mknumat, stdct, wr_nvs
	wr_peritek
  Side effects:
    If tvdisplay=1, then the test image will be displayed in window 0.
    If tvdisplay=0, then title box is written to z-buf

  NOTES:
	Peritek video card has about 617 col and 485 rows.
	NVS video card at ISAS has about 648 col and 486 rows.

  History:
	written by GAL, 11-Aug-94, from the Aug-94 ver. of mk_ptv_movie
		and mk_nvs_movie... a nearly total merge.
	15-Aug-94, GAL, bug modifications
	 7-Sep-94, GAL, Mod for Logging. Changed the calls to get_info 
			to specify the true index number.
	 4-Oct-94, GAL, Mod to work for multi-file requests
	24-Oct-94, GAL, bug fix to file name logging for mult-file requests


mk_movie [2] $SSW/yohkoh/gen/idl/movie/mk_movie2.pro
[Previous] [Next]
  Name:
    mk_movie

  Purpose:
    Write a series of images to either peritek graphics board or disk
	for the nvs system at ISAS.

  Calling Sequence:
    mk_movie, num, index, data, 		$
		[Comment0,comment1=Comment1,	$
		color_tab1=color_tab1, color_tab2=color_tab2, $
		data2=data2, qdisplay=qdisplay, charsize=charsize, $
		infile=infile, idxsfd=idxsfd, ff=ff, sfd=sfd, $	
		nvsdev=nvsdev, fileout=fileout, no_center=no_center, $
		no_resize=nosize, delta_sec=delta_sec, $
		q_log=q_log, tvdisplay=tvdisplay, no_record=no_record
		margin_color=margin_color, totimg=totimg, file_log=file_log
               fileidx=fileidx,device=device
  Input Variables:
    Num	= A vector of label numbers (usually the index number of
		  the image from the original file).
    data  	= 3-d byte array contain images.
    index 	= SDA index structure corresponding to data

  Optional Input variables:
    Comment0	= Text string which is put into the text box of the display.

  Optional Input Keywords:
    Comment1	= Text string which is put into the text box of the display
		  Comment1 may be a vector of length n_elements(data(0,0,*))

    color_tab1	= a three dimension array of r,g,b colors 
			color_tab1 = bytarr(3,256)
    color_tab2 = a three dimension array of r,g,b colors for 2nd image
    data2	= 3-d byte array contain images for 2nd image.
    qdisplay	= 0 to display one image with title box.
		= 1 to display two images with title box.
		= 2 to diplay one image with no title box.
    charsize   = charsize to output.
    infile     = name of input file with image data (eg. sfd94_34...)
    idxsfd     = roadmap index number within the input file for an image.
    ff         = laser disk #, side and frame number to record.
    sfd        = flag set to 1 for sfd file input, 0 if not.
    nvsdev     = flag =1 to indicate output goes thru nvs system, 0 if not.
    fileout	= filename for nvs system.
    no_center  = flag =1 to not auto center a single image.
    no_resize  = flag =1 to not resize image to max aspect.
    tvdisplay	= Debug flag, If set to 1, images displayed only and on
		  nvs system files are written but not sent to nvs-device.
    q_log      = flag =1 to log image info to a file.
    no_record  = flag =1 to NOT record images.
    margin_color color level for margin area around image. Default is 0.
		  particularly useful for reversed color tables.
    totimg	  total number of images to process.
    file_log	  file name of log file.
    file_idx	  running filelist index
    device       unit number of laser disc you are sending commands to

    If color_tab1 is not specified, user will be prompted for selection.

 CALLS: ***
	CONGRID [1], CONGRID [2], CONGRID [3], GET_INFO2, MK_MOVIE2, STRETCH2, command_laser
	input [1], input [2], maxspect [1], maxspect [2], mk_ptv_title, mknumat, stdct, wr_nvs
	wr_peritek
  Side effects:
    If tvdisplay=1, then the test image will be displayed in window 0.
    If tvdisplay=0, then title box is written to z-buf

  NOTES:
	Peritek video card has about 617 col and 485 rows.
	NVS video card at ISAS has about 648 col and 486 rows.

  History:
	written by GAL, 11-Aug-94, from the Aug-94 ver. of mk_ptv_movie
		and mk_nvs_movie... a nearly total merge.
	15-Aug-94, GAL, bug modifications
	 7-Sep-94, GAL, Mod for Logging. Changed the calls to get_info 
			to specify the true index number.
	 4-Oct-94, GAL, Mod to work for multi-file requests
	24-Oct-94, GAL, bug fix to file name logging for mult-file requests
       12-Oct-95, LS , merged code some more.  treat the NVS as if it were
                  an image card.  NVS is not plugged into the SONY anymore,
                  so command_laser can now be used to operate the SONYs.
		   - Using new nvs command: nvsftp1
		   - commented out print statement. will print in go_lasdisk
			(the print statement MAY be desireable if calling
			 mk_movie2 with an array of images)
			currently, go_lasdisk only sends 1 image at a time.


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

 NAME: MK_MU

 PURPOSE: For an input image, makes maps of mu (= cos(central angle)),
	sinB, sinL (heliographic coordinates)

PRO mk_mu, image, r0, x0, y0, mu, r, $
	pangle=pangle, b0=b0, sinb=sinb, sinl=sinl


 INPUT PARAMETERS:
	image = image to make coordinates for
	r0,x0,y0 = radius, center of Sun in pixels

 OUTPUT PARAMETERS:
	mu = map of mu, set to -(sqrt(r^2-r0^2)/r0) off limb
	r = image of radial distance from center in pixels

 OPTIONAL INPUT KEYWORDS
	pangle = angle between +y and solar north, measured toward
		-x, radians
	b0 = latitude of the disk center

 OPTIONAL OUTPUT KEYWORDS:
	 (Must be set to nonzero to get return value)
	sinb = image of sine of latitude, set to -2. off disk.
	sinl = image of sine of longitude, set to -2. off disk.


 HISTORY:
	Written  April 1993  Barry LaBonte
	Make SINB,SINL keywords  May 13, 1994  BJL
	Fix confusion of sinl,sinb  October 13, 1994  BJL
	Add PANGLE, B0 keywords  April 11, 1995  BJL
	More efficient use of memory  September 8, 1995 BJL


mk_nar [1] $SSW/yohkoh/gen/idl/atest/mk_nar.pro
[Previous] [Next]
NAME:
	mk_nar
PURPOSE:
	Take the daily SELSIS active region summary file and make a 
	weekly binary log file
KEYWORD INPUT:
       week    - a string with the year/week if the format
                 91_49 where 91 is the year, 49 is the week
                 This is required input.
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], GBO_STRUCT [1], GBO_STRUCT [2]
	GEN_STRUCT [1], GEN_STRUCT [2], GET_NBYTES, OPEN_DA_FILE, WRT1P_FH, anytim2doy [1]
	anytim2doy [2], concat_dir [4], data_chk [1], data_chk [2], gt_day [1], gt_day [2]
	rd_fem, rd_selsis, rdwrt [1], rdwrt [2], rdwrt [3], str_replace [1], str_replace [2]
OPTIONAL KEYWORD INPUT:
	outdir	- The output directory for the output file.
		  If undefined, write it to $DIR_GEN_NAR.
HISTORY:
	Written 4-Jun-92 by M.Morrison
       28-Aug-92 (MDM) - Modified how RD_FEM was called (call by week#)
       14-May-93 (MDM) - Changed to use $ydb_raw and $ys
       24-jan-97 (SLF) - change 'no files' message criteria (rd_selsis changed)


mk_nar [2] $SSW/yohkoh/gen/idl/gbo/mk_nar.pro
[Previous] [Next]
NAME:
	mk_nar
PURPOSE:
	Take the daily SELSIS active region summary file and make a 
	weekly binary log file
KEYWORD INPUT:
       week    - a string with the year/week if the format
                 91_49 where 91 is the year, 49 is the week
                 This is required input.
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], GBO_STRUCT [1], GBO_STRUCT [2]
	GEN_STRUCT [1], GEN_STRUCT [2], GET_NBYTES, OPEN_DA_FILE, WRT1P_FH, anytim2doy [1]
	anytim2doy [2], concat_dir [4], data_chk [1], data_chk [2], gt_day [1], gt_day [2]
	rd_fem, rd_selsis, rdwrt [1], rdwrt [2], rdwrt [3], str_replace [1], str_replace [2]
OPTIONAL KEYWORD INPUT:
	outdir	- The output directory for the output file.
		  If undefined, write it to $DIR_GEN_NAR.
HISTORY:
	Written 4-Jun-92 by M.Morrison
       28-Aug-92 (MDM) - Modified how RD_FEM was called (call by week#)
       14-May-93 (MDM) - Changed to use $ydb_raw and $ys
       24-jan-97 (SLF) - change 'no files' message criteria (rd_selsis changed)


mk_nar [3] $SSW/yohkoh/gen/idl/gbo/mk_nar2.pro
[Previous] [Next]
NAME:
	mk_nar
PURPOSE:
	Take the daily SELSIS active region summary file and make a 
	weekly binary log file
KEYWORD INPUT:
       week    - a string with the year/week if the format
                 91_49 where 91 is the year, 49 is the week
                 This is required input.
OPTIONAL KEYWORD INPUT:
	outdir	- The output directory for the output file.
		  If undefined, write it to $DIR_GEN_NAR.
HISTORY:
	Written 4-Jun-92 by M.Morrison
       28-Aug-92 (MDM) - Modified how RD_FEM was called (call by week#)
       14-May-93 (MDM) - Changed to use $ydb_raw and $ys


mk_nbnvs $SSW/yohkoh/ucon/idl/kawai/mk_nbnvs.pro
[Previous] [Next]
PROGRAM:
    mk_nbnvs
PURPOSE
    Make NVS file of a given image. (monochromatic only)
    (The format of created file is plane-sequence RGB)

CALLING SEQUENCE
    mk_nbnvs,image,fname,number
INPUT
    image = 2D-array : image data
    fname = string : NVS file name (header part)
    number = integer : frame number
OUTPUT
    number = integer : input value + 1

SIDE EFFECTS
    create NVS file on a disk. The file name is 
    "fname.NNNN.raw", where fname is given as the 2nd 
    parameter and NNNN is given as the 3rd parameter
    The number is incremented.

COMMEN BLOCKS
ADDITIONAL INFORMATION
    Created files can be transfered to NVS2000 by nvs command.
    You must set PATH to /ys/gen/soft/rel/movie to use
    nvs. Please execute following command at unix prompt:

   % setenv PATH /ys/gen/soft/rel/movie:$PATH

    When you execute nvs, you must specify some parameters:

    Pixel Data Format ----- 3:RAW
    RAW MODE ----- 3
    SIZE X Y -- n_elements(image(*,0)) n_elements(image(0,*))
    ORIGIN, DIRECTION, SKIP BITE ---- default value is OK.

EXAMPLE
    The following program create test.0000.raw, test.0001.raw,
    test.0002.raw, ... etc. , each of which contains the 
    image of data(*,*,i) with the info_array information.
:::::::::::::::::::::::
    number=0
    xyouts,120,300,/dev,'SXT FFI MOVIE',charsize=4.0
    data0=tvrd(0,0,512,512)
    mk_nbnvs,data0,'test',number
    for i=0,n_elemenes(data(0,0,*))-1 do begin
        tv,data
        xyouts,10,10,/dev,info_array(i)
        data0=tvrd(0,0,512,512)
        mk_nbnvs,data0,'test',number
    endfor
:::::::::::::::::::::::

HISTORY
    16-FEB-1993 Goro Kawai


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

  Name: mk_newdata

  Purpose: job to create new data images for distribution (show_pix,etc)
	
  History:
     10-Jul-1994 (SLF) Written
     14-Jul-1994 (SLF) Add fl_suntoday, fl_sxtobsnar, fl_goesplot
			Moved distribution request into mk_pix
     12-oct-1993 (SLF) call to fl_summary, distribute jobs in parallel
                       via go_batch / taskwait
      6-Mar-1994 (SLF) remove go_batch (OSF problems)

  Method - background job submitted via auto_toban
           Parallel, distributed execution of subtasks.

  Generate images for first_light, show_pix


mk_nvs_img $SSW/yohkoh/gen/idl/movie/mk_nvs_img.pro
[Previous] [Next]
  Name:
    mk_nvs_img

  Purpose:
    Write a series of files which can be read by the NVS to make a movie.

  Calling Sequence:
    mk_nvs_img,data,index, 				$
		[Comment0,comment1=Comment1,fileout=fileout, ... ]

  Input Variables:
    data  	= 3-d byte array contain images.
    index 	= SDA index structure corresponding to data

  Optional Input variables:
    Comment0	= Text string which is put into the text box of the display.

  Optional Input Keywords:
    Comment1	= Text string which is put into the text box of the display
    fileout	= The leading part of the output filename.
    color_tab1	= a three dimension array of r,g,b colors 
			color_tab1 = bytarr(3,256)
    tvdisplay	= If set to 1, display images on screen before writing file
    xrdisplay  = IF set to 1, display xray images on screen for selection

    If Comment0, fileout, and color_tab1 are not specified, 
    mk_nvs_movie will prompt the user for inputs.

  Side effects:
    Will create a window,1 for displaying the titles.  These are read back
    using tvrd.

    If tvdisplay=1, then the test image will be displayed in window 0.

  Modification History:
   Written, 18-jan-92,  J.R. Lemen


mk_nvs_movie $SSW/yohkoh/gen/idl/movie/mk_nvs_movie.pro
[Previous] [Next]
  Name:
    mk_nvs_movie

  Purpose:
    Write a series of files which can be read by the NVS to make a movie.

  Calling Sequence:
    mk_nvs_movie,num,data,index, 				$
		[Comment0,comment1=Comment1,fileout=fileout,	$
		color_tab1=color_tab1,tvdisplay=tvdisplay,	$
		data2=data2,qdisplay=qdisplay,color_tab2=color_tab2]

  Input Variables:
    Num	= A vector of label numbers (usually the index number of
		  the image from the original file).
    data  	= 3-d byte array contain images.
    index 	= SDA index structure corresponding to data

  Optional Input variables:
    Comment0	= Text string which is put into the text box of the display.

  Optional Input Keywords:
    Comment1	= Text string which is put into the text box of the display
		  Comment1 may be a vector of length n_elements(data(0,0,*))
    fileout	= The leading part of the output filename.
    color_tab1	= a three dimension array of r,g,b colors 
			color_tab1 = bytarr(3,256)
    tvdisplay	= If set to 1, display images on screen before writing file
    qdisplay	= 0 to display one image with title box.
		= 1 to display two images with title box.
		= 2 to diplay one image with no title box.

    If color_tab1 is not specified, user will be prompted for selection.

 CALLS: ***
	STRETCH2, input [1], input [2], mk_title [1], mk_title [2], mk_title [3], mknumat
	stdct, wr_nvs
 CALLED BY:
	go_nvs4, go_nvs5
  Side effects:
    Will create a window,1 for displaying the titles.  These are read back
    using tvrd.

    If tvdisplay=1, then the test image will be displayed in window 0.

  Modification History:
   Written, 18-jan-92,  J.R. Lemen
   Modified, 18-jun-92, J.R. Lemen -- Added call to stretch2 to adjust 
					color gama value.
   Modified,  4-sep-92, JRL	- Allow Num and Comment1 to be vectors
   Modified, 21-nov-92, JRL    - If displaying only one image, make the
				  titles come out as B/W


mk_obs $SSW/yohkoh/gen/idl/reformat/mk_obs.pro
[Previous] [Next]
NAME:
	mk_obs
PURPOSE:
	Make the observing log file
INPUT:
	infil	- an array of input files of a single prefix, usually
		  the "ada" file.
	outfil	- the output file name
OPTIONAL INPUT:
	fullweek- if present, and specifying the week in 
		  the string form 91_49 where 91 is the year
		  and 49 is the week number, it will generate
		  the input file array and output file
	qdebu	- If set, print several diagnostic messages
METHOD:
	It checks each instrument to see if the file exists. (BCS, HXT, SXT, WBS)
	Output: SXT - Every exposure (no more often than every major frame)
		WBS,HXT		* Every 2 MF (4 sec) in high rate
				* Every 1 MF (8 sec) in med rate (?)
				* Write out the first MF when a rate or mode 
				  change occurs
				* Write out in night? or just single entry
		BCS		* Combining several spectra, not to be written
				  out more often than every 4 sec

	NOTES:  Could key off WBS (since it is every 2 MF, and follows the
		"same" rules as observing log), but what if it is not on
		for a given orbit, and there is BCS and HXT data.
 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], FILE_EXIST [2], break_file [4]
	file_exist [1], file_exist [3], mk_week_file [1], mk_week_file [2]
 CALLED BY:
	yoyo_man2
Modification History:
	Ver 0.20 31-Jan-92 (MDM) - added capability to copy the observing log file
				  to the $DIR_GEN_OBS directory
	Ver 0.30 13-Feb-92 (MDM) - changed input to be an array of filenames
				(not the name of a file holding the list of FIDs)
				Removed the need for "DIR_IN" parameter
				Expanded the /FULL_WEEK option accordingly
			     Made OBS file be written directly to $DIR_GEN_OBS, not
			     to the data directory
	Ver 1.00 29-Feb-92 (MDM) - changed WBS and HXT insertion of information
				to be SQRT of summary counts.  It was overflowing
				the byte value before (integer*2 value being put
				into a byte)
	Ver 1.01   1-Mar-92 (MDM) - Changed BCS reading from RD_BDA (it was reading
				all data!!) to RD_ROADMAP and RD_BDA_DP.
	Ver 1.02   3-Mar-92 (MDM) - Made ALL_CNTS and ACC_CNTS for BCS the SQRT of
                         the DP_SYNC record value (to fit into one byte)
	Ver 1.03  18-Apr-92 (MDM) - Adjusted to use UNIQ_FID instead of getting
				a list of the FileIDs from "findfile('ada*')"
	Ver 1.04  26-May-92 (MDM) - Changed to write a temporary file and then
                           move it to on-line after finished generating it
	Ver 1.05  14-Oct-92 (MDM) - Modified to allow appending to an existing
				    OBS file.
	Ver 1.06  15-Oct-92 (MDM) - Added /QDEBUG and had print statements only
				    occur when QDEBUG is set
	Ver 1.07  22-Oct-92 (MDM) - Added /QSTOP option
				  - Moved NORBIT=0 command since if an append
				    option was overridden (Files out of order)
				    then it was appending to the ORBIT_ARR
				    incorrectly.
				  - Added /USEFID switch.  This will force the
				    ORBIT_ARRAY time/day entry to be the input
				    FileID.  This should only be used when
				    generating temporary OBS logs
       Ver 1.08 11-Nov-92 (MDM)  - Use the LAST file in "infil" to figure
                                   out the week number when the output file
                                   is not specified.
				  -
	Ver 1.09 27-Jan-93 (MDM)  - Appending option not working quite right
	Ver 1.10  3-May-93 (MDM)  - Error in FULLWEEK option
	********************************************************************
	Ver 2.0  14-May-93 (MDM) -  Re-written to use MK_WEEK_FILE and to have
				    separate OBS files per instrument
				 -  Added INDIR option


mk_obs_str $SSW/yohkoh/gen/idl/reformat/mk_obs_str.pro
[Previous] [Next]
NAME:
	mk_obs_str
PURPOSE:
	Make the observing log structure
INPUT:
	prefix	- The Observing log prefix (OBD, OSF, OSP, OWH)
	infil	- an array of input files
	last_tim - The last time in the previous input files
OUTPUT:
	out	- The observing log structure for the input files
	serial_num - For OSP and OSF, this is the lowest image serial
		  number in the file.
 CALLS: ***
	GET_NBYTES, MK_OBS_BCS, MK_OBS_SXT, MK_OBS_W_H, RD_BDA_DP, Rd_Roadmap [2]
	Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3], anytim2ints [1], anytim2ints [2]
	data_type [1], data_type [2], int2secarr [1], int2secarr [2], rd_roadmap [1]
	str_replace [1], str_replace [2], tim2dset [1], tim2dset [2]
 CALLED BY:
	mk_week_file [1], mk_week_file [2]
HISTORY:
	Written 21-Apr-93 by M.Morrison
V1.00  17-Jul-93 (MDM) - Assigned program version number
			- Read/returned the reformatter version from the header
V1.10	17-Jan-95 (MDM) - Added "last_tim" input to remove duplicate data
V1.2	20-Jan-95 (MDM) - Corrected V1.10 patch so that it checked to see
			  if roadmap is a structure.  There could be files
			  with no data in them.
V1.3	25-Jan-95 (MDM) - Define LAST_TIM at the end of the routine
			- Changed how existence of LAST_TIM is checked


mk_op_file $SSW/yohkoh/gen/idl/orbit/mk_op_file.pro
[Previous] [Next]
  NAME:
    mk_op_file
  PURPOSE:
    Generate the 16s aoslos file for op_first_guess
    File is written to $DIR_GEN_ORBIT_RAW
  CALLING SEQUENCE:
     mk_op_file,Sttim,Num_days
     mk_op_file,'5-may-93',5
  INPUTS:
    sttim	= Starting time in any format
    Num_days	= Integer number of days
  OPTIONAL INPUT KEYWORDS:
    None.
 CALLS: ***
	anytim2ex [1], anytim2ex [2], fmt_tim [1], fmt_tim [2], input [1], input [2]
	mk_aoslos
  MODIFICATION HISTORY:
     4-may-93, J. R. Lemen, Written


mk_orb_file $SSW/yohkoh/gen/idl/ref_access/mk_orb_file.pro
[Previous] [Next]
NAME:
	mk_orb_file
PURPOSE:
	To create the ORB file containg spacecraft position
INPUT:
	year
	week
OPTIONAL INPUT:
	clobber
	dirout
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], GEN_STRUCT [1], GEN_STRUCT [2]
	MK_ORB_WEEK, OPEN_DA_FILE, WRT1P_FH, concat_dir [4], rdwrt [1], rdwrt [2], rdwrt [3]
HISTORY:
	Written Aug-96 by R.D.Bentley


MK_ORB_WEEK $SSW/yohkoh/gen/idl/ref_access/mk_orb_week.pro
[Previous] [Next]
 NAME:
	MK_ORB_WEEK
 PURPOSE:
       Generates a weeks worth of orbital information to be stored in 
	the ORB file. Interval used is 300 secs.
       Structure defined in orb_struct.pro
 CALLING SEQUENCE:
       mk_orb_week,year,week,orb_data
 INPUT:
	year
	week
 OUTPUT:
	orb_data  - structure containing the orbital information
 CALLS: ***
	ADDTIME [1], ADDTIME [2], CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3]
	FMT_TIMER [1], FMT_TIMER [2], ORB_STRUCT, REVERSE, anytim2ex [1], anytim2ex [2]
	anytim2ints [1], anytim2ints [2], concat_dir [4], fmt_tim [1], fmt_tim [2]
	pr_week2tim [1], pr_week2tim [2], rd_orbit_event, run_dsnfil, week2ex [1]
	week2ex [2]
 CALLED BY:
	mk_orb_file
 OPTIONAL KEYWORD INPUT:
       asca      - If set, generate data for the ASCA spacecraft

 HISTORY:
       Written Sep-96 by R.D.Bentley


mk_orbit [1] $SSW/yohkoh/gen/idl/atest/mk_orbit.pro
[Previous] [Next]
NAME:
	mk_orbit
PURPOSE:
	Read the orbit solution file that is copied from the FACOM
	computer and make the files used by DSNFIL with one orbit
	solution per file.  Generate FEM files, aoslos files for op_first_guess
	and the advance dsn predictions file.
OPTIONAL INPUT:
	infile	- The input file to use.  If not specified, it uses
		  /ydb/orbit_sol/facom_orbit
	wait	- The number of hours to wait before the FEM generation
		  code is run (so that that code can run after midnight)
	mail	- String vector of recipients of unix mail containing
		  the dsn predictions.
	force_make - Force the MK_ORBIT_FILES and MK_FEM routines to be
		  called, even if there are no errors.
	skip_orbit - Skip the MK_ORBIT_FILE calls
OPTIONAL OUTPUT:
	outdir	- Output directory (used for debugging purposes).  If not
		  specified it writes to /ydb/orbit_sol.
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], Ex2Int [1], Ex2Int [2]
	FILE_EXIST [2], FILE_STAT [1], FILE_STAT [2], Int2Ex [1], Int2Ex [2]
	anytim2ints [1], anytim2ints [2], concat_dir [4], ctraj2orbit, deriv_arr [1]
	deriv_arr [2], file_exist [1], file_exist [3], file_list [1], file_list [2]
	file_stat [3], fmt_tim [1], fmt_tim [2], int2secarr [1], int2secarr [2], mail [1]
	mail [2], mk_fem [1], mk_fem [2], mk_orbit_files, rd_fem, str_replace [1]
	str_replace [2], tim2orbit [1], tim2orbit [2], week_loop [1], week_loop [2]
	week_loop [3], where_pattern [1], where_pattern [2]
HISTORY:
	Written 1-Mar-92 by M.Morrison
	20-May-92 (MDM) Modified to run MK_FEM when a new orbit solution is
			found.  It re-runs for for prior 2 weeks and runs
			5 weeks ahead of the solution date
	26-May-92 (MDM) changed to only do 1 week prior
	 8-Jun-92 (MDM) added keyword wait so that when FEM files are made, 
			it waits "wait" hours before running that portion
	 8-sep-92 (JRL) Added mail keyword.  Added call to mk_orbit_files
	22-sep-92 (JRL) Added auto purging of *ascii, *summ, dsn*txt files
	15-Mar-93 (MDM) Added FORCE_MAKE option
	 7-Apr-93 (MDM) Added /ASCA option to read the ASCA spacecraft
			orbit predictions
	15-Apr-93 (MDM) Modified to call MK_FEM even for ASCA
	 4-may-93 (JRL) Implemented the DSN predictions for ASCA
	19-May-93 (MDM) Fixed oversight - Added "asca=asca" switch to 
			MK_ORBIT_FILES call for ASCA
	20-May-93 (MDM) Added /SKIP_ORBIT option
	 3-Aug-93 (MDM) Added TRAJ file check and mailing of the file
			and renaming it
	12-Aug-93 (MDM) Added "keep_ascii=4" to MK_ORBIT_FILES call for ASCA
	10-May-94 (MDM) Added check for bad calculation
	27-Jul-94 (MDM) Modified to check TRAJ files first, and if a TRAJ
			file exists with no equivalent ORBIT file, create the
			ORBIT file from the TRAJ file and kick off MK_FEM
			and MK_ORBIT_FILES
			File orbit_0173 was the last file created using
			FACOM_ORBIT as the source.
       26-oct-94 (SLF) fix file name problem 
        4-nov-94 (SLF) handle format change in facom_orbit file 
                       (call where_pattern)
       21-jan-98 (SLF) remove morrison from 'mail_old'
	26-jul-2000 (GLS) Added ORB file generation via call to mk_orb_file


mk_orbit [2] $SSW/yohkoh/gen/idl/orbit/mk_orbit.pro
[Previous] [Next]
NAME:
	mk_orbit
PURPOSE:
	Read the orbit solution file that is copied from the FACOM
	computer and make the files used by DSNFIL with one orbit
	solution per file.  Generate FEM files, aoslos files for op_first_guess
	and the advance dsn predictions file.
OPTIONAL INPUT:
	infile	- The input file to use.  If not specified, it uses
		  /ydb/orbit_sol/facom_orbit
	wait	- The number of hours to wait before the FEM generation
		  code is run (so that that code can run after midnight)
	mail	- String vector of recipients of unix mail containing
		  the dsn predictions.
	force_make - Force the MK_ORBIT_FILES and MK_FEM routines to be
		  called, even if there are no errors.
	skip_orbit - Skip the MK_ORBIT_FILE calls
OPTIONAL OUTPUT:
	outdir	- Output directory (used for debugging purposes).  If not
		  specified it writes to /ydb/orbit_sol.
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], Ex2Int [1], Ex2Int [2]
	FILE_EXIST [2], FILE_STAT [1], FILE_STAT [2], Int2Ex [1], Int2Ex [2]
	anytim2ints [1], anytim2ints [2], concat_dir [4], ctraj2orbit, deriv_arr [1]
	deriv_arr [2], file_exist [1], file_exist [3], file_list [1], file_list [2]
	file_stat [3], fmt_tim [1], fmt_tim [2], int2secarr [1], int2secarr [2], mail [1]
	mail [2], mk_fem [1], mk_fem [2], mk_orbit_files, rd_fem, str_replace [1]
	str_replace [2], tim2orbit [1], tim2orbit [2], week_loop [1], week_loop [2]
	week_loop [3], where_pattern [1], where_pattern [2]
HISTORY:
	Written 1-Mar-92 by M.Morrison
	20-May-92 (MDM) Modified to run MK_FEM when a new orbit solution is
			found.  It re-runs for for prior 2 weeks and runs
			5 weeks ahead of the solution date
	26-May-92 (MDM) changed to only do 1 week prior
	 8-Jun-92 (MDM) added keyword wait so that when FEM files are made, 
			it waits "wait" hours before running that portion
	 8-sep-92 (JRL) Added mail keyword.  Added call to mk_orbit_files
	22-sep-92 (JRL) Added auto purging of *ascii, *summ, dsn*txt files
	15-Mar-93 (MDM) Added FORCE_MAKE option
	 7-Apr-93 (MDM) Added /ASCA option to read the ASCA spacecraft
			orbit predictions
	15-Apr-93 (MDM) Modified to call MK_FEM even for ASCA
	 4-may-93 (JRL) Implemented the DSN predictions for ASCA
	19-May-93 (MDM) Fixed oversight - Added "asca=asca" switch to 
			MK_ORBIT_FILES call for ASCA
	20-May-93 (MDM) Added /SKIP_ORBIT option
	 3-Aug-93 (MDM) Added TRAJ file check and mailing of the file
			and renaming it
	12-Aug-93 (MDM) Added "keep_ascii=4" to MK_ORBIT_FILES call for ASCA
	10-May-94 (MDM) Added check for bad calculation
	27-Jul-94 (MDM) Modified to check TRAJ files first, and if a TRAJ
			file exists with no equivalent ORBIT file, create the
			ORBIT file from the TRAJ file and kick off MK_FEM
			and MK_ORBIT_FILES
			File orbit_0173 was the last file created using
			FACOM_ORBIT as the source.
       26-oct-94 (SLF) fix file name problem 
        4-nov-94 (SLF) handle format change in facom_orbit file 
                       (call where_pattern)


mk_orbit_files $SSW/yohkoh/gen/idl/orbit/mk_orbit_files.pro
[Previous] [Next]
  NAME:
    mk_orbit_files
  PURPOSE:
    Generate the 16s aoslos file for op_first_guess

  CALLING SEQUENCE:
     mk_orbit_files,mail=mail,keep_ascii=keep_ascii  [,/asca]
  OPTIONAL INPUTS:
    ndays	= Number of days to compute (default = 11)
  OPTIONAL INPUT KEYWORDS:
    mail	= Vector string of users to receive mail when 
		  mk_dsn_predict has finished.
    keep_ascii = Number of *.ascii files to keep on line
    asca	= If set, compute the asca 16s file.
  OBSOLETE INPUT KEYWORDS:
    dsn_path,keep_summ,keep_dsn

 CALLS: ***
	ADDTIME [1], ADDTIME [2], ARR2STR [1], Arr2Str [2], anytim2ex [1], anytim2ex [2]
	fmt_tim [1], fmt_tim [2], gt_day [1], gt_day [2], mail [1], mail [2], mk_aoslos
 CALLED BY:
	mk_orbit [1], mk_orbit [2]
  MODIFICATION HISTORY:
     8-sep-92, J. R. Lemen, Written
    22-sep-92, JRL, Added keep_* keywords for file purging
    28-apr-93, JRL, Turned off .summ file generation
     1-may-93, JRL, Added ASCA keyword
     4-may-93, JRL, The *ascii file for op_first_guess is now 11 days
    28-mar-95, JRL, Turned of the mk_dsn_predict part of the code.
		     Changed the mail message.  Now defaults to 'lemen'
		     unless mail = ''


mk_orbit_sum $SSW/yohkoh/gen/idl/orbit/mk_orbit_sum.pro
[Previous] [Next]
 NAME:
   mk_orbit_sum

 PURPOSE:
   Generate ascii file containing summary of Yohkoh Day times (*.summ)
   Optionally generate *.sum2 file for use by contacts.

 CALLING SEQUENCE:
   mk_orbit_sum	; Will prompt for start/stop and delete option.
   mk_orbit_sum,start_time,stop_time,time_step,	$
	file=file,orbit_file=orbit_file [,/delete,/full,/nosaa,/contacts]

   Examples:
   mk_orbit_sum,/del,/contacts			; Will prompt for start/stop
   mk_orbit_sum,'1-apr-92','3-apr-92',/del	; Default = 60s, no *.sum2 file

 INPUTS:
   start_day	Start day in string (dd-mmm-yy hh:mm) format
   stop_day	Stop  day in string (dd-mmm-yy hh:mm) format
   time_step	The time step in sec.  If not present, default will be 60s

 OPTIONAL INPUT KEYWORDS:
   orbit_file = The file name containing the orbital state vector.
		 If not supplied, then the closest file in time will
		 be chosen by run_dsnfil.pro.
   delete     = If set to 1, will delete the *.ascii file.

 OPTIONAL INPUT KEYWORDS FOR *.summ FILE CONTROL:
   full       = If set to 1, will cause (*.summ) summary file to be verbose.
   nosaa      = If set to 1, will exclude daylight times outside of saa.
		 Only has an effect if full is not set to 1.

 OPTIONAL INPUT KEYWORDS FOR *.sum2 (Contacts) FILE CONTROL:
   contacts   = If set to 1, will call pr_orbit_sum2 to write *.sum2 file
		 for use by contacts.

 OPTIONAL OUTPUT KEYWORDS:
  file = The output summary file.

 CALLS: ***
	ADDTIME [1], ADDTIME [2], BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3]
	PR_ORBIT_SUM2, break_file [4], input [1], input [2], pr_orbit_sum, rd_orbit_event
	run_dsnfil, timstr2ex [1], timstr2ex [2], yesnox [1], yesnox [2]
 SIDE EFFECTS:
  mk_orbit_sum will call run_dsnfil to create an *.ascii file containing
  the raw orbital information.  Next pr_orbit_sum will be called to
  create the summary file.

 MODIFICATION HISTORY:
  9-mar-92, Written, J. R. Lemen


mk_pix [2] $SSW/yohkoh/gen/idl/atest/mk_pix.pro
[Previous] [Next]
   Name: mk_pix

   Purpose: make a genx file of image or current window for display by show_pix

   Calling Sequence:
      mk_pix [image, r, g, b, filename='filename', text=text, /replace]

   Calling Examples:
      mk_pix 		         	      ; read image and r/g/b from current window
      mk_pix, /norgb			      ; dont include r/g/b vectors
      mk_pix,image,r,g,b,filename='name'     ; user supplied image and r/g/b
      mk_pix,'filename'	              ; pass filename  (will prompt otherwise) 
      mk_pix,image,R,G,B, text=text          ; image and colors  passed 
      mk_pix,/notext		 	      ; dont prompt for text description
      mk_pix,img,r,g,b, subdir='calibration' ; subdir = showpix subdirectory 
      mk_pix,'filename', /replace	      ; replace (overwrite) an existing file
      mk_pix,'filename', opath=curdir()      ; write file to current directory
      mk_pix,'filename', text='filename'     ; if text=file, read text from file
      mk_pix,'filename', text='filename', /newcaption ; update text of existing file
      mk_pix,im,r,g,b,/http			; update HTTP (mosaic) area

   Keyword Parmaeters:
      filename - filename to use (scaler string)
      norgb - if set, dont save R/G/B vectors
      notext - switch if set, dont prompt for text
      moon OR eclipse - if set, use moon directory
      mercury -       if set, use mercury directory
      misc OR other - if set, use misc(ellaneous) directory
      opath - path for output (default is showpix common area)
      subdir - specify subdirectory under showpix common area)
      newcapt - if set, update text (only) from existing file
      text - string or string array desrcribing image (prompts if not passed)
	      (text may be name of file which contains the desired text)
      nodist - if set, do not send mail to ysserver (triggers distribution)

 CALLS: ***
	BOX_MESSAGE, BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1]
	CONCAT_DIR [2], CONCAT_DIR [3], CT2RGB, FILE_EXIST [2], break_file [4]
	concat_dir [4], curdir [1], curdir [2], data_chk [1], data_chk [2], dir_list [1]
	dir_list [2], file_append [1], file_append [2], file_exist [1], file_exist [3]
	file_list [1], file_list [2], genx2html [1], genx2html [2], get_logenv [1]
	get_logenv [2], mail [1], mail [2], rd_tfile [1], rd_tfile [2], restgen [1]
	restgen [2], savegen [1], savegen [2], str_replace [1], str_replace [2], tbeep [1]
	tbeep [2], tbeep [3], wc_where [1], wc_where [2], wmenu_sel [1], wmenu_sel [2]
	yesnox [1], yesnox [2]
 CALLED BY:
	daily_forecast [2], eit_mirror, fl_goesplot [1], fl_goesplot [2]
	fl_goesplot [3], fl_summary [1], fl_summary [2], fl_summary [3], fl_suntoday [1]
	fl_suntoday [2], fl_suntoday [3], fl_sxtobsnar [1], fl_sxtobsnar [2]
	sun_today [1], sun_today [2], sun_today [3]
   History:
      13-Nov-1993 (SLF)
      17-Nov-1993 (SLF) - fix bug with text 
	7-Dec-1993 (SLF) - add replace switch
       1-Mar-1994 (SLF) - add opath keyword, allow text to be file name
      15-Mar-1994 (SLF) - add subdir keyword
      18-Mar-1994 (SLF) - use $DIR_GEN_SHOWPIX instead of $DIR_SITE_GENPIX
      26-Jun-1994 (SLF) - filename logic and document, add FILENAME keyword
      14-Jul-1994 (SLF) - send mail to ysserver account (trigger distribution)
      22-Jul-1994 (ETB/SLF) - add index keyword
      12-oct-1994 (SLF) - fix potential scaler/array mismatch
       7-Dec-1994 (SLF) - make dummy file to prevent distribution of 
                          'replaced' files...
      14-Feb-1995 (SLF) - add HTTP keyword and function
      10-apr-1995 (SLF) - insure that subdir is defined
      23-Feb-1998 (SLF) - permit ...fname,image,r,g,b
      26-Feb-1998 (SLF) - fix problem with 23-feb update


mk_pnt $SSW/yohkoh/gen/idl/reformat/mk_pnt.pro
[Previous] [Next]
NAME:
	mk_pnt
PURPOSE:
	Generate the PNT data file from the ADA files
INPUT:
	infil0	- A string array with a list of the ADA file
		  names.  It should include the directory
		  path.  The inputfiles can be derived if the
		  "week" option is used.
	outfil	- The output filename to create.  The output
		  file can be derived if the "week" option is used
 CALLS: ***
	ATT_STRUCT [1], ATT_STRUCT [2], BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3]
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], GEN_STRUCT [1]
	GEN_STRUCT [2], GET_NBYTES, MASK, OBS_STRUCT [1], OBS_STRUCT [2], OPEN_DA_FILE
	PNT_STRUCT, RD_ADA, REF_STRUCT, Rd_NewOrb_p [1], Rd_NewOrb_p [2], Rd_Pointer [1]
	Rd_Pointer [2], Rd_Roadmap [2], Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3]
	WRT1P_FH, anytim2ex [1], anytim2ex [2], anytim2ints [1], anytim2ints [2]
	break_file [4], concat_dir [4], ex2fid [1], ex2fid [2], ex2week [1], ex2week [2]
	fid2ex [1], fid2ex [2], file_exist [1], file_exist [3], finddir [1], finddir [2]
	fmt_tim [1], fmt_tim [2], gt_dp_mode [1], gt_dp_mode [2], gt_dp_rate [1]
	gt_dp_rate [2], int2secarr [1], int2secarr [2], rd_pnt, rd_roadmap [1], rdwrt [1]
	rdwrt [2], rdwrt [3], tim2dset [1], tim2dset [2], tim2orbit [1], tim2orbit [2]
	where_arr [1], where_arr [2]
 CALLED BY:
	yoyo_man2
OPTIONAL KEYWORD INPUT:
	week	- a string with the year/week if the format
		  91_49 where 91 is the year, 49 is the week
	append	- If set, try to just append the files in "infil"
		  list which are not already in the PNT file.
	usefid	- If set, use the FID time in the orbit pointer
		  (so that it can be recognized when used with
		  the /append switch)
HISTORY:
	Written 13-Feb-92 by M.Morrison
	Ver 0.200
	Ver 0.210 (MDM) - Made correction to STENTRY value in orbit pointer
			  section (needed to be integer*4 and was off by 1)
	Ver 0.30 (MDM)	- TFSS needed to have the proper bits extracted before
			  taking the average
	Ver 1.00 13-Mar-92 (MDM) - Adjusted extraction from ADA files to 
			  not use the same datasets twice if they overlap
			  in successive data files.
	Ver 1.01 26-May-92 (MDM) - Changed so that if outfil is not passed
			  the name is built based on the first file.
	Ver 1.02 31-Jul-92 (MDM) - Removed copying SC_PNTG field into PNT
			  structure - the ADS data is being written there and
			  we want to avoid confusion
       Ver 1.03 15-Oct-92 (MDM) - Modified to allow appending to an existing
                                   PNT file.
	Ver 1.04  9-Nov-92 (MDM) - CHMOD +W on the output file
	Ver 1.05 11-Nov-92 (MDM) -  Moved NORBIT=0 command since if an append
                                   option was overridden (Files out of order)
                                   then it was appending to the ORBIT_ARR
                                   incorrectly.
                                 - Added /USEFID switch.  This will force the
                                   ORBIT_ARRAY time/day entry to be the input
                                   FileID.  This should only be used when
                                   generating temporary OBS logs
	Ver 1.06 11-Nov-92 (MDM)  - Use the LAST file in "infil" to figure
				    out the week number when the output file
				    is not specified.
	Ver 1.07 19-Nov-92 (MDM) -  Patch to handle cases when there are no
				    datasets in the ADA file (most likely the
				    ADA file is garbage and was not finished)
		 10-Feb-93 (MDM) -  Patched bug which was not allowing the
				    input parameter "outfil" to be useable
		 11-Feb-93 (MDM) -  Similar fix to 10-Feb-93
		 29-Mar-93 (MDM) -  Adding debugging print statements
	Ver 1.08  8-Jul-93 (MDM) -  Corrected the generation of the output file
				    name when not specified.  It was sometimes
				    using the weekID for the NEXT week.
	Ver 1.09 14-Dec-93 (MDM) -  Modified to correct for the case where
				    An input file is totally contained in a 
				    previous file


mk_ptv_movie $SSW/yohkoh/gen/idl/movie/mk_ptv_movie.pro
[Previous] [Next]
  Name:
    mk_ptv_movie

  Purpose:
    Write a series of images to the graphics board.

  Calling Sequence:
    mk_ptv_movie, num, index, data, 		$
		[Comment0,comment1=Comment1,	$
		color_tab1=color_tab1, color_tab2=color_tab2, $
		data2=data2, qdisplay=qdisplay, charsize=charsize, $
		infile=infile, idxsfd=idxsfd, ff=ff, sfd=sfd, $	
		nvsdev=nvsdev, fileout=fileout, no_center=no_center, $
		no_resize=nosize, delta_sec=delta_sec, $
		q_log=q_log, tvdisplay=tvdisplay, no_record=no_record
		margin_color=margin_color, totimg=totimg, file_log=file_log

  Input Variables:
    Num	= A vector of label numbers (usually the index number of
		  the image from the original file).
    data  	= 3-d byte array contain images.
    index 	= SDA index structure corresponding to data

  Optional Input variables:
    Comment0	= Text string which is put into the text box of the display.

  Optional Input Keywords:
    Comment1	= Text string which is put into the text box of the display
		  Comment1 may be a vector of length n_elements(data(0,0,*))

    color_tab1	= a three dimension array of r,g,b colors 
			color_tab1 = bytarr(3,256)
    color_tab2 = a three dimension array of r,g,b colors for 2nd image
    data2	= 3-d byte array contain images for 2nd image.
    qdisplay	= 0 to display one image with title box.
		= 1 to display two images with title box.
		= 2 to diplay one image with no title box.
    charsize   = charsize to output.
    infile     = name of input file with image data (eg. sfd94_34...)
    idxsfd     = roadmap index number within the input file for an image.
    ff         = laser disk #, side and frame number to record.
    sfd        = flag set to 1 for sfd file input, 0 if not.
    nvsdev     = flag =1 to indicate output goes thru nvs system, 0 if not.
    fileout	= The leading part of the output filename for nvs system.
    no_center  = flag =1 to not auto center a single image.
    no_resize  = flag =1 to not resize image to max aspect.
    tvdisplay	= Debug flag, If set to 1, images displayed only and on
		  nvs system files are written but not sent to nvs-device.
    q_log      = flag =1 to log image info to a file.
    no_record  = flag =1 to NOT record images (peritek option only)
    margin_color color level for margin area around image. Default is 0.
		  particularly useful for reversed color tables.
    totimg	  total number of images to process.
    file_log	  file name of log file.

    If color_tab1 is not specified, user will be prompted for selection.

 CALLS: ***
	COMMAND_PANA, CONGRID [1], CONGRID [2], CONGRID [3], GET_INFO2, STRETCH2, input [1]
	input [2], maxspect [1], maxspect [2], mk_ptv_title, mknumat, stdct, wr_nvs
	wr_peritek
  Side effects:
    Will create a window,1 for displaying the titles.  These are read back
    using tvrd.

    If tvdisplay=1, then the test image will be displayed in window 0.

  NOTES:
	Peritek video card has about 617 col and 485 rows.
	
  History:
	


mk_ptv_title $SSW/yohkoh/gen/idl/movie/mk_ptv_title.pro
[Previous] [Next]
  Name:
   mk_ptv_title

  Purpose:
   Write a title for a SXT movie sequence.

  Calling sequence:
   mk_title,Num,index,Comment0,Comment1

   For Example,
   mk_title,Num,index,'Composite','SXT Movie Ver 1.2',xoff=10

  Inputs:
   Num   = User supplied sequence number (usually a do-loop parameter)
   index = SXT index structure
   Comment0 and Comment1 = Strings that are comments written to the plot.

  Optional Keywords:
   xoff = Starting pointing in X.  Default is 10.
   charsize = Character size
   highres  = If set, write the text to a twice bigger screen, then read
  		back and rebin.
   xsize    = X size of window 1.  Default = 134
   ysize    = Y size of window 1.  Default = 486

 CALLS: ***
	anytim2ex [1], anytim2ex [2], gt_day [1], gt_day [2], gt_dp_mode [1]
	gt_dp_mode [2], gt_dp_rate [1], gt_dp_rate [2], gt_dpe, gt_filta, gt_filtb, gt_res
	gt_time [1], gt_time [2]
 CALLED BY:
	mk_movie [1], mk_movie [2], mk_ptv_movie
  Side Effects:
   Will create a window 1 to write the titles.

   If the highres keyword is set, will create a temporary window to write
   the characters at double size.

  Modification History:
   written, 30-Jun-94, gal, from greg2, and mk_title 


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

   Purpose: make the ydb mapping file (used by ydb_install)

   Calling Sequence:
      mk_pubydb

   Generally called by cron job via software account

 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], concat_dir [4], file_append [1]
	file_append [2], get_logenv [1], get_logenv [2], pr_status [1], pr_status [2]
	rd_tfile [1], rd_tfile [2], str_replace [1], str_replace [2], strjustify
   History:
     S.L.Freeland


mk_rasm_files $SSW/yohkoh/gen/idl/orbit/mk_rasm_files.pro
[Previous] [Next]
  NAME:
    mk_rasm_files
  PURPOSE:
    Reformat the rasm raw files.
  CALLING SEQUENCE:
    mk_rasm_files,path
  INPUTS:
    path	= Directory to look for the rasm_diff.log file on.
  OUTPUTS:
    None
 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], break_file [4], concat_dir [4], fmt_rasm, get_host [1]
	get_host [2]
  SIDE EFFECTS:
    Looks for rasm_diff.log on the directory given by path.  mk_rasm_files
    then tries to determine if it is necessary to run fmt_rasm to create
    new files.

    If running from flare11, will print any files written to the 
    flare1 printer.

  MODIFICATION HISTORY:
    21-sep-92, J. R. Lemen, Written
     2-jul-93, JRL, Modified to edit the ASCA files


MK_RBMPC $SSW/yohkoh/ucon/idl/hiraoka/mk_rbmpc.pro
[Previous] [Next]
 
 NAME:
       MK_RBMPC
 PURPOSE:
       To output the rbm_sc_pc( pc1,2) and rbm_sd_pc data for utplot.
 CALLING SEQUENCE:
       rbmpc = mk_rbmpc( index,data )
       rbmpc = mk_rbmpc( index,data,xtime=xtime )
        ( after the run of yodat and the extarct of  'index' and 'data' )
 INPUTS:
       index - Wbs index structure from reformat data.
       data  - Wbs data structure from reformat data.
 OPTIONAL INPUTS:
       sec   - If set, count rate is 1 sec.
 OUTPUTS:
       rbmpc - Float array containing of rbm_pc data. 
                  ( sc_pc1, sc_pc2 and sd_pc )
               rbmpc = fltarr( 3,16*N ). rbmpc(0,*) is rbm_sc_pc1, rbmpc(2,*)
               is rbm_sd_pc.  ( N: number of wbs data. )
              -- example.--
                 utplot,xtime,rbmpc(0,*),index(0)
                   --> plot rbm_sc_pc1 time profile. 
                       count rate is 0.25sec. ( high bit rate )
 OPTIONAL OUTPUTS:
       xtime - This option gives corresponding time for each of 
               rbm_pc data time.
                 ( for utplot )
 PROCEDURE:
       XTIME is the middle of observation time interval. the observation
       time is header time minus prestored time.
       Output array RBMPC has no deadtime-corrected data.
 CALLS: ***
	UNSIGN, gt_day [1], gt_day [2], gt_dp_rate [1], gt_dp_rate [2], gt_time [1]
	gt_time [2]
 RESTRICTIONS:
       The optional input SEC is restricted to high and medium bit rates.
 HISTORY:
       Written 4-dec-93 by T.Hiraoka ( Rikkyo Univ.)


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

 NAME: MK_ROOT_BITMAP

 PURPOSE: IDL routine program to process a byte image to a bitmap, save,
	and load onto root window.

PRO mk_root_bitmap, inimage, floyd=floyd

 INPUT PARAMETERS:
	inimage = byte array image to process

 OPTIONAL INPUT KEYWORDS:
	floyd - if set, use pretty but slow Floyd-Steinberg halftoning.
		Default uses faster, noisier DOT_PLOTTER halftoning.

 METHOD: Routine converts image from 8-bit to 1-bit, saves and
	displays on root window.  Works on any Unix platform running X11.

 IDL PROCEDURES USED:
	 dot_plotter, wrt_x11_bitmap
 
 X11 PROCEDURES USED:
	xwininfo, xsetroot


 CALLS: ***
	FLOYD_STEINBERG, dot_plotter, wrt_x11_bitmap
 CALLED BY:
	background_new
 HISTORY:
	Written April 29, 1993  Barry LaBonte
	Eliminate temp file  January 3, 1995  BJL


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

   Purpose: make a script file from str_data and optionally spawn it

   Input Parameters:
      str_data - string array of commands

   Optional Keyword Parameters
      name - file name for script file (default='mk_script.src')
      submit - switch; if set, the file is sourced (executed)

   Output - function return value is script file name

   History - slf, 15-nov-92
	      slf,  6-mar-92 - allow 'appending' to new file

 CALLED BY
	arctap2tap, mktap_prep


mk_sd2 $SSW/yohkoh/gen/idl/reformat/mk_sdw.pro
[Previous] [Next]
NAME:
	mk_sd2
PURPOSE:
	Generate the SXT Dark Current SDA Warm image (SDW) file from the
	SFR files of all 100% data images that are take with the CCD 
	warm.
OPTONAL INPUT:
	infil	- A list of the SFR file names that were used to make
		  the SDL file.  If this parameter is not passed, the
		  program will use FINDDIR to get the directory for that
		  week of data and then use FINDFILE.
KEYWORD INPUT:
	week	- a string with the year/week if the format
		  91_49 where 91 is the year, 49 is the week
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], GEN_STRUCT [1], GEN_STRUCT [2]
	GET_NBYTES, GET_SDL_INFO, MK_SDW, OPEN_DA_FILE, RD_XDA [1], RD_XDA [2], REF_STRUCT
	Rd_Roadmap [2], Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3], SXT_STRUCT
	UNIQ [1], UNIQ [2], UNIQ [3], WRT1P_FH, anytim2ex [1], anytim2ex [2], concat_dir [4]
	ex2week [1], ex2week [2], file_list [1], file_list [2], finddir [1], finddir [2]
	gt_dpe, gt_expdur [1], gt_expdur [2], gt_res, gt_temp_ccd, rd_roadmap [1], rd_sdl
	rdwrt [1], rdwrt [2], rdwrt [3], tim2dset [1], tim2dset [2], wrtsxtmap
HISTORY:
	Written 26-Apr-92 by M.Morrison
Ver 1.11 26-May-92 (MDM) - Changed to write a temporary file and then
                           move it to on-line after finished generating it
	   8-Jul-92 (MDM) - Added "outfil"
	  18-Aug-93 (MDM) - Removed reference to DIR_SXT_DC
Ver 1.20  4-Aug-94 (MDM) - Modified to exclude dark images which have staturated
                           pixels


mk_sdc [1] $SSW/yohkoh/gen/galileo/idl/lmsal/mk_sdc_last.pro
[Previous] [Next]
NAME:
	mk_sdc
PURPOSE:
	Generate the SXT Dark Current SDA image (SDC) file from the
	SFR files of all unique (exposure and resolution) dark current 
	images excluding SAA and non-100% images
OPTONAL INPUT:
	infil	- A list of the SFR file names that were used to make
		  the SDL file.  If this parameter is not passed, the
		  program will use FINDDIR to get the directory for that
		  week of data and then use FINDFILE.
KEYWORD INPUT:
	week	- a string with the year/week if the format
		  91_49 where 91 is the year, 49 is the week
       /correct_col_blem = call sdc_verify a second time to correct 
                              column blemishes, when necessary.
 CALLED BY:
	mk_sdcs
HISTORY:
	Written 20-Apr-92 by M.Morrison
Ver 1.11 26-May-92 (MDM) - Changed to write a temporary file and then
                           move it to on-line after finished generating it
          8-Jul-92 (MDM) - added "outfil"
	  13-May-93 (MDM) - Changed GT_EXPDUR call to have /NOCORR to not
			    correct for the shutter error
			  - Added check for upper/lower half image (for FR)
Ver 1.12 16-May-93 (MDM) - Patch to exclude BLS dark images taken "11-APR-93"
			    which were "Qrtr Dark DPE=11 (38.0 )"
	  18-Aug-93 (MDM) - Changed to use DIR_SXT_SDC and DIR_SXT_SDL
Ver 1.13 19-Aug-93 (MDM) - Added check to avoid the SLS images which are
			    QR, DPE=2, NaBan images which have scatter light
			    in them.
Ver 1.20  4-Aug-94 (MDM) - Modified to exclude dark images which have staturated
			    pixels
Ver 1.21  7-apr-95 (SLF) - avoid frames with fill data (show 100% "good")
Ver 1.22  6-Jul-95 (MDM) - Added check that the image is not a patrol image
			  - Updated ProgVerNo (it was not for Ver 1.21)
Ver 1.23 23-Mar-99 (TRM) - added call to sdc_verify to select the best dark
                           frame when multiple frames are available.
                         - Added check of filters.  Before the Oct 1992 
                           entrance filter failure any filter combination
                           is allowed.  Between the Oct 92 and Nov 92 
                           failures, only darks with a metal filter are
                           allowed.  After the Nov 92 failure only darks
                           with AlMg filter are allowed.
Ver 1.24 11-May-99 (SLF) - add /CLEAR_COMPRESS in rd_xda call
Ver 1.30 12-May-99 (SLF) - !!SIMPLIFY!! use sav_sda instead of lower level...
                           use file_delete, /noshell etc.
Ver 1.31 15-May-99 (TRM) - Simplified the call to sdc_verify so that it is
                           only called when necessary.  Added a second call
                           to sdc_verify to correct for column blemishes,
                           when necessary.
Ver 1.32 15-Jul-99 (TRM) - Make the default NOT to do the column blemish
                           correction.
Ver 1.33 28-jan-00 (PGS) - y2k fix: replaced sel_timrange with
                           ssw_time_compare
Ver 1.34 22-Nov-02 (TRM) - Added nbest keyword. Changed SAA flag to
                           use saa_in.pro rather than just 
                           the RBM flag.  Removed call to
                           get_sdl_info and changed code to reject
                           all darks from SAA times.  Changed the
                           test around Nov 92 to allow gt_filtb GE 3
                           so that the thicker filters are not
                           rejected at that time.  I also noticed that when
                           Phil did the y2k fix he did not update the
                           version number so there probably is no
                           1.33
Ver 1.35 02-Dec-02 (TRM) - Despike the short exposure darks.
                         - Added call to sxt_mksdc_history
                         - Added call to sxt_bakeout_in with a
                           cooling time of 12 hours to better
                           eliminate bakeouts.
	  11-Mar-03 (GLS) - Changed references to 'file_delete' to 'ssw_file_delete'
			    in order to avoid conflict with IDL 5.5 'file_delete'
			    command.
Ver 1.36 02-Jun-2003 (TRM) - Allow DPE=0 short exposures before the
                             first entrance filter failure.


mk_sdc [2] $SSW/yohkoh/gen/idl/reformat/mk_sdc.pro
[Previous] [Next]
NAME:
	mk_sdc
PURPOSE:
	Generate the SXT Dark Current SDA image (SDC) file from the
	SFR files of all unique (exposure and resolution) dark current 
	images excluding SAA and non-100% images
OPTONAL INPUT:
	infil	- A list of the SFR file names that were used to make
		  the SDL file.  If this parameter is not passed, the
		  program will use FINDDIR to get the directory for that
		  week of data and then use FINDFILE.
KEYWORD INPUT:
	week	- a string with the year/week if the format
		  91_49 where 91 is the year, 49 is the week
       /correct_col_blem = call sdc_verify a second time to correct 
                              column blemishes, when necessary.
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], GET_NBYTES, RD_XDA [1], RD_XDA [2]
	REF_STRUCT, Rd_Roadmap [2], Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3]
	SDC_VERIFY, STR2ARR [1], STR2ARR [2], SXT_BAKEOUT_IN, SXT_STRUCT, UNIQ [1], UNIQ [2]
	UNIQ [3], anytim2ex [1], anytim2ex [2], concat_dir [4], ex2week [1], ex2week [2]
	file_list [1], file_list [2], finddir [1], finddir [2], gt_dpe, gt_expdur [1]
	gt_expdur [2], gt_filta, gt_filtb, gt_pfi_ffi, gt_res, gt_shape_cmd, gt_temp_ccd
	int2secarr [1], int2secarr [2], rd_roadmap [1], rd_sdl, saa_in [1], saa_in [2]
	sav_sda [1], sav_sda [2], sav_sda [3], sel_timrange [1], sel_timrange [2]
	ssw_time_compare, sxt_mksdc_history, tim2dset [1], tim2dset [2]
 CALLED BY:
	mk_sdcs
HISTORY:
	Written 20-Apr-92 by M.Morrison
Ver 1.11 26-May-92 (MDM) - Changed to write a temporary file and then
                           move it to on-line after finished generating it
          8-Jul-92 (MDM) - added "outfil"
	  13-May-93 (MDM) - Changed GT_EXPDUR call to have /NOCORR to not
			    correct for the shutter error
			  - Added check for upper/lower half image (for FR)
Ver 1.12 16-May-93 (MDM) - Patch to exclude BLS dark images taken "11-APR-93"
			    which were "Qrtr Dark DPE=11 (38.0 )"
	  18-Aug-93 (MDM) - Changed to use DIR_SXT_SDC and DIR_SXT_SDL
Ver 1.13 19-Aug-93 (MDM) - Added check to avoid the SLS images which are
			    QR, DPE=2, NaBan images which have scatter light
			    in them.
Ver 1.20  4-Aug-94 (MDM) - Modified to exclude dark images which have staturated
			    pixels
Ver 1.21  7-apr-95 (SLF) - avoid frames with fill data (show 100% "good")
Ver 1.22  6-Jul-95 (MDM) - Added check that the image is not a patrol image
			  - Updated ProgVerNo (it was not for Ver 1.21)
Ver 1.23 23-Mar-99 (TRM) - added call to sdc_verify to select the best dark
                           frame when multiple frames are available.
                         - Added check of filters.  Before the Oct 1992 
                           entrance filter failure any filter combination
                           is allowed.  Between the Oct 92 and Nov 92 
                           failures, only darks with a metal filter are
                           allowed.  After the Nov 92 failure only darks
                           with AlMg filter are allowed.
Ver 1.24 11-May-99 (SLF) - add /CLEAR_COMPRESS in rd_xda call
Ver 1.30 12-May-99 (SLF) - !!SIMPLIFY!! use sav_sda instead of lower level...
                           use file_delete, /noshell etc.
Ver 1.31 15-May-99 (TRM) - Simplified the call to sdc_verify so that it is
                           only called when necessary.  Added a second call
                           to sdc_verify to correct for column blemishes,
                           when necessary.
Ver 1.32 15-Jul-99 (TRM) - Make the default NOT to do the column blemish
                           correction.
Ver 1.33 28-jan-00 (PGS) - y2k fix: replaced sel_timrange with
                           ssw_time_compare
Ver 1.34 22-Nov-02 (TRM) - Added nbest keyword. Changed SAA flag to
                           use saa_in.pro rather than just 
                           the RBM flag.  Removed call to
                           get_sdl_info and changed code to reject
                           all darks from SAA times.  Changed the
                           test around Nov 92 to allow gt_filtb GE 3
                           so that the thicker filters are not
                           rejected at that time.  I also noticed that when
                           Phil did the y2k fix he did not update the
                           version number so there probably is no
                           1.33
Ver 1.35 02-Dec-02 (TRM) - Despike the short exposure darks.
                         - Added call to sxt_mksdc_history
                         - Added call to sxt_bakeout_in with a
                           cooling time of 12 hours to better
                           eliminate bakeouts.


mk_sdc [3] $SSW/yohkoh/sxt/idl/atest/mk_sdc.pro
[Previous] [Next]
NAME:
	mk_sdc
PURPOSE:
	Generate the SXT Dark Current SDA image (SDC) file from the
	SFR files of all unique (exposure and resolution) dark current 
	images excluding SAA and non-100% images
OPTONAL INPUT:
	infil	- A list of the SFR file names that were used to make
		  the SDL file.  If this parameter is not passed, the
		  program will use FINDDIR to get the directory for that
		  week of data and then use FINDFILE.
KEYWORD INPUT:
	week	- a string with the year/week if the format
		  91_49 where 91 is the year, 49 is the week
       /correct_col_blem = call sdc_verify a second time to correct 
                              column blemishes, when necessary.
       /saa_only = write dark file with only SAA frames.  Normally
                   this should never ever ever be set.
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], GET_NBYTES, RD_XDA [1], RD_XDA [2]
	REF_STRUCT, Rd_Roadmap [2], Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3]
	SDC_VERIFY, STR2ARR [1], STR2ARR [2], SXT_BAKEOUT_IN, SXT_STRUCT, UNIQ [1], UNIQ [2]
	UNIQ [3], anytim2ex [1], anytim2ex [2], concat_dir [4], ex2week [1], ex2week [2]
	file_list [1], file_list [2], finddir [1], finddir [2], gt_dpe, gt_expdur [1]
	gt_expdur [2], gt_filta, gt_filtb, gt_pfi_ffi, gt_res, gt_shape_cmd, gt_temp_ccd
	int2secarr [1], int2secarr [2], rd_roadmap [1], rd_sdl, saa_in [1], saa_in [2]
	sav_sda [1], sav_sda [2], sav_sda [3], sel_timrange [1], sel_timrange [2]
	ssw_time_compare, sxt_mksdc_history, tim2dset [1], tim2dset [2]
 CALLED BY:
	mk_sdcs
HISTORY:
	Written 20-Apr-92 by M.Morrison
Ver 1.11 26-May-92 (MDM) - Changed to write a temporary file and then
                           move it to on-line after finished generating it
          8-Jul-92 (MDM) - added "outfil"
	  13-May-93 (MDM) - Changed GT_EXPDUR call to have /NOCORR to not
			    correct for the shutter error
			  - Added check for upper/lower half image (for FR)
Ver 1.12 16-May-93 (MDM) - Patch to exclude BLS dark images taken "11-APR-93"
			    which were "Qrtr Dark DPE=11 (38.0 )"
	  18-Aug-93 (MDM) - Changed to use DIR_SXT_SDC and DIR_SXT_SDL
Ver 1.13 19-Aug-93 (MDM) - Added check to avoid the SLS images which are
			    QR, DPE=2, NaBan images which have scatter light
			    in them.
Ver 1.20  4-Aug-94 (MDM) - Modified to exclude dark images which have staturated
			    pixels
Ver 1.21  7-apr-95 (SLF) - avoid frames with fill data (show 100% "good")
Ver 1.22  6-Jul-95 (MDM) - Added check that the image is not a patrol image
			  - Updated ProgVerNo (it was not for Ver 1.21)
Ver 1.23 23-Mar-99 (TRM) - added call to sdc_verify to select the best dark
                           frame when multiple frames are available.
                         - Added check of filters.  Before the Oct 1992 
                           entrance filter failure any filter combination
                           is allowed.  Between the Oct 92 and Nov 92 
                           failures, only darks with a metal filter are
                           allowed.  After the Nov 92 failure only darks
                           with AlMg filter are allowed.
Ver 1.24 11-May-99 (SLF) - add /CLEAR_COMPRESS in rd_xda call
Ver 1.30 12-May-99 (SLF) - !!SIMPLIFY!! use sav_sda instead of lower level...
                           use file_delete, /noshell etc.
Ver 1.31 15-May-99 (TRM) - Simplified the call to sdc_verify so that it is
                           only called when necessary.  Added a second call
                           to sdc_verify to correct for column blemishes,
                           when necessary.
Ver 1.32 15-Jul-99 (TRM) - Make the default NOT to do the column blemish
                           correction.
Ver 1.33 28-jan-00 (PGS) - y2k fix: replaced sel_timrange with
                           ssw_time_compare
Ver 1.34 22-Nov-02 (TRM) - Added nbest keyword. Changed SAA flag to
                           use saa_in.pro rather than just 
                           the RBM flag.  Removed call to
                           get_sdl_info and changed code to reject
                           all darks from SAA times.  Changed the
                           test around Nov 92 to allow gt_filtb GE 3
                           so that the thicker filters are not
                           rejected at that time.  I also noticed that when
                           Phil did the y2k fix he did not update the
                           version number so there probably is no
                           1.33
Ver 1.35 02-Dec-02 (TRM) - Despike the short exposure darks.
                         - Added call to sxt_mksdc_history
                         - Added call to sxt_bakeout_in with a
                           cooling time of 12 hours to better
                           eliminate bakeouts.
	  11-Mar-03 (GLS) - Changed references to 'file_delete' to 'ssw_file_delete'
			    in order to avoid conflict with IDL 5.5 'file_delete'
			    command.
Ver 1.36 02-Jun-2003 (TRM) - Allow DPE=0 short exposures before the
                             first entrance filter failure by turning
                             off the exp test for these images.  Also
                             added an absolute cut on the time since
                             uv flood.  Added /saa_only keyword.


mk_sdc [4] $SSW/yohkoh/sxt/idl/mk_sdc.pro
[Previous] [Next]
NAME:
	mk_sdc
PURPOSE:
	Generate the SXT Dark Current SDA image (SDC) file from the
	SFR files of all unique (exposure and resolution) dark current 
	images excluding SAA and non-100% images
OPTONAL INPUT:
	infil	- A list of the SFR file names that were used to make
		  the SDL file.  If this parameter is not passed, the
		  program will use FINDDIR to get the directory for that
		  week of data and then use FINDFILE.
KEYWORD INPUT:
	week	- a string with the year/week if the format
		  91_49 where 91 is the year, 49 is the week
       /correct_col_blem = call sdc_verify a second time to correct 
                              column blemishes, when necessary.
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], GET_NBYTES, RD_XDA [1], RD_XDA [2]
	REF_STRUCT, Rd_Roadmap [2], Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3]
	SDC_VERIFY, STR2ARR [1], STR2ARR [2], SXT_BAKEOUT_IN, SXT_STRUCT, UNIQ [1], UNIQ [2]
	UNIQ [3], anytim2ex [1], anytim2ex [2], concat_dir [4], ex2week [1], ex2week [2]
	file_list [1], file_list [2], finddir [1], finddir [2], gt_dpe, gt_expdur [1]
	gt_expdur [2], gt_filta, gt_filtb, gt_pfi_ffi, gt_res, gt_shape_cmd, gt_temp_ccd
	int2secarr [1], int2secarr [2], rd_roadmap [1], rd_sdl, saa_in [1], saa_in [2]
	sav_sda [1], sav_sda [2], sav_sda [3], sel_timrange [1], sel_timrange [2]
	ssw_time_compare, sxt_mksdc_history, tim2dset [1], tim2dset [2]
 CALLED BY:
	mk_sdcs
HISTORY:
	Written 20-Apr-92 by M.Morrison
Ver 1.11 26-May-92 (MDM) - Changed to write a temporary file and then
                           move it to on-line after finished generating it
          8-Jul-92 (MDM) - added "outfil"
	  13-May-93 (MDM) - Changed GT_EXPDUR call to have /NOCORR to not
			    correct for the shutter error
			  - Added check for upper/lower half image (for FR)
Ver 1.12 16-May-93 (MDM) - Patch to exclude BLS dark images taken "11-APR-93"
			    which were "Qrtr Dark DPE=11 (38.0 )"
	  18-Aug-93 (MDM) - Changed to use DIR_SXT_SDC and DIR_SXT_SDL
Ver 1.13 19-Aug-93 (MDM) - Added check to avoid the SLS images which are
			    QR, DPE=2, NaBan images which have scatter light
			    in them.
Ver 1.20  4-Aug-94 (MDM) - Modified to exclude dark images which have staturated
			    pixels
Ver 1.21  7-apr-95 (SLF) - avoid frames with fill data (show 100% "good")
Ver 1.22  6-Jul-95 (MDM) - Added check that the image is not a patrol image
			  - Updated ProgVerNo (it was not for Ver 1.21)
Ver 1.23 23-Mar-99 (TRM) - added call to sdc_verify to select the best dark
                           frame when multiple frames are available.
                         - Added check of filters.  Before the Oct 1992 
                           entrance filter failure any filter combination
                           is allowed.  Between the Oct 92 and Nov 92 
                           failures, only darks with a metal filter are
                           allowed.  After the Nov 92 failure only darks
                           with AlMg filter are allowed.
Ver 1.24 11-May-99 (SLF) - add /CLEAR_COMPRESS in rd_xda call
Ver 1.30 12-May-99 (SLF) - !!SIMPLIFY!! use sav_sda instead of lower level...
                           use file_delete, /noshell etc.
Ver 1.31 15-May-99 (TRM) - Simplified the call to sdc_verify so that it is
                           only called when necessary.  Added a second call
                           to sdc_verify to correct for column blemishes,
                           when necessary.
Ver 1.32 15-Jul-99 (TRM) - Make the default NOT to do the column blemish
                           correction.
Ver 1.33 28-jan-00 (PGS) - y2k fix: replaced sel_timrange with
                           ssw_time_compare
Ver 1.34 22-Nov-02 (TRM) - Added nbest keyword. Changed SAA flag to
                           use saa_in.pro rather than just 
                           the RBM flag.  Removed call to
                           get_sdl_info and changed code to reject
                           all darks from SAA times.  Changed the
                           test around Nov 92 to allow gt_filtb GE 3
                           so that the thicker filters are not
                           rejected at that time.  I also noticed that when
                           Phil did the y2k fix he did not update the
                           version number so there probably is no
                           1.33
Ver 1.35 02-Dec-02 (TRM) - Despike the short exposure darks.
                         - Added call to sxt_mksdc_history
                         - Added call to sxt_bakeout_in with a
                           cooling time of 12 hours to better
                           eliminate bakeouts.


mk_sdcs $SSW/yohkoh/gen/galileo/idl/lmsal/mk_sdcs.pro
[Previous] [Next]
   Name: mk_sdcs 

   Purpose: make many sdcs (one week or mission)

   Input Parameters:
      NONE

   Optional Keyword Parameters:
      weeks - optional list of desired weeks to process (default=mission)
      start_week - optional start week (default = launch week)
                   may be useful for restarts of mission long dbase

   Output Parameters:
      NONE

   Output:
      generates an sdc per WEEKS (default is mission)

 CALLS: ***
	BOX_MESSAGE, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], DELVARX [1]
	DELVARX [2], DELVARX [3], DELVARX [4], FILE_EXIST [2], concat_dir [4], delvarx [5]
	file_exist [1], file_exist [3], file_list [1], file_list [2], get_logenv [1]
	get_logenv [2], get_yo_dates [1], get_yo_dates [2], get_yo_dates [3], last_nelem
	mk_sdc [1], mk_sdc [2], mk_sdc [3], mk_sdc [4], week_loop [1], week_loop [2]
	week_loop [3]
   History:


mk_sdl $SSW/yohkoh/gen/idl/reformat/mk_sdl.pro
[Previous] [Next]
NAME:
	mk_sdl
PURPOSE:
	Generate the SXT Dark current log (SDL) file from the SFR file
INPUT:
	infil	- A string array with a list of the SFR file
		  names.  It should include the directory
		  path.  The inputfiles can be derived if the
		  "week" option is used.
	outfil	- The output filename to create.  The output
		  file can be derived if the "week" option is used
OPTIONAL INPUT:
	week	- a string with the year/week if the format
		  91_49 where 91 is the year, 49 is the week
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], GEN_STRUCT [1], GEN_STRUCT [2]
	GET_NBYTES, KeySea [1], KeySea [2], OPEN_DA_FILE, RD_XDA [1], RD_XDA [2], REF_STRUCT
	Rd_Roadmap [2], Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3], SXT_STRUCT
	WRT1P_FH, anytim2ex [1], anytim2ex [2], concat_dir [4], ex2week [1], ex2week [2]
	file_list [1], file_list [2], finddir [1], finddir [2], fmt_tim [1], fmt_tim [2]
	rd_roadmap [1], rdwrt [1], rdwrt [2], rdwrt [3], wrtsxtmap
HISTORY:
	Written 15-Apr-92 by M.Morrison
Ver 1.10 20-Apr-92 (MDM) - Changed from SDC to SDL
			  - Changed to use structures for data
Ver 1.11 26-May-92 (MDM) - Adjusted how weekid is derived
			  - Changed to write a temporary file and then
			    move it to on-line after finished generating it
Ver 1.12 12-Jul-93 (MDM) - Build/save the roadmap
	  18-Aug-93 (MDM) - Modified to use DIR_SXT_SDL directory
	  19-Aug-93 (MDM) - Corrected typo in 18-Aug-93 fix


mk_sdm $SSW/yohkoh/gen/idl/reformat/mk_sdm.pro
[Previous] [Next]
NAME:
	mk_sdm
PURPOSE:
	To create the weekly average SXT dark image database
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], DATA_PATHS, FILE_EXIST [2], POLY
	POLY_FIT, RD_XDA [1], RD_XDA [2], Rd_Roadmap [2], UNIQ [1], UNIQ [2], UNIQ [3]
	anytim2ints [1], anytim2ints [2], anytim2weekid [1], anytim2weekid [2]
	concat_dir [4], file_compress [1], file_compress [2], file_exist [1]
	file_exist [3], file_list [1], file_list [2], file_uncompress [1]
	file_uncompress [2], fmt_tim [1], fmt_tim [2], gt_dpe, gt_res, his_index
	rd_roadmap [1], restgen [1], restgen [2], sav_sda [1], sav_sda [2], sav_sda [3]
	str_replace [1], str_replace [2], sxt_decomp [1], sxt_decomp [2], tbeep [1]
	tbeep [2], tbeep [3], tim2dset [1], tim2dset [2], weekid2ex [1], weekid2ex [2]
	weekid2ex [3]
HISTORY:
	Written Mar-95 by M.Morrison
V1.1	11-Jul-95 (MDM) - Modified to write the output to /1d3/yohkoh/sdm
V1.11	12-Jul-95 (MDM) - Modified to correct minor bug
V1.12			- Fixed bug when no short exposure is available


mk_sdmi $SSW/yohkoh/gen/idl/reformat/mk_sdmi.pro
[Previous] [Next]
NAME:
	mk_sdmi
PURPOSE:
	To make the SDM Input database "SDMI" which holds 
	information on most of the dark current images
	and is used to select which images are used for SDM
SAMPLE CALLING SEQUENCE:
	mk_sdmi,v,test=[92,50]
 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], POLY_FIT, RD_XDA [1], RD_XDA [2], Rd_Roadmap [2], STDEV
	anytim2ints [1], anytim2ints [2], break_file [4], concat_dir [4], fid2ex [1]
	fid2ex [2], file_list [1], file_list [2], finddir [1], finddir [2], get_sdm_val
	gt_corner, gt_day [1], gt_day [2], gt_dpe, gt_percentd, gt_res, gt_temp_ccd
	gt_time [1], gt_time [2], mk_dset_str [1], mk_dset_str [2], rd_obs, rd_roadmap [1]
	savegen [1], savegen [2], sxt_decomp [1], sxt_decomp [2], tim2orbit [1]
	tim2orbit [2], week2ex [1], week2ex [2]
HISTORY:
	Written 27-Mar-95 by M.Morrison using CHECK_SDM and 
					SDM_CHECK2BIN
	28-Mar-95 (MDM) - Modified the logic somewhat
			- Added TEST option
	31-Mar-95 (MDM) - Modified to have keyword RUN_TIME
	18-Oct-96 (GLS) - Changed '/ydb' ref to '$ydb'


mk_sdp $SSW/yohkoh/gen/idl/reformat/mk_sdp.pro
[Previous] [Next]
NAME:
       mk_sdp
PURPOSE:
       Given a set of PFI files, read the roadmaps and save the 
	dark images into a weekly file
INPUT:
       infil   - an array of input file names
       outdir  - the output directory where the file should be written
		  It uses $DIR_SXT_SDP by default.
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], MASK, RD_SDA [1], RD_SDA [2]
	RD_SDA [3], Rd_Roadmap [2], concat_dir [4], fmt_tim [1], fmt_tim [2], gt_expmode
	mk_dset_str [1], mk_dset_str [2], rd_roadmap [1], sav_sda [1], sav_sda [2]
	sav_sda [3], tim2orbit [1], tim2orbit [2]
HISTORY:
       Written 3-Aug-94 by M.Morrison


mk_sfc [1] $SSW/yohkoh/sxt/idl/atest/mk_sfc.pro
[Previous] [Next]
   Name: mk_sfc

   Purpose: convert one or more SFT files to SFC files (via sfc_prep)

   Input Parameters:
      week - week string(s) in form YY_WW 

   Calling Sequence:
      mk_sfc, week_str [param_file='filename', /check_param, /online, $
	                 /noconfirm, /testing, /no_mail ]

   Calling Examples:
      mk_sfc,'95_50',/online,/noconfirm   ; process SFTs for 95_50
      mk_sfc,/check_param		   ; just show current parameter
					   ; settings (show param file)
  
   Optional Keyword Parameters:
      online - if set, put the sfcs online (DIR_SXT_SFC)
      noconfirm - if set, dont prompt for sfc/sft dirs
      sftdir - if set, alternate sft output directory
      sfcdir - if set, alternate sfc output directory 
      no_mail - if set, dont send mail
      check_params - if set, just show current SFC parameter values
      param_file - optional SFC parameter file (Def: $ys/sxt/doc/mk_sfc.param)
      min_att_status1 - minimum ATT Status1 value to accept 
                        Default is 4, which accepts ATT STATUS1 >= 4 (4 and 8)
      

 CALLS: ***
	ARR2STR [1], Arr2Str [2], CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3]
	FILE_EXIST [2], IMGINFO, MORE [1], MORE [2], RD_SDA [1], RD_SDA [2], RD_SDA [3]
	STR2ARR [1], STR2ARR [2], anytim2ex [1], anytim2ex [2], anytim2ints [1]
	anytim2ints [2], concat_dir [4], ex2fid [1], ex2fid [2], file_append [1]
	file_append [2], file_exist [1], file_exist [3], file_info2 [1], file_info2 [2]
	file_list [1], file_list [2], fmt_tim [1], fmt_tim [2], get_logenv [1]
	get_logenv [2], get_user [1], get_user [2], get_yo_dates [1], get_yo_dates [2]
	get_yo_dates [3], gt2exe [1], gt2exe [2], gt_dpe, gt_filta, gt_filtb, gt_res
	int2secarr [1], int2secarr [2], mail [1], mail [2], match_index [1]
	match_index [2], pr_status [1], pr_status [2], prstr [1], prstr [2], rd_att
	rd_tfile [1], rd_tfile [2], sav_sda [1], sav_sda [2], sav_sda [3]
	sel_timrange [1], sel_timrange [2], sfc_prep [1], sfc_prep [2], str2cols [1]
	str2cols [2], str_replace [1], str_replace [2], strjustify, tbeep [1], tbeep [2]
	tbeep [3], tim2dset [1], tim2dset [2], tim2orbit [1], tim2orbit [2], ut_time [1]
	ut_time [2]
   History:
      4-may-1995 (SLF) - Archive version (from orig written 15-mar)
                         Add auto-update, auto-mail, time window
     29-Jun-1995 (SLF) - write log to DIR_SITE_LOGS (not REFORMAT_SC)
     23-aug-1995 (SLF) - add Leak ERA criteria 
      8-nov-1995 (SLF) - DPE filter , use parameter file for DPE, seperation
			  add CHECK_PARAMS keyword (verify param table)
     18-dec-1995 (SLF) - parameterize Tim2Sunset (in param table)
      9-jan-1995 (SLF) - fix status messages
     16-apr-1996 (SLF) - update documentation header, add PARAM_FILE keyword
     21-may-1996 (SLF) - return with no action if NO SFTs found
      3-mar-1997 (JRL) - Give the file date (not current date) if /check_param 
     20-jan-1997 (SLF) - filter out all but half-res
     22-apr-1999 (pgs) - replaced =- hour interval with att_offset keywork & hour default
                         modified status check from att.status1 eq 4 to att.status1 ge 4
      4-may-1999 (SLF) - permit SAA, write to parallel directory ...sfcsaa/..
     23-sep-1999 (SLF) - filter ccd temp > -20.
     18-Nov-1999 (SLF) - dont re-create if sfc in$DIR_SXT_SFC/offline/...
      5-Jan-2000 (SLF) - add NOGRILL keyword (pass to sfc_pro)
     17-dec-2001 (SFL) - save updated index->sfc file / enable cdd temp filter
      9-oct-2002 (SFL) - add MIN_ATT_STATUS1 KEYWORD and function (default=4)


mk_sfc [2] $SSW/yohkoh/sxt/idl/util/mk_sfc.pro
[Previous] [Next]
   Name: mk_sfc

   Purpose: convert one or more SFT files to SFC files (via sfc_prep)

   Input Parameters:
      week - week string(s) in form YY_WW 

   Calling Sequence:
      mk_sfc, week_str [param_file='filename', /check_param, /online, $
	                 /noconfirm, /testing, /no_mail ]

   Calling Examples:
      mk_sfc,'95_50',/online,/noconfirm   ; process SFTs for 95_50
      mk_sfc,/check_param		   ; just show current parameter
					   ; settings (show param file)
  
   Optional Keyword Parameters:
      online - if set, put the sfcs online (DIR_SXT_SFC)
      noconfirm - if set, dont prompt for sfc/sft dirs
      sftdir - if set, alternate sft output directory
      sfcdir - if set, alternate sfc output directory 
      no_mail - if set, dont send mail
      check_params - if set, just show current SFC parameter values
      param_file - optional SFC parameter file (Def: $ys/sxt/doc/mk_sfc.param)

 CALLS: ***
	ARR2STR [1], Arr2Str [2], CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3]
	FILE_EXIST [2], IMGINFO, MORE [1], MORE [2], RD_SDA [1], RD_SDA [2], RD_SDA [3]
	STR2ARR [1], STR2ARR [2], anytim2ex [1], anytim2ex [2], anytim2ints [1]
	anytim2ints [2], concat_dir [4], ex2fid [1], ex2fid [2], file_append [1]
	file_append [2], file_exist [1], file_exist [3], file_info2 [1], file_info2 [2]
	file_list [1], file_list [2], fmt_tim [1], fmt_tim [2], get_logenv [1]
	get_logenv [2], get_user [1], get_user [2], get_yo_dates [1], get_yo_dates [2]
	get_yo_dates [3], gt2exe [1], gt2exe [2], gt_dpe, gt_filta, gt_filtb, gt_res
	int2secarr [1], int2secarr [2], mail [1], mail [2], match_index [1]
	match_index [2], pr_status [1], pr_status [2], prstr [1], prstr [2], rd_att
	rd_tfile [1], rd_tfile [2], sav_sda [1], sav_sda [2], sav_sda [3]
	sel_timrange [1], sel_timrange [2], sfc_prep [1], sfc_prep [2], str2cols [1]
	str2cols [2], str_replace [1], str_replace [2], strjustify, tbeep [1], tbeep [2]
	tbeep [3], tim2dset [1], tim2dset [2], tim2orbit [1], tim2orbit [2], ut_time [1]
	ut_time [2]
   History:
      4-may-1995 (SLF) - Archive version (from orig written 15-mar)
                         Add auto-update, auto-mail, time window
     29-Jun-1995 (SLF) - write log to DIR_SITE_LOGS (not REFORMAT_SC)
     23-aug-1995 (SLF) - add Leak ERA criteria 
      8-nov-1995 (SLF) - DPE filter , use parameter file for DPE, seperation
			  add CHECK_PARAMS keyword (verify param table)
     18-dec-1995 (SLF) - parameterize Tim2Sunset (in param table)
      9-jan-1995 (SLF) - fix status messages
     16-apr-1996 (SLF) - update documentation header, add PARAM_FILE keyword
     21-may-1996 (SLF) - return with no action if NO SFTs found
      3-mar-1997 (JRL) - Give the file date (not current date) if /check_param 
     20-jan-1997 (SLF) - filter out all but half-res


mk_sfd [1] $SSW/yohkoh/gen/idl/atest/mk_sfd.pro
[Previous] [Next]
NAME:
	mk_sfd
PURPOSE:
	Given a set of files, read the roadmaps and find where there
	is a long and short exposure.  Make a composite image and remove
	the saturated pixels.  Write images to an output file.
INPUT:
	infil	- an array of input file names
	outdir	- the output directory where the file should be written
 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], GET_NBYTES, GetObsID, RD_XDA [1], RD_XDA [2], Rd_Roadmap [2]
	break_file [4], concat_dir [4], file_append [1], file_append [2], fmt_tim [1]
	fmt_tim [2], get_dc_image [1], get_dc_image [2], get_dc_image [3], get_info [1]
	get_info [2], get_info [3], get_info [4], gt_day [1], gt_day [2], gt_dpe
	gt_expdur [1], gt_expdur [2], gt_expmode, gt_filta, gt_filtb, gt_res, gt_shape_cmd
	gt_temp_ccd, gt_time [1], gt_time [2], his_index, int2secarr [1], int2secarr [2]
	leak_sub [1], leak_sub [2], leak_sub [3], mk_dset_str [1], mk_dset_str [2]
	rd_roadmap [1], sav_sda [1], sav_sda [2], sav_sda [3], sgn [1], sgn [2], sxt_cen [1]
	sxt_cen [2], sxt_decomp [1], sxt_decomp [2], tim2orbit [1], tim2orbit [2]
 CALLED BY:
	yoyo_man2
OPTIONAL KEYWORD INPUT:
	interactive- If set, display the results to the screen as the
		   processing occurs.
	outfil	- The output file name (excluding the directory)
       float   - If set, bypass SFD compression and write floating type
KEYWORD OUTPUT:
	filename- the output file name as derived from the input file list
HISTORY:
	draft version: 28 January 1992 (KTS)
	20-Mar-92 (MDM) - Took Keith Strong's program "db_desat.pro"
			  and made the procedure "mk_desat"
	7-Apr-92 (KTS)  - Put IFLAG in to avoid error if first image
			  is rejected
	14-Apr-92 (KTS) - 'PREFIX' parameter hardwired for 'sfd' 
			- Added automatic week # feature
			- Better generated dark frame algorithm
			- Avoid night images algorithm
Ver 2.0 16-Apr-92 (KTS) - Added dark frame library read
       16-Apr-92 (MDM) - Changed file name definition to use the
                         "progverno" variable to determine the extension
			- Put the prefix parameter back in (so it would work
			  with old existing programs)
	20-Apr-92 (MDM) - Added RUN_TIME parameter
	21-Apr-92 (KTS) - Included LWA/MDM desat technique
			- Included MDM DC routine
Ver 2.1 22-Apr-92 (MDM) - Added "roadmap" to the RD_SDA calls (speeds
		 	  things up since it will not re-read the roadmap
			  for each call)
			- Adjusted the format of the code so MDM can 
			  read it more easily
			- Fixed DC subtraction to use the whole image,
			  not just one pixel
			- Put the call to GET_DC_IMAGE for the short
			  exposure images outside the loop.
			- Moved the check for apropriate short exposure
			  to before the RD_SDA (use the roadmap info)
			- Replaced RD_SDA with RD_XDA
       23-Apr-92 (MDM) - Added "ist" input option to skip to image
			  "ist" in the loop (for recovery from bombout)
Ver 2.2 26-Apr-92 (MDM) - Corrected bug in background subtraction.  For
			  quarter res images, it was subtracting them
		 	  wrong.  data1-dark1(*,*,i) does not work if
			  dark1 is 512x512xN and data1 is 256x256.  But
			  data1-dark1 will work even if dark1 is 512x512!
			- Renamed from "mk_desat" to "mk_sfd"
Ver 2.21 26-Apr-92 (MDM) - Adjusted search to look at the image maximum
			  and only choose images with max greater than 150
			  DN (high-8).  There are images which are being
			  taken after the sun has set, so they are dark
			  images.
Ver 2.22 26-Apr-92 (MDM) - Added the warm dark current image subtraction
			  capability (calling "get_dc_warm")
Ver 2.23 27-Apr-92 (MDM) - Fixed bug (induced by me) where the "m1"
			  search was being performed on the exposure
			  normalized short image.  It was grabbing too
			  many pixels.
Ver 2.24 27-Apr-92 (MDM) - Added a check to see that the dark image
			  subtraction is at least close when taking
			  warm images.
Ver 2.25 30-Jul-92 (MDM) - Check to see how many minutes before predicted
			  night the image was taken.  Exclude images taken
			  less than 2 minute before night.  Removed the
			  img_max > 150 check (tried to do the same thing)
Ver 3.00 17-Aug-92 (MDM) - Updated version number to 3.00 to make a new
			    file extension because of 2.25 changes that 
			    result in a reduced number of images selected.
			  - Added "filename" parameter
Ver 3.01 24-Aug-92 (MDM) - Passed PROGVERNO and PROGNAME to SAV_SDA
Ver 3.02 28-Aug-92 (MDM) - Return without doing anything if cannot find 
			    any proper images
			  - Passed PROVERNO*1000 to SAV_SDA
Ver 3.03 20-Oct-92 (MDM) - Added "OUTFIL" input parameter
Ver 3.04 21-Oct-92 (MDM) - Modified selection of images to process
			    changed exposure range and technique used
			    OLD: Used ROADMAP.EXPLEVMODE directly (MBE)
			    NEW: Use GT_DPE
			    OLD Long Exposure Bracket:  DPE 17-23 (MBE 10-16)
			    OLD Short Exposure Bracket: DPE  9-14 (MBE  2- 7)
			    New Long Exposure Bracket:  DPE 17-25
			    New Short Exposure Bracket: DPE  9-15
			    Range changed because dagwood short/long exposures
			    where changed from DPE 13/23 to 15/25 around 7-Oct.
Ver 3.05 22-Oct-92 (MDM) - Futhur mod/fix from Ver 3.04 (missed one WHERE)
	   7-Jan-93 (MDM) - Added QDEBUG and QSTOP keywords
Ver 4.00  7-Jan-93 (MDM) - Made change to GT_EXPDUR which corrected for
			    returning a zero exposure duration (was causing
			    saturated images)
			  - Put in a call to LEAK_SUB to remove the thin Al
			    pin hole scattered light leak
			  - Put in code to try to eliminate images with bleed
			    from insufficient flushes (from previous staturated
			    image)
Ver 4.01  8-Jan-93 (MDM) - Corrected code to remove bleed images to do so
			    in the short exposure images also
Ver 5.00 14-Jan-93 (MDM) - New patch to the LEAK_SUB routine to work properly
			    with quarter resolution images
Ver 6.00  3-Feb-93 (MDM) - LEAK_SUB had been updated to correct for AlMg leak
			    also.  Started use of /SAVE option for LEAK_SUB.
				** BOGUS ** - see Ver 7.00 below
	   8-Feb-93 (MDM) - Trapped on case where files exist, but are empty
Ver 7.00 26-Mar-93 (MDM) - Enabled using LEAK_SUB for AlMg filters
Ver 8.00 21-Jul-93 (MDM) - Changed the insertion of the short exposure for
			    pixels over 90 DN to only be done where the long
			    exposure is saturated.
			    ** This fixes the glitch in the SXL histograms **
	  23-Jul-93 (SLF) - Use temporary function for memory management
Ver 9.00 26-Aug-93 (MDM) - Enabled history records
			  - Enabled interpolation for the dark images
			  - Updated the SFC leak image to be used (was
			    using Nov-92, now uses Aug-93 image)
Ver 9.01 31-Aug-93 (MDM) - The "Ver 2.25 30-Jul-92" patch to check to see
			    how many minutes before predicted night was not
			    done in the final selection of the short exposure
			    "where" command.  It is fixed now.
V 10.00  29-Nov-93 (MDM) - Select only images taken with Filter A open
			    (don't select neutral density images)
V 11.00   3-Dec-93 (MDM) - Added rough alignment of short and long exposures
V 11.01   3-Jan-94 (MDM) - Corrected a bug which caused subscript out of range
			    (was looking at m1 instead of m1s for -1)
         24-Jan-94 (DMZ) - removed VMS version numbers from infile
V 12.00  12-apr-95 (SLF) - Filter out fill data images
V 12.01   9-oct-95 (SLF) - Filter out non-square images
V 12.02   3-mar-97 (HSH) - Added /float switch (don't change progverno)
          5-mar-97 (TRM) - Fixed the logic of the /float change


mk_sfd [2] $SSW/yohkoh/gen/idl/reformat/mk_sfd.pro
[Previous] [Next]
NAME:
	mk_sfd
PURPOSE:
	Given a set of files, read the roadmaps and find where there
	is a long and short exposure.  Make a composite image and remove
	the saturated pixels.  Write images to an output file.
INPUT:
	infil	- an array of input file names
	outdir	- the output directory where the file should be written
 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], GET_NBYTES, GetObsID, RD_XDA [1], RD_XDA [2], Rd_Roadmap [2]
	break_file [4], concat_dir [4], file_append [1], file_append [2], fmt_tim [1]
	fmt_tim [2], get_dc_image [1], get_dc_image [2], get_dc_image [3], get_info [1]
	get_info [2], get_info [3], get_info [4], gt_day [1], gt_day [2], gt_dpe
	gt_expdur [1], gt_expdur [2], gt_expmode, gt_filta, gt_filtb, gt_res, gt_shape_cmd
	gt_temp_ccd, gt_time [1], gt_time [2], his_index, int2secarr [1], int2secarr [2]
	leak_sub [1], leak_sub [2], leak_sub [3], mk_dset_str [1], mk_dset_str [2]
	rd_roadmap [1], sav_sda [1], sav_sda [2], sav_sda [3], sgn [1], sgn [2], sxt_cen [1]
	sxt_cen [2], sxt_decomp [1], sxt_decomp [2], tim2orbit [1], tim2orbit [2]
 CALLED BY:
	yoyo_man2
OPTIONAL KEYWORD INPUT:
	interactive- If set, display the results to the screen as the
		   processing occurs.
	outfil	- The output file name (excluding the directory)
KEYWORD OUTPUT:
	filename- the output file name as derived from the input file list
HISTORY:
	draft version: 28 January 1992 (KTS)
	20-Mar-92 (MDM) - Took Keith Strong's program "db_desat.pro"
			  and made the procedure "mk_desat"
	7-Apr-92 (KTS)  - Put IFLAG in to avoid error if first image
			  is rejected
	14-Apr-92 (KTS) - 'PREFIX' parameter hardwired for 'sfd' 
			- Added automatic week # feature
			- Better generated dark frame algorithm
			- Avoid night images algorithm
Ver 2.0 16-Apr-92 (KTS) - Added dark frame library read
       16-Apr-92 (MDM) - Changed file name definition to use the
                         "progverno" variable to determine the extension
			- Put the prefix parameter back in (so it would work
			  with old existing programs)
	20-Apr-92 (MDM) - Added RUN_TIME parameter
	21-Apr-92 (KTS) - Included LWA/MDM desat technique
			- Included MDM DC routine
Ver 2.1 22-Apr-92 (MDM) - Added "roadmap" to the RD_SDA calls (speeds
		 	  things up since it will not re-read the roadmap
			  for each call)
			- Adjusted the format of the code so MDM can 
			  read it more easily
			- Fixed DC subtraction to use the whole image,
			  not just one pixel
			- Put the call to GET_DC_IMAGE for the short
			  exposure images outside the loop.
			- Moved the check for apropriate short exposure
			  to before the RD_SDA (use the roadmap info)
			- Replaced RD_SDA with RD_XDA
       23-Apr-92 (MDM) - Added "ist" input option to skip to image
			  "ist" in the loop (for recovery from bombout)
Ver 2.2 26-Apr-92 (MDM) - Corrected bug in background subtraction.  For
			  quarter res images, it was subtracting them
		 	  wrong.  data1-dark1(*,*,i) does not work if
			  dark1 is 512x512xN and data1 is 256x256.  But
			  data1-dark1 will work even if dark1 is 512x512!
			- Renamed from "mk_desat" to "mk_sfd"
Ver 2.21 26-Apr-92 (MDM) - Adjusted search to look at the image maximum
			  and only choose images with max greater than 150
			  DN (high-8).  There are images which are being
			  taken after the sun has set, so they are dark
			  images.
Ver 2.22 26-Apr-92 (MDM) - Added the warm dark current image subtraction
			  capability (calling "get_dc_warm")
Ver 2.23 27-Apr-92 (MDM) - Fixed bug (induced by me) where the "m1"
			  search was being performed on the exposure
			  normalized short image.  It was grabbing too
			  many pixels.
Ver 2.24 27-Apr-92 (MDM) - Added a check to see that the dark image
			  subtraction is at least close when taking
			  warm images.
Ver 2.25 30-Jul-92 (MDM) - Check to see how many minutes before predicted
			  night the image was taken.  Exclude images taken
			  less than 2 minute before night.  Removed the
			  img_max > 150 check (tried to do the same thing)
Ver 3.00 17-Aug-92 (MDM) - Updated version number to 3.00 to make a new
			    file extension because of 2.25 changes that 
			    result in a reduced number of images selected.
			  - Added "filename" parameter
Ver 3.01 24-Aug-92 (MDM) - Passed PROGVERNO and PROGNAME to SAV_SDA
Ver 3.02 28-Aug-92 (MDM) - Return without doing anything if cannot find 
			    any proper images
			  - Passed PROVERNO*1000 to SAV_SDA
Ver 3.03 20-Oct-92 (MDM) - Added "OUTFIL" input parameter
Ver 3.04 21-Oct-92 (MDM) - Modified selection of images to process
			    changed exposure range and technique used
			    OLD: Used ROADMAP.EXPLEVMODE directly (MBE)
			    NEW: Use GT_DPE
			    OLD Long Exposure Bracket:  DPE 17-23 (MBE 10-16)
			    OLD Short Exposure Bracket: DPE  9-14 (MBE  2- 7)
			    New Long Exposure Bracket:  DPE 17-25
			    New Short Exposure Bracket: DPE  9-15
			    Range changed because dagwood short/long exposures
			    where changed from DPE 13/23 to 15/25 around 7-Oct.
Ver 3.05 22-Oct-92 (MDM) - Futhur mod/fix from Ver 3.04 (missed one WHERE)
	   7-Jan-93 (MDM) - Added QDEBUG and QSTOP keywords
Ver 4.00  7-Jan-93 (MDM) - Made change to GT_EXPDUR which corrected for
			    returning a zero exposure duration (was causing
			    saturated images)
			  - Put in a call to LEAK_SUB to remove the thin Al
			    pin hole scattered light leak
			  - Put in code to try to eliminate images with bleed
			    from insufficient flushes (from previous staturated
			    image)
Ver 4.01  8-Jan-93 (MDM) - Corrected code to remove bleed images to do so
			    in the short exposure images also
Ver 5.00 14-Jan-93 (MDM) - New patch to the LEAK_SUB routine to work properly
			    with quarter resolution images
Ver 6.00  3-Feb-93 (MDM) - LEAK_SUB had been updated to correct for AlMg leak
			    also.  Started use of /SAVE option for LEAK_SUB.
				** BOGUS ** - see Ver 7.00 below
	   8-Feb-93 (MDM) - Trapped on case where files exist, but are empty
Ver 7.00 26-Mar-93 (MDM) - Enabled using LEAK_SUB for AlMg filters
Ver 8.00 21-Jul-93 (MDM) - Changed the insertion of the short exposure for
			    pixels over 90 DN to only be done where the long
			    exposure is saturated.
			    ** This fixes the glitch in the SXL histograms **
	  23-Jul-93 (SLF) - Use temporary function for memory management
Ver 9.00 26-Aug-93 (MDM) - Enabled history records
			  - Enabled interpolation for the dark images
			  - Updated the SFC leak image to be used (was
			    using Nov-92, now uses Aug-93 image)
Ver 9.01 31-Aug-93 (MDM) - The "Ver 2.25 30-Jul-92" patch to check to see
			    how many minutes before predicted night was not
			    done in the final selection of the short exposure
			    "where" command.  It is fixed now.
V 10.00  29-Nov-93 (MDM) - Select only images taken with Filter A open
			    (don't select neutral density images)
V 11.00   3-Dec-93 (MDM) - Added rough alignment of short and long exposures
V 11.01   3-Jan-94 (MDM) - Corrected a bug which caused subscript out of range
			    (was looking at m1 instead of m1s for -1)
         24-Jan-94 (DMZ) - removed VMS version numbers from infile
V 12.00  12-apr-95 (SLF) - Filter out fill data images
V 12.01   9-oct-95 (SLF) - Filter out non-square images


mk_sfd [3] $SSW/yohkoh/sxt/idl/atest/mk_sfd.pro
[Previous] [Next]
NAME:
	mk_sfd
PURPOSE:
	Given a set of files, read the roadmaps and find where there
	is a long and short exposure.  Make a composite image and remove
	the saturated pixels.  Write images to an output file.
INPUT:
	infil	- an array of input file names
	outdir	- the output directory where the file should be written
 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], GET_NBYTES, GetObsID, RD_XDA [1], RD_XDA [2], Rd_Roadmap [2]
	break_file [4], concat_dir [4], file_append [1], file_append [2], fmt_tim [1]
	fmt_tim [2], get_dc_image [1], get_dc_image [2], get_dc_image [3], get_info [1]
	get_info [2], get_info [3], get_info [4], gt_day [1], gt_day [2], gt_dpe
	gt_expdur [1], gt_expdur [2], gt_expmode, gt_filta, gt_filtb, gt_res, gt_shape_cmd
	gt_temp_ccd, gt_time [1], gt_time [2], his_index, int2secarr [1], int2secarr [2]
	leak_sub [1], leak_sub [2], leak_sub [3], mk_dset_str [1], mk_dset_str [2]
	rd_roadmap [1], sav_sda [1], sav_sda [2], sav_sda [3], sgn [1], sgn [2], sxt_cen [1]
	sxt_cen [2], sxt_decomp [1], sxt_decomp [2], tim2orbit [1], tim2orbit [2]
 CALLED BY:
	yoyo_man2
OPTIONAL KEYWORD INPUT:
	interactive- If set, display the results to the screen as the
		   processing occurs.
	outfil	- The output file name (excluding the directory)
       float   - If set, bypass SFD compression and write floating type
KEYWORD OUTPUT:
	filename- the output file name as derived from the input file list
HISTORY:
	draft version: 28 January 1992 (KTS)
	20-Mar-92 (MDM) - Took Keith Strong's program "db_desat.pro"
			  and made the procedure "mk_desat"
	7-Apr-92 (KTS)  - Put IFLAG in to avoid error if first image
			  is rejected
	14-Apr-92 (KTS) - 'PREFIX' parameter hardwired for 'sfd' 
			- Added automatic week # feature
			- Better generated dark frame algorithm
			- Avoid night images algorithm
Ver 2.0 16-Apr-92 (KTS) - Added dark frame library read
       16-Apr-92 (MDM) - Changed file name definition to use the
                         "progverno" variable to determine the extension
			- Put the prefix parameter back in (so it would work
			  with old existing programs)
	20-Apr-92 (MDM) - Added RUN_TIME parameter
	21-Apr-92 (KTS) - Included LWA/MDM desat technique
			- Included MDM DC routine
Ver 2.1 22-Apr-92 (MDM) - Added "roadmap" to the RD_SDA calls (speeds
		 	  things up since it will not re-read the roadmap
			  for each call)
			- Adjusted the format of the code so MDM can 
			  read it more easily
			- Fixed DC subtraction to use the whole image,
			  not just one pixel
			- Put the call to GET_DC_IMAGE for the short
			  exposure images outside the loop.
			- Moved the check for apropriate short exposure
			  to before the RD_SDA (use the roadmap info)
			- Replaced RD_SDA with RD_XDA
       23-Apr-92 (MDM) - Added "ist" input option to skip to image
			  "ist" in the loop (for recovery from bombout)
Ver 2.2 26-Apr-92 (MDM) - Corrected bug in background subtraction.  For
			  quarter res images, it was subtracting them
		 	  wrong.  data1-dark1(*,*,i) does not work if
			  dark1 is 512x512xN and data1 is 256x256.  But
			  data1-dark1 will work even if dark1 is 512x512!
			- Renamed from "mk_desat" to "mk_sfd"
Ver 2.21 26-Apr-92 (MDM) - Adjusted search to look at the image maximum
			  and only choose images with max greater than 150
			  DN (high-8).  There are images which are being
			  taken after the sun has set, so they are dark
			  images.
Ver 2.22 26-Apr-92 (MDM) - Added the warm dark current image subtraction
			  capability (calling "get_dc_warm")
Ver 2.23 27-Apr-92 (MDM) - Fixed bug (induced by me) where the "m1"
			  search was being performed on the exposure
			  normalized short image.  It was grabbing too
			  many pixels.
Ver 2.24 27-Apr-92 (MDM) - Added a check to see that the dark image
			  subtraction is at least close when taking
			  warm images.
Ver 2.25 30-Jul-92 (MDM) - Check to see how many minutes before predicted
			  night the image was taken.  Exclude images taken
			  less than 2 minute before night.  Removed the
			  img_max > 150 check (tried to do the same thing)
Ver 3.00 17-Aug-92 (MDM) - Updated version number to 3.00 to make a new
			    file extension because of 2.25 changes that 
			    result in a reduced number of images selected.
			  - Added "filename" parameter
Ver 3.01 24-Aug-92 (MDM) - Passed PROGVERNO and PROGNAME to SAV_SDA
Ver 3.02 28-Aug-92 (MDM) - Return without doing anything if cannot find 
			    any proper images
			  - Passed PROVERNO*1000 to SAV_SDA
Ver 3.03 20-Oct-92 (MDM) - Added "OUTFIL" input parameter
Ver 3.04 21-Oct-92 (MDM) - Modified selection of images to process
			    changed exposure range and technique used
			    OLD: Used ROADMAP.EXPLEVMODE directly (MBE)
			    NEW: Use GT_DPE
			    OLD Long Exposure Bracket:  DPE 17-23 (MBE 10-16)
			    OLD Short Exposure Bracket: DPE  9-14 (MBE  2- 7)
			    New Long Exposure Bracket:  DPE 17-25
			    New Short Exposure Bracket: DPE  9-15
			    Range changed because dagwood short/long exposures
			    where changed from DPE 13/23 to 15/25 around 7-Oct.
Ver 3.05 22-Oct-92 (MDM) - Futhur mod/fix from Ver 3.04 (missed one WHERE)
	   7-Jan-93 (MDM) - Added QDEBUG and QSTOP keywords
Ver 4.00  7-Jan-93 (MDM) - Made change to GT_EXPDUR which corrected for
			    returning a zero exposure duration (was causing
			    saturated images)
			  - Put in a call to LEAK_SUB to remove the thin Al
			    pin hole scattered light leak
			  - Put in code to try to eliminate images with bleed
			    from insufficient flushes (from previous staturated
			    image)
Ver 4.01  8-Jan-93 (MDM) - Corrected code to remove bleed images to do so
			    in the short exposure images also
Ver 5.00 14-Jan-93 (MDM) - New patch to the LEAK_SUB routine to work properly
			    with quarter resolution images
Ver 6.00  3-Feb-93 (MDM) - LEAK_SUB had been updated to correct for AlMg leak
			    also.  Started use of /SAVE option for LEAK_SUB.
				** BOGUS ** - see Ver 7.00 below
	   8-Feb-93 (MDM) - Trapped on case where files exist, but are empty
Ver 7.00 26-Mar-93 (MDM) - Enabled using LEAK_SUB for AlMg filters
Ver 8.00 21-Jul-93 (MDM) - Changed the insertion of the short exposure for
			    pixels over 90 DN to only be done where the long
			    exposure is saturated.
			    ** This fixes the glitch in the SXL histograms **
	  23-Jul-93 (SLF) - Use temporary function for memory management
Ver 9.00 26-Aug-93 (MDM) - Enabled history records
			  - Enabled interpolation for the dark images
			  - Updated the SFC leak image to be used (was
			    using Nov-92, now uses Aug-93 image)
Ver 9.01 31-Aug-93 (MDM) - The "Ver 2.25 30-Jul-92" patch to check to see
			    how many minutes before predicted night was not
			    done in the final selection of the short exposure
			    "where" command.  It is fixed now.
V 10.00  29-Nov-93 (MDM) - Select only images taken with Filter A open
			    (don't select neutral density images)
V 11.00   3-Dec-93 (MDM) - Added rough alignment of short and long exposures
V 11.01   3-Jan-94 (MDM) - Corrected a bug which caused subscript out of range
			    (was looking at m1 instead of m1s for -1)
         24-Jan-94 (DMZ) - removed VMS version numbers from infile
V 12.00  12-apr-95 (SLF) - Filter out fill data images
V 12.01   9-oct-95 (SLF) - Filter out non-square images
V 12.02   3-mar-97 (HSH) - Added /float switch (don't change progverno)
          5-mar-97 (TRM) - Fixed the logic of the /float change
V 12.03  24-may-99 (SLF) - only apply fill data check to short
                           (after last ent failure, all longs were filtered out'


mk_sfd [4] $SSW/yohkoh/ucon/idl/slater/mk_sfd_new.pro
[Previous] [Next]
NAME:
	mk_sfd
PURPOSE:
	Given a set of files, read the roadmaps and find where there
	is a long and short exposure.  Make a composite image and remove
	the saturated pixels.  Write images to an output file.
INPUT:
	infil	- an array of input file names
	outdir	- the output directory where the file should be written
 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], GET_NBYTES, GetObsID, MK_SFD_NEW, RD_XDA [1], RD_XDA [2]
	Rd_Roadmap [2], break_file [4], concat_dir [4], file_append [1], file_append [2]
	fmt_tim [1], fmt_tim [2], get_dc_image [1], get_dc_image [2], get_dc_image [3]
	get_info [1], get_info [2], get_info [3], get_info [4], gt_day [1], gt_day [2]
	gt_dpe, gt_expdur [1], gt_expdur [2], gt_expmode, gt_filta, gt_filtb, gt_res
	gt_shape_cmd, gt_temp_ccd, gt_time [1], gt_time [2], his_index, int2secarr [1]
	int2secarr [2], leak_sub [1], leak_sub [2], leak_sub [3], mk_dset_str [1]
	mk_dset_str [2], rd_roadmap [1], sav_sda [1], sav_sda [2], sav_sda [3], sgn [1]
	sgn [2], sxt_cen [1], sxt_cen [2], sxt_decomp [1], sxt_decomp [2], tim2orbit [1]
	tim2orbit [2]
 CALLED BY:
	yoyo_man2
OPTIONAL KEYWORD INPUT:
	interactive- If set, display the results to the screen as the
		   processing occurs.
	outfil	- The output file name (excluding the directory)
KEYWORD OUTPUT:
	filename- the output file name as derived from the input file list
HISTORY:
	draft version: 28 January 1992 (KTS)
	20-Mar-92 (MDM) - Took Keith Strong's program "db_desat.pro"
			  and made the procedure "mk_desat"
	7-Apr-92 (KTS)  - Put IFLAG in to avoid error if first image
			  is rejected
	14-Apr-92 (KTS) - 'PREFIX' parameter hardwired for 'sfd' 
			- Added automatic week # feature
			- Better generated dark frame algorithm
			- Avoid night images algorithm
Ver 2.0 16-Apr-92 (KTS) - Added dark frame library read
       16-Apr-92 (MDM) - Changed file name definition to use the
                         "progverno" variable to determine the extension
			- Put the prefix parameter back in (so it would work
			  with old existing programs)
	20-Apr-92 (MDM) - Added RUN_TIME parameter
	21-Apr-92 (KTS) - Included LWA/MDM desat technique
			- Included MDM DC routine
Ver 2.1 22-Apr-92 (MDM) - Added "roadmap" to the RD_SDA calls (speeds
		 	  things up since it will not re-read the roadmap
			  for each call)
			- Adjusted the format of the code so MDM can 
			  read it more easily
			- Fixed DC subtraction to use the whole image,
			  not just one pixel
			- Put the call to GET_DC_IMAGE for the short
			  exposure images outside the loop.
			- Moved the check for apropriate short exposure
			  to before the RD_SDA (use the roadmap info)
			- Replaced RD_SDA with RD_XDA
       23-Apr-92 (MDM) - Added "ist" input option to skip to image
			  "ist" in the loop (for recovery from bombout)
Ver 2.2 26-Apr-92 (MDM) - Corrected bug in background subtraction.  For
			  quarter res images, it was subtracting them
		 	  wrong.  data1-dark1(*,*,i) does not work if
			  dark1 is 512x512xN and data1 is 256x256.  But
			  data1-dark1 will work even if dark1 is 512x512!
			- Renamed from "mk_desat" to "mk_sfd"
Ver 2.21 26-Apr-92 (MDM) - Adjusted search to look at the image maximum
			  and only choose images with max greater than 150
			  DN (high-8).  There are images which are being
			  taken after the sun has set, so they are dark
			  images.
Ver 2.22 26-Apr-92 (MDM) - Added the warm dark current image subtraction
			  capability (calling "get_dc_warm")
Ver 2.23 27-Apr-92 (MDM) - Fixed bug (induced by me) where the "m1"
			  search was being performed on the exposure
			  normalized short image.  It was grabbing too
			  many pixels.
Ver 2.24 27-Apr-92 (MDM) - Added a check to see that the dark image
			  subtraction is at least close when taking
			  warm images.
Ver 2.25 30-Jul-92 (MDM) - Check to see how many minutes before predicted
			  night the image was taken.  Exclude images taken
			  less than 2 minute before night.  Removed the
			  img_max > 150 check (tried to do the same thing)
Ver 3.00 17-Aug-92 (MDM) - Updated version number to 3.00 to make a new
			    file extension because of 2.25 changes that 
			    result in a reduced number of images selected.
			  - Added "filename" parameter
Ver 3.01 24-Aug-92 (MDM) - Passed PROGVERNO and PROGNAME to SAV_SDA
Ver 3.02 28-Aug-92 (MDM) - Return without doing anything if cannot find 
			    any proper images
			  - Passed PROVERNO*1000 to SAV_SDA
Ver 3.03 20-Oct-92 (MDM) - Added "OUTFIL" input parameter
Ver 3.04 21-Oct-92 (MDM) - Modified selection of images to process
			    changed exposure range and technique used
			    OLD: Used ROADMAP.EXPLEVMODE directly (MBE)
			    NEW: Use GT_DPE
			    OLD Long Exposure Bracket:  DPE 17-23 (MBE 10-16)
			    OLD Short Exposure Bracket: DPE  9-14 (MBE  2- 7)
			    New Long Exposure Bracket:  DPE 17-25
			    New Short Exposure Bracket: DPE  9-15
			    Range changed because dagwood short/long exposures
			    where changed from DPE 13/23 to 15/25 around 7-Oct.
Ver 3.05 22-Oct-92 (MDM) - Futhur mod/fix from Ver 3.04 (missed one WHERE)
	   7-Jan-93 (MDM) - Added QDEBUG and QSTOP keywords
Ver 4.00  7-Jan-93 (MDM) - Made change to GT_EXPDUR which corrected for
			    returning a zero exposure duration (was causing
			    saturated images)
			  - Put in a call to LEAK_SUB to remove the thin Al
			    pin hole scattered light leak
			  - Put in code to try to eliminate images with bleed
			    from insufficient flushes (from previous staturated
			    image)
Ver 4.01  8-Jan-93 (MDM) - Corrected code to remove bleed images to do so
			    in the short exposure images also
Ver 5.00 14-Jan-93 (MDM) - New patch to the LEAK_SUB routine to work properly
			    with quarter resolution images
Ver 6.00  3-Feb-93 (MDM) - LEAK_SUB had been updated to correct for AlMg leak
			    also.  Started use of /SAVE option for LEAK_SUB.
				** BOGUS ** - see Ver 7.00 below
	   8-Feb-93 (MDM) - Trapped on case where files exist, but are empty
Ver 7.00 26-Mar-93 (MDM) - Enabled using LEAK_SUB for AlMg filters
Ver 8.00 21-Jul-93 (MDM) - Changed the insertion of the short exposure for
			    pixels over 90 DN to only be done where the long
			    exposure is saturated.
			    ** This fixes the glitch in the SXL histograms **
	  23-Jul-93 (SLF) - Use temporary function for memory management
Ver 9.00 26-Aug-93 (MDM) - Enabled history records
			  - Enabled interpolation for the dark images
			  - Updated the SFC leak image to be used (was
			    using Nov-92, now uses Aug-93 image)
Ver 9.01 31-Aug-93 (MDM) - The "Ver 2.25 30-Jul-92" patch to check to see
			    how many minutes before predicted night was not
			    done in the final selection of the short exposure
			    "where" command.  It is fixed now.
V 10.00  29-Nov-93 (MDM) - Select only images taken with Filter A open
			    (don't select neutral density images)
V 11.00   3-Dec-93 (MDM) - Added rough alignment of short and long exposures
V 11.01   3-Jan-94 (MDM) - Corrected a bug which caused subscript out of range
			    (was looking at m1 instead of m1s for -1)
         24-Jan-94 (DMZ) - removed VMS version numbers from infile
V 12.00  12-apr-95 (SLF) - Filter out fill data images


mk_sff_pair [1] $SSW/yohkoh/gen/galileo/idl/lmsal/mk_sff_pair.pro
[Previous] [Next]
   Name: mk_sff_pair

   Purpose: make pairings for SXT full disk composites.
	The logic chooses 

   Input Parameters:
      infil - list of SFR files OR SXT INDEX records 
 CALLS: ***
	BOX_MESSAGE, MATCH_SAA_STATE, RD_XDA [1], RD_XDA [2], SXT_SATSCREEN, anytim [1]
	anytim [2], anytim [3], anytim [4], anytim [5], data_chk [1], data_chk [2]
	get_yo_dates [1], get_yo_dates [2], get_yo_dates [3], gt_dpe, gt_expmode, gt_filta
	gt_filtb, gt_percentd, gt_res, gt_shape_cmd, gt_temp_ccd, int2secarr [1]
	int2secarr [2], saa_in [1], saa_in [2], sort_index [1], sort_index [2]
	sxt_bleedtest, tim2dset [1], tim2dset [2], tim2orbit [1], tim2orbit [2]
 CALLED BY:
	mk_ssc [1], mk_ssc [2]
         NOTE:  If infil is an INDEX structure then keyword
         indat=indat must contain the corresponding data array.

   Output Paramters:
      ssl - subscripts of LONG exposures matching criteria  
      ssm - subscripts of Medium (if /triplet set)
      sss - subscripts of associated SHORT exposures 

   Keyword Ouput
      count, used by mk_ssc.

   Optional Keyword Output
      outindex, index structure used in making sff_pairs
      outdata, data cube used in making sff_pairs.

   Optional Keyword Input Parameters:
      /triplet - make 3-exposure composites
      /al_only - only do Al.1 images 
      /almg_only - only do AlMg images
	  NOTE: It doesn't work to use both /al_only and /almg_only.
      /nuden_ok - don't reject data using filter (Default is to reject.)
      maxdt - maximum deltaT to allow LONG:SHORT - in seconds
		(Default:  maxdt=660)
       saa_state - choose where to make SSCs w/t SAA (default is off)
          SAA_STATE = undefined => don't care about SAA (ie, all)
          SAA_STATE = 1 => ONLY include SAA images
          SAA_STATE = 0 => Only include NON-SAA images
  
   History:
      14-apr-1998 - S.L.Freeland - break/rework mk_sfd
      31-Jan-2000 - S.L.Freeland - enable /TRIPLET
       7-Nov-2003 - S.L.Freeland - made DELTA = maximum delta (pair or triplet) 
                                   added MAXDT keyword/function
      19-nov-2003 - S.L.Freeland - required INDEX, not ROADMAPs
                                   (CCD Temp check added)
      13-Jan-2004 - LWA - Removed filta=1 requirement for short and med.
			   Widened short to 4-15 dpe and med to 16-26 dpe.
                          Permit warm CCD before 2-oct-91 09:05.
      19-Jan-2004 - LWA - Lowered required percentd to gt 95.
                          Increased default maxdt to 660 seconds.
			   Major rewrite of flow of pairing process.
      20-Jan-2004 - LWA - Installed test for images with CCD bleed.
			   For short and medium exposures ignore lost 
			    data outside of active latitudes (rows 150:405 in HR)
			    and permit one minor frame of missing data
			    within the active latitude band.
      24-Jan-2004 - LWA - Added test for image data completeness of LONG
			    exposures because percentd not always reliable.
			   Added test for unsaturated long/medium exposures.
			    Will pass -1 in ssm or sss to mk_ssc for these cases.
      26-Jan-2004 - LWA - Debugged spaghetti logic.
      31-Jan-2004 - LWA - Corrected inconsistency in image counting.
      25-Mar-2004 - LWA - Fixed bug in short image logic.
      26-Mar-2004 - LWA - Fixed bug in "nearest short" logic.
      17-Aug-2004 - LWA - Added keyword indat.
      27-Sep-2004 - LWA - Hardwired variable "junk" to deal with a
			    limited number of pathological long exposures.
			   Now require percentd=100 for NuDen short exposures.
	1-Oct-2004 - LWA - Restricted NuDen images from use as mid exposures
                           in triplets.
      18-Nov-2004 - LWA - Reversed edit of 1-Oct-2004.
			   Incorporated SSC7 guideline to
			    use no filtA=6 (NuDen) images post-14Nov92.
      20-Nov-2004 - LWA - Tested and debugged.
      17-Mar-2005 - LWA - In case of multiple short exposures with a variety
			    of DPE values now use unsaturated short with largest
			    DPE value that is closest in time to long exposure. 
			   Deleted development print and help commands. 
      18-Mar-2005 - LWA - Fixed a bug in line 338.
			   Deleted non-functional keyword delta.
			   Added keyword nuden_ok.
       1-Feb-2006 - LWA - Added keywords outindex and outdata.
	2-Feb-2006 - LWA - Corrected old errors introduced with NuDen business.


mk_sff_pair [2] $SSW/yohkoh/sxt/idl/atest/mk_sff_pair.pro
[Previous] [Next]
   Name: mk_sff_pair

   Purpose: make pairings for SXT full disk composite movies

   Input Parameters:
      infil - list of SFR files OR roadmaps

   Output Paramters:
      ssl - subscripts of LONG exposures matching criteria  
      ssm - subscripts of Medium (if /triplet set)
      sss - subscripts of associated SHORT exposures 
      delta - deltaT (long:short)
  
 CALLS: ***
	BOX_MESSAGE, MATCH_SAA_STATE, RD_XDA [1], RD_XDA [2], SXT_SATSCREEN, anytim [1]
	anytim [2], anytim [3], anytim [4], anytim [5], data_chk [1], data_chk [2]
	get_yo_dates [1], get_yo_dates [2], get_yo_dates [3], gt_dpe, gt_expmode, gt_filta
	gt_filtb, gt_percentd, gt_res, gt_shape_cmd, gt_temp_ccd, int2secarr [1]
	int2secarr [2], saa_in [1], saa_in [2], sort_index [1], sort_index [2]
	sxt_bleedtest, tim2dset [1], tim2dset [2], tim2orbit [1], tim2orbit [2]
 CALLED BY:
	mk_ssc [1], mk_ssc [2]
   History:
      14-apr-1998 - S.L.Freeland - break/rework mk_sfd
      31-Jan-2000 - S.L.Freeland - enable /TRIPLET


mk_sfs $SSW/yohkoh/gen/idl/reformat/mk_sfs.pro
[Previous] [Next]
NAME:
       mk_sfs
PURPOSE:
       Given a set of FFI files, read the roadmaps and save the 
		open/open, diffuser (compressed), and UV flood images
INPUT:
       infil   - an array of input file names
       outdir  - the output directory where the file should be written
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], MASK, RD_SDA [1], RD_SDA [2]
	RD_SDA [3], Rd_Roadmap [2], concat_dir [4], fmt_tim [1], fmt_tim [2], gt_comp
	gt_expmode, gt_filta, gt_filtb, mk_dset_str [1], mk_dset_str [2], rd_roadmap [1]
	sav_sda [1], sav_sda [2], sav_sda [3], tim2orbit [1], tim2orbit [2]
HISTORY:
       Written 7-Aug-92 by M.Morrison
	29-Nov-93 (MDM) - Modified to deleted the output file first


mk_sft [1] $SSW/yohkoh/gen/idl/reformat/mk_sft.pro
[Previous] [Next]
NAME:
       mk_sft
PURPOSE:
       Given a set of FFI files, read the roadmaps and save the 
	terminator images (SFT images)
INPUT:
       infil   - an array of input SFR file names
       outdir  - the output directory where the file should be written
		  It defaults to $DIR_SXT_SFT
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], MASK, RD_SDA [1]
	RD_SDA [2], RD_SDA [3], Rd_Roadmap [2], concat_dir [4], file_exist [1]
	file_exist [3], file_list [1], file_list [2], finddir [1], finddir [2]
	fmt_tim [1], fmt_tim [2], get_yo_dates [1], get_yo_dates [2], get_yo_dates [3]
	gt_comp, gt_dpe, gt_expmode, gt_filta, gt_res, his_suncen, mk_dset_str [1]
	mk_dset_str [2], rd_roadmap [1], sav_sda [1], sav_sda [2], sav_sda [3]
	sel_timrange [1], sel_timrange [2], tim2orbit [1], tim2orbit [2]
OPTIONAL KEYWORD INPUT:
	append	- If set, append to an existing file if it exists.
	week	- If set, find the appropriate directory and make the
		  SFR file listing from it.
HISTORY:
       Written 19-Nov-93 by M.Morrison
               11-Dec-94 (SLF) - add/update history records with sun_center
                7-Feb-95 (SLF) - update selection criteria based upon
                                 LWA/JRL reccomendations


V1.01 19-Nov-93 (MDM) - Added SAA check


mk_sft [2] $SSW/yohkoh/sxt/idl/atest/mk_sft.pro
[Previous] [Next]
NAME:
       mk_sft
PURPOSE:
       Given a set of FFI files, read the roadmaps and save the 
	terminator images (SFT images)
INPUT:
       infil   - an array of input SFR file names
       outdir  - the output directory where the file should be written
		  It defaults to $DIR_SXT_SFT
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], MASK, RD_SDA [1]
	RD_SDA [2], RD_SDA [3], Rd_Roadmap [2], concat_dir [4], file_exist [1]
	file_exist [3], file_list [1], file_list [2], finddir [1], finddir [2]
	fmt_tim [1], fmt_tim [2], get_yo_dates [1], get_yo_dates [2], get_yo_dates [3]
	gt_comp, gt_dpe, gt_expmode, gt_filta, gt_res, his_suncen, mk_dset_str [1]
	mk_dset_str [2], rd_roadmap [1], sav_sda [1], sav_sda [2], sav_sda [3]
	sel_timrange [1], sel_timrange [2], tim2orbit [1], tim2orbit [2]
OPTIONAL KEYWORD INPUT:
	append	- If set, append to an existing file if it exists.
	week	- If set, find the appropriate directory and make the
		  SFR file listing from it.
     filtr_saa - If set, filter out all SAA files.  Default is to allow
                 them as sft candidates.
HISTORY:
       Written 19-Nov-93 by M.Morrison
               11-Dec-94 (SLF) - add/update history records with sun_center
                7-Feb-95 (SLF) - update selection criteria based upon
                                 LWA/JRL reccomendations
               04-May-99 (PGS) - Added filtr_saa keyword 'switch'

V1.01 19-Nov-93 (MDM) - Added SAA check


mk_sfw $SSW/yohkoh/gen/idl/reformat/mk_sfw.pro
[Previous] [Next]
NAME:
       mk_sfw
PURPOSE:
       Given a set of files, read the roadmaps and find where there
       are complete narrow band images.  Write the subset to a datafile.
INPUT:
       infil   - an array of input file names
       outdir  - the output directory where the file should be written
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], GetObsID, RD_SDA [1], RD_SDA [2]
	RD_SDA [3], Rd_Roadmap [2], concat_dir [4], fmt_tim [1], fmt_tim [2], gt_adoor
	gt_comp, gt_day [1], gt_day [2], gt_expmode, gt_filta, gt_res, gt_time [1]
	gt_time [2], int2secarr [1], int2secarr [2], mk_dset_str [1], mk_dset_str [2]
	rd_roadmap [1], sav_sda [1], sav_sda [2], sav_sda [3], tim2orbit [1]
	tim2orbit [2]
OPTIONAL KEYWORD INPUT:
       interactive- If set, display the results to the screen as the
                  processing occurs.
HISTORY:
       draft version: 28 January 1992 (KTS)
       20-Mar-92 (MDM) - Took Keith Strong's program "db_wlext.pro"
                         and made the procedure "mk_desat_wl"
	14-Apr-92 (KTS) - Removed prefix option and set to 'sfw'
			- Changed so as to output week id (91_51a.01)
	16-Apr-92 (MDM) - Changed file name definition to use the 
			  "progverno" variable to determine the extension
	20-Apr-92 (MDM) - Added RUN_TIME parameter
Ver 2.1 26-Apr-92 (MDM) - Renamed from "mk_desat_wl" to "mk_sfw"
			- Added check for compressed data.
Ver 2.11 30-Apr-92 (MDM) - Fixed bug where couldn't tell if should
			    open a new file if first image is skipped
Ver 2.12 30-Jul-92 (MDM) - Check to make sure image was taken at least
			    2 minutes before predicted night fall.
Ver 3.00 17-Aug-92 (MDM) - Changed to match SFD extension *.03
Ver 3.01 28-Aug-92 (MDM) - Simply return if no matches
			    Pass PROVERNO and PROGNAME to SAV_SDA
Ver 3.02 31-Aug-92 (MDM) - Fixed typo in SAV_SDA command - wasn't saving
			    the images
Ver 3.03 11-Nov-92 (MDM) - Updated to use GT_ADOOR to check if the
			    aspect door is open.
Ver 3.04 25-Nov-92 (MDM) - Updated to not select files after 13-Nov-92


mk_sl [1] $SSW/yohkoh/gen/idl/atest/mk_sl.pro
[Previous] [Next]
NAME:
	mk_sl
PURPOSE:
	Generate the SXT Leak Dark image (SLD) or SXT Leak scatter (SLS)
	log from the SFR files.  It also generates the SXT X-ray Average
	(SXA) files from the SFD files.
INPUT:
	infil	- A string array with a list of the SFR file
		  names.  It should include the directory
		  path.  The inputfiles can be derived if the
		  "week" option is used.
REQUIRED KEYWORD INPUT:
	prefix	- The prefix of the output file.  Either SLS, SLD, or SXA
OPTIONAL INPUT:
	outfil	- The output filename to create.  The output
		  file can be derived from the input file list.
OPTIONAL INPUT:
	week	- a string with the year/week if the format
		  91_49 where 91 is the year, 49 is the week
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], GEN_STRUCT [1], GEN_STRUCT [2]
	GET_NBYTES, OPEN_DA_FILE, RD_XDA [1], RD_XDA [2], REF_STRUCT, Rd_Roadmap [2]
	Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3], SPLIT_FILES, SXT_STRUCT, WRT1P_FH
	anytim2ex [1], anytim2ex [2], concat_dir [4], ex2week [1], ex2week [2]
	file_list [1], file_list [2], finddir [1], finddir [2], fmt_tim [1], fmt_tim [2]
	gt_comp, gt_dpe, gt_expmode, gt_filta, gt_filtb, gt_res, int2secarr [1]
	int2secarr [2], mk_dset_str [1], mk_dset_str [2], rd_roadmap [1], rdwrt [1]
	rdwrt [2], rdwrt [3], sfd_decomp, sxt_decomp [1], sxt_decomp [2], tim2orbit [1]
	tim2orbit [2], wrtsxtmap
HISTORY:
	Written 8-Dec-92 by M.Morrison
	Ver 1.01 (8-Dec-92) MDM - Exclude full resolution images
	Ver 1.02 (15-Jan-93) MDM - Added check to make sure it is past 11-oct-92
	Ver 1.03 ( 9-Mar-93) MDM - Changed code to use lower case for the
				   filename prefix
	Ver 1.04 (12-Jul-93) MDM - Build/Save the roadmap
	Ver 1.05 (11-Oct-93) MDM - Added option of creating SXA files.
       Ver 1.06 (28-mar-97) SLF - filter out non-square data for SLS


mk_sl [2] $SSW/yohkoh/gen/idl/reformat/mk_sl.pro
[Previous] [Next]
NAME:
	mk_sl
PURPOSE:
	Generate the SXT Leak Dark image (SLD) or SXT Leak scatter (SLS)
	log from the SFR files.  It also generates the SXT X-ray Average
	(SXA) files from the SFD files.
INPUT:
	infil	- A string array with a list of the SFR file
		  names.  It should include the directory
		  path.  The inputfiles can be derived if the
		  "week" option is used.
REQUIRED KEYWORD INPUT:
	prefix	- The prefix of the output file.  Either SLS, SLD, or SXA
OPTIONAL INPUT:
	outfil	- The output filename to create.  The output
		  file can be derived from the input file list.
OPTIONAL INPUT:
	week	- a string with the year/week if the format
		  91_49 where 91 is the year, 49 is the week
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], GEN_STRUCT [1], GEN_STRUCT [2]
	GET_NBYTES, OPEN_DA_FILE, RD_XDA [1], RD_XDA [2], REF_STRUCT, Rd_Roadmap [2]
	Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3], SPLIT_FILES, SXT_STRUCT, WRT1P_FH
	anytim2ex [1], anytim2ex [2], concat_dir [4], ex2week [1], ex2week [2]
	file_list [1], file_list [2], finddir [1], finddir [2], fmt_tim [1], fmt_tim [2]
	gt_comp, gt_dpe, gt_expmode, gt_filta, gt_filtb, gt_res, int2secarr [1]
	int2secarr [2], mk_dset_str [1], mk_dset_str [2], rd_roadmap [1], rdwrt [1]
	rdwrt [2], rdwrt [3], sfd_decomp, sxt_decomp [1], sxt_decomp [2], tim2orbit [1]
	tim2orbit [2], wrtsxtmap
HISTORY:
	Written 8-Dec-92 by M.Morrison
	Ver 1.01 (8-Dec-92) MDM - Exclude full resolution images
	Ver 1.02 (15-Jan-93) MDM - Added check to make sure it is past 11-oct-92
	Ver 1.03 ( 9-Mar-93) MDM - Changed code to use lower case for the
				   filename prefix
	Ver 1.04 (12-Jul-93) MDM - Build/Save the roadmap
	Ver 1.05 (11-Oct-93) MDM - Added option of creating SXA files.


mk_sot $SSW/yohkoh/gen/idl/reformat/mk_sot.pro
[Previous] [Next]
NAME:
	mk_sot
PURPOSE:
	Generate the SXT Optical (Aspect) Telescope (SOT) file
	from the SFR file
INPUT:
	infil	- A string array with a list of the SFR file
		  names.  It should include the directory
		  path.  The inputfiles can be derived if the
		  "week" option is used.
OPTIONAL INPUT:
	outfil	- The output filename to create.  The output
		  file can be derived from the input file list.
OPTIONAL INPUT:
	week	- a string with the year/week if the format
		  91_49 where 91 is the year, 49 is the week
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], GEN_STRUCT [1], GEN_STRUCT [2]
	GET_NBYTES, GO_FIND_LIM2, OPEN_DA_FILE, RD_XDA [1], RD_XDA [2], REF_STRUCT
	Rd_Roadmap [2], Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3], SPLIT_FILES
	SXT_STRUCT, WRT1P_FH, anytim2ex [1], anytim2ex [2], concat_dir [4], ex2week [1]
	ex2week [2], file_list [1], file_list [2], finddir [1], finddir [2], fmt_tim [1]
	fmt_tim [2], get_box_avg, gt_adoor, gt_comp, gt_expdur [1], gt_expdur [2]
	gt_expmode, gt_filta, gt_res, int2secarr [1], int2secarr [2], mk_dset_str [1]
	mk_dset_str [2], ocenter, rd_roadmap [1], rdwrt [1], rdwrt [2], rdwrt [3]
	tim2orbit [1], tim2orbit [2], wrtsxtmap
HISTORY:
	Written 20-Apr-92 by M.Morrison
Ver 1.1 21-Apr-92 (MDM) - flux was not being calculated properly.  Needed
			   to divide by sum^2
Ver 1.11 26-May-92 (MDM) - Changed to write a temporary file and then
                           move it to on-line after finished generating it
Ver 2.00 17-Aug-92 (MDM) - New version of FIND_LIMB was used.  Also added
			    OCENTER results to the structure, and avoided
			    sunset or night pictures
Ver 2.01 11-Nov-92 (MDM) - Modified to check that the aspect door is
			    open.
Ver 2.02 25-Nov-92 (MDM) - Modification to return if running a week after
			    92_46 (13-Nov-92 entrance filter failure)
			  - Also don't process any images after 13-Nov-92 17:06
Ver 2.03 12-Jul-93 (MDM) - Build/save the roadmap


mk_soup_hcat $SSW/yohkoh/gen/idl/gbo/mk_soup_hcat.pro
[Previous] [Next]
NAME:
	mk_soup_hcat
PURPOSE:
	To make the catalog of the SOUP headers of files that
	are currently on-line.
SAMPLE CALLING SEQUENCE:
	mk_soup_hcat
	mk_soup_hcat, dirs='/umbra/data1/soup'
	mk_soup_hcat, dirs='/umbra/data0/soup', files='*001.rid'
	mk_soup_hcat, dirs='/umbra/data1/soup', outfil='$ydb/soup/soup_hcat'
 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], SOUP_OBS, break_file [4], concat_dir [4], int2secarr [1]
	int2secarr [2], prstr [1], prstr [2], rd_soup, savegen [1], savegen [2]
OPTIONAL KEYWORD INPUT:
	dirs	- The list of directory names to use.  If not
		  set, it will use:
			/umbradata0/soup
			/umbradata1/soup
	files	- The list of files to look at in the selection.
		  If not set, it will use:
			*001.rig*
		  NOTE: You need to specify 001 in the name because of listing
		  restrictions.
	outfil	- The name of the saved output file.  If not
		  set, it will not save the results to a file.
	qplot	- If set, call SOUP_OBS and display the results
	sort	- If set, the time sort the output
OPTIONAL KEYWORD OUTPUT:
	headers	- The headers of the SOUP data files which were found
HISTORY:
	Written Mar-93 by M.Morrison
	15-Mar-93 (MDM) - Modified into a procedure
	16-Apr-93 (MDM) - Modified to look for files *001.rig* instead of
			  *001.rig and *001.rigd
			- Added step to save default directory and set 
			  yourself back there after doing the search
			- Added /SORT option


mk_spd $SSW/yohkoh/sxt/idl/util/mk_spd.pro
[Previous] [Next]
   Name: mk_spd

   Purpose: make a processed version of an spr file (spd)

   Input Parameters:
      sprs -    file or file list of SPRs to process
      outfile - output file name (default replaces SPR with SPD)
      conf_file - name of configuration file (default $ys/sxt/doc/spd.config
      mostfov - switch , if set, only do most frequen FOV

   Calling Sequence:
      mk_spd,sprs [,conf_file=configuration_file , /mostfov, outfile=outfile]

   Method:
      call sxt_uniqfov to identify uniq SXT pointings within spr files
      call sxt_prep2 to prepare the data

   Read selection/filter criteria from configuration file

 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], DELVARX [1], DELVARX [2]
	DELVARX [3], DELVARX [4], FILE_EXIST [2], RD_SDA [1], RD_SDA [2], RD_SDA [3]
	Rd_Roadmap [2], SXT_UNIQFOV, concat_dir [4], delvarx [5], file_exist [1]
	file_exist [3], gt2exe [1], gt2exe [2], prstr [1], prstr [2], rd_roadmap [1]
	rd_tfile [1], rd_tfile [2], rem_elem [1], rem_elem [2], sav_sda [1], sav_sda [2]
	sav_sda [3], sfd_comp, str_replace [1], str_replace [2], sxt_prep [1]
	sxt_prep [2], sxt_prep [3], tim2orbit [1], tim2orbit [2], wc_where [1]
	wc_where [2]
   History:
      7-Sep-1993 (SLF) Proto version written
      9-Dec-1993 (SLF) compress flag, sav_sda , sxt_prep call changes
     13-Dec-1993 (SLF) change re-compressfrom from sxt_comp to sfd_comp
      3-Feb-1995 (SLF) tweaked documentation
     17-may-1995 (SLF) add despike_thresh and width to sxt_prep call


mk_ssc [1] $SSW/yohkoh/gen/galileo/idl/lmsal/mk_ssc.pro
[Previous] [Next]
   Name: mk_ssc

   Purpose: make SXT "Final" science composite movie - de-spagetti mk_sfd

   Input Parameters:
       week - the week to process 
       ifiles - explicit filelist (in lieu of WEEK string)
	  BEWARE!  This program is designed to be driven by go_ssc_batch
		which causes SFR files to be ingested one day at a time.
		This program reads ALL files in ifiles=ifiles, or for an
		entire week if the input week is used.  Thus, one can readily
		exceed the memory capacity of the computer if discretion
		is not used.
 
   Output Parameters:
     NONE

   Keyword Parameters:
       nodeka     - dont deka normalize  (default)
	vignette - call sxt_off_axis to correct for vignetting.
       novignette - dont vignette correct  (default)
       noleak - don't do straylight correction  (default is to do it)
       no_second_order_leak - don't do 2nd straylight (default is to do it)
       noclean or nokleen   - dont call sxt_clean (default is to clean)
       noscatter  - dont call sxt_scatter (default)
	scatter  - call sxt_scatter      
       triplet    - make 3-image composite SSTs
       prefix - output file prefix (default='ssc' (pair), 'sst' implies triple 
       outdir - output directory
       subdir - optional subdirectory 
       filename_only - if set, just derive planned filename and return in OUTFILE
       ss     - Set ss to limit the number of composites made to ss (saves time)
       debug  - Stop before return for debugging
	loud  - Print out some messages.
	destreak - call sxt_xsaa to remove cosmic ray streaks.
	nodestrak - don't call sxt_xsaa  (default)
	nonormalize - don't normalize to 1 sec exposure (default is to do it)
	yyyy - Put the output in a specified yyyy subdirectory (normally automatic)
	uncert - Create uncertainty arrays  (default not to do it)
	synsfc - Use SynSFCs, override internal guidelines
	saa_state - choose where to make SSCs w/t SAA (default is off)
	   SAA_STATE = undefined => don't care about SAA (ie, all)
	   SAA_STATE = 1 => ONLY include SAA images
	   SAA_STATE = 0 => Only include NON-SAA images
	nuden_ok - Eliminates rejection of images using ND filter.
  
 CALLS: ***
	BOX_MESSAGE, BOX_MESSGE, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3]
	DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], FILE2TIME, FILE_EXIST [2]
	RD_SDA [1], RD_SDA [2], RD_SDA [3], RD_XDA [1], RD_XDA [2], TIME2FILE, anytim [1]
	anytim [2], anytim [3], anytim [4], anytim [5], cdrom_files [1], cdrom_files [2]
	choose_sfc, concat_dir [4], curdir [1], curdir [2], data_chk [1], data_chk [2]
	deka_norm [1], deka_norm [2], delvarx [5], file_exist [1], file_exist [3]
	get_info [1], get_info [2], get_info [3], get_info [4], get_logenv [1]
	get_logenv [2], get_yo_dates [1], get_yo_dates [2], get_yo_dates [3]
	gt_expdur [1], gt_expdur [2], gt_filta, his_index, int2secarr [1], int2secarr [2]
	mk_sff_pair [1], mk_sff_pair [2], mnr_frm_fix, sav_sda [1], sav_sda [2]
	sav_sda [3], sxt_decon [1], sxt_decon [2], sxt_deleak [1], sxt_deleak [2]
	sxt_dn_unc, sxt_off_axis, sxt_prep [1], sxt_prep [2], sxt_prep [3]
	sxt_sff_composite [1], sxt_sff_composite [2], tim2dset [1], tim2dset [2]
   Side Effects:
      generates an 'ssc' file - floating point, normalized to counts/sec/pix
   
   Rules for choice of Synthetic or Terminator SFCs.
	 -------- Set up Syn/Term SFC boundaries ----------
	   	ent(0) - 24 Jul 93      use TermSFC
	   	24 Jul 93 - 16 Sep 94   use SynSFC
	   	16 Sep 94 - ent(3)      use TermSFC
	   	ent(3) - ent(5)         use SynSFC
	   	ent(5) - ent(7)         use TermSFC
	   	ent(7) - ent(9)         use SynSFC
	 NOTE: Syn/Term choice is based upon time of first index 
	   record and that selection is used for that SSC or SST.
	 -------------------------------------------------

   History:
      14-Sep-1998 - S.L.Freeland  - Written (YPOP/MSU)
      16-Sep-1998 - Various mods - include proc flags in file name.
      17-Sep-1998 - Add scattered light correction and /NOSCATTER
      18-Dec-1998 - Change normalization-> from deka-norm->counts/sec/pixel
                    Change default prefix to SSC (Sxt Science Composite)
                    Triplet->                SST 
      21-Mar-1999 - S.L.Freeland - change /sxt_kleen->sxt_clean
                    Add /destreak (sxt_xsaa)hook/logic
      21-apr-1999 - S.L.Freeland - allow filelist in lieu of week string
      12-aug-1999 - S.L.Freeland - add /YYYY,  /YYYYMM, and /YYYYMMDD keywords
                    (subdirectory formats)
      29-Sep-1999 - S.L.Freeland - add /FILENAME_ONLY keyword and function
      26-Oct-1999 - S.L.Freeland - add /NOLEAK ( -> sxt_prep )
      18-Jan-2001 - S.L.Freeland - add /UNCERT
       8-May-2001 - S.L.Freeland - add /SYNSFC and flag (appended)
      11-Dec-2001 - D.McKenzie - revised handling of uncertainties to
		     work for composites, including normalization and
		     output.  My hacks are on lines 197, 232, 241, 248, 264.
      23-jul-2003 - S.L.Freeland - add statistical uncertainties
                                   via sxt_dn_unc per NN, 3MK default 
       7-Nov-2003 - S.L.Freeland - set MAXDT=600 in call to mk_sff_pair
                                   (maximum permitted dT pair seperation)
      10-nov-2003 - S.L.Freeland - add SYNSFC to box-message output
                                   and optionally look at environmental 
                                   (fixes file name... )   
      13-nov-2003 - S.L.Freeland - change MAXDT from 600 -> 660
      19-nov-2003 - S.L.Freeland - move 2nd order leak correction to 
                                   this routine following compositing
                                   step (don't pass keyword -> sxt_prep) 
      18-dec-2003 - S.L.Freeland - change mk_sff_pair call 
                                   for two image case 
	2-jan-2004 - LWA - Restored 2nd order leak in sxt_prep call, line 234.
	7-jan-2004 - LWA - Edited boxmessage to handle triplets.
       8-jan-2004 - S.L.Freeland - avoid sxt_deleak call if pre-1st 
                                   entrance filter failure
	9-jan-2004 - LWA - Restricted McKenzie boxmessages to loud=1.
			 - Cleaned up code, removed all ^M from DOS edits.
			 - Put sxt_deleak step back into sxt_prep.  
			 - Commented out Sam's changes of 19-nov-2003.
      10-Jan-2004 - LWA - Deleted obsolete keyword refresh.
			 - Removed forced uncert processing.
      16-jan-2004 - S.L.Freeland - sxt_scatter2 -> sxt_decon updates merged 
      19-Jan-2004 - LWA - Inserted test for images with severe CCD bleed.
      20-Jan-2004 - LWA - Now reading xdata with "roadmap" for use in
			mk_sff_pairs.  Include in common block.
			   Moved bleed test to mk_sff_pair.pro.
      24-Jan-2004 - LWA - Now doing all image selection tasks , including
			sxt-satscreen, within mk_sff_pair.pro.
      27-Jan-2004 - LWA - Debugs and fiddles.
      20-aug-2004 - S.L.Freeland - set normalization .HIS algorithm flag
       3-Sep-2004 - LWA - Moved sxt_deleak (2nd order leak) to final step.
	9-Sep-2004 - LWA - Now handles pre-firstleak cases.
      25-Sep-2004 - LWA - For NuDen shorts now do 2nd order leak in sxt_prep.
      13-Oct-2004 - S.L.Freeland - set 2nd order leak flag in proper place
	3-Nov-2004 - LWA - Incorp. mnr_frm_fix to zero missing minor frames.
			Deleted useless yn= keyword in final call to sxt_deleak.
	4-Nov-2004 - LWA - Replaced "useless" keyword needed for .HIS. 
      18-Nov-2004 - S.L.Freeland - inhibit sxt_deleak for NuDen case
                                   (handled via sxt_prep,/second)
      18-Nov-2004 - S.L.Freeland - re-think per lwa previous NuDen fix...
      19-Nov-2004 - LWA - Incorporated SSC7 guidelines for SSC choice..
			   Major update of header.
      20-Nov-2004 - LWA - Tiny NuDen mod for single exposure "doublet."
			   Repaired box message for NuDen roadmap alteration.
      20-Nov-2004 - LWA - Corrected final stupid blunder.
      18-Mar-2005 - LWA - Added nuden_ok keyword.
       4-Oct-2005 - LWA - Added /uncert test a couple of places.
	8-Feb-2006 - LWA - Added indat to the calls to mk_sff_pair.
      14-Apr-2006 - LWA - Reconciled different versions, mk_ssc_version='.2'
      16-May-2006 - LWA - Removed de-vignette step from sxt_prep.
			Changed post_prep processing to the following order:
			Prep -> 2nd-order-leak -> de-scatter -> de-vignette.
      19-May-2006 - LWA - Removed . in 2^15. to cure IDL 6.2 problem.


mk_ssc [2] $SSW/yohkoh/sxt/idl/atest/mk_ssc.pro
[Previous] [Next]
   Name: mk_ssc

   Purpose: make SXT "Final" science composite movie - de-spagetti mk_sfd

   Input Parameters:
      week - the week to process 
 
   Output Parameters:
     NONE

   Keyword Parameters:
      nodeka     - dont deka normalize
      novignette - dont vignette correct
      noclean    - dont call sxt_clean (despike and optional)
      noscatter  - dont call sxt_scatter

      prefix - output file prefix (default='ssc' (pair), 'sst' implies triple 
      ifiles - explicit filelist (in lieu of WEEK string)
      subdir - optional subdirectory 
      filename_only - if set, just derive planned filename and return in OUTFILE
  
 CALLS: ***
	BOX_MESSAGE, BOX_MESSGE, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3]
	DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], FILE2TIME, FILE_EXIST [2]
	RD_SDA [1], RD_SDA [2], RD_SDA [3], RD_XDA [1], RD_XDA [2], TIME2FILE, anytim [1]
	anytim [2], anytim [3], anytim [4], anytim [5], cdrom_files [1], cdrom_files [2]
	choose_sfc, concat_dir [4], curdir [1], curdir [2], data_chk [1], data_chk [2]
	deka_norm [1], deka_norm [2], delvarx [5], file_exist [1], file_exist [3]
	get_info [1], get_info [2], get_info [3], get_info [4], get_logenv [1]
	get_logenv [2], get_yo_dates [1], get_yo_dates [2], get_yo_dates [3]
	gt_expdur [1], gt_expdur [2], gt_filta, his_index, int2secarr [1], int2secarr [2]
	mk_sff_pair [1], mk_sff_pair [2], mnr_frm_fix, sav_sda [1], sav_sda [2]
	sav_sda [3], sxt_decon [1], sxt_decon [2], sxt_deleak [1], sxt_deleak [2]
	sxt_dn_unc, sxt_off_axis, sxt_prep [1], sxt_prep [2], sxt_prep [3]
	sxt_sff_composite [1], sxt_sff_composite [2], tim2dset [1], tim2dset [2]
   Side Effects:
      generates an 'ssc' file - floating point, normalized to counts/sec/pix
   
   History:
      14-Sep-1998 - S.L.Freeland  - Written (YPOP/MSU)
      16-Sep-1998 - Various mods - include proc flags in file name.
      17-Sep-1998 - Add scattered light correction and /NOSCATTER
      18-Dec-1998 - Change normalization-> from deka-norm->counts/sec/pixel
                    Change default prefix to SSC (Sxt Science Composite)
                    Triplet->                SST 
      21-Mar-1999 - S.L.Freeland - change /sxt_kleen->sxt_clean
                    Add /destreak (sxt_xsaa)hook/logic

      21-apr-1999 - S.L.Freeland - allow filelist in lieu of week string
      12-aug-1999 - S.L.Freeland - add /YYYY,  /YYYYMM, and /YYYYMMDD keywords
                    (subdirectory formats)
      29-Sep-1999 - S.L.Freeland - add /FILENAME_ONLY keyword and function
      26-Oct-1999 - S.L.Freeland - add /NOLEAK ( -> sxt_prep )
      18-Jan-2001 - S.L.Freeland - add /UNCERT
       8-May-2001 - S.L.Freeland - add /SYNSFC and flag (appended)
       7-Mar-2003 - S.L.Freeland - add /LOUD and made default quieter
  


mk_ssc [3] $SSW/yohkoh/sxt/idl/atest/mk_ssc_times.pro
[Previous] [Next]
   Name: mk_ssc

   Purpose: make SXT "Final" science composite movie - de-spagetti mk_sfd

   Input Parameters:
      week - the week to process 
 
   Output Parameters:
     NONE

   Keyword Parameters:
      nodeka     - dont deka normalize
      novignette - dont vignette correct
      noclean    - dont call sxt_clean (despike and optional)
      noscatter  - dont call sxt_scatter

      prefix - output file prefix (default='ssc' (pair), 'sst' implies triple 
      ifiles - explicit filelist (in lieu of WEEK string)
      subdir - optional subdirectory 
      filename_only - if set, just derive planned filename and return in OUTFILE
  
   Side Effects:
      generates an 'ssc' file - floating point, normalized to counts/sec/pix
   
   History:
      14-Sep-1998 - S.L.Freeland  - Written (YPOP/MSU)
      16-Sep-1998 - Various mods - include proc flags in file name.
      17-Sep-1998 - Add scattered light correction and /NOSCATTER
      18-Dec-1998 - Change normalization-> from deka-norm->counts/sec/pixel
                    Change default prefix to SSC (Sxt Science Composite)
                    Triplet->                SST 
      21-Mar-1999 - S.L.Freeland - change /sxt_kleen->sxt_clean
                    Add /destreak (sxt_xsaa)hook/logic

      21-apr-1999 - S.L.Freeland - allow filelist in lieu of week string
      12-aug-1999 - S.L.Freeland - add /YYYY,  /YYYYMM, and /YYYYMMDD keywords
                    (subdirectory formats)
      29-Sep-1999 - S.L.Freeland - add /FILENAME_ONLY keyword and function
      26-Oct-1999 - S.L.Freeland - add /NOLEAK ( -> sxt_prep )
      18-Jan-2001 - S.L.Freeland - add /UNCERT
       8-May-2001 - S.L.Freeland - add /SYNSFC and flag (appended)
      Circa 1-jun-2001 - Add TIMES keyword and option

   Restrictions: 
      Beta-Test version of mk_ssc which only generates SSC images
      matching TIMES input vector - may become a released mk_ssc.pro
      option, but not today..
  


mk_ssc_batch [1] $SSW/yohkoh/gen/galileo/idl/lmsal/go_ssc_batch.pro
[Previous] [Next]
   Name: mk_ssc_batch

   Purpose: generate and optionally submit a customized mk_ssc batch job

   Input Paramters:
      time0 - start day of desired time range 
      time1 - stop day of desired time range 
      
   Keyword Paramters:
      DAYS - vector of one or more days (in leiu of time0/time1 range)
      SUBMIT - (switch) - if set, submit the job ~now via ssw_batch
      YEAR   - do full year (ex: YEAR=1991) in leiu of time range or DAYS
      nimages - for testing only, number of images/day to process
                (generally used for infrastructure TESTING only)
                For example, NIMAGES=5 only does 1st 5 images of each DAY
      beta - (switch) - use $YOARCH/ssc_beta instead of $YOARCH/ssc
                        (only software/yohkoh accounts - ignored for others)
      ssc_topdir - optional full path for output SSC parents - defaults
                   derived from $SSW_YOARCH and user info 
      release - (switch) if set, use 'release' online area instead of user-personal area
      online  - (siwtch) - synonym for /RELEASE (only authorized users allowed)
      prefix - optional prefix for output files; default is 'ssc'
      quiet - if set, suppress /LOUD in call to mk_ssc
      JOB_DESCRIPTION - optional descriptive buzzword to innclude in job/log
                        derived JobNames (used for *pro and *log names)
         JobName> USER_yyyymmdd_hhmm +  _JOB_DESCRIPTION   + {.pro,.log}
                  |                |    |^^^^^^^^^^^^^^^              
                  | --Derived------|    |-- Optional --|     
                  |user+time of run|    | Default=null |
    
      ---- mk_ssc processing control ----
      vignette - (switch)     if set, ENABLE vignette
      scatter  - (switch)     if set, ENABLE scatter correction
      destreak - (switch)     if set, ENABLE destreak
      second   - (switch)     if set, ENABLE second order leak correction
      nonormalize - (switch)  if set, DISABLE SSC normalization (DN/S/Pixel)
      clean - (switch)        if set, ENABLE despiking
      synthetic_sfc - (switch) if set, ENABLE synthetic SFC leak correction
      --------------------------------------------------------

      ------ xxx_beta switches for overriding released ydb input dbases
      sfc_beta -      NN -> version of $SSWDB/ydb_beta/sfc_NN
      sdc_beta -      NN -> version of $SSWDB/ydb_beta/sdc_NN
      att_beta -      NN -> version of $SSWDB/ydb_beta/att_NN
      fem_beta -      NN -> version of $SSWDB/ydb_beta/fem_NN
      synsfc_beta   - NN -> version of $SSWDB/ydb_beta/synsfc_NN
      ----------------------------------------------------------

   Calling Sequence:
   IDL> go_ssc_batch,t0,t1 [,processing flags] [,B-ydb flags][,SUBMIT]      

   Calling Examples:
        ------ defaults for time range & run -----
   IDL> go_ssc_batch,'1-mar-1997','10-mar-1997',/SUBMIT     - all defaults

        -----  add 2nd order leak, use ydb_beta SFC version 2   
   IDL> go_ssc_batch,'1-mar-1997','10-mar-1997',/SECOND, SFC_BETA=2,/SUB

        ----- discrete DAYS vector instead of contiguious time range ---
   IDL> go_ssc_batch,DAYS=['1-sep-2000','15-nov-1999'],/SUBMIT

   IDL> go_ssc_batch,YEAR=1992,/SUBMIT,/SECOND         ; do full year

        ----- mission long run --------------
   IDL> go_ssc_batch,get_yo_dates(/launch), $
           last_nelem(get_yo_dates(/ent)),/sub,/second,job_desc='MISSION'

 CALLS: ***
	ARR2STR [1], Arr2Str [2], BOX_MESSAGE, CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], FILE_EXIST [2], GO_SSC_BATCH, POPD, PUSHD, STR2ARR [1], STR2ARR [2]
	STRTAB2VECT, TIME2FILE, anytim [1], anytim [2], anytim [3], anytim [4], anytim [5]
	concat_dir [4], curdir [1], curdir [2], data_chk [1], data_chk [2]
	file_append [1], file_append [2], file_exist [1], file_exist [3], get_logenv [1]
	get_logenv [2], get_user [1], get_user [2], is_member [1], is_member [2]
	pr_status [1], pr_status [2], rd_tfile [1], rd_tfile [2], reltime [1], reltime [2]
	ssw_path, str2cols [1], str2cols [2], str_replace [1], str_replace [2]
	ut_time [1], ut_time [2], write_access [1], write_access [2], yesnox [1]
	yesnox [2]
   History:
      5-Mar-2003 - S.L.Freeland 
      7-Mar-3003 - S.L.Freeland add OUT param to batch cmd spawn
                   (avoid some kind of frozen pipe on some Linux)
                   Add YEAR keyword and function
     18-Apr-2003 - S.L.Freeland added /ONLINE and /RELEASE (synonyms)
     12-jan-2004 - S.L.Freeland - to enable /SCATTER, needed to fix a historical typo
                                  (destreak flag was inccorrectly named /FSCAT; chg -> /FSTREAK)
     19-Apr-2004 - S.L.Freeland add /QUIET switch and make /LOUD default in 
                   call to mk_ssc
      1-Oct-2004 - S.L.Freeland add /TRIPLET keyword&function
 


mk_ssc_batch [2] $SSW/yohkoh/sxt/idl/atest/go_ssc_batch.pro
[Previous] [Next]
   Name: mk_ssc_batch

   Purpose: generate and optionally submit a customized mk_ssc batch job

   Input Paramters:
      time0 - start day of desired time range 
      time1 - stop day of desired time range 
      
   Keyword Paramters:
      DAYS - vector of one or more days (in leiu of time0/time1 range)
      SUBMIT - (switch) - if set, submit the job ~now via ssw_batch
      YEAR   - do full year (ex: YEAR=1991) in leiu of time range or DAYS
      nimages - for testing only, number of images/day to process
                (generally used for infrastructure TESTING only)
                For example, NIMAGES=5 only does 1st 5 images of each DAY
      beta - (switch) - use $YOARCH/ssc_beta instead of $YOARCH/ssc
                        (only software/yohkoh accounts - ignored for others)
      ssc_topdir - optional full path for output SSC parents - defaults
                   derived from $SSW_YOARCH and user info 
      release - (switch) if set, use 'release' online area instead of user-personal area
      online  - (siwtch) - synonym for /RELEASE (only authorized users allowed)
      prefix - optional prefix for output files; default is 'ssc'
      JOB_DESCRIPTION - optional descriptive buzzword to innclude in job/log
                        derived JobNames (used for *pro and *log names)
         JobName> USER_yyyymmdd_hhmm +  _JOB_DESCRIPTION   + {.pro,.log}
                  |                |    |^^^^^^^^^^^^^^^              
                  | --Derived------|    |-- Optional --|     
                  |user+time of run|    | Default=null |
    
      ---- mk_ssc processing control ----
      vignette - (switch)     if set, ENABLE vignette
      scatter  - (switch)     if set, ENABLE scatter correction
      destreak - (switch)     if set, ENABLE destreak
      second   - (switch)     if set, ENABLE second order leak correction
      nonormalize - (switch)  if set, DISABLE SSC normalization (DN/S/Pixel)
      clean - (switch)        if set, ENABLE despiking
      --------------------------------------------------------

      ------ xxx_beta switches for overriding released ydb input dbases
      sfc_beta -      NN -> version of $SSWDB/ydb_beta/sfc_NN
      sdc_beta -      NN -> version of $SSWDB/ydb_beta/sdc_NN
      att_beta -      NN -> version of $SSWDB/ydb_beta/att_NN
      fem_beta -      NN -> version of $SSWDB/ydb_beta/fem_NN
      syncoeff_beta - NN -> version of $SSWDB/ydb_beta/synsfc_NN
      ----------------------------------------------------------

   Calling Sequence:
   IDL> go_ssc_batch,t0,t1 [,processing flags] [,B-ydb flags][,SUBMIT]      

   Calling Examples:
        ------ defaults for time range & run -----
   IDL> go_ssc_batch,'1-mar-1997','10-mar-1997',/SUBMIT     - all defaults

        -----  add 2nd order leak, use ydb_beta SFC version 2   
   IDL> go_ssc_batch,'1-mar-1997','10-mar-1997',/SECOND, SFC_BETA=2,/SUB

        ----- discrete DAYS vector instead of contiguious time range ---
   IDL> go_ssc_batch,DAYS=['1-sep-2000','15-nov-1999'],/SUBMIT

   IDL> go_ssc_batch,YEAR=1992,/SUBMIT,/SECOND         ; do full year

        ----- mission long run --------------
   IDL> go_ssc_batch,get_yo_dates(/launch), $
           last_nelem(get_yo_dates(/ent)),/sub,/second,job_desc='MISSION'

 CALLS: ***
	ARR2STR [1], Arr2Str [2], BOX_MESSAGE, CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], FILE_EXIST [2], GO_SSC_BATCH, POPD, PUSHD, STR2ARR [1], STR2ARR [2]
	STRTAB2VECT, TIME2FILE, anytim [1], anytim [2], anytim [3], anytim [4], anytim [5]
	concat_dir [4], curdir [1], curdir [2], data_chk [1], data_chk [2]
	file_append [1], file_append [2], file_exist [1], file_exist [3], get_logenv [1]
	get_logenv [2], get_user [1], get_user [2], is_member [1], is_member [2]
	pr_status [1], pr_status [2], rd_tfile [1], rd_tfile [2], reltime [1], reltime [2]
	ssw_path, str2cols [1], str2cols [2], str_replace [1], str_replace [2]
	ut_time [1], ut_time [2], write_access [1], write_access [2], yesnox [1]
	yesnox [2]
   History:
      5-Mar-2003 - S.L.Freeland 
      7-Mar-3003 - S.L.Freeland add OUT param to batch cmd spawn
                   (avoid some kind of frozen pipe on some Linux)
                   Add YEAR keyword and function
     18-Apr-2003 - S.L.Freeland added /ONLINE and /RELEASE (synonyms)
 


mk_ssl $SSW/yohkoh/gen/idl/reformat/mk_ssl.pro
[Previous] [Next]
NAME:
	mk_ssl
PURPOSE:
	Generate the SXT Summary Log (SSL) file from the SPR and
	SFR files.  Also need the output from MK_SEL.
OPTONAL INPUT:
	indir	- The input directories where the SFR and SPR files
		  reside.  If not defined, "week" must be passed
		  and the program will find the files in the week
		  directory.
	outfil	- The output file name.  If undefined, it derives
		  a week ID filename from the first data file.
KEYWORD INPUT:
	week	- a string with the year/week if the format
		  91_49 where 91 is the year, 49 is the week
		  This is required input.
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], GEN_STRUCT [1], GEN_STRUCT [2]
	GET_NBYTES, MASK, OPEN_DA_FILE, RD_XDA [1], RD_XDA [2], REF_STRUCT, Rd_Roadmap [2]
	Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3], SXT_STRUCT, UNIQ [1], UNIQ [2]
	UNIQ [3], WRT1P_FH, anytim2ex [1], anytim2ex [2], concat_dir [4], ex2week [1]
	ex2week [2], file_list [1], file_list [2], finddir [1], finddir [2], get_explat
	gt_dp_mode [1], gt_dp_mode [2], gt_expdur [1], gt_expdur [2], gt_expmode, gt_filta
	gt_filtb, gt_mbe [1], gt_mbe [2], gt_pfi_ffi, mk_ssl_sub1, rd_roadmap [1], rdwrt [1]
	rdwrt [2], rdwrt [3]
HISTORY:
	Written 23-Apr-92 by M.Morrison
Ver 1.01 28-Apr-92 (MDM) - Changed logging of expdur to be in
			microseconds instead of millisec.  Also, GT_EXPDUR
			had been modified to return the corrected expdur.
Ver 1.02  1-May-92 (MDM) - Fixed bug where # images were 1 and a sort was
			being attempted on it
Ver 1.03 26-May-92 (MDM) - Changed to write a temporary file and then
                           move it to on-line after finished generating it
Ver 1.04  9-Jul-92 (MDM) - Modified to not access the TEMP files from the
			    reformating
Ver 1.05 16-Oct-92 (MDM) - Modified SERNUM extraction.  Last serial num of
			    selected files was sometimes bad, so when it is
			    less than the starting serial num, then find the
			    maximum instead.


mk_ssl_sub1 $SSW/yohkoh/gen/idl/reformat/mk_ssl_sub1.pro
[Previous] [Next]
NAME:
	mk_ssl_sub1
PURPOSE:
	MK_SSL subprocedure #1 counts the number of images of a given filter
	and saves the total exposure through that filter.
INPUT/OUTPUT:
	outrec
INPUT:
	index
	ss
	isub
 CALLS: ***
	gt_expdur [1], gt_expdur [2]
 CALLED BY:
	mk_ssl
HISTORY:
	Written 24-Apr-92 by M.Morrison


MK_SSX $SSW/yohkoh/gen/idl/reformat/mk_ssx.pro
[Previous] [Next]
NAME:
	MK_SSX
PURPOSE:
	Generate the weekly SXT Synoptic slice files (SSX) from the SFD file.
INPUT:
	INFIL	 - SFD file name.  It should include the directory
		   path.  
 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], DR_CARR [1], DR_CARR [2], DR_CARR [3], RD_SDA [1], RD_SDA [2]
	RD_SDA [3], RD_XDA [1], RD_XDA [2], Rd_Roadmap [2], break_file [4], concat_dir [4]
	get_rb0p [1], get_rb0p [2], gt_filta, gt_filtb, gt_res, gt_shape_cmd, int2secarr [1]
	int2secarr [2], rd_roadmap [1], sav_sda [1], sav_sda [2], sav_sda [3]
	str_copy_tags [1], str_copy_tags [2], str_copy_tags [3], str_copy_tags [4]
	sxt_cen [1], sxt_cen [2], tim2orbit [1], tim2orbit [2]
OPTIONAL KEYWORD INPUT:
	wid_fac	- ?? units?
	type	- 0 = East portion (SSE), 1 = Central portion (SSC), 
		  2 = west portion (SSW).  If undefined, it uses type=1.
	outdir	- The output directory.  If not specified, it uses
		  $DIR_SXT_SSX
	qstop	- If set, then stop within the program
OPTIONAL KEYWORD OUTPUT:
	RUN_TIME - Time required to run the routine
HISTORY:
Ver 1.00 23-Aug-92 (GLS) - Using MDM's MK_SXL as the starting point
Ver 1.01 31-Aug-92 (MDM) - Added return if the input file does not exist
Ver 1.02 31-Aug-92 (MDM) - Added return if no matches found
Ver 1.03  1-Sep-92 (MDM) - Modified to write GT_HXA results from GET_PNT to
                           INDEX.GEN.PNTG_ANGLE(0:1)
Ver 1.04  2-Sep-92 (MDM) - OUTDIR option added
                         - Greg Slater made several changes to GET_SSX_SLICE
Ver 1.05  4-Sep-92 (MDM) - Changed size of first/last slice from 80 to 120 pix
                         - Greg Slater made more changes to GET_SSX_SLICE
Ver 1.06 21-Sep-92 (MDM) - Avoid SAA images
Ver 1.07  4-Dec-92 (MDM) - Greg Slater made several changes to GET_SSX_SLICE
                           to work with SSE and SSW
                         - Changed "wid_fac" default from 1.1 to 1.5
                         - Patch to use the new SXT index structures when
                           using old SFD files.
Ver 1.08 19-Jun-93 (MDM) - Modified to save the x0 coordinate extracted.
Ver 2.00  8-Jul-93 (GLS) - Several modifications.  GET_SSX_SLICE incorporated
                           into MK_SSX
Ver 2.01  9-Jul-93 (MDM) - Several corrections
Ver 2.02  9-Jul-93 (MDM) - Multiplied PNTG value by 10
Ver 2.03 30-Aug-93 (MDM) - Replaced call to GET_SUNCENTER with SXT_CEN
Ver 2.04 31-Aug-93 (GLS) - Merged atest version with diverging GLS version
			  - WID_FAC default is 1.2
			  - Removed call to GET_PNT and PDATA keyword
			  - SXT index structure patch added for third and
			    hopefully last time


mk_strip_file $SSW/yohkoh/ucon/idl/slater/mk_strip_file.pro
[Previous] [Next]
NAME:
PURPOSE:
INPUT:
 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], GET_POLAR_BIN_VALS, GET_SUN [1], GET_SUN [2], RD_XDA [1]
	RD_XDA [2], ROT, Rd_Roadmap [2], S2C [1], S2C [2], break_file [4], concat_dir [4]
	get_rb0p [1], get_rb0p [2], gt_corner, gt_pix_size, gt_res, gt_shape_cmd
	rd_roadmap [1], sav_sda [1], sav_sda [2], sav_sda [3], sfd_comp, sfd_decomp
	sxt_cen [1], sxt_cen [2], sxt_comp, sxt_decomp [1], sxt_decomp [2]
OPTIONAL KEYWORD INPUT:
OPTIONAL KEYWORD OUTPUT:
HISTORY:


mk_sun_mosaic $SSW/yohkoh/ucon/idl/slater/mk_sun_mosaic.pro
[Previous] [Next]
 NAME:
	mk_sun_mosaic
 PURPOSE:
	create mosaic of solar images
 Calling Sequence:
	mk_sun_mosaic, time
 CALLS:


mk_sxc $SSW/yohkoh/gen/idl/reformat/mk_sxc.pro
[Previous] [Next]
NAME:
	mk_sxc
PURPOSE:
	Generate the SXT Xray Sun Center (SXC) data files from
	the SFD images
INPUT:
	infil	- A string array with a list of the SFR file
		  names.  It should include the directory
		  path.  The inputfiles can be derived if the
		  "week" option is used.
OPTIONAL INPUT:
	outfil	- The output filename to create.  The output
		  file can be derived from the input file list.
OPTIONAL INPUT:
	week	- a string with the year/week if the format
		  91_49 where 91 is the year, 49 is the week
 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], GEN_STRUCT [1], GEN_STRUCT [2], GET_NBYTES, OPEN_DA_FILE
	RD_XDA [1], RD_XDA [2], REF_STRUCT, Rd_Roadmap [2], Rd_fHeader [1], Rd_fHeader [2]
	Rd_fHeader [3], SPLIT_FILES, SXT_STRUCT, WRT1P_FH, break_file [4], concat_dir [4]
	fmt_tim [1], fmt_tim [2], gt_res, mk_dset_str [1], mk_dset_str [2], rd_roadmap [1]
	rdwrt [1], rdwrt [2], rdwrt [3], sxt_cen [1], sxt_cen [2], sxt_center, wrtsxtmap
HISTORY:
	Written 26-May-93 by M.Morrison
Ver 1.01 27-May-93 (MDM) - changed call to GET_SUNCENTER to use INDEX=INDEX
Ver 1.02 12-Jul-93 (MDM) - Build/Save the roadmap
Ver 1.10  3-Feb-94 (MDM) - Updated version number because of change to
			    SXT_CENTER
Ver 1.20  8-Nov-94 (MDM) - changed to use SXT_CEN instead of GET_SUNCENTER


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

   Name: mk_sxh

   Purpose: Generate the SXT X-Ray Histogram Log (SXH) from SSC files

   Input Parameters:
      sscfiles - the input ssc files, Nominally one per day

   Optional Keyword Parameters:
	outdir	- The output directory for the file.  Default = $DIR_SXT_SXH
	/vignette, applies vignette correction to SSC before forming
		histogram IF the SSC is not already vignette corrected.

   METHOD (~same as mk_sxl) :
	Six histograms are saved for each SSC image.  If the data is
	read out into the variable SXL, then the following applies:
		sxh.hist(*,0) = full image (all pixels)
		sxh.hist(*,1) = all pixels inside 0.86 of the solar
				radius
		sxh.hist(*,2) = all pixels outside of 1.05 of the solar
				radius
		sxh.hist(*,[3,4,5]) = as above but for negative values
				in the image
	Each of the histograms is 539 elements and is the histogram of
          alog10( (data+1)>1.) with binsize = .01

 CALLS: ***
	ADD_TAG [1], ADD_TAG [2], AVERAGE, BOX_MESSAGE, BREAK_FILE [1], BREAK_FILE [2]
	BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2]
	RD_XDA [1], RD_XDA [2], Rd_Roadmap [2], STDEV, SXT_STRUCT, break_file [4]
	concat_dir [4], data_chk [1], data_chk [2], file_exist [1], file_exist [3]
	get_logenv [1], get_logenv [2], get_rb0p [1], get_rb0p [2], gt_pix_size, gt_res
	rd_roadmap [1], safe_log10, sav_sda [1], sav_sda [2], sav_sda [3], str_replace [1]
	str_replace [2], strmids [1], strmids [2], strsplit, sxt_cen [1], sxt_cen [2]
	sxt_off_axis
	NOTE: The negative-value histograms are included to properly
		represent the effects of statistical noise in the
		low-signal parts of the image.
	
	The histogram of the whole-sun image can be derived by:
		ann_hist = sxh.hist(*,0) - sxh.hist(*,3)

	The histogram of the "annulus" (pixels around the very limb
	of the sun) can be derived by:
		ann_hist = (sxh.hist(*,0) - sxh.hist(*,1) - sxh.hist(*,2))
			- (sxh.hist(*,3) - sxh.hist(*,4) - sxh.hist(*,5))

   HISTORY
	23-March-1999 - S.L.Freeland MK_SXH Written  from mdm mk_sxl
                       using 'new SSW technology' and write_genxcat  
        6-apr-1999 - S.L.Freeland - add /VIGNETTE keyword and function

       Note: this file has simplified structure and includes all TAGS
             previously split between sxl roadmap and sxl.HISTR

	4-May-99, LWA	Increased log10(intensity) range to 5.39 and
			handled negative values as an inverse image

       7-May-99, S.L.Freeland - lwa_sxh->mk_sxh, made it version 1.1
                                change structure def to match newdim (540)

	15-Jun-00, LWA  Corrected file size of sxh_struct.his to 539 from 540.
			Changed SXL to SXH in header.
			Added explanation of /vignette keyword to header.
			Changed version to 1.2.

	18-Jul-00, LWA  Deleted unused qstop keyword.

	19-Jul-00, LWA	Hacked a fix for file naming section and requirement
			for outdir.  Now default to local directory.
       21-Jul-00, SLF  Once again, lwa_sxh->mk_sxh.
                       reinstated the DIR_SXT_SXH/OUTDIR
                       (added an option of using DIR_SXT_SSC/..//sxh
                       set 'vignette' flag in output filename


mk_sxl $SSW/yohkoh/gen/idl/reformat/mk_sxl.pro
[Previous] [Next]
NAME:
	mk_sxl
PURPOSE:
	Generate the SXT X-Ray Histogram Log (SXL) from the SFD file.
INPUT:
	infil	- The SFD file name.  It should include the directory
		  path.  
 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], GEN_STRUCT [1], GEN_STRUCT [2], GET_NBYTES, OPEN_DA_FILE
	RD_XDA [1], RD_XDA [2], REF_STRUCT, Rd_Roadmap [2], Rd_fHeader [1], Rd_fHeader [2]
	Rd_fHeader [3], SXT_STRUCT, WRT1P_FH, break_file [4], concat_dir [4], fmt_tim [1]
	fmt_tim [2], get_rb0p [1], get_rb0p [2], gt_pix_size, gt_res, rd_roadmap [1]
	rdwrt [1], rdwrt [2], rdwrt [3], sxt_cen [1], sxt_cen [2]
OPTIONAL KEYWORD INPUT:
	outdir	- The output directory for the file.  Uses DIR_SXT_SXL
		  by default.
METHOD:
	Three histograms are saved for each SFD image.  If the data is
	read out into the variable SXL, then the following applies:
		sxl.hist(*,0) = full image (all pixels)
		sxl.hist(*,1) = all pixels inside 0.86 of the solar
				radius
		sxl.hist(*,2) = all pixels outside of 1.05 of the solar
				radius
	Each of the histograms is 256 elements and is the histogram of
	the BYTE type log compressed SFD image (so sxl.hist is a
	LONARR(256,3) ).

	NOTE: The histogram of the "annulus" (pixels very around the limb
	of the sun) can be derived by:
		ann_hist = sxl.hist(*,0) - sxl.hist(*,1) - sxl.hist(*,2)
HISTORY:
	MK_SXL Written 13-Aug-92 by M.Morrison taking MK_SDL as the 
	starting point
V2.00	 9-Jul-93 (MDM) - Made MK_SXL2 to have three histograms
V2.01  12-Jul-93 (MDM) - Adjustment to not have subscripts out of range
			  when there are no points with radius < 0.86 or
			  > 1.05
V2.02  19-Jul-93 (MDM) - Corrected large error - Center position was not
			  used properly
	19-Aug-93 (MDM) - Renamed from MK_SXL2 to MK_SXL
	15-Feb-94 (MDM) - Added header information
	25-Feb-94 (MDM) - Updated header information


mk_syn_sfc [1] $SSW/yohkoh/gen/galileo/idl/lmsal/mk_syn_sfc.pro
[Previous] [Next]
NAME: 
         mk_syn_sfc.pro

PURPOSE:
         Create a synthetic Yohkoh-SFC for a given time and pointing,
         as determined by the input index file.  The synthetic SFC is
         generated from the 15x512x512 coefficient data structure generated
         by mk_synsfc_coeff.pro and stored in DIR_SXT_SYNSFC.

CALLING SEQUENCE:
         mk_syn_sfc, index_in, index, syn_sfc
         mk_syn_sfc, index_in, index, syn_sfc, exp_dur=exp_dur

INPUT:
         index_in - index file, or array of index files (all from
                    a single filter failure epoch) that is used
                    to determine the date, x and y coordinates of  
                    sun-center, and roll of the image.
 
 CALLS: ***
	BOX_MESSAGE, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2]
	GET_SUN [1], GET_SUN [2], SIMPLEX_INSIDE, TIME2FILE, concat_dir [4]
	file_exist [1], file_exist [3], get_logenv [1], get_logenv [2], get_yo_dates [1]
	get_yo_dates [2], get_yo_dates [3], gt_day [1], gt_day [2], gt_filta, gt_filtb
	his_index, is_member [1], is_member [2], restgenx, ssw_time_compare
	str_replace [1], str_replace [2], sxt_cen [1], sxt_cen [2]
 CALLED BY:
	leak_sub [1], leak_sub [2], leak_sub [3], sxt_deleak [1], sxt_deleak [2]
OPTIONAL KEYWORD INPUT:
         exp_dur -  Exposure duration for synthesized SFC.  The default
                    exposure duration is 2691.09.         
        
         coeff_file - filename of synthetic coefficients to use to create
                      synthetic SFCs.

OUTPUT:  
         index -    The index_in values modified to indecate that the file
                    is a synthetic SFC, with an exposure time. NOT YET 
                    IMPLEMENTED.

         syn_sfc -  The synthetic SFC, a 512x512 real-number array.
KEYWORD OUTPUT:
         inside - Boolean array, 1 = the SFC was interpolated, 
                                  0 = the SFC was extrapolated.
         synstatus - true (1) if synthetic generated ok

HISTORY:

V. 1.00  Written 08-Sep-2000 (PGS)
V. 1.01  S.L.Freeland - merge SLF history Mods into PGS 8-Jan-2001 version
         T. Metcalf 2001-July-19 Added "inside" keyword and code to determine
                                 whether the SFC is interpolated or
                                 extrapolated.
V. 1.02  T. Metcalf 2001-Dec-18  Added "doroll" into restgenx call and 
                                 set roll to zero unless doroll is set.
V. 1.03  S.L.Freelland 2002-Jan-15 - add SYNSTATUS output keyword
         21-Jan-2004 LWA -Commented out info message,
			   'coeff_matrix file NOT read.  Already exists.'


mk_syn_sfc [2] $SSW/yohkoh/sxt/idl/atest/mk_syn_sfc.pro
[Previous] [Next]
NAME: 
         mk_syn_sfc.pro

PURPOSE:
         Create a synthetic Yohkoh-SFC for a given time and pointing,
         as determined by the input index file.  The synthetic SFC is
         generated by a linear interpolation of nearby SFC's.  This
         routine can be very slow since it must read in the nearby SFC
         database and operate on it.  The first call for a filter failure
         epoch will be the slowest, subsequent calls will be somewhat 
         faster as the SFC data are stored.

CALLING SEQUENCE:
         mk_syn_sfc, index_in, index, syn_sfc
         mk_syn_sfc, index_in, index, syn_sfc, exp_dur=exp_dur

INPUT:
         index_in - index file, or array of index files (all from
                    a single filter failure epoch) that is used
                    to determine the date, x and y coordinates of  
                    sun-center, and roll of the image.
 
 CALLS: ***
	BOX_MESSAGE, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2]
	GET_SUN [1], GET_SUN [2], SIMPLEX_INSIDE, TIME2FILE, concat_dir [4]
	file_exist [1], file_exist [3], get_logenv [1], get_logenv [2], get_yo_dates [1]
	get_yo_dates [2], get_yo_dates [3], gt_day [1], gt_day [2], gt_filta, gt_filtb
	his_index, is_member [1], is_member [2], restgenx, ssw_time_compare
	str_replace [1], str_replace [2], sxt_cen [1], sxt_cen [2]
 CALLED BY:
	leak_sub [1], leak_sub [2], leak_sub [3], sxt_deleak [1], sxt_deleak [2]
OPTIONAL KEYWORD INPUT:
         exp_dur -  Exposure duration for synthesized SFC.  The default
                    exposure duration is 2691.09.         
        
OUTPUT:  
         index -    The index_in values modified to indecate that the file
                    is a synthetic SFC, with an exposure time. NOT YET 
                    IMPLEMENTED.

         syn_sfc -  The synthetic SFC, a 512x512 real-number array.
KEYWORD OUTPUT:
         inside - Boolean array, 1 = the SFC was interpolated, 
                                 0 = the SFC was extrapolated.
         synstatus - true (1) if synthetic generated ok

HISTORY:

V. 1.00  Written 08-Mar-2002 T. Metcalf 
         This is a new version only loosely based on the old
         mk_syn_sfc.pro.


mk_synsfc_coeff [1] $SSW/yohkoh/gen/galileo/idl/lmsal/mk_synsfc_coeff.pro
[Previous] [Next]
NAME:
         mk_synsfc_coeff.pro

PURPOSE: 
         Calculate a 15x512x512 data structure of coefficients 
         derived from a per-pixel fit of terms containing 
         x, y, solar_diameter.

CALLING SEQUENCE:
         mk_synsfc_coeff, index_in, sfcs_in
         mk_synsfc_coeff, index_in, sfcs_in, sigma=sigma
         mk_synsfc_coeff, index_in, sfcs_in, sigma=sigma, ep_date = '12-dec-99' 

INPUT:   
         index_in - A vector the index records of the SFC images in sfcs_in.
         sfcs_in -  Cube of sfc images corresponding to index_in records,
                    and used as the data-set to calculate the synthetic SFC
                    coefficient data structure.

 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], GET_SUN [1], GET_SUN [2], MEAN
	REGRESS, SIMPLEX_BOUND, STDEV, TIME2FILE, anytim [1], anytim [2], anytim [3]
	anytim [4], anytim [5], concat_dir [4], get_logenv [1], get_logenv [2]
	get_yo_dates [1], get_yo_dates [2], get_yo_dates [3], gt_expdur [1]
	gt_expdur [2], gt_filta, gt_filtb, gt_res, savegenx, ssw_time_compare
	str_replace [1], str_replace [2], sxt_cen [1], sxt_cen [2], ut_time [1]
	ut_time [2]
OPTIONAL KEYWORD INPUT:
         ep_date - specify the date to be used to calculate epoch under
                   consideration.  Default: date of first index record.
                   in index_in.

         coeff_file - Name of output coefficient file.  Default is
                      anticipated by mk_syn_sfc.pro.

         boxnote    - String Description of 'box' filter for permissable SFCs.
         doweight - Include a weighting scheme to prevent clumps of data
                    pulling on more sparse areas of data.
         doroll - Include the roll angle in the fit.  The default is no roll.
                  It is hard to understand how roll could play any part here,
                  but the keyword is there if you want to use it.     

OUTPUT:  sigma - keyword sigma output from idl regress function.
         ep_date - 

History: pgs: Apr 10, 2000
         9-Jan-2000 - S.L.Freeland - enhance epoch check and file name
         2001-Jul-19 - T. Metcalf - Added code to find a bounding surface
                                    for all the data points.  This will be
                                    used to decide if a synthetic SFC is
                                    interpolated or extrapolated.
         2001-July-20 - T. Metcalf - Added a new weighting scheme for the
                                     data in the fits.  Highly clustered
                                     data is weighted less than sparse data.
         2001-Dec-18  - T. Metcalf - Added doroll and doweight
                        keywords. 
         2003-May-23  - T. Metcalf - Added check on size of indep_vector


mk_synsfc_coeff [2] $SSW/yohkoh/sxt/idl/atest/mk_synsfc_coeff.pro
[Previous] [Next]
NAME:
         mk_synsfc_coeff.pro

PURPOSE: 
         Calculate a 15x512x512 data structure of coefficients 
         derived from a per-pixel fit of terms containing 
         x, y, solar_diameter.

CALLING SEQUENCE:
         mk_synsfc_coeff, index_in, sfcs_in
         mk_synsfc_coeff, index_in, sfcs_in, sigma=sigma
         mk_synsfc_coeff, index_in, sfcs_in, sigma=sigma, ep_date = '12-dec-99' 

INPUT:   
         index_in - A vector the index records of the SFC images in sfcs_in.
         sfcs_in -  Cube of sfc images corresponding to index_in records,
                    and used as the data-set to calculate the synthetic SFC
                    coefficient data structure.

 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], GET_SUN [1], GET_SUN [2], MEAN
	REGRESS, SIMPLEX_BOUND, STDEV, TIME2FILE, anytim [1], anytim [2], anytim [3]
	anytim [4], anytim [5], concat_dir [4], get_logenv [1], get_logenv [2]
	get_yo_dates [1], get_yo_dates [2], get_yo_dates [3], gt_expdur [1]
	gt_expdur [2], gt_filta, gt_filtb, gt_res, savegenx, ssw_time_compare
	str_replace [1], str_replace [2], sxt_cen [1], sxt_cen [2], ut_time [1]
	ut_time [2]
OPTIONAL KEYWORD INPUT:
         ep_date - specify the date to be used to calculate epoch under
                   consideration.  Default: date of first index record.
                   in index_in.

         coeff_file - Name of output coefficient file.  Default is
                      anticipated by mk_syn_sfc.pro.

         boxnote    - String Description of 'box' filter for permissable SFCs.
         doweight - Include a weighting scheme to prevent clumps of data
                    pulling on more sparse areas of data.
         doroll - Include the roll angle in the fit.  The default is no roll.
                  It is hard to understand how roll could play any part here,
                  but the keyword is there if you want to use it.     

OUTPUT:  sigma - keyword sigma output from idl regress function.
         ep_date - 

History: pgs: Apr 10, 2000
         9-Jan-2000 - S.L.Freeland - enhance epoch check and file name
         2001-Jul-19 - T. Metcalf - Added code to find a bounding surface
                                    for all the data points.  This will be
                                    used to decide if a synthetic SFC is
                                    interpolated or extrapolated.
         2001-July-20 - T. Metcalf - Added a new weighting scheme for the
                                     data in the fits.  Highly clustered
                                     data is weighted less than sparse data.
         2001-Dec-18  - T. Metcalf - Added doroll and doweight
                        keywords. 
         2003-May-23  - T. Metcalf - Added check on size of indep_vector


mk_taer $SSW/yohkoh/ucon/idl/lemen/mk_taer.pro
[Previous] [Next]
  Routine:	mk_taer

  Purpose:
    Try to generate the taer worksheets.  Works ok for simple trips to Japan

    If the first city and subsequent cities are the same, the first day
    will be included in the M&IE average.  If the first city is different,
    the first day will not be averaged.

  Procedure:
    Reads input data from an ascii file that is created using the editor.
    Start with an existing file to have an example.

    Calls TAER_RN to generate the actual M&IE.  

  Restrictions:
     o Does not do anything with Max column (E).
     o Allows for up to five different exchange rates.
    
  Modification History:
    Written, J. R. Lemen, 21 Feb 1992
    Modified, JRL, 30 Mar 1992, Fixed a bug (for 7 day or less taers)
				 Added the "OFF" key word (don't charge
				 per diem for those days).
    Modified, JRL, 14-jul-92 (V1.3) Made format of output columns wider to
				accommodate larger numbers.
    Modified, JRL, 15-feb-93 (V1.4) If first City contains a * after the name,
				use 1st Day M&IE, but assume first and 2nd
				city have same M&IE rates (For domestic travel)
				Average page 1 and page 2 together.
     2-jun-94, JRL, V1.5  Added the m_ie option to specify a specific amount
			   on a given day.  The mk_taer first tries to hit the
			   average before considering the special input.
    12-may-95, JRL, V1.6  Allow for non-numeric Taer numbers
    18-Dec-95, JRL, V1.7  Can specify more than two cities.
     6-Aug-96, JRL, V1.8  Can specify up to five different exchange rates


mk_tiffb $SSW/yohkoh/ucon/idl/linford/mk_tiffb.pro
[Previous] [Next]
	NAME: mk_tiffb     
	
       PURPOSE: Create a full color (24bit) tiff file.

	CALLING SEQUENCE:
	mk_tiffb, file, img, r, g, b, [ired=ired, igrn=igrn, iblu=iblu, xs=xs,
			ys=ys, nowrt=nowrt, noflip=noflip, *resol=*resol,
			interp=interp]
		img	input image
	   	r,g,b	input color vector/table	
		file	output Tiff file name.
		ired...	returned Full color image, one for each color table
               xs,ys	output img size  (must give both!)
			NOTE: default is 508x508 (Mac double sided floppy
			limit [779kbytes])
		nowrt 	flag to prevent creating Tiff file.
		noflip	flag to prevent mk_tiffb from flipping image.
			(default is to flip image which is needed for
			Tiff readers on Mac.)
		*resol	horizontal (x) and vertical (y) resolution in pixels
			per inch. default is 100.
		interp	if set, will do a bilinear interp. to xs,ys.
 CALLS: ***
	CONGRID [1], CONGRID [2], CONGRID [3], REVERSE, TIFF_WRITE
	Example:
	  Output to Double sided Mac floppy (779 Kbytes formatted free space). 
		img	is a bytarr(508,508)	;774.192 Kbytes
		r,g,b	color table vectors obtained via IDL procedure:
			tvlct,/get, r, g, b
		mk_tiffb, 'My_tiff.dat', img, r, g, b, 
		
		This creates Tiff file 'My_tiff.dat' which has been flipped
		vertically for direct display (e.g. via PhotoShop) and
		has a resolution of 100 pixels per inch.
		
	
	History: 
		written by gal Sept 92. 	
		update to calling seq. 22-Oct-92, gal
	---------------------------------------------------------------


mk_tiffp $SSW/yohkoh/ucon/idl/linford/mk_tiffp.pro
[Previous] [Next]
	Name: mk_tiffp

	PURPOSE: Create a TIFF-Palette Color (256 levels) file.  For, 
		standard TIFF readers on the Macintosh.
	
	CALLING SEQUENCE:
		mk_tiffp, file, img, r, g, b, [xs=xs, ys=ys, noflip=noflip,
			xresol=xresol, yresol=yresol, interp=interp
		
		file	output TIFF file name.
		img	input image matrix.
		r,g,b	input color tables for creating Palette color.
		xs,ys	is the desired pixel image resolution.  Default
			is 508x508 to ensure fitting on double sided floppy.
               noflip  flag to prevent mk_tiffb from flipping image.
                       (default is to flip image which is needed for
                       Tiff readers on Mac.)
               *resol  horizontal (x) and vertical (y) resolution in pixels
                       per inch. default is 100.
               interp  if set, will do a bilinear interp. to desired 
			image resolution specifed in xs and ys.

 CALLS: ***
	CONGRID [1], CONGRID [2], CONGRID [3], REVERSE, TIFF_WRITE
	NOTE:	Default is to flip the image for the normal Macintosh
		display.
 	HISTORY:
		Created 21-Dec-93, GAL
	---------------------------------------------------------------


mk_timarr [2] $SSW/yohkoh/gen/idl/util/mk_timarr.pro
[Previous] [Next]
NAME:
	mk_timarr
PURPOSE:
	Since there are cases when there is only one time tag for
	2,4,8,16 or 32 values, this routine will return a time vector
	that can be used with UTPLOT.
CALLING SEQUENCE:
	timarr = mk_timarr(index, 8)
	timarr = mk_timarr(index, data.pc.sxs_pc11, /wbs)
	timarr = mk_timarr(index, data.pc.sxs_pc11, /wbs, ref_time)

	then use: utplot, timarr, data.pc.sxs_pc11, index(0)
	or        utplot, timarr, data.pc.sxs_pc11, ref_time
INPUT:
	index	- the index structure that goes with the data
	y	- either (1) the number of repeats per DATA SET or
		  (2) the data array that is to be plotted.  If (1)
		  is used, it must be the number of repeats per data
		  set.  Since WBS data takes two major frames per data
		  set, be sure to use the correct number.  For example,
		  data.pc.sxs_pc11 has 8 samples per major frame, but
		  that is 16 samples per data set.
OPTIONAL INPUT:
	ref_time- a reference time to use to generate the time array.
		  If it is not passed, then index(0) is used as the
		  reference
	wbs	- if set, then the number of samples in the data array
		  took TWO major frames to accumulate and adjust
		  accordingly.  
OUTPUT:
	returns an floating point array with the number of seconds
	past the reference time for each data point.
OPTIONAL KEYWORD OUPTUT:
	ok_map	- A byte array the same size/dimention as the output
		  array saysing where there is data or not.  
 CALLS: ***
	anytim2ints [1], anytim2ints [2], bits [1], bits [2], deriv_arr [1], deriv_arr [2]
	dprate2sec [1], dprate2sec [2], fmt_tim [1], fmt_tim [2], int2secarr [1]
	int2secarr [2]
 CALLED BY:
	AVE_CTS, AVE_CTS2 [1], AVE_CTS2 [2], AVE_CTS2 [3], fix_hxtindex, grs32_fsp, grsl_fsp
	hxs_chsums, hxt_chsums, rd_sxs_pha [1], rd_sxs_pha [2], rd_wbs_pha [1]
	rd_wbs_pha [2]
HISTORY:
	Written 31-May-92 by M.Morrison
	29-Apr-93 (MDM) - Added check for WBS missing data
			- Added output OK_MAP
			- Added check for duplicate WBS data
			- Added STRUCT option
	11-Aug-93 (MDM) - Corrected an error which was not allowing
			  "y" to be a scalar
       23-Nov-93 (JMM) - Allows index to have only one element.
	 7-Jun-94 (MDM) - Corrected error which was happening when
			  "y" was a simple 1-D vector, or an
			  array 1xN, and "nx" was supposed to be 1
			  (it was being set to "N")
	 9-Jun-94 (MDM) - Furthur correction to 7-Jun-94 mod
			  (ok_map subscript out of range)
	17-Jun-94 (MDM) - Added some comments
	20-Jun-94 (MDM) - Patched error which did not allow an ADA
			  single nested structure to work


mk_title [2] $SSW/yohkoh/gen/idl/movie/mk_title.pro
[Previous] [Next]
  Name:
   mk_title

  Purpose:
   Write a title for a SXT movie sequence.

  Calling sequence:
   mk_title,N,index,Comment0,Comment1

   For Example,
   mk_title,N,index,'SXT Movie Ver 1.2','User Comment',xoff=512

  Inputs:
    Num   = User supplied sequence number (usually a do-loop parameter)
    index = SXT index structure
    Comment0 and Comment1 = Strings that are comments written to the plot.

  Optional Keywords:
   xoff = Starting pointing in X.  xoff defaults to xoff=520 if xoff is
	   not specified.

 CALLS: ***
	gt_day [1], gt_day [2], gt_dp_mode [1], gt_dp_mode [2], gt_dp_rate [1]
	gt_dp_rate [2], gt_dpe, gt_filta, gt_filtb, gt_res, gt_time [1], gt_time [2]
 CALLED BY:
	mk_nvs_movie, ptv_sxt
  Restrictions:
    The plot window must be approximately 648 by 486 in order to accommodate
    the text correctly.

  Modification History:
    Written, 18-jan-92,  J.R. Lemen - based on Mons Morrison's greg2.pro


mk_title [3] $SSW/yohkoh/gen/idl/util/mk_time_title.pro
[Previous] [Next]
 NAME:
   mk_title
 PURPOSE:
   Put Time titles on a multi-panel image plot using Yohkoh 
   data structures
 CALLING SEQUENCE:
   mk_time_title,index
   mk_time_title,index,xsize=xsize,ysize=ysize
   mk_time_title,index,numx,numy,ss=ss,xoff=xoff,yoff=yoff
 INPUTS:
   index	- Yohkoh roadmap or index
 OPTIONAL INPUTS:
   numx,numy   - Number of panels in the x and y directions
 OPTIONAL INPUT KEYWORDS:
   ss	        - Subscript array
   xoff,yoff   - X offset and Y offset in device coordinates
   xsize,ysize - Size of each panels in device coordinates
   align	- For call to xyouts (def = 0.5)
   charsize    - Character size
   charthick   - Character thickness 
   font	- To specify Hershey character font style 
   color	- Color of title
 CALLS: ***
	MK_TIME_TITLE, gt_time [1], gt_time [2]
 CALLED BY:
	mk_nvs_movie, ptv_sxt
 RESTRICTIONS:
   Only works for X device
 MODIFICATION HISTORY:
  12-jul-94, Louise Harra Murnion MSSL, Written.


mk_vcr $SSW/yohkoh/gen/idl/movie/mk_vcr.pro
[Previous] [Next]
 NAME:
   mk_vcr 
 PURPOSE:
   Control the Sony laser player to make a VCR movie.
 CALLING SEQUENCE:
   mk_vcr [, filin, start_seq, stop_seq, /pause]
 OPTIONAL INPUTS:
   filin	= Ascii file containing the control sequence list (see below)
   start_seq	= First line to process in the file (start from 0)
   stop_seq	= Last  line to process in the file
   Pause	= If set to one, will prompt the user to enter <cr> between
		  sequences.
   queue	= If set, position to the first frame and prompt the user to start
   beep	= If set, will beep 3 sec before the end of wait_after if 
		  wait_after>=4 sec (see definition of wait_after below).
   noflash     = If set, will turn the video off and on for 1 sec while
		  repositioning for multiple speeds within one sequence 
		  (represented by up to four speeds in the [square] brackets).
   device	= 0 for Sony 3000 
		= 1 for Sony 5000 (default)
 Calls sonyloop to control the Sony Laser Recorder.

 CALLS: ***
	STR2ARR [1], STR2ARR [2], VIDEO_ON, get_host [1], get_host [2], get_site, input [1]
	input [2], rd_tfile [1], rd_tfile [2], sonyloop [1], sonyloop [2], tbeep [1]
	tbeep [2], tbeep [3]
 RESTRICTIONS:
   If you are at ISAS, you must be running from either isass0 or isass1.
   If you are at LPARL, you must be running from SXT0.
 EXAMPLE FILE:
* ;    This is an example input file:
* ;
* ; The format is start, stop, wait_before (sec), wait_after (sec), [speeds - max of 4], "Title"
* ; Comment lines begin with ";"
* ;
* ; Titles are optional.  
* ; The titles are displayed on the TTY when running
* ; Make sure the titles don't have "[" or "]" in them.
* ;
* ; Speeds can be 1 to 255 or -1 (1/5 speed) -2 (3*normal).  
* ; If no speed is defined, sequence will default to 1.
* ; Speed=0 corresponds to no operation.
* ; There can be a maximum of 4 speeds per entry.
* ; The /beep option works if wait_after >= 4
* ;
*  7000, 7000,    4,    "Blank Frame"	; This is give some header on the tape
*  6077, 6077,    4,    0, [ -1  0  0  0] "Movie Title Page"
*  6078, 6078,    2,    1, [ -1  0  0  0] "Nov 1991 Movie - Title"
*  5036, 5238,    2,    1, [  1  2  1 -1] "Nov 1991 Movie"
*  6079, 6079,    2,    1, [ -1  0  0  0] "AR 7117 - Title"
*  5431, 5527,    2,    1, [  2  1  3  0] "AR 7117 - WL"
*  5335, 5430,    2,    1, [  2  1  3  0] "AR 7117 - X-ray"
*
 MODIFICATION HISTORY:
  Written, 28-aug-92, J. R. Lemen
  Update,  26-nov-92, JRL, Display titles before asking for start/stop seq #
            1-Jun-93, RDB, Made start and stop fields in structure longs
   9-oct-93, JRL, Changed to use rd_tfile
   5-nov-93, JRL&HSH, Added timing information.
  28-Jan-95, JRL, Added queue, beep, and noflash keywords


mk_week1_file $SSW/yohkoh/gen/idl/reformat/mk_week1_file.pro
[Previous] [Next]
NAME:
	mk_week1_file
PURPOSE:
	Make the Yohkoh formated files for:
			GRO/BATSE event log file (GBE)
			Nobeyama event log file (NEL)
 CALLS: ***
	GBO_STRUCT [1], GBO_STRUCT [2], GEN_STRUCT [1], GEN_STRUCT [2], GET_NBYTES
	OBS_STRUCT [1], OBS_STRUCT [2], OPEN_DA_FILE, RD_NEL_RAW, WRT1P_FH, int2secarr [1]
	int2secarr [2], rd_gbe_raw, rdwrt [1], rdwrt [2], rdwrt [3]
 CALLED BY:
	mk_gbe
HISTORY:
	Written 19-Apr-93 by M.Morrison


mk_week_file [1] $SSW/yohkoh/gen/idl/atest/mk_week_file.pro
[Previous] [Next]
NAME:
	mk_week_file
PURPOSE:
	Generate a weekly file.  Files that can be generated are GXT, G6D, 
	G7D (GOES light curve), GOL, GBL, OSP/OSF/OBD/OWH files.
SAMPLE CALLING SEQUENCE:
	mk_week_file, 'gxt', infil
	mk_week_file, 'g6d', week=week
	mk_week_file, 'g7d', week=week, /append, /usefid
INPUT:
	prefix	- The prefix is required.  It must be one of the following:
				
				GXT, G6D, G7D, G6DF, G7DF, G71,G75,G61,G75
				GOL
				GBL
				OBD, OSF, OSP, OWH
				NTS
				ATR, ATT
				GUF
OPTIONAL INPUT:
	infil0	- A string array with a list of the input file names.
		  It should include the directory path.  
		  The inputfiles can be derived if the "week" option is used.
	outfil	- The output filename to create.  The output
		  file can be derived if the "week" option is used
 CALLS: ***
	ADA2ATR, ATT_STRUCT [1], ATT_STRUCT [2], BREAK_FILE [1], BREAK_FILE [2]
	BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2]
	GBO_STRUCT [1], GBO_STRUCT [2], GEN_STRUCT [1], GEN_STRUCT [2], GET_NBYTES
	Int2Ex [1], Int2Ex [2], MK_GOL_STR, OBS_STRUCT [1], OBS_STRUCT [2], OPEN_DA_FILE
	RD_GOESTEK, RD_NTS_RAW, REF_STRUCT, Rd_NewOrb_p [1], Rd_NewOrb_p [2]
	Rd_Pointer [1], Rd_Pointer [2], Rd_Roadmap [2], Rd_fHeader [1], Rd_fHeader [2]
	Rd_fHeader [3], SELSIS2FID, WRT1P_FH, anytim2ex [1], anytim2ex [2]
	anytim2ints [1], anytim2ints [2], break_file [4], concat_dir [4], data_chk [1]
	data_chk [2], ex2fid [1], ex2fid [2], ex2week [1], ex2week [2], fid2ex [1]
	fid2ex [2], file_exist [1], file_exist [3], file_list [1], file_list [2]
	finddir [1], finddir [2], fmt_tim [1], fmt_tim [2], gt_day [1], gt_day [2]
	is_member [1], is_member [2], mk_obs_str, pr_week2tim [1], pr_week2tim [2]
	rd_gbl_raw [1], rd_gbl_raw [2], rd_goes3sec [1], rd_goes3sec [2], rd_goes_fits
	rd_guf_ascii, rd_gxd [1], rd_gxd [2], rd_gxd [3], rd_roadmap [1], rd_sxtgoes
	rd_week_file [1], rd_week_file [2], rd_week_file [3], rd_week_file [4]
	rdwrt [1], rdwrt [2], rdwrt [3], str2number [1], str2number [2], str_copy_tags [1]
	str_copy_tags [2], str_copy_tags [3], str_copy_tags [4], str_replace [1]
	str_replace [2], tbeep [1], tbeep [2], tbeep [3], tim2orbit [1], tim2orbit [2]
	timeavg [1], timeavg [2], timegrid, week2ex [1], week2ex [2], where_arr [1]
	where_arr [2]
 CALLED BY:
	goes3sec_copy, mk_gxt, mk_obs, nts_copy [1], nts_copy [2]
OPTIONAL KEYWORD INPUT:
	week	- a string with the year/week if the format
		  91_49 where 91 is the year, 49 is the week
	append	- If set, try to just append the files in "infil"
		  list which are not already in the output file.
	usefid	- If set, use the FID time in the orbit pointer
		  (so that it can be recognized when used with
		  the /append switch)
	indir	- The input directory
	outdir	- The output directory
	same_week - If set, then only select the files with the same
		  week
	mo_append-If set, then the input file list is a new separate
		  list which have no names in common with the previous
		  list and all files in the list should be appended
		  without checking for duplicates.
RESTRICTION:
	Cannot use /USEFID or /APPEND option with 'GBL' datatype
HISTORY:
	Written 13-Apr-93 by M.Morrison
	14-Apr-93 (MDM) - Expanded to handle GBL
	20-Apr-93 (MDM) - Expanded to handle GOL
	21-Apr-93 (MDM) - Expanded to handle OBD, OSF, OSP, OWH
			- Added keyword option /SAME_WEEK
			- Renamed from MK_GX to MK_WEEK_FILE
	 7-May-93 (MDM) - Allowed 300 orbit entries for GBL files
	13-May-93 (MDM) - Expanded to handle NTS
	14-May-93 (MDM) - Made NTS files not have fixed record sizes
	18-May-93 (MDM) - Modifed the raw GBL input file name
	19-May-93 (MDM) - Modified to remove the copy of the data file
			  which was moved to the scratch directory for the
			  cases when /APPEND is used, but there are no
			  new datasets to append.
	16-Jul-93 (MDM) - Expanded to handle ATR files
V1.01	17-Jul-93 (MDM) - Added /MO_APPEND option
V1.02  17-Jul-93 (MDM) - Corrected selection of the week number during
			  automatic generation of the output file name
V1.03  17-Jul-93 (MDM) - Added logging of the reformatter version for ATR and OBS
			  as well as logging ADA2ATR version number
V1.04	 4-Oct-93 (MDM) - Corrected error which was causing NTS generation not
			  to work
V1.05	 8-Oct-93 (MDM) - Corrected for case where there are no Roadmap datasets
			  in the input files (makes it hard to define the output file)
V1.06	13-Oct-93 (MDM) - Added capability of generating the G6D and G7D files
			  from the GOES FITS files (G6DF, G7DF)
			- Added /QSTOP option
	 8-Nov-93 (MDM) - Added /CD to FILE_LIST call for NTS making
	15-Nov-93 (MDM) - Modification because of fluke error with no datasets in
			  the middle file (used for determining the week ID)
	 3-Jan-94 (SLF) - allow weeks with 1 day (94_01)
        8-Mar-94 (SLF) - expanded to handle GUF (Ulyssses Ephemeris)
	12-Jul-94 (MDM) - Modified to use FREE_LUN instead of CLOSE
V1.07	 8-Dec-94 (MDM) - Modified to use a larger NEW_ORBP structure which
			  allowed the FILEID to be saved separate from the
			  .TIME and .DAY to figure out when to do an append.
			  Perviously, the pointers were being messed up 
			  when there was overlap of time periods between
			  data files.
V1.08	 8-Dec-94 (MDM) - Further modification.  Flag when a file is fully
			  contained within
	17-Jan-95 (MDM) - Removed redundant code
			- Added debug print statement
			- Patched case for ATR creation with /append option
			  ("last_tim" was not being defined)
V1.081	17-Jan-95 (MDM) - Add "last_tim" logic to MK_OBS_STR too
V1.09	25-Jan-95 (MDM) - Corrected anomaly which was causing a problem when
			  /APPEND is used, but the files are out of order so
			  it must remake the whole file, but "last_tim" was
			  remaining set and not including all of the previous
			  files
V1.091	26-Jan-95 (MDM) - Modified G6DF and G6DF input file calculated name
V1.092 29-aug-95 (SLF) - Add GOES averages (g61/g71/g65/g75)
V1.093 11-sep-95 (SLF) - Add SXG (sxt/goes xray log)
V1.094 27-jan-96 (SLF) - eliminate hard coded path
			  (/yd8/goes3sec_raw -> concat_dir('$ydb_raw','goes3sec_raw') )
V1.095  1-apr-96 (SLF) - GOES 8 and 9, G8D/G9D/G81/G85/G91/G95
V1.096  22-dec-97(SLF) - GOL update
                         G0D,G01,G05
V1.1     9-Apr-2003 (SLF) - Add GOES 12 hooks (G2D, G21, G25)


mk_week_file [2] $SSW/yohkoh/gen/idl/reformat/mk_week_file.pro
[Previous] [Next]
NAME:
	mk_week_file
PURPOSE:
	Generate a weekly file.  Files that can be generated are GXT, G6D, 
	G7D (GOES light curve), GOL, GBL, OSP/OSF/OBD/OWH files.
SAMPLE CALLING SEQUENCE:
	mk_week_file, 'gxt', infil
	mk_week_file, 'g6d', week=week
	mk_week_file, 'g7d', week=week, /append, /usefid
INPUT:
	prefix	- The prefix is required.  It must be one of the following:
				
				GXT, G6D, G7D, G6DF, G7DF, G71,G75,G61,G75
				GOL
				GBL
				OBD, OSF, OSP, OWH
				NTS
				ATR, ATT
				GUF
OPTIONAL INPUT:
	infil0	- A string array with a list of the input file names.
		  It should include the directory path.  
		  The inputfiles can be derived if the "week" option is used.
	outfil	- The output filename to create.  The output
		  file can be derived if the "week" option is used
 CALLS: ***
	ADA2ATR, ATT_STRUCT [1], ATT_STRUCT [2], BREAK_FILE [1], BREAK_FILE [2]
	BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2]
	GBO_STRUCT [1], GBO_STRUCT [2], GEN_STRUCT [1], GEN_STRUCT [2], GET_NBYTES
	Int2Ex [1], Int2Ex [2], MK_GOL_STR, OBS_STRUCT [1], OBS_STRUCT [2], OPEN_DA_FILE
	RD_GOESTEK, RD_NTS_RAW, REF_STRUCT, Rd_NewOrb_p [1], Rd_NewOrb_p [2]
	Rd_Pointer [1], Rd_Pointer [2], Rd_Roadmap [2], Rd_fHeader [1], Rd_fHeader [2]
	Rd_fHeader [3], SELSIS2FID, WRT1P_FH, anytim2ex [1], anytim2ex [2]
	anytim2ints [1], anytim2ints [2], break_file [4], concat_dir [4], data_chk [1]
	data_chk [2], ex2fid [1], ex2fid [2], ex2week [1], ex2week [2], fid2ex [1]
	fid2ex [2], file_exist [1], file_exist [3], file_list [1], file_list [2]
	finddir [1], finddir [2], fmt_tim [1], fmt_tim [2], gt_day [1], gt_day [2]
	is_member [1], is_member [2], mk_obs_str, pr_week2tim [1], pr_week2tim [2]
	rd_gbl_raw [1], rd_gbl_raw [2], rd_goes3sec [1], rd_goes3sec [2], rd_goes_fits
	rd_guf_ascii, rd_gxd [1], rd_gxd [2], rd_gxd [3], rd_roadmap [1], rd_sxtgoes
	rd_week_file [1], rd_week_file [2], rd_week_file [3], rd_week_file [4]
	rdwrt [1], rdwrt [2], rdwrt [3], str2number [1], str2number [2], str_copy_tags [1]
	str_copy_tags [2], str_copy_tags [3], str_copy_tags [4], str_replace [1]
	str_replace [2], tbeep [1], tbeep [2], tbeep [3], tim2orbit [1], tim2orbit [2]
	timeavg [1], timeavg [2], timegrid, week2ex [1], week2ex [2], where_arr [1]
	where_arr [2]
 CALLED BY:
	goes3sec_copy, mk_gxt, mk_obs, nts_copy [1], nts_copy [2]
OPTIONAL KEYWORD INPUT:
	week	- a string with the year/week if the format
		  91_49 where 91 is the year, 49 is the week
	append	- If set, try to just append the files in "infil"
		  list which are not already in the output file.
	usefid	- If set, use the FID time in the orbit pointer
		  (so that it can be recognized when used with
		  the /append switch)
	indir	- The input directory
	outdir	- The output directory
	same_week - If set, then only select the files with the same
		  week
	mo_append-If set, then the input file list is a new separate
		  list which have no names in common with the previous
		  list and all files in the list should be appended
		  without checking for duplicates.
RESTRICTION:
	Cannot use /USEFID or /APPEND option with 'GBL' datatype
HISTORY:
	Written 13-Apr-93 by M.Morrison
	14-Apr-93 (MDM) - Expanded to handle GBL
	20-Apr-93 (MDM) - Expanded to handle GOL
	21-Apr-93 (MDM) - Expanded to handle OBD, OSF, OSP, OWH
			- Added keyword option /SAME_WEEK
			- Renamed from MK_GX to MK_WEEK_FILE
	 7-May-93 (MDM) - Allowed 300 orbit entries for GBL files
	13-May-93 (MDM) - Expanded to handle NTS
	14-May-93 (MDM) - Made NTS files not have fixed record sizes
	18-May-93 (MDM) - Modifed the raw GBL input file name
	19-May-93 (MDM) - Modified to remove the copy of the data file
			  which was moved to the scratch directory for the
			  cases when /APPEND is used, but there are no
			  new datasets to append.
	16-Jul-93 (MDM) - Expanded to handle ATR files
V1.01	17-Jul-93 (MDM) - Added /MO_APPEND option
V1.02  17-Jul-93 (MDM) - Corrected selection of the week number during
			  automatic generation of the output file name
V1.03  17-Jul-93 (MDM) - Added logging of the reformatter version for ATR and OBS
			  as well as logging ADA2ATR version number
V1.04	 4-Oct-93 (MDM) - Corrected error which was causing NTS generation not
			  to work
V1.05	 8-Oct-93 (MDM) - Corrected for case where there are no Roadmap datasets
			  in the input files (makes it hard to define the output file)
V1.06	13-Oct-93 (MDM) - Added capability of generating the G6D and G7D files
			  from the GOES FITS files (G6DF, G7DF)
			- Added /QSTOP option
	 8-Nov-93 (MDM) - Added /CD to FILE_LIST call for NTS making
	15-Nov-93 (MDM) - Modification because of fluke error with no datasets in
			  the middle file (used for determining the week ID)
	 3-Jan-94 (SLF) - allow weeks with 1 day (94_01)
        8-Mar-94 (SLF) - expanded to handle GUF (Ulyssses Ephemeris)
	12-Jul-94 (MDM) - Modified to use FREE_LUN instead of CLOSE
V1.07	 8-Dec-94 (MDM) - Modified to use a larger NEW_ORBP structure which
			  allowed the FILEID to be saved separate from the
			  .TIME and .DAY to figure out when to do an append.
			  Perviously, the pointers were being messed up 
			  when there was overlap of time periods between
			  data files.
V1.08	 8-Dec-94 (MDM) - Further modification.  Flag when a file is fully
			  contained within
	17-Jan-95 (MDM) - Removed redundant code
			- Added debug print statement
			- Patched case for ATR creation with /append option
			  ("last_tim" was not being defined)
V1.081	17-Jan-95 (MDM) - Add "last_tim" logic to MK_OBS_STR too
V1.09	25-Jan-95 (MDM) - Corrected anomaly which was causing a problem when
			  /APPEND is used, but the files are out of order so
			  it must remake the whole file, but "last_tim" was
			  remaining set and not including all of the previous
			  files
V1.091	26-Jan-95 (MDM) - Modified G6DF and G6DF input file calculated name
V1.092 29-aug-95 (SLF) - Add GOES averages (g61/g71/g65/g75)
V1.093 11-sep-95 (SLF) - Add SXG (sxt/goes xray log)
V1.094 27-jan-96 (SLF) - eliminate hard coded path
			  (/yd8/goes3sec_raw -> concat_dir('$ydb_raw','goes3sec_raw') )
V1.095  1-apr-96 (SLF) - GOES 8 and 9, G8D/G9D/G81/G85/G91/G95


mk_ydb_list $SSW/yohkoh/ucon/idl/slater/mk_ydb_list.pro
[Previous] [Next]
   Name: mk_ydb_list

   Purpose: Write out a ydb file list

   Input Parameters:
	ydbdir - 

   Optional Keyword Parameters:

   Calling Sequence:
	mk_ydbtape ,dev=dev
      
 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], POPD, PUSHD, break_file [4]
	curdir [1], curdir [2], file_append [1], file_append [2], file_info2 [1]
	file_info2 [2], get_logenv [1], get_logenv [2], rd_tfile [1], rd_tfile [2]
	rem_elem [1], rem_elem [2]
 CALLED BY:
	mk_ydbtape [1], mk_ydbtape [2]
   History: 06-Mar-96 - GLS


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

    Purpose: make table of Yohkoh data base sizes

    Optional Keyword Paramters:
       extrap - date to extrapolate size information to.
                uses acutal file size averages for computation

    Calling Sequence:
       mk_ydbtab [EXTRAP='date']

 CALLS: ***
	anytim2ints [1], anytim2ints [2], file_append [1], file_append [2], get_host [1]
	get_host [2], get_logenv [1], get_logenv [2], get_ydbhelp [1], get_ydbhelp [2]
	get_yo_dates [1], get_yo_dates [2], get_yo_dates [3], gt_day [1], gt_day [2]
	rem_elem [1], rem_elem [2], str_replace [1], str_replace [2], where_arr [1]
	where_arr [2]
    History:
       ~20-Dec-93 (SLF) - for Yohkoh Analysis Guide Appendix
        25-Jun-94 (SLF) - Add EXTRAP keyword and function


mk_ydbtape [1] $SSW/yohkoh/gen/idl/tape/mk_ydbtape.pro
[Previous] [Next]
   Name: mk_ydbtape

   Purpose: generate a directory listing file and make tar tape

   Input Parameters:

   Optional Keyword Parameters:
	dev - tape drive number (default=0)
	exclude - String arr list of environmentals to exclude.  If
		  this parameter is passed then mk_tar_dir is forced.
       mk_tar_dir - If set call mk_ydb_list to create the tar list file,
		     '$DIR_GEN_TAPECOPY/ydb_yymmdd.01'.  If not set, then
		     use the existing file list,
		     '$DIR_GEN_TAPECOPY/ydb_file_list'.
       no_exec - Only ceate file list.  Do not spawn tar commands

   Calling Sequence:
	mk_ydbtape [,dev=dev, exclude=exclude, env_file=env_file, $
		    mk_tar_dir=mk_tar_dir, /no_exec]
      
 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], break_file [4], concat_dir [4], def_tapd [1], def_tapd [2]
	def_tapd [3], ex2fid [1], ex2fid [2], file_append [1], file_append [2]
	get_host [1], get_host [2], get_logenv [1], get_logenv [2], mk_ydb_list, prstr [1]
	prstr [2], rd_tfile [1], rd_tfile [2], rem_elem [1], rem_elem [2], strjustify
	syst2ex [1], syst2ex [2], syst2ex [3]
   History: 06-Mar-96 - GLS - Using mk_ydbtape as template

   Restrictions - one level down for now 


mk_ydbtape [2] $SSW/yohkoh/ucon/idl/slater/mk_ydbtape_new.pro
[Previous] [Next]
   Name: mk_ydbtape

   Purpose: generate a directory listing file and make tar tape

   Input Parameters:

   Optional Keyword Parameters:
	dev - tape drive number (default=0)
	exclude - String arr list of environmentals to exclude.  If
		  this parameter is passed then mk_tar_dir is forced.
       mk_tar_dir - If set call mk_ydb_list to create the tar list file,
		     '$DIR_GEN_TAPECOPY/ydb_yymmdd.01'.  If not set, then
		     use the existing file list,
		     '$DIR_GEN_TAPECOPY/ydb_file_list'.
       no_exec - Only ceate file list.  Do not spawn tar commands

   Calling Sequence:
	mk_ydbtape [,dev=dev, exclude=exclude, env_file=env_file, $
		    mk_tar_dir=mk_tar_dir, /no_exec]
      
 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], MK_YDBTAPE_NEW, break_file [4], concat_dir [4], def_tapd [1]
	def_tapd [2], def_tapd [3], ex2fid [1], ex2fid [2], file_append [1]
	file_append [2], get_host [1], get_host [2], get_logenv [1], get_logenv [2]
	mk_ydb_list, prstr [1], prstr [2], rd_tfile [1], rd_tfile [2], rem_elem [1]
	rem_elem [2], strjustify, syst2ex [1], syst2ex [2], syst2ex [3]
   History: 06-Mar-96 - GLS - Using mk_ydbtape as template

   Restrictions - one level down for now 


mkdirst $SSW/yohkoh/gen/idl/tape/mkdirst.pro
[Previous] [Next]
	Name:
		mkdirst
	PURPOSE:
		Create data-structures for the SXT-Archive-Tape
		Directory File (SATDF) also known as the files 
		with file prefixes xbd (binary) and xad (ascII).

	Input Parameters:
    		tar_str - structure array with file names and size
		mktapverno - mktap ver. # for data structure.
	Output Parmaters:
		arch_hdrec	logical header structure for yohkoh 
				archive tape header.
		arch_drec	logical data structure record for 
				tracking cpio.
 CALLS: ***
	MAKE_STR [1], MAKE_STR [2]
 CALLED BY:
	Rd_TapDir, TapDir, rd_dsktapdir
	HISTORY:
		written 24-Oct-91, GAL
		update 14-Feb-92 for longer tapename and more spares.
		update 17-Feb-92 added wklst which contains a list of
			prefixes for the weekly files.
		update 11-Jun-93 added mktapverno to formal parameter
			list and checks to the ver#(6).  Increased 
			wkprelst to 80 from 40, wkextlst to 20
			from 10, and added 10 more spares to the 
			size fields in the data-record.


MkFnMapMake Filename Map $SSW/yohkoh/gen/idl/dbase/mkfnmap.pro
[Previous] [Next]
	Name:
		MkFnMap	(Make Filename Map)
	Purpose:
		Create a record (fnMap) of the data to be 
		extracted from reformatted data files.
	CALLING SEQUENCE:
		err = MkFnMap([fidmap=map, fnMap=fnMap])
	Input/Keyword:
		map	search keys, input times, file prefix, file ids,
			and fidmap.
	Output/keyword:
		fnMap	a copy of the 1st half of the fidmap plus a
			file name map for data indices.
	Returned:
		MkFnMap	returns error status values:
			0 is failure
			1 is success
 CALLS: ***
	ARR2STR [1], Arr2Str [2], CreFn, MAKE_STR [1], MAKE_STR [2], MKFNMAP, MkInsArr
	STR2ARR [1], STR2ARR [2], Strs2Mat
	History:
		written by GAL 25-June-91
		27-June, extended to give valid indices for correct
		file prefixes.


MkInsArr $SSW/yohkoh/gen/idl/dbase/mkinsarr.pro
[Previous] [Next]
	Name: 
		MkInsArr
	Purpose:
		Create the user selected instrument matrix-list.
	CALLING SEQUENCE:
		matrix_list = MkInsArr( w, nfn)
	Input:
		w	string- list of file prefixes
		nfn	number of file ids
	Returned:
		2-dimensional string matrix (nfile ids by 5)
 CALLS: ***
	STR2ARR [1], STR2ARR [2]
 CALLED BY:
	MkFnMapMake Filename Map
	History:
		written 25-June-91 by GAL


mknumat $SSW/yohkoh/gen/idl/movie/mknumat.pro
[Previous] [Next]
	NAME: mknumat
	
	PURPOSE: Enlarge input matrix n times to fill the requested size
		or default size of 512 x 512 and center it without
		distortions.

	Calling SEQUENCE:
		a = mknumat(indata, [xs=345, ys=456, /nocenter], /bigpix)

		a = mknumat(indata) ;a is 512 x 512 with indata centered
		a = mknumat(indata,xs=412)	;a is 412 x 412
		a = mknumat(indata,xs=345,ys=392)
		a = mknumat(indata,/nocenter)	;indata starts in lower
			left

	Input parameters:
		indata		input data matrix to enlarge.
		xsize		output xsize of matrix or n columns
		ysize		output ysize of matrix or n rows
		nocenter	switch to set the no centering option
				of enlarged data within the ret. matrix.
		bigpix		to use pix rep. instead of bilinear smooth
		missing		Set missing values to missing (default = 0)
	Returned:
		matrix of image data.
	LIMITS:
		indata 	can not be an array of images.
 CALLED BY:
	mk_movie [1], mk_movie [2], mk_nvs_movie, mk_ptv_movie, tv_coors
	History: written 17-june-92 (mk512)
		updated 23-june-92, for a requested size output matrix
		updated 23-jul-93, bigpix
	   9-oct-93, JRL, Added the missing keyword


MkstrMap $SSW/yohkoh/gen/idl/dbase/mkstrmap.pro
[Previous] [Next]
	Name:
		MkstrMap
	Purpose:
		create, append, insert, replace, or remove variant 
		string fields within sturtured identifiers.
	CALLING SEQUENCE:
		newStr = MkStrMap(curStr, nfn, [idx=idx, str=str,
			create=create, append=append, insert=insert,
			replace=replace, remove=remove, 
			delimitor=delimitor])
	Input:
		curStr	input string to be modified.
		nfn	number of items within curStr
		idx	item number to be operated on
		str	new item to be added
		TYPE OF OPERATION:
		create	the a new string
		append	str to curStr
		insert	str into curStr at item 'idx' 
		replace item number 'idx' of curStr with str
		remove	delete item 'idx' in curStr
		delimitor is by default ",".
	Returned:
		curStr 	with the requested modification.

	NOTE: The caller should increment 'nfn' if adding to the 
	      number of items and decrement if removing items.
	History:
		test ver created 6-May-91 by GAL


mktap $SSW/yohkoh/gen/idl/tape/mktap.pro
[Previous] [Next]
	NAME:
		mktap
       PURPOSE:
		Create Script file which produces an 8mm archive tape.
	CALLING SEQUENCE:
		mktap, dev, [dataDir='91_50a,91_51a', /nosw, /alldata, $
				/noweek, weekDir='weeklys' ]
 CALLS: ***
	GetDatDir, STR2ARR [1], STR2ARR [2], TAPDIR2, aRCHsCRPT, def_tapd [1], def_tapd [2]
	def_tapd [3], finddir [1], finddir [2], mktap_prep, mktapver, sw_tape, tar_size
	EXAMPLES:
		IDL> mktap		
			will use default tape drive (#0) and ask user for 
			data directory(s) and what files to put on tape.
		IDL> mktap, 1         or   IDL> mktap, '/dev/nrmt1h'
			will use tape drive #1 and ask user for data
			directory(s) and what files to put on tape.
		IDL> mktap, dataDir='91_50a,91_51a' 
			will use default tape drive (#0) and ask user 
			what file to put on tape.
		IDL> mktap, 1, dataDir='91_50a,91_51a', /alldata
			will use tape drive #1 and will archive all data
			within sub-directories 91_50a and 91_51a.
		IDL> mktap, 1, dataDir='91_50a,91_51a', /alldata, /nosw
			same as the above example except that, NO 
			software tar file will be placed on the tape.
		IDL> mktap, 1, dataDir='91_50a,91_51a',/alldata, /noweek
			same as the above example except that, NO
			weekly files will be copied to the data directory
			and the software tar will be copied to tape.

	INPUT:
		dev		name of tape device
		dataDir		Data directory name not full path name.
				Can be a simple string list: '91_50a,91_51a'
		startTime	start time-date of archive
		endTime		end time-date of archive
		defaults	[future] filename of the input defaults
				file to avoid prompts...
		submit		not availabel yet
		nosw		IF SET: write No software tar files.
		weekDir		if set contains the subDir for weekly files.

	HISTORY:
		written 15-Nov-91, by GAL
		updated 7-Feb-92, for weeks split over two or more directorys
		17-Feb-92 added mktap-prep procedure...
		18-Feb-92 many updates: version #, integer input for dev,
			nosw switch that works, documentation in header, etc.
		3-Mar-92, ver-3 update
		4-Mar-92, ver-4 update
		5-Mar-92, all data switch added and file cks moved from
			load_recs to mktap_prep.
		21-Mar-92 (MDM) - Added "tapename" as an output parameter
		18-Apr-92 (GAL) - Added "weekDir" keyword
			weekDir -so weekly files can be in seperate dir.
			does not key off of ada files for creation of data
			archive.
		11-Jun-93 (GAL) - changed max # of tar files to 40 and 
			added 10 to the max # of weekly files in cpio
			archive files. Added ver# formal parameter to 
			tapdir2, mkdirst, and rd_tapdir.


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

   Purpose: prepare directory for mktap

   Input Parameters:
      directory - full data directory (1st if multiple)

   Keyword parameters:
      recover - if set, attempts to recover from various errors 
      noweek  - if set, dont copy weekly files 

 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], GetObsID, POPD, PREFIXCK, PUSHD
	VALID_CHECK, break_file [4], curdir [1], curdir [2], mk_script [1], mk_script [2]
	prstr [1], prstr [2], ref_bad, str_replace [1], str_replace [2]
 CALLED BY:
	mktap
   Side Effects:
	copies OBS,TRN, and PNT files from general area
	deletes old tape directory, mktap_prep  and mktape.com files


   Restrictions: UNIX only (but thats where we will always make tapes)
			    (probably definitely mabey for sure...)

   History: slf, 14-feb-1992
	     slf,  6-mar-1992	added data file checks/logging
				calls to valid_check.pro
	     gal, 15 Apr-92	deletes mktap_prep* files
	     mdm, 18-Apr-92     deleted mktap*.com instead of mktap.com
				patch to file length check code
	     gal, later the same day, patch for a weekDir, added weekDir
	     gal, del old files within weekdir... 22-apr-92
	     mdm, made the spawn to delete the files BEFORE logging the
		  action and make the log file be the first file to delete
	     mdm, 8-Jul-92 Added SDC and SDW to be copied to the reformatter
		  week directory to be backed up to the archive tapes
	     gal, 14-jul-92 Added a "chmod 666" to all newly created files
		  within the reformatter week directory.
	     mdm, 17-dec-92 Added SDC* and SDW* to the list of files to be
		  deleted from the weekdir before copying the new week.
	     mdm, 15-May-93 Added OBD, OSF, OSP, OWH to the list of files
		  to be copied to tape and to be deleted from the directory.
		  Removed OBS
	     mdm, 18-Aug-93, replaced reference to DIR_SXT_DC
	     mdm, 10-Oct-93, Added ATR and ATT files to be backed up
	     mdm, 11-Oct-93, Added ATR and ATT files to be deleted


mktapver $SSW/yohkoh/gen/idl/tape/mktapver.pro
[Previous] [Next]
	NAME: mktapver
	
	PURPOSE: return current version of mktap.
	
 CALLED BY:
	mktap, tar_size
	Note: version # is an INTEGER: with values between 1 and 9000.
	However, it is displayed as a scaled quanity (i.e. ver#/1000.)

		
	HISTORY: written 17-Feb-92, ver=2
		2-Mar-92, update to ver=3, cpio header cal for weekly 
			changed.
		3-Mar-92, update to ver=4, tar_size ret. tar file list
			with 70 bytes instead of 50.
		18-Apr-92, update to ver=5, no longer uses ada files
			make data archive list and has a seperate 
			weekly data directory.
		11-Jun-93, update to ver=6, # of tar files to 40 from
			20 and change in the header to tape dir file on
			wkextlst to 20 from 10 and wkprelst to 80 from
			40, and in the data record adding 10 more spare
			entries.


mlso_reader $SSW/yohkoh/ucon/idl/hudson/mlso_reader.pro
[Previous] [Next]
 NAME:
     mlso_reader
 PURPOSE:
     read MLSO Sun raster files
 CATEGORY:
     Yohkoh
 CALLING SEQUENCE:
     img = mlso_reader(infil, r, g, b)
 INPUTS:
     infil is a string containing identifiers, eg '92*ras'
 OPTIONAL (KEYWORD) INPUT PARAMETERS:
 ROUTINES CALLED
     findfile, read_srf
 OUTPUTS:
     data cube
     r,g,b color table 
 CALLS: ***
	READ_SRF
 COMMON BLOCKS:
 SIDE EFFECTS:
 RESTRICTIONS:
     must be run in the directory containing the data
 MODIFICATION HISTORY:
     HSH written 9 May 1995


MLSO_SYN_READER $SSW/yohkoh/ucon/idl/hudson/mlso_syn_reader.pro
[Previous] [Next]
 NAME:
     MLSO_SYN_READER
 PURPOSE:
     input a binary MLSO synoptic file. See README_BINARY in the
       MLSO documentation for a full description. Don't use their
       IDL code unless you are cleverer than I am.
 CATEGORY:
 CALLING SEQUENCE:
     image = mlso_syn_reader(file)
     image = mlso_syn_reader('1890e1.36', text, /info')
 INPUTS:
     file = string giving file specification
 OPTIONAL (KEYWORD) INPUT PARAMETERS:
     /info lists the data used in the synoptic map
 ROUTINES CALLED
     rd_tfile, vax2sun
 OUTPUTS:
     syn, the (360, 181) integer array
     text, the ASCII tail of the data file 
 CALLS: ***
	rd_tfile [1], rd_tfile [2], vax2sun [1], vax2sun [2]
 COMMON BLOCKS:
 SIDE EFFECTS:
     lists to screen under /info
 RESTRICTIONS:
 MODIFICATION HISTORY:
     HSH, written 10 May 1995


mnr_frm_fix $SSW/yohkoh/gen/galileo/idl/lmsal/mnr_frm_fix.pro
[Previous] [Next]
 NAME:
	mnr_frm_fix
 PURPOSE
	SXT images often have minor frames of data missing.
	Usually these are zeroes.  Occasionally the missing
	minor frames are set to 170 DN.  The purpose of this
	program is to identify these minor frames in SXT
	compressed images and set the 170 values to zero in
	the missing minor frames.
 CALLING SEQUENCE
	mnr_frm_fix,index,data
 INPUT
	index, SXT index structure
	data, raw, compressed, SXT image or data cube
	   (mixed resoutions, image sizes, etc., are OK)
 OUTPUT
	data cube with missinf minor frames set to zero
 RESTRICTIONS
	Only works for sxt_compressed images.
 HISTORY
	30-Jul-2004 LWA
	17-Sep-2004 AkT: adopt for PFI '170' problem.
	19-Sep-2004 AkT: adopt for de_compressed images.
	26-Oct-2004 AkT: adopt for '170' lines with a few spikes. 
	 3-Nov-2004 AkT: output comments simplified. 
 CALLS:
 CALLED BY
	mk_ssc [1], mk_ssc [2], sxt_prep [1], sxt_prep [2], sxt_prep [3]


mo2wks $SSW/yohkoh/gen/idl/mo_disk/mo2wks.pro
[Previous] [Next]
	NAME: mo2wks

	PURPOSE: Get a list of archive tapes contain on a MO side.

	CALLING SEQUENCE:

		tape_weeks = mo2wks( mo_side, [/molabel, /tape, /fid] )

	INPUT:
		mo_side	  requested mo side ex. '014B' or '018a'
		
	OPTIONAL INPUT:
		molabel	  if set will print MO label
		tape	  if set will print MT dev # and archive tape
		fid	  if set will print first and last fids for 
				each tape archive week section.	
				
	OUTPUT:	
		tape_weeks 	list of weeks for that mo side

 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], UNIQ [1], UNIQ [2], UNIQ [3]
	concat_dir [4], def_tapd [1], def_tapd [2], def_tapd [3], restgen [1], restgen [2]
	wmenu_sel [1], wmenu_sel [2]
	HISTORY:
		10-Apr-93, written by gal
		16-Apr-93, added fid switch for to print 1st and last
			file ID on each week.
		18-May-93, added label switch


mo_check $SSW/yohkoh/gen/idl/mo_disk/mo_check.pro
[Previous] [Next]
   Name: mo_check

   Purpose: verifiy MO integrity (all files included, proper size, readcheck)

   Input Parameters:
      monode - Node with MO driver (string), Example: 'flare15'
      moname - Name of MO to check (string), Example: '109B'

   Output Parameters:
      badtot  - number of bad files on mo
      summary - Text summary of MO status
 
   Optional Keyword Parameters:
      drive   -  drive number (default is drive 0)
      readchk - if set, read checks of all MO files are performed
		 (via yo_file_check) - default is to confirm existance $ size

 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_STAT [1], FILE_STAT [2]
	STR2ARR [1], STR2ARR [2], UNIQ [1], UNIQ [2], UNIQ [3], concat_dir [4], data_chk [1]
	data_chk [2], diskfree [1], diskfree [2], fid2ex [1], fid2ex [2], file_append [1]
	file_append [2], file_stat [3], fmt_tim [1], fmt_tim [2], get_afile_size [1]
	get_afile_size [2], get_host [1], get_host [2], get_user [1], get_user [2]
	momount, rd_modb, rd_tfile [1], rd_tfile [2], str_perm, tbeep [1], tbeep [2]
	tbeep [3], tim2orbit [1], tim2orbit [2], timegrid
 CALLED BY:
	mk_mo2 [1], mk_mo2 [2]
   History:
      1-Jul-1994 (SLF)
      4-Jul-1994 (SLF) Made functional, add bad logs, etc.
      6-Jul-1994 (slf) Version 2 log (only write bad files to 'bad' logs)
			So, mochk_NNNX.02 has diagnostics
			    mochk_bad.NNNX contains bad file list
      7-Jul-1994 (slf) Use timegrid.pro to generate time grid 
      8-Jul-1994 (slf) add output SUMMARY (text) and badtot (number bad)
			trim fid array (sometimes took the extreme)
     10-Jul-1994 (slf) Truncate summary file and output to minimize garbage
			(full listing is maintained in 'mochk_bad.xxxN')  
     14-Sep-1994 (slf) add ada to prefix list!
      3-Oct-1995 (LS)  modified code to work with new output of momount.pro,
			 which changed when it started using mo_mount


mo_filelist $SSW/yohkoh/gen/idl/mo_disk/mo_filelist.pro
[Previous] [Next]
   Name: mo_filelist

   Purpose: return files found on currently mounted mos

   Calling Sequence:
      files=mo_filelist( /dest, prefix='SSS')

   History:
      9-Dec-1994 (SLF) 

 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], STR2ARR [1], STR2ARR [2]
	concat_dir [4], file_list [1], file_list [2], get_logenv [1], get_logenv [2]
	str_perm
   Restrictions:
      uses environnmentals MO_SOURCE and MO_DEST so assumes those are
      defined at your site...


mo_fndirck $SSW/yohkoh/gen/idl/mo_disk/mo_fndirck.pro
[Previous] [Next]
	NAME: mo_fndirck

	PURPOSE: Check the on-line weekly directory for the first and
		last file-id (fid) defined by the selected index to
		the MO disk map.

	In too much of a hurry to do other header stuff.
 	
 CALLS: ***
	rd_modb, uniq_fid [1], uniq_fid [2]
 CALLED BY:
	mk_mo2 [1], mk_mo2 [2]
	History:
	


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

   Purpose: initialize one or more mo disks

   Input Parameters:
      drive - optional drive number (default is drive 0)

   Keyword Parameters:
      override - if set, override check for user (root) and host

	old	- passes flag to mo_prep
		  used for formatting old (1Gb MOs)
		  if /old flag is not present, will default to higher density

   Calling Sequence:
      [Log in as root on one of the hosts in defined hosts list]
      mo_init [,drive] [,/old]

 CALLS: ***
	MORE [1], MORE [2], get_host [1], get_host [2], mo_prep, tbeep [1], tbeep [2]
	tbeep [3]
   History:
      4-Feb-1994 (SLF)
        26-June-95 (GAL), added 18 and 15
	  3-Oct-95 (LS), added all flare MO machines in motab
	 18-Oct-95 (LS), added /old option.  see mo_prep


mo_init [2] $SSW/yohkoh/gen/idl/mo_disk/mo_init.pro
[Previous] [Next]
   Name: mo_init

   Purpose: initialize one or more mo disks

   Input Parameters:
      drive - optional drive number (default is drive 0)

   Keyword Parameters:
      override - if set, override check for user (root) and host

	old	- passes flag to mo_prep
		  used for formatting old (1Gb MOs)
		  if /old flag is not present, will default to higher density

   Calling Sequence:
      [Log in as root on one of the hosts in defined hosts list]
      mo_init [,drive] [,/old]

 CALLS: ***
	MORE [1], MORE [2], get_host [1], get_host [2], mo_prep, tbeep [1], tbeep [2]
	tbeep [3]
   History:
      4-Feb-1994 (SLF)
        26-June-95 (GAL), added 18 and 15
	  3-Oct-95 (LS), added all flare MO machines in motab
	 18-Oct-95 (LS), added /old option.  see mo_prep


mo_job0 $SSW/yohkoh/ucon/idl/slater/mo_job0.pro
[Previous] [Next]
   Name: mo_job0

   Purpose: mo job driver 

   19-aug-95 (gls) - slight mod of slf's mojob
 CALLS:


mo_job1 $SSW/yohkoh/ucon/idl/slater/mo_job1.pro
[Previous] [Next]
   Name: mo_job1

   Purpose: mo job driver 

   19-aug-95 (gls) - slight mod of slf's mojob
 CALLS:


mo_patch $SSW/yohkoh/gen/idl/mo_disk/mo_patch.pro
[Previous] [Next]
   Name: mo_patch

   Purpose: use mo_check bad log to patch an MO disk from exabyte

   Calling Sequence:
      mo_patch, moname, monode [modev=modev , tapdev=tapdev, mag_stage=mag_stage]

   Calling Example:
      mo_patch,'038a','flare4'		     ;  tapd0 -> flare4 mod0

      mo_patch,'043a','flare13', mod=1, tapd=1 ; tapd1 -> mod1

 CALLED BY:
	mk_mo2 [1], mk_mo2 [2]
   History:
      7-Jul-1994 (SLF) Written
      8-Jul-1994 (SLF) Mods - placed online
      9-Jul-1994 (SLF) upgraded auto-mail message, mt offline in background, 
			Verify staged (input) valid (or abort),  RECURSE!!
     12-Jul-1994 (SLF) Mail to executing user only, change output file
			generation
     13-Jul-1994 (SLF) use str2cols for names, add directory create/chmod
     18-sep-1994 (SLF) file delete & chmod protection...

 CALLS: ***
	ARR2STR [1], Arr2Str [2], CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3]
	FILE_EXIST [2], FILE_STAT [1], FILE_STAT [2], RdTap [1], RdTap [2], RdTap [3]
	STR2ARR [1], STR2ARR [2], UNIQ [1], UNIQ [2], UNIQ [3], concat_dir [4], data_chk [1]
	data_chk [2], def_tapd [1], def_tapd [2], def_tapd [3], file_append [1]
	file_append [2], file_exist [1], file_exist [3], file_stat [3]
	get_afile_size [1], get_afile_size [2], get_host [1], get_host [2]
	get_logenv [1], get_logenv [2], get_user [1], get_user [2], is_member [1]
	is_member [2], mail [1], mail [2], mtcmd [1], mtcmd [2], prstr [1], prstr [2], rd_modb
	rd_tfile [1], rd_tfile [2], rsh, set_logenv [1], set_logenv [2], str2cols [1]
	str2cols [2], str_replace [1], str_replace [2], tbeep [1], tbeep [2], tbeep [3]
	yo_file_check [1], yo_file_check [2]
   Side Effects:
      Data on MO disk may be changed (it should only get better, not worse...)

   Restrictions:
      Must be run on a machine with a tapedrive (isass0, isass2, flare2)


mo_prep $SSW/yohkoh/gen/idl/mo_disk/mo_prep.pro
[Previous] [Next]
	NAME: mo_prep
	
	PURPOSE: prepare mo for archiving.

	CALLING SEQUENCE:

	mo_prep, mo_node, /init, /tune, /mount, /umount, /mkdir='002B', /old

 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], UNIQ [1], UNIQ [2], UNIQ [3]
	concat_dir [4], diskfree [1], diskfree [2], is_alive [1], is_alive [2], momount
	restgen [1], restgen [2], tbeep [1], tbeep [2], tbeep [3], wmenu_sel [1]
	wmenu_sel [2]
 CALLED BY:
	mk_mo, mk_mo2 [1], mk_mo2 [2], mo_init [1], mo_init [2]
	Examples:
		mo_prep, 'flare15', 0, /mount 	;mount /mo/flare15.0	
		mo_prep, 'flare15', 1, /umount	;unmount /mo/flare15.1
		
	INPUT:	
	mo_node	name of node with mo device (eg 'flare15' or 'flare13').
	mo_dev	mo device number (eg. 0 or 1)
	OPTIONAL INPUT:
	mount	if set will mount mo
	umount 	if set will umount mo
	mkdir	if set will make the directories assoicated with 
		the SELECTED mo#: The mo# is slected via
		a) menu of MO of sides (interactive mode).
		b) At the caller via mkdir ='000B'. 
		NOTE: The week directories are check for and if they
		exist they are not re-created (important feature for
		updating MOs)!
	qdebug	if set will display spawn commands but will not do
		actually do anything.
	old	if set will format MO to low density (1Gb)=448Mb/side
		otherwise, will format high density (1.2Gb)=577Mb/side
		
	THE FOLLOWING OPTIONS HAVE BEEN MOVED TO a NEW routine: MO_INIT
	init	if set will run mkfs to max. MO space useage
	tune	if set will reduce the free space threshold to 0%. 
		(Note: use either tune or init but NOT both!!)

	OUTPUT:
	mo_disk	The "top" mo directory name or mount point.
	wks	List of weeks that belong on selected MO.
	mo_no	Selected indices to the MO disk map.


	HISTORY: written 8-apr-93, gal
		updated 16-apr-93, gal, Use "mocreate" account
		updated 30-Apr-93, gal, Add debug option 
		updated 17-May-93, gal, Updated MO mount command for
			writing to MO and add a tune switch.
		updated 21-May-93, gal, corrected dir. ck "rsh" cmd
			and changed the mkdir and chd_mod cmd to work
			in "rsh" commands so the host does not have
			to have the mo locally mounted.
		updated 26-May-93, mdm, changed logic on recognizing when
			an error occurs on the rsh command
		updated  1-Feb-94, gls,slf (use momount, reinstate /innit)
			 2-Feb-94 - if init, dont use rsh command 
			 rsh mo_node -l mocreate (ultrix) 
			     mo_nod -l mocreate (others)
		updated 10-Feb-94, gal, corrected a bug in the rcmd 
		updated 25-Feb-94, gal, minor update includes document.
                       24-Jun-94, slf, use is_alive, blank between rsh and node
			26-Jun-94, slf, make sure mo is REALLY  mounted
				   (sanity check on disksize and mount name)
		updated 3-Oct-95, LS, changed path to new mo_mount
					style /mo/flareN.X
               updated 18-Oct-95, LS, added /old flag to call.  this will
                        allow formatting of the lower 1Gb MOs.  otherwise,
                        formatting will default to the higher density 1.2Gb



mo_tap_dump $SSW/yohkoh/gen/idl/mo_disk/mo_tap_dump.pro
[Previous] [Next]
	NAME: mo_tap_dump

	PURPOSE: Dump MO archive file from 8mm Yohkoh archive tape.

	sorry no time for other stuff
	History; written 21-May-93
		26-May-93, changed Tape dump dir. to type "m" from
			type "t". 

 CALLS:
 CALLED BY
	mk_mo2 [1], mk_mo2 [2]


mobad_summ $SSW/yohkoh/gen/idl/mo_disk/mobad_summ.pro
[Previous] [Next]
   Name: mobad_summ

   Purpose: produce summary listing of mo_check logs

   Calling Sequence:
      mobad_summ [,/hc]

 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], DPRINT, concat_dir [4]
	file_append [1], file_append [2], file_list [1], file_list [2], get_user [1]
	get_user [2], prstr [1], prstr [2], rd_modb, rd_tfile [1], rd_tfile [2]
	rem_elem [1], rem_elem [2], str2cols [1], str2cols [2], strsplit
   History:
      7-Jul-1994 (SLF) Written


mod_res $SSW/yohkoh/sxt/idl/util/mod_res.pro
[Previous] [Next]
NAME:
	mod_res
PURPOSE:
	Rebin SXT partial or full frame images, and keep track
	of the corner pixel and resolution in the history records.
	The signal is adjusted accordingly to conserve the total
	charge.
SAMPLE CALLING SEQUENCE
	data_out = mod_res(index, data, index_out)
	data_out = mod_res(index, data, index_out, outres=2)
	data_out = mod_res(index, data, index_out, factor=0.429)
INPUT:
	index	- The SXT index record
	data	- The data image or data cube.  The data must already be 
		  decompressed AND background subtracted.  The output
		  data type is the same as the input.
OUTPUT:
	index_out- The updated SXT index record
	data_out- The rebinned data
 CALLS: ***
	CONGRID [1], CONGRID [2], CONGRID [3], gt_corner, gt_pfi_ffi, gt_res, gt_shape
	his_index, tbeep [1], tbeep [2], tbeep [3]
 CALLED BY:
	RD_AR, align1img [1], align1img [2], ext_subimg2, mk_coal_movie, wl_process
OPTIONAL KEYWORD INPUT:
	outres	- The output resolution to rebin to.  Default is
		  full resolution.  0=FR, 1=HR, 2=QR
	factor	- The multiple of FR pixels that the image should
		  be rebinned to.  FACTOR=0.6 means make the pixels
		  0.6 FR is size (2.45*0.6 = 1.47 arcseconds).
		  This should only be used if it "outres" cannot be used
	norm_fact - If set to 1, then do not normalize the signal level
		  for the number of pixels binned/spread.
		  The default is to divide by the number of pixels that
		  the charge is being spread into.
		  For example, when going from HR to FR the signal is
		  from one pixel is spread into 4 pixels.  The default
		  is to divide the signal by 4.  /NORM_FACTOR will 
		  leave the signal as is.
		  If set to 2, then normalize by the sqrt(# pixels
		  the charge is spread into.  For the example above,
		  divide the signal by 2.  This is used for the handling
		  the uncertainty arrays.
METHOD:
	It uses CONGRID when going to higher resolutions (simply
	duplicates the pixel the proper number of time) and it uses
	SXT_SUMXY for binning to lower resolutions (bin the pixels
	accordingly)

	For full resolution images, it shifts the image by the number
	of columns necessary to align the image properly.

	Replaces CHANGE_RES
HISTORY:
	Written 13-Aug-93 by M.Morrison
	26-Aug-93 (MDM) - Added /UPDATE_INDEX
	16-Sep-93 (MDM) - Added NORM_FACTOR option
	16-Nov-93 (MDM) - Small patch for case where there is no resolution
			  change
	18-Nov-93 (MDM) - Thrashing around - fixed a problem which was not a problem
			  - reversed it back to the original
	13-Mar-95 (MDM) - Corrected anomaly where .SHAPE_SAV did not match
			  the data array


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

 PURPOSE: For fitting a unique value to a set of data using histograms.
           

 METHOD: A histogram is performed on the data, and the results are 
	  fitted with a guassian, the center-value of which is taken		
	  as the best fit to the data. When there are less than four
         values the cases are handled specially, as the guassian fit
	  won't converge. For a unigue value, that is simply past back,
	  for 2 or 3 values a weighted average is taken.

	  In order to use with data where you want a binsize less than
	  1, you must first scale up the data.

 CALLED BY:
	area_mean
	  Note: the sigma value is that defined by IDL convention.


 CALLING SEQUENCE: mean=mode_fit(data[,binsize=2][,/second][,fit=gauss]
                   			          [,/display])

 PARAMETERS:	data		input vector 
          

 KEYWORDS: 	binsize		sets the size of the histogram bin
				default is 1.0, this is also the minimum.

		second		when set does a second pass using data
				within 3 sigma of the peak value

		display  	when set display the histogram and fit.

		fit		a three vector with peak value, peak 
				location and sigma value.

 CAUTIONS: Dosn't work well on histograms with many discrete spikes.

 CALLS: ***
	GAUSSFIT2, new_win
 HISTORY: cut out as seperate routine, June 1 1993, A. McAllister


model_spec $SSW/yohkoh/ucon/idl/acton/sxt_model_dem.pro
[Previous] [Next]
 NAME:
	model_spec
 PURPOSE
	To compute, for a model DEM, the temperature, emission measure and
	x-ray irradiance within a specified wavelength band that would be 
	derived from an SXT 2-filter observation.  The "true" x-ray
	irradiance calculated from DEM is output for comparison.
 CALLING SEQUENCE
   sxt_model_dem,dem,tlog,filters,date=date,short=short,long=long, $
        te_sxt,em_sxt,xlum_sxt,xlum_dem,spec_dem=spec_dem,nu_dem=nu_dem, $
        debug=debug,plot=plot,no_dem_norm=no_dem_norm
   sxt_model_dem,dem,tlog,[2,3]
 INPUTS
	dem 	= log10(DEM distribution) [Units: 10^44/cm^3/MK]
	          {Unless you use /no_dem_norm the program normalizes
                 the total DEM to 1.0 to negate over/underflow problems.}
	tlog	= vector of the log10(T) [Units:  K]
	filters = numbers of SXT analysis filter pair (MUST BE A VECTOR)
			#   Filter    area.filter designation
         		1   Open       		0
         		2   Al.1       		1
         		3   AlMg       		2
         		4   Be119      		5
         		5   Al12       		4
         		6   Mg3        		3
 OPTIONAL INPUT KEYWORDS:
   date     = 'date' in the standard format to account for change
               in entrance filter transmission in November 1992.
   short    = short wavelength (Angstrom), default = 1
   long     = long wavelength (Angstrom), default = 300
   spec_dem = spectral array for prscribed DEM,
	       input to save time for subsequent runs with the same DEM.
   nu_dem   = switch to force run with new DEM, i.e., /nu_dem.
   plot     = plot synthesized spectra
   debug    = /debug to stop inside program at end to examine variables.
   no_dem_norm  = /no_dem_norm to NOT normalize DEM to 1 cm^-3.
 OUTPUTS
	te_sxt	= temperatured derived from simulated SXT observation.
	em_sxt	= emission meax.  "      "      "      "       "
	xlum_sxt= alog10(x-ray luminosity from SXT)
	xlum_dem= alog10(x-ray luminosity calculated from DEM)
 OPTIONAL KEYWORD OUTPUT
	spec_dem = synthesized spectrum for the input DEM.
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], DOC_LIBRARY, SXT_MODEL_DEM
	SXT_TEEM1 [1], SXT_TEEM1 [2], SXT_TEEM1 [3], concat_dir [4], gt_filtb
	mewe_spec [1], mewe_spec [2], restgen [1], restgen [2]
 RESTRICTIONS:
       Getting the DEM units right is tricky:
	   For each temperature bin the units must be 
	   a.  Divided by 10^44 because MEWE_SPEC returns flux 
              for an EM of 10^44 cm^-3.
	   b.  Divided by the temperature bin in MK because they will
              later be multiplied by this parameter within the program.
	   c.  Include one dummy value as the last value in the array
              because this is later multiplied by a d(Te) of 0.0.

  	If the dates of interest span the time of 17-nov-92, then 
	separate calls must be made for data before and after this date.

  	log10(Te) must be in the range 5.50 to 8.00

  	Short must be 1 or greater.
  	Long must be 300 or smaller.
 HISTORY
	1-Aug-94, completed by LWA.


modvolume_inf [1] $SSW/yohkoh/gen/idl/atest/modvolume_inf.pro
[Previous] [Next]
	NAME: modvolume_inf
	PURPOSE: modify the "volume.inf" files for YMI-makedisc
		procedure of creating CDRs.
	PARAMETERS:
		RETURNED 	1 for sucess and 0 for error or failure
 
		volfn		input fully qual. file name of volume.inf file
		dest		input dest. for the CD, default is LMATC
		logdiscna	ret. string for logging the disc making.
		archdir		ret. string for archive dir. for files.
		pre		ret. PREfix string for /ydb archives.
		weekid		input for finding nametape and logging name
               v_year          year of volume being archived 
               v_week          week of volume being archived 

 CALLS: ***
	STR2ARR [1], STR2ARR [2], file_append [1], file_append [2], get_tapename
	get_user [1], get_user [2], input [1], input [2], rd_tfile [1], rd_tfile [2]
	str2alp
 CALLED BY:
	prep_gendat, prep_week [1], prep_week [2]
	History:
		created  06-Mar-96, gal
		modified 27-Sep-96, gal
               modified 12-Jan-98, pgs added v_year and v_week


modvolume_inf [2] $SSW/yohkoh/gen/idl/cd_rom/modvolume_inf.pro
[Previous] [Next]
	NAME: modvolume_inf
	PURPOSE: modify the "volume.inf" files for YMI-makedisc
		procedure of creating CDRs.
	PARAMETERS:
		RETURNED 	1 for sucess and 0 for error or failure
 
		volfn		input fully qual. file name of volume.inf file
		dest		input dest. for the CD, default is LMATC
		logdiscna	ret. string for logging the disc making.
		archdir		ret. string for archive dir. for files.
		pre		ret. PREfix string for /ydb archives.
		weekid		input for finding nametape and logging name
 CALLS: ***
	STR2ARR [1], STR2ARR [2], file_append [1], file_append [2], get_tapename
	get_user [1], get_user [2], input [1], input [2], rd_tfile [1], rd_tfile [2]
	str2alp
 CALLED BY:
	prep_gendat, prep_week [1], prep_week [2]
	History:
		created 6-Mar-96, gal
		modified 27-Sep-96, gal


momount $SSW/yohkoh/gen/idl/mo_disk/momount.pro
[Previous] [Next]
   Name: momount

   Purpose: IDL interface for momount script

   Input Paramters:
      node - machine name (string) where MO drive is located
   
   Optional Keyword Paramters:
      umount - switch, if set , do unmount (default is mount)
      write  - switch, if set, access = write (default=read)
      drive  - drive number (default=0)

 CALLS: ***
	STR2ARR [1], STR2ARR [2], get_host [1], get_host [2]
 CALLED BY:
	dbase2disk, flares2disk, mk_mo2 [1], mk_mo2 [2], mo_check, mo_prep
   History:
      1-OCT-93 (SLF) - written
     30-Jan-94 (SLF) - add status keyword
     12-Feb-94 (GAL) - Fix a bug which clobbers input drive value
      4-Jul-94 (SLF) - Use current machine if node not supplied, add EJECT
      7-oct-94 (SLF) - problem with spawn on suns, use explicite csh
      3-Oct-95 (LS)  - call new mo_mount script


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

   Purpose: monitor scratch areas; optionally move old files to designated area

   History:
      13-May-1994 (SLF) Written

 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_STAT [1], FILE_STAT [2]
	concat_dir [4], dir_since, file_stat [3], get_logenv [1], get_logenv [2], mail [1]
	mail [2], rsh, strsplit
   Restrictions:
      user must have rsh priviledge to software account


month_sfd_fits [1] $SSW/yohkoh/sxt/idl/atest/month_sfd_fits.pro
[Previous] [Next]
NAME:
	month_sfd_fits
PURPOSE:
	To read the SFM files, create FITS files, and copy them to CRL computer
INPUT:
	month	- The year and month in the string form YYMM (ie: 9305)
KEYWORDS:
	weekid	- alternate input to specify month
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], SXT2FITS, concat_dir [4]
	file_list [1], file_list [2], prstr [1], prstr [2]
HISTORY:
	Written 17-Sep-93 by M.Morrison


month_sfd_fits [2] $SSW/yohkoh/sxt/idl/util/month_sfd_fits.pro
[Previous] [Next]
NAME:
	month_sfd_fits
PURPOSE:
	To read the SFM files, create FITS files, and copy them to CRL computer
INPUT:
	month	- The year and month in the string form YYMM (ie: 9305)
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], SXT2FITS, concat_dir [4]
	file_list [1], file_list [2], prstr [1], prstr [2]
HISTORY:
	Written 17-Sep-93 by M.Morrison


monthly_summary $SSW/yohkoh/gen/idl/gbo/monthly_summary.pro
[Previous] [Next]
   Name: monthly_summary

   Purpose: produce summary information for 1 month (GOES/NAR/SXT images)

 CALLS: ***
	PAUSE [1], RD_GBE, anytim2ex [1], anytim2ex [2], anytim2ints [1], anytim2ints [2]
	fmt_tim [1], fmt_tim [2], goes_summary, int2secarr [1], int2secarr [2], mplot_nar
	pause [2], plot_gbl [1], plot_gbl [2], pprint [1], pprint [2]
   History:
      ??? - written
      31-May-94 (SLF) - change lprint to pprint


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

   Purpose: simulate (kindof) more function for strarray

   Input Parameters:
      strarray - string array to display
     
   Ouput Parameters:
      quit - boolean to let caller know if quit was requested

   Optional Keyword Paramters:
      lcount - lincount (size of display page in rows)
      lun    - if set, output is to current open file on lun

   Method: if terminal, display pages, otherwise print to file,lun

 CALLED BY:
	get_doc [1], get_doc [2], get_doc [3], soup_info
   History: slf, 10-Aug-1992
            slf, 15-mar-1993 	; page size default changed


mostrip $SSW/yohkoh/ucon/idl/slater/mostrip.pro
[Previous] [Next]
   Name: mostrip

   Purpose: mo job driver 

   27-mar-1995 (slf) - call get_sdm_val for sdc job
   02-jun-1995 (gls) - modified to run mk_strip_file
 CALLS:


move_weekly $SSW/yohkoh/gen/idl/ys_util/move_weekly.pro
[Previous] [Next]
	NAME: move_weekly
	Purpose: move weekly archive files from a common dir. to their
		specific directories.
	CALLING:
		move_weekly, sarr, wks

		sarr	string-array for output.
		slun 	logical unit number to write script command
		wks	list of weekly file prefixes to moves
 CALLED BY:
	RdTap [1], RdTap [2], RdTap [3]
	HISTORY:
		written 25-Apr-95
		mod 8-May-95, to change 1st arg. from slun (logical unit
			number) to sarr (a string-array).


MOVIE [2] $SSW/yohkoh/gen/idl/util/movie.pro
[Previous] [Next]
 NAME:		MOVIE
 PURPOSE:	Show a cyclic sequence of images stored in a 3D array.
 CATEGORY:	Image display
 CALLING SEQUENCE:
	Movie, Images [,Rate]
 INPUTS:
	Images = (n,m,nframes) byte array of image data, consisting of
		nframes images, each of n by m.  This array should be
		stored with the top row first, (order = 1) for maximum 
		efficiency.
 OPTIONAL INPUT PARAMETERS:
	Rate = initial rate, in APPROXIMATE frames per second.  If 
		omitted, the inter-frame delay is set to 0.01 second.
 KEYWORD PARAMETERS:
	Order = image ordering.  Order = 0 for images ordered bottom up,
		(the default) or = 1 for images ordered top down.
 OUTPUTS:
	No explicit outputs.
 CALLED BY:
	imspec [10], imspec [11], imspec [12], imspec [13], imspec [14], imspec [15]
	imspec [16], imspec [17], imspec [18], imspec [19], imspec [1], imspec [20]
	imspec [21], imspec [22], imspec [23], imspec [24], imspec [25], imspec [26]
	imspec [27], imspec [28], imspec [29], imspec [2], imspec [30], imspec [31]
	imspec [32], imspec [33], imspec [34], imspec [35], imspec [36], imspec [3]
	imspec [4], imspec [5], imspec [6], imspec [7], imspec [8], imspec [9]
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	Images are displayed in the lower left corner of the currently
		selected window.
 RESTRICTIONS:
	As SunView has no zoom or pan, we have to write each image to
	the display. Restricting the maximum rate, etc.  Experience has
	shown that you can count on a rate of approximately 10 frames / second
	with 192 by 192 images.  This varies according to the type of
	computer, amount of physical memory, and number of frames.

	The amount of available memory also restricts the maximum amount
	of data	that can be displayed in  a loop.
 PROCEDURE:
	Straightforward.
 MODIFICATION HISTORY:
	DMS, Nov, 1988.
	JRL, Oct 1991, Changed !order default to !order=0


mplot $SSW/yohkoh/ucon/idl/mariska/mplot.pro
[Previous] [Next]
 NAME:
	mplot
 PURPOSE:
	plot multiple data sets on a single set of axes
 CATEGORY:

 CALLING SEQUENCE:
	mplot, x, a, xsp, ysp
 INPUTS:
	x = 	x array x(m), or x(m, n)
	a = 	set of n y arrays a(m, n)
	xsp =	x spacing between plots 
	ysp =	y spacing between plots 
 OPTIONAL INPUT PARAMETERS:
	none
 KEYWORD PARAMETERS:
	/norm	plot data with each array normalized to unity
 OUTPUTS:
	none
 OPTIONAL OUTPUT PARAMETERS:
	none
 COMMON BLOCKS:
	none
 SIDE EFFECTS:
	constructs a plot
 RESTRICTIONS:
	
 PROCEDURE:
	obvious
 MODIFICATION HISTORY:
	JTM, Jan 1984 as routine pseudo
	JTM, Sep 1992 renamed mplot and added /norm
	JTM, Mar 1993 major modifications for IDL version 2


mplot_nar $SSW/yohkoh/ucon/idl/slater/mplot_nar.pro
[Previous] [Next]
NAME:
	mplot_nar
PURPOSE:
	To plot positions of NOAA Active Regions on a heliocentric
	grid
CALLING SEQUENCE:
INPUT:
       item - The reference time to which all feature coordinates
	  will be differentially rotated before plotting on the grid.
	  Form can be:
	    (1) structure with a .time and .day field,
	    (2) standard 7-element external representation,
	 or (3) a string of the format "hh:mm dd-mmm-yy"
	 If no date is entered, the current date is used.
	 The year is not required, but if entered should be
	 of the form 1-Oct-91 style.  The date should be entered
	 in string style with date first.
OPTIONAL INPUT:
 CALLS: ***
	DIFF_ROT [1], DIFF_ROT [2], DRAW_GRID [1], DRAW_GRID [2], DRAW_GRID [3]
	DR_PHOTO [1], DR_PHOTO [2], DR_PHOTO [3], RD_NAR, S2C [1], S2C [2], WDEF [1], WDEF [2]
	anytim2ex [1], anytim2ex [2], clearplot [1], clearplot [2], fmt_tim [1]
	fmt_tim [2], font_size [1], font_size [2], get_rb0p [1], get_rb0p [2]
	int2secarr [1], int2secarr [2], pprint [1], pprint [2], uniqo [1], uniqo [2]
 CALLED BY:
	monthly_summary
OPTIONAL KEYWORD INPUT:
	hc	- If set, write the results to a temporary file, print
		  it and delete it.
OUTPUT:
HISTORY:
	Written 26-Mar-93 by G. L. Slater
	update 31-May-94, by gal, lprint to pprint.
QUESTIONS, PROBLEMS, THINGS TO DO:
	- Properly position window at creation, using screen size
	- FMT_TIM should accept a string argument


MSEC2TIME $SSW/yohkoh/ucon/idl/wuelser/msec2time.pro
[Previous] [Next]
 NAME:
        MSEC2TIME
 PURPOSE:
        Converts milliseconds (since beginning of the day)
        into time string ('hh:mm:ss')
 CATEGORY:
        Misc.
 CALLING SEQUENCE:
        out = msec2time(in)
 INPUTS:
        in = longword.  Time in milliseconds since 00:00:00
 OUTPUTS:
        out = string representing time information in hours, minutes,
             seconds. Format: 'hh:mm:ss'
 RESTRICTIONS:


MskExpLev $SSW/yohkoh/sxt/idl/to_be_deleted/mskexplev.pro
[Previous] [Next]
	NAME:
		MskExpLev
	PURPOSE:
		Breakup multiple item/value byte into a single value
		by masking out the unwanted items.  Returned vector
		is teh same size as input vector "idx" and is masked
		for requested value via keyword switch.
	CALLING SEQUENCE:
		masked_dVec = MskExpLev( idx, [expMode=expMode,
					expLev=expLev] )
	INPUT:
		idx	is a vector of expLevMode values.
	KEYWORDS:
		expMode	present to mask-out all but exposure mode bits.
		expLev	present to mask-out all but exposure level bits.
	RETURN:
		A masked byte vector of the same length as input vector.
 CALLED BY:
	SXTKaySea [1], SXTKaySea [2]
	HISTORY:
		written 7-Aug-91, by GAL


MskImg $SSW/yohkoh/gen/idl/dbase/mskimg.pro
[Previous] [Next]
	NAME:
		MskImg
	PURPOSE:
		breakup encode items within a byte into a single value
		by masking out the unwanted items.  Returned vector
		is the same size as input vector and is masked
		for requested value via keyword switch.
	CALLING SEQUENCE:
		masked_dVec = MskImg(idx, [Cad=cad, Comp=comp, 
					nRois=nrois, Res=res])
	INPUT:
		idx 	is a vector of the imgparam values
	KEYWORDS:
		cad	present for cadence check
		comp	present for compression check
		nRois	present for No of ROIs????
		Res	present for resolution check
	OUTPUT:
		returns a masked byte vector ...
 CALLED BY:
	SXTKaySea [1], SXTKaySea [2]
	HISTORY:
		written 17-Oct-91, by GAL


MskPer $SSW/yohkoh/sxt/idl/to_be_deleted/mskper.pro
[Previous] [Next]
	Name:
		MskPer
	Purpose:
		Breakup multiple item/value byte into a single value 
		by masking out the unwanted items.  Returned vector 
		is the same size as input vector "idx" and is masked
		for requested value via keyword switch.
	CALLING SEQUENCE:
		masked_dVec = MskPer( idx, [aspdr=aspdr, shut=shut,
					xray=xray, opt=opt])
	Input:
		idx	is the vector of periph values.
	Keywords:
		aspdr	present for aspdr status check.
		shut	present for shutter status check.
		xray	present for Xray filter search.	
		opt	present for optical filter search.	
	Output:
		Returns a masked byte vector of the same 
		length as input vector.
 CALLED BY:
	SXTKaySea [1], SXTKaySea [2]
	History:
		written 13-May-91, by GAL


msok_copy $SSW/yohkoh/gen/idl/gbo/msok_copy.pro
[Previous] [Next]
   Name: msok_copy

   Purpose: copy MSO Ca-K gif files

   25-sep-1995 (SLF) First Light optional image


msok_copy_jpg $SSW/yohkoh/gen/idl/gbo/msok_copy_jpg.pro
[Previous] [Next]
   Name: msok_copy_jpg

   Purpose: copy daily Meese Ca Kline jpeg file

   6-nov-1995 (SLF)
 CALLS:


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

   Purpose: copy MSO Ca-K FITS (POI)

   25-sep-1995 (SLF) First Light optional image
   16-apr-1995 (SLF) Get FITS from POI
   17-apr-1995 (SLF) add /noftp (therfore kluging logic...)
   20-may-1998 (PGS) changed name string from P??????.????.fts 
                     to P??????_????.fts to stop crashes.
 CALLS:


msok_poi_copy [2] $SSW/yohkoh/gen/idl/gbo/msok_poi_copy.pro
[Previous] [Next]
   Name: msok_poi_copy

   Purpose: copy MSO Ca-K FITS (POI)

   25-sep-1995 (SLF) First Light optional image
   16-apr-1995 (SLF) Get FITS from POI
   17-apr-1995 (SLF) add /noftp (therfore kluging logic...)
 CALLS:


msok_poi_copy [3] $SSW/yohkoh/gen/idl/gbo/msok_poi_copy_old.pro
[Previous] [Next]
   Name: msok_poi_copy

   Purpose: copy MSO Ca-K FITS (POI)

   25-sep-1995 (SLF) First Light optional image
   16-apr-1995 (SLF) Get FITS from POI
   17-apr-1995 (SLF) add /noftp (therfore kluging logic...)


MSSTA_GIF $SSW/yohkoh/ucon/idl/hudson/MSSTA_GIF.pro
[Previous] [Next]
 NAME:
	MSSTA_GIF
 PURPOSE:
	write an SFD image in GIF format on the specified directory 
       (selects the most recent Dag H res image and annotates)
 CATEGORY:
       Yohkoh
 CALLING SEQUENCE:
       .run MSSTA_GIF
 INPUTS:
 OPTIONAL (KEYWORD) INPUT PARAMETERS:
 OUTPUTS:
 COMMON BLOCKS:
 SIDE EFFECTS:
 RESTRICTIONS:
 MODIFICATION HISTORY:
       HSH written 12-oct-94
       HSH removed the tv display 14-oct-94


msu_tekprint $SSW/yohkoh/ucon/idl/acton/msu_tekprint.pro
[Previous] [Next]
 NAME:
	msu_tekprint
 PURPOSE
	To set up the device parameters for making nice centered
	  and appropriately sized postscript prints on the MSU
	  Tektronix Phaser IIsd color printer from an IDL bytescaled image.
	*** BE SURE THE MEDIA TRAYS YOU WANT ARE IN THE PRINTER!! ***
 HOW IT WORKS
	Give the program the variable name of the image you want to print.
	If no image name is passed the programs reads the image from the
	  active window.
	The program scales the image to fit the page and centers it.  If
	  want to save the postscript file pass the program the name via
	  the keyword file=file.  If you wish a different sized picture, or a
	  picture placed differently on the page than the default values they
	  you can set the x0, y0, xoffset, and yoffset parameters.
	The landscape keyword works by rotating the image.  The device
	  parameter remains portrait.
 CALLING SEQUENCE
	msu_tekprint
	msu_tekprint,img
	msu_tekprint,img,file='imgname.ps'
	msu_tekprint,img,file=file,x0=x0,y0=y0,xoffset=xoffset,$
          yoffset=yoffset,landscape=landscape,window=window
 OPTIONAL INPUT
	img = picture you want to print
 OPTIONAL KEYWORD INPUT
	file = filename (say, 'mypix.ps") you want to give the picture
	x0<8.21, y0<10.78 are dimensions of allowed print area in inches.
	xoffset>0,75 and yoffset>1.125 are LH and bottom margins in inches.
	/landscape will print the image in landscape format.
	window = window number of the desired image
	/noprint may be used to create .ps file without making print
 RESTRICTIONS
	*** BE SURE THE MEDIA TRAYS YOU WANT ARE IN THE PRINTER!! ***
	The color table range that works seems to be limted to 0-240 
	  so the program bytscls the image to that range before printing.
	The pure, unreversed, color tables come too dark.  Normally use a
	  Gamma Correction of about 0.5 or a little less.
 HISTORY
	cp_print.pro Written by LWA 8/04/94 after lots of frustration with
	  the printing process.  Header fixed and bytscl corrected 8/05/94.
	prepared from cp_print.pro allowing taking image from screen
	  and making all variables optional.  LWA 9/01/94
	LWA 10/14/94 - Added xmax, ymax media dimensions and keyword 
	  /noprint as well as fixing the header.


msu_tekprint2 $SSW/yohkoh/ucon/idl/acton/msu_tekprint2.pro
[Previous] [Next]
 NAME:
	msu_tekprint2
 PURPOSE
	To set up the device parameters for making nice centered
	  and appropriately sized postscript prints on the MSU
	  Tektronix Phaser IIsd color printer from an IDL bytescaled image.
	*** BE SURE THE MEDIA TRAYS YOU WANT ARE IN THE PRINTER!! ***
 HOW IT WORKS
	Give the program the variable name of the image you want to print.
	If no image name is passed the programs reads the image from the
	  active window.
	The program scales the image to fit the page and centers it.  If
	  want to save the postscript file pass the program the name via
	  the keyword file=file.  If you wish a different sized picture, or a
	  picture placed differently on the page than the default values they
	  you can set the x0, y0, xoffset, and yoffset parameters.
	The landscape keyword works by rotating the image.  The device
	  parameter remains portrait.
 CALLING SEQUENCE
	msu_tekprint2
	msu_tekprint2,img
	msu_tekprint2,img,file='imgname.ps'
	msu_tekprint2,img,file=file,x0=x0,y0=y0,xoffset=xoffset,$
          yoffset=yoffset,landscape=landscape,window=window
	msu_tekprint2,img2,file='sxt_mlso.ps',/noprint,ct=ct,$
	   hwtxt='SXT and MLSO -- 1992 May 8',xtxt=30,ytxt=25,col=255

 OPTIONAL INPUT
	img = picture you want to print
 OPTIONAL KEYWORD INPUT
	file = filename (say, 'mypix.ps") you want to give the picture
	x0<8.21, y0<10.78 are dimensions of allowed print area in inches.
	xoffset>0,75 and yoffset>1.125 are LH and bottom margins in inches.
	/landscape will print the image in landscape format.
	window = window number of the desired image
	/noprint may be used to create .ps file without making print
	ct = number of IDL color table or [[r],[g],[b]] array.
	hwtxt = strarray with text for xyouts2 to write in hardware font
	xtxt,ytxt = pixel location to write hwtxt
	col = color to use for hwtxt (default = 255)
 RESTRICTIONS
	*** BE SURE THE MEDIA TRAYS YOU WANT ARE IN THE PRINTER!! ***
	The color table range that works seems to be limted to 0-240 
	  so the program bytscls the image to that range before printing.
	The pure, unreversed, color tables come too dark.  Normally use a
	  Gamma Correction of about 0.5 or a little less.
 HISTORY
	cp_print.pro Written by LWA 8/04/94 after lots of frustration with
	  the printing process.  Header fixed and bytscl corrected 8/05/94.
	prepared from cp_print.pro allowing taking image from screen
	  and making all variables optional.  LWA 9/01/94
	LWA 10/14/94 - Added xmax, ymax media dimensions and keyword 
	  /noprint as well as fixing the header.
	LWA 8/28/95 - Changed scaling to use entire 255 colors by
	  bytscaling image inside the program.
	LWA 9/13/95 - Added hardware text capability by calls to
	  tv3_msu.pro.
 CALLS:


MSV2INTS $SSW/yohkoh/ucon/idl/bentley/msv2ints.pro
[Previous] [Next]
 NAME:
	MSV2INTS
 PURPOSE:
	converts msec vector and start to internal structure
 CATEGORY:
 CALLING SEQUENCE:
	ints = msv2ints(msv,tstart)
 INPUTS:
	msv		vector of msec times
	tstart		start time
 OPTIONAL INPUT PARAMETERS:
 KEYWORD PARAMETERS:
 OUTPUTS:
	ints		internal format structure
 OPTIONAL OUTPUT PARAMETERS:
 CALLS: ***
	anytim2ints [1], anytim2ints [2]
 CALLED BY:
	HXT_4CHPLOT, HXT_TVEC, SXT_TVEC, WBS_TVEC
 COMMON BLOCKS:
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:
	RDB  17-Jan-94	Written


mt $SSW/yohkoh/gen/idl/tape/mt.pro
[Previous] [Next]
  NAME:
    mt
  PURPOSE:
    Handle functional control of tape "dev" for both unix and vms.
  CALLING SEQUENCE:
    mt,'dev/nrmt0h',unit,/open		; For unix 
    mt,'mub0',unit,/open,/mount	; For VMS (DCL mount the tape)
					; Will also do a 
					;      setlog, 'mub0','mt'+fix(unit)
    mt,'mub0',unit,/open		; For VMS (Don't mount the tape)
    mt,unit,/rewind			; rewind
    mt,unit,rd=buff			; Read a tape record into buff
    mt,unit,skpf=1			; Skip one record forward
    mt,unit,skpr=1			; Skip one record backwards (reverse)
    mt,unit,/close			; unix (no action for vms)
    mt,unit,/close,/dismount		; vms (DCL dismount/nounload the tape)
 CALLS: ***
	REWIND [1], REWIND [2], SETLOG, SKIPF [1], SKIPF [2], TAPRD [1], TAPRD [2], mtcom
 CALLED BY:
	ACOPY [1], RdTap [1], RdTap [2], RdTap [3], Rd_TapDir, WrtDat2, WrtDat3, arctap2tap
	getm1ans, go_rdtap [1], go_rdtap [2], mo_tap_dump, tap2tap, vmscopytape, wrtwkdat
	ydbtap2tap
    Note: the /mount and /dismount will have no effect under unix.
  INPUT: 
	p1	device (e.g. '/dev/nrmt0h') or
		unit number (e.g., 0 or 1)
		NOTE:   DEVICE "dev" is assumed to be defined and string.
  OUTPUT:
	p2	unit number (only if /open switch is supplied).

  OPTIONAL KEWORDS:
	/open	To open either unix or vms
	/mount	(VMS only)  -- With the /open switch, will also spawn
				a DCL mount/foreign command.
	/rewind	Rewinds the tape
	skpf=n	Skip forward n files (e.g., skpf=1 will skip one file forward)
	skpr=n	Skip backwards n files.
	rd=rd	Read a tape record into rd
	/close  Close the tape unit (unix)
	/dismount (VMS) If specified with /close, will spawn a DCL 
			dismount/nounload command. 
			Note:  Even though the drive is dismounted, since
			IDL does not deallocate the drive, no other tape
			can be mounted until the current IDL process has
			been exited.
 MODIFICATION HISTORY:
   6-nov-91, G. A. Linford, Written
  28-mar-92, J. R. Lemen, Added documentation, /mount and /dismount for vms.
  16-Apr-92, gal, upgraded vms /open /mount logic work for bcs group at isas.
  18-Jun-92, gal, added I/O trap for problems with openr command on
		tape device.
  23-Jun-92, gal, still having problems with j-side devices...added mt rewind
  19-Oct-93, gal, add a trap on i/o readu errors specifically for DATs???
  30-Nov-93, gal, minor change to vms mount and info mount status.
  14-Feb-94, gal, minor change to error trap logic.
   5-Mar-94, gal, increased wait on retry for problems with ISASS0 running
		Ultrix V4.3A.
   6-Mar-94, gal, Yet another patch has been made for hardware problems.
		This one was for: OPENR: Error opening file: /dev/nrmt*h
		Interrupted system call.
		I added an io_error tape after a spawned rewind-status
		cmd to the system for another openr try.  Trap this error
		wait 2 seconds and retry the open with sucess!
   7-Jul-94, slf, suppress annoying 'error' messages, during normal operations
		   (I think the definition of normal has changed) 


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

   Purpose: issue OS dependent tape positioning

   Calling Sequence:
      mtcmd [,drive , /rewind, /offline, fsf=NN, bsf=NN , $
	      fsr=NN, bsr=NN, /nospawn]

   Calling Examples:
      mtcmd,/rewind			; rewind drive 0
      mtcmd,1,/rewind,fsf=5		; rewind, then skip forward 6, drive 1

   Input Parameters:
      dev - drive number or drive name (default is drive 0, via def_tapd()

   Keyword Parameters:
      rewind  - if set, rewind is issued
      offline - if set, offline is issued
      fsf     - if set, forward skip specified number files 
      bsf     - if set, backward skip specified number of files
      fsr     - if set, forward skip specified number records
      bsr     - if set, backward skip specified number of records
      nospawn - if set, dont spawn commands
      background - if set, command is spawned in background
      cmds    - (output) returns the mt commands as string/string array

 CALLED BY:
	ACOPY [1], RdTap [1], RdTap [2], RdTap [3], fitstap2tap [1], fitstap2tap [2]
	go_mk_cd, go_rdtap [1], go_rdtap [2], mk_gsn_obs, mo_patch, rd_ydbtap, rd_ydbtapedir
	soon2fits, ycopy, ydbtapsets, ydump
   History:
      30-Jun-1994 (SLF) - having problems with mt.pro and mtcom.pro
       8-Aug-1994 (SLF) - unload instead of offline for SGI
      17-Apr-1997 (GLS) - added fsr and bsr commands

 CALLS: ***
	ARR2STR [1], Arr2Str [2], data_chk [1], data_chk [2], def_tapd [1], def_tapd [2]
	def_tapd [3], fstats [1], fstats [2], is_member [1], is_member [2]
   Restrictions:
      This routine only postions drive (rewind, forward and back skips)
      UNIX only for today (vms idl routines available=skipf, etc)


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

   Purpose: issue OS dependent tape positioning

   Calling Sequence:
      mtcmd [,drive , /rewind, /offline, fsf=NN, bsf=NN , /nospawn]
 
   Calling Examples:
      mtcmd,/rewind			; rewind drive 0
      mtcmd,1,/rewind,fsf=5		; rewind, then skip forward 6, drive 1

   Input Parameters:
      dev - drive number or drive name (default is drive 0, via def_tapd()

   Keyword Parameters:
      rewind  - if set, rewind is issued
      offline - if set, offline is issued
      fsf     - if set, forward skip specified number files 
      bsf     - if set, backward skip specified number of files
      nospawn - if set, dont spawn commands
      background - if set, command is spawned in background
      cmds    - (output) returns the mt commands as string/string array

 CALLED BY:
	ACOPY [1], RdTap [1], RdTap [2], RdTap [3], fitstap2tap [1], fitstap2tap [2]
	go_mk_cd, go_rdtap [1], go_rdtap [2], mk_gsn_obs, mo_patch, rd_ydbtap, rd_ydbtapedir
	soon2fits, ycopy, ydbtapsets, ydump
   History:
      30-Jun-1994 (SLF) - having problems with mt.pro and mtcom.pro
       8-Aug-1994 (SLF) - unload instead of offline for SGI

 CALLS: ***
	ARR2STR [1], Arr2Str [2], data_chk [1], data_chk [2], def_tapd [1], def_tapd [2]
	def_tapd [3], fstats [1], fstats [2], is_member [1], is_member [2]
   Restrictions:
      This routine only postions drive (rewind, forward and back skips)
      UNIX only for today (vms idl routines available=skipf, etc)


mtcom $SSW/yohkoh/gen/idl/tape/mtcom.pro
[Previous] [Next]
	NAME:
		mtcom
	PURPOSE:
		Reposition tape unit via either rewind or skip 
		forward "skpf" files or "skpr" records.
	Calling SEQ:
		THIS IS NOT FOR THE AVERAGE USER -- USE MT.PRO
 CALLED BY:
	mt
	HISTORY:
		written, 1991, gal
		14-Feb-91, gal & Andy Phillips, added a patch for 
		OSF/1-IDL problem of getting Interrupted System Call
		after rewind command.
        17-Feb-94, JRL, Fixed a typo (N_IOERROR ==> ON_IOERROR)
         7-Jul-94, SLF, suppress annoying 'error' messages which always show up


mtv pro $SSW/yohkoh/ucon/idl/naoj_nkr/mtv.pro
[Previous] [Next]

NAME       : mtv (pro)
 PURPOSE :
	multi tv
 CATEGORY :
	idl/lib/nkr
 CALLING SEQUENCE :
	mtv,data,data2,info=info,step=step,size=size,start=start,dx=dx,dy=dy,	$
		scale=scale,v=v,pos_info=pos_info,order=order,continue=continue, $
		img_no=img_no,get=get,image=image,h=h,title=title,next=next,	$
		charsize=charsize,title1=title1
 INPUTS :
	data    : data(*,*,*) or NKR type filenames
 OPTIONAL INPUT PARAMETERS : 
	data2
 KEYWORD PARAMETERS :
	info	: comment array
	pos_info: position of info (default=[0,0])
	step	:
	size	: magnification fact
	start	: starting no.
	dx,dy	: space between images
	scale	: scaling, 1,2 or 3
			1. tvscl, linear
			2. tvscl, log
			3. tv
			4. ..
			else. tv,a/scale
	v	: display direction to vertical
	order	: same as tv or tvscl procedure
	continue: do not pause at full screen
	img_no	: image no. for nkrget when data is filename array
	get	: get image array when data is filename array
	image	: image array to get nkr images
	h	: header array to get nkr headers
	title	: title of new window 
	title1	: title in the window 
	next	: give strting position (count)
	charsize: size of information characters
 OUTPUTS :
	none
 CALLS: ***
	CONGRID [1], CONGRID [2], CONGRID [3], MTV, WDEF [1], WDEF [2]
 COMMON BLOCKS : 	none
 SIDE EFFECTS : 	none
 RESTRICTIONS :	none
 PROCEDURE :
	If title keyword is set, new full window is always created.
 MODIFICATION HISTORY :
	K.I. '93/01/07	
	K.I. '93/01/10	; pos_info
	K.I. '93/01/25	; v, continue, order keyywords
	K.I. '93/01/26	; 2 kind of images can be displayed
	K.I. '93/01/29	; fact --> size
	K.I. '93/01/30	; title keyword, full window
	K.I. '93/05/09	; /get -> nng
	K.I. '93/06/21	; dx,dy keyword
	K.I. '93/08/14	; next keyword
	K.I. '93/08/21	; charsize keyword
	K.I. '93/08/25	; scale


mult_th_fsp $SSW/yohkoh/ucon/idl/mctiernan/mult_th_fsp.pro
[Previous] [Next]
 NAME:
	mult_th_fsp
 CALLING SEQUENCE:
	mult_th_fsp,index,detector,itim,dti,btim,dtb,cnts,bcnts,sdel=sdel,$
		fit_pars,sc_par,ch_dta,outfile=outfile,pfile=pfile,$
               nsigmas=nsigmas, tyspec=tyspec,$
               fix_a=fix_a, sat_flag=sat_flag, $
               noplot=noplot, erange=erange, sys_err=sys_err, $
               ucnts=ucnts, init_a=init_a
 PURPOSE:
	Given photon counts from SXT and GOES and HXT,  
	fit multi-thermal spectra..
 INPUT:
	index= data info. structure, can be an internal time structure
	detector= string array or variable with the appropriate 
		instrument name(s)
	itim= interval start times, any Yoh format
       dti= interval time, in seconds
	btim= background start time(s), any Yoh format
       dtb= background interval time
	cnts= an array of counts, fltarr(nchannels) or fltarr(nchannels,ntimes)
	bcnts= an array of background counts, fltarr(nchannels)
 OUTPUT:
	fit_pars, a structure of type {fitinfo}, for each interval, with tags:
		tyspec= type of spectrum
		ma= no. of parameters fit
		alabels = labels for the fit parameters
		t= the interval START times, in the 7 element array
		dt= the interval lengths
		a= the fit parameters, a fltarr(6), for tyspec
                  =95, a(0) = EM at 1MK, a(1) = c_2, a(2)=c_3
                  =96, a(0) = EM at 1MK, a(1) = low pl. index OF T (<5MK),
                    a(2) = high pl. index of T (>5MK), a(3) = cutoff T
                  =97, a(0) = EM at peak, a(1) = peak T, a(2) = width in T
                  =98, a(0)=EM at 1MK, a(1) = pl. index of T, a(2) = Max. T
                  =99, a(0)=EM at 1MK, a(1) = pl. index of T
		sa= uncertainties in the fit parameters
               ffx= 0 if the associated parameter is free, 1 if fixed at a
                    user defined value, 2 if fixed at the value initially
                    given by ainit.
		chi2= chi^2
		nch= the number of channels for each interval
		fluxc= flux correction if any
		nsig= # of sigmas above background for good channels.
		flags= saturated flag, incomplete flag, channel event 
			was found in, highest channel included in fit, 
			mro flag.
	sc_par, a structure containing data for each sc channel, tags:
		e10= channel low energy edges
		e20= channel high energy edges
		eb0= channel midpt energy
		bck= background count rates, for the two bck intervals, fltarr(2)
		sbck= Uncertainty in bck
		tb= the background START time for two background intervals, an array of(7, 2)
		dtb= the bck time interval, fltarr(2)
	ch_dta, a structure containing data for each channel for each interval
		y0= total (i.e., not background subtracted) incident count rates
		sy0= Uncertainty in y0
		chok=channel flag, 0 for channels used in fit , 
				   1 for channel not used
               b0 = background count rate
               sb0 = uncertainty in b0
               f0 = photon flux in the channel, for most cases f0 is
                    the flux at the channel energy, for thermal  + line fits
                    f0 is the average photon flux in that channel.
                    Note that f0 = model flux * ((y0-b0)/c0)
               sf0 = uncertainty in f0.      
               c0 = Model Excess count rates
 KEYWORD INPUT:
       sdel= the channels you want to delete, if not set, the program
             prompts for the appropriate channels, if set to -1, no prompt,
             no channels deleted.
	outfile= the output file, a keyword
	pfile= a file for spectral plots
	nsigmas= the number of sigmas above background for a "good" channel,
		=3.0 as a default
	tyspec=the spectral type, if not set, the program prompts you
             = 96, Double Power Law in temperature, variable T cutoff, break at 5 MK
             = 97 A power law in T, variable high and low T cutoffs
             = 98 A power law in Temperature, Variable high T cutoff
             = 99 A power law in Temperature, Constant high T cutoff at 30 MK
       fix_a= an array, corresponding to a for the fit parameters,
              gives the values of a chosen to remain fixed by the
              user. If fix_a(j)=0.0, the parameter is free, if fix_a(j)
              is set to -1, then you choose the jth parameter in a
              routine called fix_pars, if fix_a(j)=-2, then the parameter
              will be chosen in ainit, but will remain fixed during the fit.
              or a scalar, /fix_a will enable you to make choices for
              any or all parameters. 
       VARIOUS DATA FLAGS:
              ch_found = channel used to find fit
              incomplete = 1 if missing frames, or data gap, otherwise 0
              sat_flag= an array of saturation flags, to warn for
                 spectral distortion in HXS, one per interval, or one
                 for all intervals.
       noplot= if set, no screen plot
       erange= an energy range to be used for the spectral fit, channels with
               middle energies between the two limits are included. Channels
               specified in sdel are still not included in the fit, but the
               user is not prompted for channels to delete if erange is passed in
       sys_err= a 'systematic error', pass in if you don't trust the
                errors you get from counting stats, or to arbitrarily
                push down chi^2 values, or in cases where different
                instruments cause counts mismatches. The default is 0.0
                This makes the error in the rate = sqrt(cps/dt)+sys_err*cps.
       ucnts= the uncertainty in cnts, if this is not passed in, Poisson
              uncertainties are assumed, the sys_err will be used also if
              the sys_err keyword is set. Ucnts must be an array of (nchannels)
              or (nchannels, ntimes).
       init_a= initial values for the fit parameters, can be an array
               of (number of fit parameters, ntimes)
 CALLS: ***
	ADDTIME [1], ADDTIME [2], anytim2ex [1], anytim2ex [2], fix_pars0, fsp_11
	yesnox [1], yesnox [2]
 CALLED BY:
	sxt_thfsp
 HISTORY:
       From Any_fsp, 10-jan-96, jmm


multi_hda2hxi $SSW/yohkoh/ucon/idl/freeland/multi_hda2hxi.pro
[Previous] [Next]
   Name: multi_hda2hxi
  
   Purpose: make lots of HXI image via wrapper to Tom Metcalf's <hxt_autoimg>
             Optionally filter for GOES threshold and RISE phase

   Input Parameters:
      t0, t1 - user specified time range to process (-> cdflare_files.pro)

   Keyword Parameters:
      hdafiles - user passed file array (instead of time range)
      gthresh  - GOES threshold - only process files where GXD level for
                 HDA time span meets or exceeds this level
      rise     - switch, if set, only process hda files where GOES level
                 increases.  
      outdir   - output directory for HXI files (def=$HXI_IMAGES)
  
   Calling Sequence:
     multi_hda2hxi, t0, t1, [,gthresh=GOESLEVEL, /rise, /remake, hdafiles=files]
 
   20-Jun-1997 - S.L.Freeland 
   22-jul-2000 - S.L.Freeland - removed 'spd' references
 CALLS:


multi_spatial_dem $SSW/yohkoh/ucon/idl/mctiernan/multi_spatial_dem.pro
[Previous] [Next]
 NAME:
      multi_spatial_dem
 PURPOSE:
      Creates a 'spatial DEM' for a cube of SXT images, 
      This sums up all of the em's in individual temperature bins,
      for each time.
 CALLING SEQUENCE:
      dem47 = multi_spatial_dem(te0, em0, t6_arr, t6_edges=t6_edges, $
              n_t6bins = n_t6bins, t6_binsize = t6_binsize, t6_max = t6_max, $
              t6_min = t6_min)
 INPUT:
      te0 = Log(T), a data cube, (ipix, ipix, nexp)
      em0 = Log(EM), must be the same size as te0
 OUTPUT:
      dem47 = the DEM the emisison measure in each temperature bin, for each image
      t6_arr= the temperature array that the dem is defined on, the
              midpoints of the temperature bins.
 KEYWORDS:
      t6_edges= The bin edges for the T bins (OUTPUT)
      n_t6bins= the number of bins, if passed in, then there will
                be this many bins, either between the values of
                t6_max and t6_min, or if t6_binsize is passed in,
                then from t6_min to n_t6bins*t6_binsize
      t6_binsize= The binsize for the T bins, the default is 1.0
      t6_max= The max. temperature for the T bins, the default is the
              bin edge above the max. of te0
      t6_min = The min. temperature FOR the T bins, the default is the
               minimum value of te0
 CALLS: ***
	spatial_dem
 HISTORY:
      26-jan-96, jmm


Multresponses $SSW/yohkoh/ucon/idl/mctiernan/multresponses.pro
[Previous] [Next]
 NAME:
	Multresponses
 CALLING SEQUENCE:
	resp_struct = multresponses(inpf)
 PURPOSE:
 	Inputs the response functions for all the instruments, and puts
	them into one array.
 INPUT:
	inpf= a string array of resp. file names
 OUTPUT:
       resp_struct= an anonymous structure, tags
	        e10= channel low energy edges
	        e20= channel high energy edges
       	eb0= channel energies
               resp_files= inpf, the resp.file names
		n_ins= no. of detectors use in spectrum
		ncmx= no. of channels for each instrument
		nc0= total number of channels
		ne0= number of energies at which the response has been determined
		e0= the energies at which the response has been determined
		r0= the response matrix 
		rde0= response matrix*de0, so that counts(nc0)=flux(ne0)#rde0(nc0,ne0)
 CALLS: ***
	Responses [1], Responses [2], Responses [3]
 CALLED BY:
	fsp_11, fsp_mc, fsp_proc, hxt_anycomp, hxt_cutoff, hxt_plcomp, hxt_thcomp, sxt_anycomp
 HISTORY:
	Spring '92 by JMcT
       Changed to structure output, 14-Jul-95, jmm


mwlt_analyze $SSW/yohkoh/ucon/idl/wuelser/mwlt_analyze.pro
[Previous] [Next]
 NAME:
        mwlt_analyze
 PURPOSE:
        Analyzes a given MWLT image array for image quality according
        to a range of image quality indicators
 CATEGORY:
 CALLING SEQUENCE:
        mwlt_analyze,image,qstruc,qmov
 INPUTS:
        image = image array, byte(1024,1024)
 KEYWORDS (INPUT):
        date_obs = string (from FITS header), translated into qstruc.day
        time_obs = string (from FITS header), translated into qstruc.time
 CALLED BY:
	mwlt_tape2jpeg
                   Note: both date_obs and time_obs should be supplied for
                         this to work right
 OUTPUTS:
        qstruc = structure containing image quality data.
                 If already there, a new structure element is appended.
        qmov = processed and rebinned image for visual and cloud check.
 KEYWORDS (OUTPUT):
 CALLS: ***
	FITIM2INTS, MWLT_CENTER
 COMMON BLOCKS:
        None.
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:
        JPW, 15-oct-97


MWLT_CENTER $SSW/yohkoh/ucon/idl/wuelser/mwlt_center.pro
[Previous] [Next]
 NAME:
        MWLT_CENTER
 PURPOSE:
        procedure to determine sun center and radius in a MWLT image
 CATEGORY:
 CALLING SEQUENCE:
        mwlt_center,im,cx,cy,rx,ry
 INPUTS:
        im = image
 KEYWORDS (INPUT):
        /old .  If set, use fit parameters best suited for old MWLT data
 OUTPUTS:
        cx = x-coordinate of suncenter
        cy = y-coordinate of suncenter
        rx = solar radius in x-direction
        ry = solar radius in y-direction
 KEYWORDS (OUTPUT):
        thresh = threshold value used for calculation
        xjit = vector of "meridian" points (suncenter in each row)
        yjit = vector of "equator" points (suncenter in each column)
 CALLED BY:
	PP_MWLT2SXT, mwlt_analyze, sun_grid
 COMMON BLOCKS:
        None.
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:
        JPW, Jan. 93
        JPW, Oct. 97 added lomean and himean keywords


mwlt_select $SSW/yohkoh/ucon/idl/wuelser/mwlt_select.pro
[Previous] [Next]
 NAME:
        mwlt_select
 PURPOSE:
        Looks at one (Mees) day's worth of mwlt quality data,
        selects images to be written to CDROM,
        creates a shell script to move/remove the selected/discarded files,
        and presents the quality data in a convenient format.
 CATEGORY:
 CALLING SEQUENCE:
        mwlt_select
 INPUTS:
        start = start date. In any Yohkoh format (optional)
 KEYWORDS (INPUT):
        indir = string.  Directory for input files.  Default: current dir.
        outdir = string.  Directory for output files.  Default: ./out
        /nointeractive.  Don't allow for interactive modifications.
 OUTPUTS:
        No explicit output
 KEYWORDS (OUTPUT):
 CALLS: ***
	OUTPLOT [1], OUTPLOT [2], OUTPLOT [3], UTPLOT [1], UTPLOT [2], UTPLOT [3]
	UTPLOT [4], UTPLOT [5], UTPLOT [6], anytim2ex [1], anytim2ex [2], anytim2ints [1]
	anytim2ints [2], fmt_tim [1], fmt_tim [2], int2secarr [1], int2secarr [2]
	rd_mwltlog
 COMMON BLOCKS:
        None.
 SIDE EFFECTS:
        Creates file 'mv_mwlt.source' (shell script) in the current directory.
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:
        JPW, 16-oct-97
        JPW,  2-dec-97  add interactive modification of selection


mwlt_tape2jpeg $SSW/yohkoh/ucon/idl/wuelser/mwlt_tape2jpeg.pro
[Previous] [Next]
 NAME:
        mwlt_tape2jpeg
 PURPOSE:
        Read an MWLT raw data tape image by image, analyze each image
        for quality, and write it in JPEG format onto disk.
 CATEGORY:
 CALLING SEQUENCE:
        mwlt_fits2jpeg
 INPUTS:
        start = start time. In any Yohkoh format (optional)
        stop = stop time (optional)
 KEYWORDS (INPUT):
        device = string.  Name of input device.  Default='/dev/nrst4'
        dir = string.  Directory for output file.  Default: current dir.
 OUTPUTS:
        No explicit output
 KEYWORDS (OUTPUT):
        qstruc = structure with image quality info.
        qmovie = rebinned, scaled, and aligned "thumbnail" images
        Note: qstruc and qmovie are also in the 'log...sav' file
 CALLS: ***
	FITIM2INTS, RFITS [1], RFITS [2], RFITS [3], anytim2ints [1], anytim2ints [2]
	int2secarr [1], int2secarr [2], mwlt_analyze
 COMMON BLOCKS:
        None.
 SIDE EFFECTS:
        Creates files 'mwjyymmdd.hhmm.jpg' and one file 'logyymmdd.hhmm.sav'
        in the current directory.
        A file temp_log.sav is maintained during the run in case of crashes.
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:
        JPW, 15-oct-97