I2BYT $SSW/yohkoh/bcs/idl/micro/i2byt.pro
[Previous] [Next]
 NAME:
	I2BYT
 PURPOSE:
	splits integer*2 word into two bytes
 CATEGORY:
 CALLING SEQUENCE:
	barr = i2byt(intin)
 INPUTS:
	intin		input integer
 OPTIONAL INPUT PARAMETERS:
 KEYWORD PARAMETERS:
 OUTPUTS:
	barr		byte pair out
 OPTIONAL OUTPUT PARAMETERS:
 COMMON BLOCKS:
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:
	RDB  Autumn-91


IDEPROJECT $SSW/yohkoh/ucon/idl/metcalf/ideproject.pro
[Previous] [Next]
NAME:
     IDEPROJECT
PURPOSE:
     Warp an image so that it is deprojected from its true disk position to 
     disk center.
CATEGORY:
CALLING SEQUENCE:
     image = ideproject(image,point)
INPUTS:
     image = image array to warp (can be a data cube, in which case
              point must have one element per image)
     point = structure giving pointing information.  The structure must 
             contain at least the following tags:
                B0 = Solar B0 angle in radians
                P  = Solar P angle in radians.  Set this to zero if the image
                     has solar north up already.
                LAT = Latitude of the center of the FOV in radians
                CMD = CMD of the center of the FOV in radians
                PIX_SIZE = [x_pixel_size,y_pixel_size] in arcseconds
                RADIUS = radius of sun in arcseconds
             Point can also be a mag structure from bfits.pro
             For SXT PFI images, use get_point_str.pro to get the point
             structure.
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS
     bytscale = if set, byte scale the output image so that the lowest 15
                colors are reserved for contours etc.  The largest value
                will depend on how many colors are available (!d.table_size)
     missing = the image value to use for blank regions in the transformation.
     negative = if set, return a negative image (only if /bytscale is set)
     /cubic = Set this to use cubic interpolation in poly_2d.
     /nointerp = Set this to avoid interpolation in poly_2d.
OUTPUTS:
     image = deprojected image array.  The spatial scale of the output array
             is the same as the input array, but the dimension of the output
             is larger due to the deprojection.  I.e. each pixel in the
             output array has the same size, in arc seconds, as the input
             array, in arcseconds. 
 CALLS: ***
	GET_LATLON, POLYWARP, tag_index [1], tag_index [2]
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
     Assumes that the image is of something on the photosphere.  Since a 
     rotation is done, this will not work for X-ray images ... without 
     knowing the height of the x-ray structures, the deprojection can not
     be done correctly.

     The deprojection does not work well if some of the pixels are off the
     limb. 
PROCEDURE:
EXAMPLE:
     For SXT PFI images (white light only! See restrictions):
         point = get_point_str(index)
         newdata = ideproject(data,point)
MODIFICATION HISTORY:

       Nov, 1992  T. Metcalf
       1997-Oct-30 T. Metcalf - Improved the algorithm to compute the lat
                              and CMD at every point in the image
                              independently.  This accounts for solar
                              curvature.  To take advantage of this
                              the PIX_SIZE and RADIUS elements are 
                              required in the point structure.  If they
                              are not present, the old behavior of the
                              routine is used.
                              - Also changed the loop to assume that there
                              is a seperate point structure for each image
                              in the data cube.
      1999-Jun-25 T. Metcalf  - Added cubic and nointerp keywords.


idl_header $SSW/yohkoh/gen/idl/reformat/idl_header.pro
[Previous] [Next]
 NAME:
 PURPOSE:
 CATEGORY:
 CALLING SEQUENCE:
 INPUTS:
 OPTIONAL INPUT PARAMETERS:
 OUTPUTS:
 OPTIONAL OUTPUT PARAMETERS:
 COMMON BLOCKS:
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:


idx2img $SSW/yohkoh/ucon/idl/linford/idx2img.pro
[Previous] [Next]
	NAME: idx2img
	PURPOSE: convert selected indices to sub-image.
	
	currently:
	two case ...either da is a single image or da is an image cube.
	same is true for idx.

	change to:
	either da is single image or cube and idx is always just the
	indices of 1st image....

	History written 25-Aug-93
 CALLED BY
	wdefroi [3], wdefroi [4]


Idx2List $SSW/yohkoh/gen/idl/dbase/idx2list.pro
[Previous] [Next]
	NAME:
		Idx2List
	Purpose:
		Convert requested fields of a data-vector to String-type 
		for list directed output.
       CALLING SEQUENCE:
		Idx2List, idx, strFilter, strIdx, header
	INPUT PARAMETERS:
		idx		Structured Data-vector 
		strFilter	The Names of fields of the data-
				vector the user wishes
				to convert to String-type. Example:
				strFilter = ['day','time','periph']
		conv		flag, when set code returns converted values
				(e.g. effective exposure instead of mail-
				box value).
	OUTPUT:
		strIdx          a list of formatted strings containning the
				items in 'strFilter'.
		header		a string header for the listing.
 CALLS: ***
	GETSTRSHPCMD, GetStrDPmode, GetStrDat, GetStrExpLev, GetStrFOVcen, GetStrImgPar
	GetStrObsReg, GetStrPeriph, GetStrTim, GetStrpfiffi, Int2Ex [1], Int2Ex [2]
 CALLED BY:
	save_data [2], sda_look [1]
	History:
		written Mar '91 by GAL
		updated 27-Mar-91
		updated 1-Apr-91 for input list > 128 in length.
	     	updated 12-June-91 for minor problem with IDX index
			when "nrem" was 0.
		updated 17-June - reform statement removed; SLF 
		updated 1-Aug-91 extended the number of list parameters and
			added header parameters to all list parameters.
		updated 6-Aug-91 - added ObsRegion parameter
		updated 12-Aug-91 - PFI_FWI changed to PFI_FFI and many
			low-level routines updated to use keywords.
		updated 16-Sep-91 - change FWI to FFI in SXT Structure fields
		updated 25-Sep-91 - added conversion parameter (conv) to 
			formal parameter list.
		update  22-Jan-92, for nested index structure


igamma2 [2] $SSW/yohkoh/ucon/idl/zarro/igamma2.pro
[Previous] [Next]
 NAME:
       igamma2
 PURPOSE:
      compute incomplete gamma function
 CALLING SEQUENCE:
      z=igamma2(a,x)
 INPUTS:
      a = positive exponent
      x = independent variable (array or scalar; max value lt 35)
 OUTPUTS:
      z = integral from 0 to X of EXP(-T) T^(A-1) for A > 0.
 CALLS: ***
	GAMMA
 CALLED BY:
	GAMINC [1], GAMINC [2], GAMINC [3]
 MODIFICATION HISTORY:     
      DMZ (ARC) Aug'92
      Adapted from Numerical Recipes in C (p.171)


iionbal [2] $SSW/yohkoh/gen/idl/spectra/iionbal.pro
[Previous] [Next]
  NAME:
    iionbal
  PURPOSE:
    Return interpolated ionization fractions.
  CALLING SEQUENCE:
    ion_abun = iionbal(bal_data,Te6)
    ion_abun = iionbal(bal_data,Te6,Stages,Elem=Elem)
  INPUTS:
    bal_data	= Data structure contain data read from the ascii data
			file with the routine rd_ionbal
    Te6	= Vector of electron temperatures in units of 1.e6 K
    Stages	= Vector of ionization stages.  (XVIII = 18, etc.)

  OUTPUTS:
    The functional result is a 2-d array containing the fractional ion 
    abundances:
           ion_abun = fltarr(N_elements(Te6),N_elements(Stages))
  OPTIONAL OUTPUT KEYWORDS:
    Element	= The element (which is obtained from the last word in Head)
    Stages	= The stages returned (in case stages is no defined on input)
 CALLS: ***
	SPLINE
 CALLED BY:
	get_ionbal [1], get_ionbal [2]
  MODIFICATION HISTORY:
     4-sep-93, J. R. Lemen (LPARL), Written


IMAGE_C17 $SSW/yohkoh/ucon/idl/mctiernan/image_c17.pro
[Previous] [Next]
 NAME:
	IMAGE_C17
 PURPOSE:
	Overlay an image of an array and a contour plot of another array
	The contour plot will have 16 levels
 CATEGORY:
	General graphics.
 CALLING SEQUENCE:
	IMAGE_C17, A, B=b ;odd ps bugs if you don't use b
 INPUTS:
	A = 2 dimensional array to display as image
 KEYWORD PARAMETERS:
	B = 2 dimensional array to display as contour
	/WINDOW_SCALE = set to scale the window size to the image size,
		otherwise the image size is scaled to the window size.
		Ignored when outputting to devices with scalable pixels.
	/ASPECT = set to retain image's aspect ratio.  Assumes square
		pixels.  If /WINDOW_SCALE is set, the aspect ratio is
		retained.
	/INTERP = set to bi-linear interpolate if image is resampled.
	/NLEVELS = No. of contour levels
	/LEVELS = an array of contour levels, these two are mutually 
		exclusive, if levels is set nlevels is ignored
       color = a color, the default is to use the brightest for screen
               plots, and the reverse for postscript
 OUTPUTS:
	No explicit outputs.
 CALLED BY:
	te_scale
 COMMON BLOCKS:
	none.
 SIDE EFFECTS:
	The currently selected display is affected.
 RESTRICTIONS:
	None that are obvious.
 PROCEDURE:
	If the device has scalable pixels then the image is written over
	the plot window.
 MODIFICATION HISTORY:
	DMS, May, 1988.
	JM, Oct '92, added the second array, and the contour level options
       Added color keyword, 27-mar-95, jmm


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

  Routine matches a pair images to have the same
	magnification, rotation, and XY position.

PRO image_match, image1, image2, outimg1, outimg2, scale1, scale2, angle1, angle2, xyref1, xyref2, xyout, scaleout


 Input Parameters:
	image1, image2 = 2-d input images.  May be of any type.

	scale1, scale2 = image scales in units per pixel.  
			Assumes that both x and y axes have same scale.

	angle1, angle2 = Rotation angle in degrees, measured from the
			+Y direction toward -X,  to a common reference
			direction.  

	xyref1, xyref2 = 2-element vectors giving the location of a common
			reference location in original pixels.  The
			2 elements are the (x,y) distance from the (0,0)
			pixel.  The reference location can be outside
			both images.

 Output Parameters:
	outimg1, outimg2 = output images, magnified, shifted, rotated, to
			a common coordinate system.  Output images
			are always larger than the input images to
			avoid losing data.  The reference direction is
			toward +Y.

	xyout   =  2-element vector giving the location of the reference
			location in output pixels.  Same convention as
			input reference vector.

	scaleout  =  output image scale, units per pixel.  This is
			always the smaller of the 2 input scales.


 Routines Called:
	ROT_TRIM

 CALLS: ***
	rot_trim
 Procedure:
	Rotates and magnifies images to common system.  Computes
	vector offset of image centers, inserts images into a common
	large format that completely includes both fields.

 History:
	Written Jun 8, 1993  Barry LaBonte


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

   Purpose: return text summary of sxt image 
 CALLS:


IMG_DEFORM $SSW/yohkoh/ucon/idl/sakao/img_deform.pro
[Previous] [Next]
 NAME:
	IMG_DEFORM
 PURPOSE:
	To perform image deformation.
 CALLING SEQUENCE:
	deform_image = IMG_DEFORM(image, p, xsize, ysize)
 INPUT:
	image		- Image to be deformed.
	p		- Deformation coefficient. This variable is obtained 
			  by Wuelser san's SETPTS.
 OPTIONAL (KEYWORD)INPUT:
	xsize		- X size of the output image. Default size is the same 
			  as that of the input image.
	ysize		- Y size of the output image. Default size is the same 
			  as that of the input image.
	zoom		- zooming factor.
 OUTPUT:
	deform_image	- Deformed image with the size (xsize x ysize).
 NOTICE:
	This function makes use of a part of Wuelser san's POLY_MOVIE 
	function. 
 CATEGORY:
	Yohkoh HXT data analysis.
 CALLS: ***
	CALTRANS
 HISTORY:
	version 1.0	97.12.11 (Thu)	T.Sakao written.


IMG_HELADD $SSW/yohkoh/ucon/idl/shimizu/img_heladd.pro
[Previous] [Next]
 NAME:
        IMG_HELADD  
 PURPOSE:
      Obtain the heliocentric address of the mouse-clicked position.
 CALLING SEQUENCE:
      IMG_HELADD, data, index, hel, [rebin= rebin_factor, noscale= noscale] 
 INPUTS:
      data - A SXT image data
      index - Yohkoh index structure
 OPTIONAL INPUTS:
      rebin - the factor to magnify "show_data" in the display.
              Only integer factor is allowed.
      noscale - If set, use TV instead of TVSCL in the image display.
 OUTPUTS:
      hel - helicentric address
              hel(1) - NS address (N: positive)
              hel(0) - EW address (W: positive)
 CALLS: ***
	conv_p2h [1], conv_p2h [2], gt_corner, gt_res
 PROCEDURE:
      Call "conv_p2h" to calculate the heliocentric address. 
 HISTORY:
      13 June, 1993  written by T.Shimizu (Univ.of Tokyo)
      19 June, 1993  Use "conv_p2h" and fix bugs  (T.Shimizu)


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

 PURPOSE:
         To take two images of the sun and resize, and repostion
         the second one so that it lies on top of the first one.
      
 METHOD: Both images are passed through GEN_LOC to find the centroid
         and the axial diameters, the second is then resized and 
         reposisitioned to match the first (the TARGET).
         The SXT variable indicates which images, if any, are SXT images. 

 CALLING SEQUENCE:

          outimg=img_match(trgimg,gboimg,sxt[,indx1][,indx2][,mktv=mktv])
                                                            
 PARAMETERS:

	    outimg      the rescaled output image.
	    gboimg      the input image.
           trgimg      the target image to which it is to be matched.
 	    sxt         a binary two-vector mask: 1=sxt, 0=gbo.

           indx1       a single index entry for either trgimg or gboimg. 
           indx2       the second index when both are SXT images.       


 KEYWORDS:
	   MKTV   	if you want to put outimg on a window set /mktv.
	   QUIET	pass through to DSK_LOCG, no display.
	   INTER	pass through to DSK_LOCG, interactive point edit.


 CALLED BY:
	rt_fits, rt_mag
 RESTRICTIONS:

             When working with fits images the top few lines or so 
             should be removed before input. These contain the 
             header and gum things up.

	      When matching an SXT to a GBO image the sizes must be the
	      same to within about 5%. In all other cases there is no
	      restriction on relative size.

 RETURN TYPE: Same as input.
 
 CALLS: ***
	CONGRID [1], CONGRID [2], CONGRID [3], GEN_LOC
 HISTORY:
	   Procedure developed to shrink BBSO Halpha image and place it
	   correctly in a 512x512 SXT image. Written by L. Acton  7-nov-91
	   Modified for generality  A. McAllister 10-apr-92
          Added automatic sun finder, A. McA. 16-apr-92
          Corrected for different vertical/horizontal scaling A.McA 18-apr-92

          Version 2. Rewrote for general sized matrices, using DSK_LOC.
          changed calling sequence to include target image, A.McA 24-apr-92
          Replaced location routine. Can now handle SXT images, A.McA. 6-may-92
          Added fractional pixel repositioning, A.McA. 7-may-92
          Changed congrid call to use bilinear extrapolation, A.McA. 26-may-92
          Output variable type now same as input type, A.McA. 2-dec-92

	   Version 3. Reworked for flexiable image type. Renamed from
	   GBO_SCALE2, A.McA. 14-dec-92.
	   Minor change to match DSK_LOCG use, added QUIET and INTER 
	   keywords, A.McA. 24-aug-94.
          Changed congrid call to use cubic convolution interpolation, A.McA. 24-aug-94


img_seq [1] $SSW/yohkoh/ucon/idl/takahash/img_seq.pro
[Previous] [Next]
NAME:
          img_seq
PURPOSE:
          Draw the image sequence of three dimension array.
METHOD:
          idl> img_seq,index,data
Your Response:
          1. Pixel number of one image.
             Size of "data" can be known from 
              idl> help,data
             The data's type is 
               data(X-pixels number,Y-pixels number,image number)
             where X-pixels number equals to Y-pixels number.
             Image numbers are corresponding to time-sequence.
          2. Arrangement of each image.
             Usually time evolution is in the X-direction. 
             But you must take account of the arrangement in
             the Y-direction, because there is the limit of number 
             of image in the X-direction.
          3. Y or N for image type.
             If Y, images are drawn after inputing each image to
             one array, by "TVSCL".
             If N, images are drawn one by one in the window.
          4. Character size for time.
             Input character size for time added in each image.
 CALLS: ***
	CONGRID [1], CONGRID [2], CONGRID [3], IMG_TWRITE, gt_time [1], gt_time [2]
HISTORY:
          M. Takahashi 93.8.21 early


img_seq [2] $SSW/yohkoh/ucon/idl/takahash/img_seq_p2.pro
[Previous] [Next]
NAME:
          img_seq
PURPOSE:
          Draw the image sequence of three dimension array.
METHOD:
          idl> img_seq,index,data
Your Response:
          1. Pixel number of one image.
             Size of "data" can be known from 
              idl> help,data
             The data's type is 
               data(X-pixels number,Y-pixels number,image number)
             where X-pixels number equals to Y-pixels number.
             Image numbers are corresponding to time-sequence.
          2. Arrangement of each image.
             Usually time evolution is in the X-direction. 
             But you must take account of the arrangement in
             the Y-direction, because there is the limit of number 
             of image in the X-direction.
          3. Y or N for image type.
             If Y, images are drawn after inputing each image to
             one array, by "TVSCL".
             If N, images are drawn one by one in the window.
          4. Character size for time.
             Input character size for time added in each image.
HISTORY:
          M. Takahashi 93.8.21 early


ImgParam $SSW/yohkoh/sxt/idl/to_be_deleted/imgparam.pro
[Previous] [Next]
	NAME:
		ImgParam
	PURPOSE:
		Decode the ImgParam BYTE field into the four component 
		values exposure cadence, noOfROIs, compression, and 
		image resolution.
	CALLING SEQUENCE:
		ImgParam, [val=inbuf, cadence=cadence, noOfROIs=noOfROIs, 
			compress=compress, imgRes=imgRes]
	INPUT/keyword:
		inbuf	is the ImgParam byte-type field value.
	OUTPUT/keyword:
		cadence		is the decode exposure cadence:
				(e.g. 0=2sec, 1=1sec, 2=.5sec)
		noOfROIs        is the decode # of ROIs in the FFI:
				(e.g. 0=1 ROI, 1=2 ROI, 2=3 ROI, 3=4ROI).
		compress	is the compression algorithm for the
				12bit CCD output: 
				0=compress, 1=Low8, 2=Hi8
		imgRes		is the image resolution
				(e.g. 0=1x1, 1=2x2, 2=4x4)
 CALLED BY:
	GetStrImgPar
	History:
		Written by GAL 31-July-91
		12-Aug-91, changed formal parameters to keywords


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

       PURPOSE:
               To take two images of the sun and resize, and repostion
               the second one so that it lies on top of the first one.
		Like GBO_SCALE2, except it takes traget data as input,
		rather than the target image.
      
       METHOD: The image is passed through gen_loc to find the centroid
               and the axial diameters, it is then resized and reposisitioned 
               to match the data in TRGDT.
               When the target, or both images, are SXT images set the SXT
               keyword to 1 or 2, respectively.

	CALLING SEQUENCE:

               outimg=imgscl(trgdt,gboimg[,indx1,indx2][,sxt=sxt][,mktv=mktv])

		trgdt is a 6 component vector which contains: the centroid (0,1), 
               the radii(horizontal,vertical;2,3), and the pixel size (x,y:4,5) 
		of the target image.

	        gboimg is the input GBO image.

               indx1 is the index entry for the target image and indx2 is 
               the index entry for gboimg. These are necessary for
               SXT images. Then you must also set the SXT keyword (see below).

       NOTES:
               When working with fits images the top 5 lines or so 
               should be removed before input. These contain the 
               header and gum things up.


	KEYWORDS:
                SXT    This is the flag indicating weither the images
                       are sxt images or not. If only the target is an
                       sxt image the keyword should be set to 1, if
                       they both are it should be set to 2.
 
	         MKTV   if you want to put outimg on a window set /mktv.

       OUTPUT TYPE:

       CALLS: ***
	CONGRID [1], CONGRID [2], CONGRID [3], GEN_LOC
	HISTORY:
	   Procedure developed to shrink BBSO Halpha image and 
	   place it correctly in a 512x512 SXT image 
	   Written by L. Acton  7-nov-91
	   Modified for generality  10-apr-92
          Added automatic sun finder, A. McA. 16-apr-92
          Corrected for different vertical/horizontal scaling A.McA 18-apr-92
          Version 2. Rewrote for general sized matrices, using dsk_loc.
          changed calling sequence to include target image, A.McA 24-apr-92
          Replaced location routine. Can now handle SXT images, A.McA. 6-may-92
          Added fractional pixel repositioning, A.McA. 7-may-92
          Changed congrid call to use bilinear extrapolation, A.McA. 26-may-92
	   Rewritten from GBO_SCALE2, takes target info as input, A.McA. 6-oct-92
          Output variable type now same as input type, A.McA. 2-dec-92


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

 PURPOSE:
         To an image of the sun and resize, and repostion it to match
         an input centroid and radius.
	  Like IMG_MATCH, except it takes traget data as input, rather
	  than the target image.
      
 METHOD: The image is passed through GEN_LOC to find the centroid
         and the axial diameters, it is then resized and reposisitioned 
         to match the data in TRGDT.
         The SXT variable indicates which images, if any, are SXT images.

 CALLING SEQUENCE:

         outimg=imgscl2(trgdt,gboimg,sxt[,indx1][,indx2][,mktv=mktv])

 PARAMETERS:

	    outimg      the rescaled output image.
	    trgdt       a 6 component vector which contains: the CENTROID (0,1), 
                       the DIAMETERS(horizontal,vertical;2,3), and the pixel 
	                size (x,y:4,5) of the target image. 
	    gboimg      the input image.
 	    sxt         a binary two-vector mask: 1=sxt, 0=gbo.
           indx1       a single index entry for either trgimg or gboimg.
           indx2       the second index when both are SXT images.

 KEYWORDS:
 
	   MKTV   	if you want to put outimg on a window set /mktv.
	   QUIET	pass through to DSK_LOCG, no display.
	   INTER	pass through to DSK_LOCG, interactive point edit.
       
 CALLED BY:
	align_cube, gbo_pfi, rt_fits, rt_hdha, rt_nkr
 RESTRICTIONS:
             When working with fits images the top few lines or so 
             should be removed before input. These contain the 
             header and gum things up.

	      When matching an SXT to a GBO image the sizes must be the 
	      same to within about 5%. In all other cases there is no
	      restriction on relative size.

 RETURN TYPE: Same as input.

 CALLS: ***
	CONGRID [1], CONGRID [2], CONGRID [3], GEN_LOC, gt_res, his_index
 NOTE:      Expects the indeices to have .HIS tags and that "his_index,/enable"
	     has been invoked.                                                    

 HISTORY:
	   Procedure developed to shrink BBSO Halpha image and 
	   place it correctly in a 512x512 SXT image 
	   Written by L. Acton  7-nov-91
	   Modified for generality  10-apr-92
          Added automatic sun finder, A. McA. 16-apr-92
          Corrected for different vertical/horizontal scaling A.McA 18-apr-92

          Version 2. Rewrote for general sized matrices, using dsk_loc.
          changed calling sequence to include target image, A.McA 24-apr-92
          Replaced location routine. Can now handle SXT images, A.McA. 6-may-92
          Added fractional pixel repositioning, A.McA. 7-may-92
          Changed congrid call to use bilinear extrapolation, A.McA. 26-may-92

	   Rewritten from GBO_SCALE2, takes target info as input, A.McA. 6-oct-92
          Output variable type now same as input type, A.McA. 2-dec-92

	   Version 2. Reworked for flexiable image type. A.McA. 14-dec-92 
	   Return radius rather than diameters for first GEN_LOC/SXT 
	   call,A.McA 14-feb-94 
	   Reworked to index update to function with FIT_LIMB. A.McA. 4-apr-94.
	   Minor change to match DSK_LOCG use, added QUIET and INTER 
	   keywords, A.McA. 24-aug-94.
          Changed congrid call to use cubic convolution interpolation, A.McA. 24-aug-94
	   Added CIR keyword, for use with corrected images, A.McA. 2-sep-94.
	   Apply INTER keyword as passthrough for 2nd SXT call as well, AMcA, 1-apr-95.
	   Added INTER for 2nd GBO call too, AMcA, 18-apr-95.


IMREB $SSW/yohkoh/ucon/idl/hudson/imreb.pro
[Previous] [Next]
 NAME :
       IMREB
 PURPOSE:
       Enlarge image .
 CALLING SEQUENCE:
       out = imreb(data, factor=factor, sample=sample)
 INPUTS:
       data        = image array.
       factor   = integer of enlargement factor
 OUTPUTS:
       out = Enlargement of image data 
 SIDE EFFECT:

 COMMON BLOCKS:

 MODIFICATION HISTORY:
       Written  May 4, 1992 - Bachtiar Anwar


IMSHIFT $SSW/yohkoh/ucon/idl/hudson/imshift.pro
[Previous] [Next]
 NAME : 
       IMSHIFT
 PURPOSE : 
        To  shift image to in x and y displacement
 CALLING SEQUENCE :
        img_shif=imshift(data, xyshift, istart=ist, iend=ien)
 INPUTS:
        data     =  image cube array
        xyshift  = array of displacement  
        ist   = start of index (default = 0) 
        ied   = end of index   (default = last of image index)
 OUTPUTS:
        img      = shifted images
 SIDE EFFECTS :
        None
 COMMON BLOCKS :
       
 MODIFICATION HISTORY:
        Written by Bachtiar Anwar, Hugh Hudson - April 6, 1992
        Updated 27-4-92  Bachtiar Anwar


in_fov $SSW/yohkoh/gen/idl/ys_util/in_fov.pro
[Previous] [Next]
NAME:
	in_fov
PURPOSE:
	Given a location on the sun, find which of the list of images
	have field of views which encompass that location.
SAMPLE CALLING SEQUENCE:
	qok = in_fov(ref_loc, ref_date, loc_arr, times, /boolean)
	ss = in_fov([0,0], gsn=gsn_head)	;near the center of the disk
	ss = in_fov('N30W55', '14-JUL-94  13:36:18', gsn=gsn_head, /helio)
	ss = in_fov('S20W60', '9-nov-91', sxt=rmap)
	ss = in_fov([0,0], gsn=gsn_head, /carrington)
	ss = in_fov('FULLD', gsn=gsn_head, full_disk=full_disk)
INPUT:
	ref_loc	- The location.  Default is in units of "angle from sun
		  center in arcseconds.  If /HELIO is specified or the input
		  data type is string, it is the heliocentric coordinates
		  in degrees.  It is the carrington Lat/Lon in degrees if
		  /CARRINGTON is set.
	ref_date - The reference date which goes with the heliocentric 
		  coordinate.  Not used if REF_LOC is angle or carrington.
	loc_arr	- 2xN array of locations in angles from sun center in arcsec
                    (0,*) = angle in E/W direction with W positive
                    (1,*) = angle in N/S direction with N positive
	times	- The date/time associated with the 2xN location array
 CALLS: ***
	anytim2ints [1], anytim2ints [2], conv_c2a, data_type [1], data_type [2]
	fmt_tim [1], fmt_tim [2], gt_center, gt_pix_size, gt_shape, track_h2a [1]
	track_h2a [2], track_h2a [3]
 CALLED BY:
	soon_search [1], soon_search [3]
OPTIONAL KEYWORD INPUT:
	sxt	- The SXT index or roadmap can be passed instead of passing
		  LOC_ARR and TIMES
	gsn	- The SOON/SPOT file header structure can be passed instead
		  of LOC_ARR and TIMES
	helio	- If set, the REF_LOC values are in heliocentric coordinates
	carrington- If set, the REF_LOC values are in carrinton coordinates
	boolean	- If set, return an array the same length as the input with
		  a 1 for images which are in the field of view
	full_disk- If set, select all full disk images
OUTPUT:
	ss	- Returns the subscripts of the input locations which 
		  contain the reference location.  The output is a boolean
		  array if /BOOLEAN is set which contains "N" elements and
		  is set to 1 if the location (image) contains the reference
		  location.
HISTORY:
	Written 5-Aug-94 by M.Morrison
	 8-Aug-94 (MDM) - Modified the header information.
	19-Apr-95 (MDM) - Added /FULL_DISK option


indgenx $SSW/yohkoh/ucon/idl/kawai/indgenx.pro
[Previous] [Next]
NAME:
       indgenx
CALLING SEQUENCE:
       result = indgenx(N,M)
PURPOSE:
       INDEGENX returns index array, i.e. [0,1,2,3, .... , N], 
       excluding M(0), M(1), M(2), ....
CATEGORY:
INPUTS:
       N = integer
       M = integer array
OUTPUTS:
  result = integer array
           [0,1,2,3, ..., M(0)-1, M(0)+1, ...., M(1)-1, M(1)+1, ...., N-1]
COMMON BLOCKS:
SIDE DEFFECTS:            
RESTRICTIONS:

EXAMPLES:
IDL> print, indgenx(10,[3,4,8])
    0    1    2    5    6    7    9
HISTORY:
      Goro Kawai, Mar. 22, 1993


INF_STR $SSW/yohkoh/ucon/idl/shimizu/inf_str.pro
[Previous] [Next]
 NAME:
       INF_STR 
 PURPOSE:
       Extract information of Day,Time,Filter,Exp time and    
     output those as string array.
 CATEGORY:
       SOLAR-A/SXT data analysis
 CALLING SEQUENCE:
       info = inf_str(index)
 INPUTS:
       index = index information of reformatted database
 OPTIONS:
       None.
 OUTPUTS:
       info = string array of the information.
        For example, '25-OCT-91 12:32:31 Al.1 77.67ms'
 CALLS: ***
	gt_day [1], gt_day [2], gt_expdur [1], gt_expdur [2], gt_filtb, gt_time [1]
	gt_time [2]
 COMMON BLOCKS:
       None.
 SIDE EFFECTS:
       None.
 RESTRICTIONS:
       None.
 PROGRAMER:
       Toshifumi Shimizu
           Department of Astronomy, University of Tokyo, JAPAN
 HISTORY:
       Ver 1.0  16-JAN-1992  made


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

   Purpose: convert 2xn integer array -> long word array for easier
	     checks of unique pairs - (uniq x/y combos)
 CALLED BY
	OR_SHAPE


INTEG [2] $SSW/yohkoh/gen/idl/util/integ.pro
[Previous] [Next]
 NAME:
       INTEG
 PURPOSE:
       Trapezoidal integration of the area under a curve
 CALLING SEQUENCE:
       Result=INTEG(y)
       Result=INTEG(x,y)
       Result=INTEG(x,y,imin,imax)
 INPUTS:
       x = array containing independent variable.  If omitted, then
           x is assumed to contain the index of the y variable.
           x=indgen(n_elements(y)).
       y = array containing dependent variable y=f(x)
       imin = index of x array at which to begin the integration.  If
              omitted, then integration starts at x(0).
       imax = index of x value at which to end the integration.  If 
              omitted then the integration ends at x(npts).
 OUTPUTS:
       result = area under the curve y=f(x) between x(imin) and x(imax).
 PROCEDURE:
       The area is determined of indivdual trapezoids defined by x(i),
       x(i+1), y(i) and y(i+1).
 MODIFICATION HISTORY:
       Written, W.B. Landsman, STI Corp. May 1986
       Modified so X is not altered in a one parameter call Jan 1990


interp1d [3] $SSW/yohkoh/gen/idl/util/interp1d.pro
[Previous] [Next]
 NAME:
   interp1d
 PURPOSE:
   Perform fast linear 1d interpolation 

   Uses the IDL INTERPOLATE procedure, which requires an equally spaced grid.
   If X0 is not equally spaced, will generate an equally spaced grid first and
   then use INTERPOLATE to do the interpolation.

 CALLING SEQUENCE:
   result = interp1d(x0,y0,x1)
   result = interp1d(x0,y0,x1,dx,missing=missing)
   result = interp1d(x0,y0,x1,missing=missing)
   result = interp1d(x0,y0,x1,/interp)		; Use spline interpolation to 
						; generate equally spaced grid
 INPUTS:
   X0	= The absicissae values for Y0.
   Y0  = The function to interpolate
   x1	= The abscissae values for the result.
 OPTIONAL INPUTS:
   dx  = The step size in X for equally spaced data.  If given,
	  will eliminate a check to see that X0 is equally spaced.
	  This is the fastest way to call this routine.
 OPTIONAL INPUT KEYWORDS:
   missing = Value to points which have X1 gt max(X0) or X1 lt min(X0)
   interp  = If set will call spline to construct linear grid if dx is
             not specified.
 OPTIONAL OUTPUT KEYWORDS:
   dx  = If dx is not specified, dx = abs(total(X0-X0(1:*))) / (n_elements(X0)-1)
   new_Y = New values interpolated at dx spacing
 Returned:
   result = a vector N_elements(X1) long 

 CALLED BY:
	sxt_flux [1], sxt_flux [2], sxt_flux [3], width_1d
 PROCEDURE:
   This routine interpolates faster than interpol because it makes use of
   the fact that the data interpolated by the IDL INTERPOLATE function
   must be evenly spaced.

   If dx is specified as the fourth paramter, directly interpolate.
   If dx is not specified, compute std = std(x0(1:*)-x0, dx).  If
         (std/dx) is lt 1.e-5, interpolate the result.
   If dx is not specified and (std/dx) is greater than 1.e-5 then:
      1. Construct a new grid starting at x0(0) and going in dx step sizes.
      2. Call dspline to construct a linear grid
      3. Then interpolate.
 CALLS: ***
	DOC_LIBRARY, DSPLINE, STDEV
 RESTRICTIONS:
   No extrapolation is performed.  If extrapolation is desired, use the
   IDL user library INTERPOL routine.
 HISTORY:
   31-aug-94, J. R. Lemen LPARL, Written.


interp2d [3] $SSW/yohkoh/gen/idl/util/interp2d.pro
[Previous] [Next]
 NAME:
   interp2d
 PURPOSE:
   Perform bilinear 2d interpolation using the IDL intrinsic 
   interpolate procedure
 CALLING SEQUENCE:
   result = interp2d(A,x0,y0,x1,y1)
   result = interp2d(A,x0,y0,x1,y1,/grid)
   result = interp2d(A,x0,y0,x1,y1,/regular,/cubic)
   result = interp2d(A,x0,y0,x1,y1,missing=missing)
 INPUTS:
   A	= 2d array to interpolate
   x0	= Values that correspond to A(0,0), A(1,0), ...
   y0  = Values that correspond to A(0,0), A(0,1), ...
   x1	= New X values at which A should be interpolated
   y1  = New Y values at which A should be interpolated
 OPTIONAL INPUTS:
   nxny = [nx,ny] Vector of length 2 which specifies the size of
         the regular linearized grid produced with trigrid.  The
         default is nxny = [51,51].  If the size of A is much larger
	  than 51 by 51, greater accuracy may be obtained by having
         nxny = [n_elements(A(*,0),n_elements(A(0,*))]
 OPTIONAL INPUT KEYWORDS:
   grid= If set, return an n_elements(X1) by n_elements(y1) grid
   missing = Value to points which have X1 gt max(X0) or X1 lt min(X0)
		and the same for Y1.
   quintic = If set, use smooth interpolation in call to trigrid
   regular = If set, do not call trigrid -- x0 and y0 must be linear.
   cubic   = If set, use cubic convolution
 Returned:
   result = a vector N_elements(X1) long 
      or, if /grid is set
   result = an array that is N_elements(X1) by N_elements(Y1)

 CALLED BY:
	DROT_MAP, DROT_RASTER, GRID_MAP, HSI_XY2ANNSEC [1], HSI_XY2ANNSEC [2], INTER_MAP
	ITOOL_DIFF_ROT, ROT_MAP, collexc [1], collexc [2], eit_temp, hsi_sim_random_2d
	temp_random_fn_a
 PROCEDURE:
   First call the IDL intrinsic routines TRIANGULATE & TRIGRID to make
	sure that X0 and Y0 are linear (if /regular is not set).
   Then call the IDL intrinsic INTERPOLATE to do bilinear interpolation.
 RESTRICTIONS:
   X0 and Y0 must be linear functions.
   A must be a 2-d array
 HISTORY:
    9-mar-94, J. R. Lemen LPARL, Written.
   20-Jan-95, JRL, Added the REGULAR & CUBIC keywords


interp_arr [3] $SSW/yohkoh/gen/idl/util/interp_arr.pro
[Previous] [Next]
 NAME:
   interp_arr
 PURPOSE:   
	Linearly interpolate the two input arrays to the requested time.

 CALLING SEQUENCE:
   New_arr = interp_arr(img1 ,img2, Time1, Time2, Time3)
   New_arr = interp_arr(img1 ,img2, Time1, Time2, Time3, unc_img1, unc_img2, unc_arr)

 INPUTS:
   img1,img2	= Two images that will be linearly interpolated
   Time1, Time2= The times corresponding to img1, img2 in any standard
		  Yohkoh standard time format.
   Time3	= The time to which the returned image should be interpolated

 OPTIONAL INPUTS:
   unc_img1, unc_img2 = uncertainties in img1 and img2, both must be
   		  passed in if the uncertainty is to be calculated

 OPTIONAL OUTPUT:
   unc_arr = the array of uncertainties in the final image

 CALLS: ***
	ADDTIME [1], ADDTIME [2], anytim2ex [1], anytim2ex [2]
 CALLED BY:
	hxi_interp, interp_img, sxt_interp [1], sxt_interp [2]
 MODIFICATION HISTORY:
  9-oct-92, Written, G. A. Linford (and J.R. Lemen)
  29-sep-95, jmm, Added uncertainty calculation


interp_img $SSW/yohkoh/ucon/idl/linford/interp_img.pro
[Previous] [Next]
							20-Oct-92
 NAME:
	interp_img
 PURPOSE:
	Linearly interpolate input images to the desired time (time).
 
 CALLING SEQUENCE:
	interp_img, idx1, img1, idx2, img2, time, nidx, nimg, [Nocomp=Nocomp]

 INPUTS:
	img1, img2	Two images to be linearly interpolated
	idx1, idx2	index or roadmaps of the two images
	time		time to which the returned image should be 
			interpolated to (in any standard Yohkoh standard 
			time format (e.g. index or roadmap var.)
	Nocomp		OPTIONAL input switch to return interpolated
			decompressed normalized image.

 Outputs:
	nidx		returned index for interpolated image.  This
			is defined as the input img with the shortest expdur.
	nimg		compressed interpolated image.  Use exposure
			durations of nidx to decompress and normalize.

 Method Notes:
	When interpolating images care is taken to ensure that
	the resulting image has saturated pixels where EITHER image
	is saturated, as there is NO Way one can be sure of the actual
	DN in a saturated pixel.

 CALLS: ***
	Ex2Int [1], Ex2Int [2], UNIQ [1], UNIQ [2], UNIQ [3], anytim2ex [1], anytim2ex [2]
	gt_expdur [1], gt_expdur [2], gt_res, interp_arr [1], interp_arr [2]
	interp_arr [3], sxt_comp, sxt_decomp [1], sxt_decomp [2]
 MODIFICATION HISTORY:
	9-Oct-92, written GAL
	20-Oct-92, extended to half and quater res.


interp_or $SSW/yohkoh/sxt/idl/util/interp_or.pro
[Previous] [Next]
NAME:
	interp_or
PURPOSE:
	To intepolate the gaps caused by observing region strips
INPUT/OUTPUT:
	data	- The data cube
INPUT:
	st_en_lin 
OPTIONAL INPUT:
	st_img	- Starting image number to process
	en_img	- Ending image number to process
 CALLED BY:
	sxt_prep [1], sxt_prep [2], sxt_prep [3]
OPTIONAL KEYWORD INPUT:
	trim_edge- If set, interpolate and replace the edge pixels
		   as well as the gaps (because when POLY_2D does the
		   sub pixel registration, it loses some signal)
HISTORY:
	Written 12-Aug-93 by M.Morrison
	22-Sep-93 (MDM) - Added "st_img" and "en_img"
	31-Jan-94 (MDM) - Modified to correct error when missing
			  some PFI strips.
			- Modified to use the correct lines when using
			  the /TRIM_EDGE option (it was selecting lines
			  two lines away, ie: trimming two lines since
			  the code automatically trims one when selecting
			  the lines to average)
			- Corrected a scaling problem


interpol_yoh $SSW/yohkoh/ucon/idl/morrison/interpol_yoh.pro
[Previous] [Next]
NAME:
	interpol_yoh
PURPOSE:
	To time interpolate a 1-D array to a different set of time.
SAMPLE CALLING SEQUENCE:
	out = interpol_yoh(index_d, sld.avg_arr(6), index_s)
INPUT:
	x_in	- The x input array with the times
	y_in	- The y input array (that goes with x_in)
	x_out	- The new x time array to interpolate "x_in" to
OUTPUT:
	out	- The new "y" array
 CALLS: ***
	INTERPOL, anytim2ints [1], anytim2ints [2], int2secarr [1], int2secarr [2]
HISTORY:
	Written 2-Sep-93 by M.Morrison


INTERPU_1D $SSW/yohkoh/ucon/idl/mctiernan/interpu_1d.pro
[Previous] [Next]
 NAME:
	INTERPU_1D
 PURPOSE:
	Linearly interpolate vectors with an irregular grid.
       Calculates the uncertainties. 
 CALLING SEQUENCE:
	Result = interpu_1d(v, x, x_new, inp_unc=inp_unc, $
                           ux_new=ux_new, out_unc=out_unc)
 INPUTS:
	v:	The input vector can be any type except string.

	x:	The absicissae values for v.  This vector must have same # of
		elements as v.  The values MUST be monotonically ascending 
		or descending, you can get away with degenerate values
               of x, if you interpolate to a degenerate point, the final value
               will be an average.
	x_new:	The absicissae values for the result.  The result will have 
		the same number of elements as x_new.  X_new doesn't need to
               be monotonic.
 OUTPUTS:
	INTERPU_1D returns a floating-point vector of N points determined
	by linearly interpolating the input vector.
       If the input vector is byte or integer or real, the result is real
	If the input vector is double, the result is double
 KEYWORDS:
       inp_unc = uncertainty in input vector v, can be a scalar
       ux_new = uncertainty in x_new, can be a scalar
       out_unc = uncertainty in output vector, this'll only be calculated
                 if inp_unc or ux_new or both are set.
 CALLED BY:
	SXT_POWL, align_hxi, dem_models, dfx_1th_l, dfx_1th_lo, dfx_2th_l, dfx_thppl_l
	dfx_thppl_lo, fdf10_init, fwhm_histo, fx_1th_l, fx_1th_lo, hxt_cutoff, sxt_dn_int
	sxt_fsp_resp, sxt_t6_resp0, sxthxt_fsp, sxtth_hxt, time_interp, time_smooth
 PROCEDURE:
	Result(i) = V(x) + (x - FIX(x)) * (V(x+1) - V(x))

	where x = U(i).

 MODIFICATION HISTORY:
	Written, DMS, October, 1982.
	Modified, Rob at NCAR, February, 1991.  Made larger arrays possible 
		and correct by using long indexes into the array instead of
		integers.
       Stripped users lib, INTERPOL, and added uncertainties, 1/26/95, jmm
       Sorts the data to monotonically increase, 5-apr-1996, jmm


interpu_2d [2] $SSW/yohkoh/ucon/idl/mctiernan/interpu_2d.pro
[Previous] [Next]
 NAME:
       interpu_2d.pro
 PURPOSE:
       Linearly interpolates in 2 dimensions, similar to the 
       Users Library routine Interpol. 
 CALLING SEQUENCE:
       f = interpu_2d(a, x, y, x_new, y_new, inp_unc=inp_unc, $
                     ux_new=ux_new, uy_new=uy_new, out_unc=out_unc)
 INPUT:
       a = the array to be interpolated on.
       x= grid values for the vector a, need not be monotonic.
           N_ELEMENTS(X) must equal N_ELEMENTS(A(*,0))
       y= grid values for the vector a, need not be monotonic.
           N_ELEMENTS(Y) must equal N_ELEMENTS(A(0,*))
       x_new= values of x for the result
       y_new= values of y for the result
 OUTPUT:
       f= an nxXny array, determined by linear interpolation.
 KEYWORDS:
       inp_unc= uncertainty in the input array, can be a scalar
       ux_new= uncertainty in x_new
       uy_new= uncertainty in y_new
       out_unc= output uncertainty, only calculated if one or
                more of the input uncertainties are set.
 CALLS: ***
	DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], delvarx [5]
 CALLED BY:
	align_hxi
 HISTORY:
       19-APR-93 by JM
       Interpol calls removed and uncertainties added, 1/26/95, jmm
       Sorts the data to monotonically increase, 5-apr-1996, jmm


intextime $SSW/yohkoh/bcs/idl/util/intextime.pro
[Previous] [Next]
 INTEXTIME v1.6 (IDL2)

   Convert bda time from internal format 
   to bsdtime format.
   particularly useful for arrays of times to be converted, as 
   it is considerably faster than int2ex.(factor 10) For scalars use int2ex.

 author:	Andy Phillips, MSSL 1991
 in:		days79   (array)   - days since 1979.0
		msecday  (array)   - milliseconds of day
 out:		bsdtime    - 7 element lonarr time in format 
			     hh mm ss msec dd mm yy

 syntax:  	time = intextime(days79,msecday)

 CALLED BY:
	plot_ref
 history:
	v0.1 atp translation of RLSAC::MKC 's FORTRAN code 
		 intext.for .
	v0.9 atp release, cleaned up code a little.
       v1.2 atp changed to do all at once.
       v1.4 atp bugfix for leap year month handler.
       v1.5 atp 20/3/92 changed to std ext time format.
	v1.6 atp 27/6/92 changed to accept any sort of datatype

 notes:
	no error checking is done on the time,
	it is entirely possible to return an impossible time.
       accepts an array, much faster.


INTS4NEXT_DAY $SSW/yohkoh/ucon/idl/sakao/ints4next_day.pro
[Previous] [Next]
 NAME:
	INTS4NEXT_DAY
 PURPOSE:
	Returns a proper INTS variable with correct day/time tags, i.e., 
	returns an INTS not having INTS.time = 46:00:00, or something like 
	that sort. 
 CALLING SEQUENCE:
	out_ints = INTS4NEXT_DAY(in_ints)
 INPUT:
	in_ints		- Input INTS which may have INTS.time larger than 
			  86400000 msec (one day long). 
 OUTPUT:
	out_ints	- Output INTS with proper .day/.time tags.
 CALLED BY:
	HXT_IMAGE_TIME
 SIDE EFFECTS:
	none
 CATEGORY:
	Yohkoh data analysis.
 HISTORY:
	version 1.0	98.08.27 (Thu)	T.Sakao written.


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


       PURPOSE: to turn a matrix upside down using a simple pixel to 
		 pixel mapping


       METHOD: use indgen to make in index and invert that.


       CALLING SEQUENCE:   outdata = invrt(indata)


       PARAMETERS: indata   input data array


       KEYWORDS:  x    when set it flips about the vertical axis
		   y    when set it flips about the horizontal axis

       HISTORY: drafted dec-19-92 AMcA.



IRU_FILT $SSW/yohkoh/gen/idl/pointing/iru_filt.pro
[Previous] [Next]
 NAME:
        IRU_FILT
 PURPOSE:
        Returns pointer to "good" IRU values, replaces bad values through
        linear interpolation of neighbours, and takes care of "roll over"
        of IRU values from (hex) FFFFFF to 0 (by adding 1000000 if required).
 CATEGORY:
 CALLING SEQUENCE:
        iru_filt,iru_i,iru_d
 INPUTS:
        iru_i = pnt, atr, or mk_timarr(ada_index,8,/struct)
        iru_d = array(3,*). iru data. iru_d is returned with bad values fixed
                IF THE PARAMETER IS A SIMPLE VARIABLE.
 KEYWORDS (INPUT):
 OUTPUTS:
        iru_d   (see under inputs above)
 KEYWORDS (OUTPUT):
        w_good = pointer vector to the originally "good" iru values.
                 The fixed values are not included in w_good.
 CALLS: ***
	int2secarr [1], int2secarr [2]
 CALLED BY:
	GET_SUNCENTER [1], GET_SUNCENTER [2], IRUHXA2SXT, IRUHXASCAN2SXT [1]
	IRUHXASCAN2SXT [2]
 COMMON BLOCKS:
        None.
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
        detects IRU spikes by subtracting a nearest neighbourhood average.
 MODIFICATION HISTORY:
        19-Jul-93 (JPW)  From get_suncenter.
        27-sep-93 (JPW)  Do the filter for all 3 iru's (new: also for Z).


IRU_OFFS $SSW/yohkoh/ucon/idl/hudson/iru_offs.pro
[Previous] [Next]
 NAME:
 	IRU_OFFS
 PURPOSE:
	Driver for Wuelser's program getcal_off for flare cubes
 CALLING SEQUENCE:
 WARNINGS:
	input times need to be msod
 CALLS: ***
	GETCAL_ATT [1], GETCAL_ATT [2], RD_ADA, Rd_Roadmap [2], gt_time [1], gt_time [2]
	rd_roadmap [1]
 HISTORY:


IRU_S2Y $SSW/yohkoh/gen/idl/pointing/iru_s2y.pro
[Previous] [Next]
 NAME:
        IRU_S2Y
 PURPOSE:
        Reconstructs "raw" IRU-Y values by using a combination of IRU-X,
        IRU-Z, and IRU-S.  This became necessary due to the IRU switch
        from Y to S on September 20, 1993.  The program applies the
        correction only to data after 20-sep-93, 4:20 UT.
 CATEGORY:
 CALLING SEQUENCE:
        iru_xyz = iru_s2y(iru_i,iru_xsz)
 INPUTS:
        iru_i = pnt, atr, or mk_timarr(ada_index,8,/struct)
        iru_xsz = array(3,*). iru data, not corrected for iru switch.
 KEYWORDS (INPUT):
 OUTPUTS:
        iru_xyz = array(3,*). iru data corrected.
 KEYWORDS (OUTPUT):
 CALLS: ***
	sel_timrange [1], sel_timrange [2], ssw_time_compare
 CALLED BY:
	GET_SUNCENTER [1], GET_SUNCENTER [2], IRUHXA2SXT, IRUHXASCAN2SXT [1]
	IRUHXASCAN2SXT [2]
 COMMON BLOCKS:
        None.
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:
        27-sep-93 (JPW)
	 27-jan-2000 (Mckenzie, GLS) - Y2K fix 


IRUHXA2SXT $SSW/yohkoh/gen/idl/pointing/iruhxa2sxt.pro
[Previous] [Next]
 NAME:
        IRUHXA2SXT
 PURPOSE:
        Calculate suncenter positions (in SXT pixel coordinates) by
        combining IRU and HXA data.
        This program should be called with only one orbit worth of data
        at a time.
 CATEGORY:
 CALLING SEQUENCE:
        sunc = iruhxa2sxt(iru_i,iru_d,hxa_i,hir_d,hxa_d)
        sunc = iruhxa2sxt(atr,atr.iru,atr,atr.iru,atr.hxa)
        sunc = iruhxa2sxt(mk_timarr(ada_index,8,/struct), $
                          reform(ada_data.iru,3,8*n_elements(ada_data)), $
                          ada_index,gt_iru(ada_data.iru),gt_hxa(ada_data)
 INPUTS:
        iru_i = index for iru_d. pnt, atr, or mk_timarr(ada_index,8,/struct)
        iru_d = array(3,m). iru data, e.g., pnt.iru, reform(ada_data.iru,3,n8)
        hxa_i = index for hxa_d and hir_d, e.g., pnt, atr, or ada_index
        hir_d = array(3,n)iru data COTEMPORAL with hxa_d, e.g. pnt.iru
        hxa_d = array(4,n). HXA data, e.g., pnt.hxa or gt_hxa(ada_data)
 KEYWORDS (INPUT):
 OUTPUTS:
        sunc = suncenter coordinates in SXT full resolution pixels for
               all times in iru_i.  sunc(0,*) = x, sunc(1,*) = y
 KEYWORDS (OUTPUT):
        code = vector.  Indicates the reliability of each sun center position.
               1: plain S/C commanded value used, no dejittering with IRU.
               2: S/C commanded value dejittered with IRU.
               4: HXA value dejittered with IRU.  Standard result, good.
               Note: S/C commanded values can be several pixels off.
 CALLS: ***
	HXA2HXAXY [1], HXA2HXAXY [2], HXAXY2SXT, IRUHXA_FIT [1], IRUHXA_FIT [2], IRU_FILT
	IRU_S2Y, anytim2ints [1], anytim2ints [2], int2secarr [1], int2secarr [2]
	sel_timrange [1], sel_timrange [2], sxt_cmd_pnt
 COMMON BLOCKS:
        None.
 SIDE EFFECTS:
 RESTRICTIONS:
        This program should be called with only one orbit worth of data
        at a time.
 PROCEDURE:
        The HXA detectors provide absolute suncenter positions, but with a
        relatively coarse resolution.  The gyros (IRU) have better resolution
        but poor longterm stability.  The program fits the gyro data onto
        the HXA data to obtain the absolute accuracy of the HXA, and the
        high resolution of the gyros.  The gyros show a drift which can
        assumed to be linear for time intervals of up to about 10 minutes.
        If the covered time period is longer, the program splits the data
        into shorter intervals and performs a linear fit for each interval.
 MODIFICATION HISTORY:
        19-Jul-93 (JPW)  From get_suncenter.
        27-Sep-93 (JPW)  Added call to iru_s2y to correct for iru switch.


IRUHXA_FIT [1] $SSW/yohkoh/gen/galileo/idl/lmsal/iruhxa_fit.pro
[Previous] [Next]
 NAME:
        IRUHXA_FIT
 PURPOSE:
        Calculate suncenter positions (in SXT pixel coordinates) by
        combining IRU and HXA data.
 CATEGORY:
 CALLING SEQUENCE:
        sunc = iruhxa_fit(iru_i,iru_d,hxa_i,hir_d,hxa_d)
 INPUTS:
        iru_i = index for iru_d. pnt, atr, or mk_timarr(ada_index,8,/struct)
        iru_d = array(3,m). iru data, e.g., pnt.iru, reform(ada_data.iru,3,n8)
        hxa_i = index for hxa_d and hir_d, e.g., pnt, atr, or ada_index
        hir_d = array(3,n)iru data COTEMPORAL with hxa_d, e.g. pnt.iru
        hxa_d = array(4,n). HXA data, e.g., pnt.hxa or gt_hxa(ada_data)
 KEYWORDS (INPUT):
        degree = polynomial degree (+ 1) of fitting function,
                 default = 2 (linear).
 OUTPUTS:
        sunc = suncenter coordinates in SXT full resolution pixels.
               sunc(0,*) = x, sunc(1,*) = y
 KEYWORDS (OUTPUT):
 CALLS: ***
	HXA_PARMS [1], HXA_PARMS [2], HXA_PARMS [3], SVDFIT, int2secarr [1]
	int2secarr [2]
 CALLED BY:
	IRUHXA2SXT, IRUHXASCAN2SXT [1], IRUHXASCAN2SXT [2]
 COMMON BLOCKS:
        None.
 SIDE EFFECTS:
 RESTRICTIONS:
        This low level program does not check for hxa and iru data quality
        which must be done by the caller (usually iruhxa2sxt).
        The obtained hxa - iru fit is only good for time periods up to
        10 - 15 minutes.  Splitting the data into 10 min. intervals must
        also be done by the caller.
 PROCEDURE:
        The HXA detectors provide absolute suncenter positions, but with a
        relatively coarse resolution.  The gyros (IRU) have better resolution
        but poor longterm stability.  The program fits the gyro data onto
        the HXA data to obtain the absolute accuracy of the HXA, and the
        high resolution of the gyros.
 MODIFICATION HISTORY:
        20-Jul-93 (JPW)  From get_suncenter.
         9-mar-2005 (SLF) - change svdffit references -> yoh_svdfit
                         Work around non-backwardly compatible
                         svdfit evolution and avoid ssw-gen side effects


IRUHXA_FIT [2] $SSW/yohkoh/gen/idl/pointing/iruhxa_fit.pro
[Previous] [Next]
 NAME:
        IRUHXA_FIT
 PURPOSE:
        Calculate suncenter positions (in SXT pixel coordinates) by
        combining IRU and HXA data.
 CATEGORY:
 CALLING SEQUENCE:
        sunc = iruhxa_fit(iru_i,iru_d,hxa_i,hir_d,hxa_d)
 INPUTS:
        iru_i = index for iru_d. pnt, atr, or mk_timarr(ada_index,8,/struct)
        iru_d = array(3,m). iru data, e.g., pnt.iru, reform(ada_data.iru,3,n8)
        hxa_i = index for hxa_d and hir_d, e.g., pnt, atr, or ada_index
        hir_d = array(3,n)iru data COTEMPORAL with hxa_d, e.g. pnt.iru
        hxa_d = array(4,n). HXA data, e.g., pnt.hxa or gt_hxa(ada_data)
 KEYWORDS (INPUT):
        degree = polynomial degree (+ 1) of fitting function,
                 default = 2 (linear).
 OUTPUTS:
        sunc = suncenter coordinates in SXT full resolution pixels.
               sunc(0,*) = x, sunc(1,*) = y
 KEYWORDS (OUTPUT):
 CALLS: ***
	HXA_PARMS [1], HXA_PARMS [2], HXA_PARMS [3], SVDFIT, int2secarr [1]
	int2secarr [2]
 CALLED BY:
	IRUHXA2SXT, IRUHXASCAN2SXT [1], IRUHXASCAN2SXT [2]
 COMMON BLOCKS:
        None.
 SIDE EFFECTS:
 RESTRICTIONS:
        This low level program does not check for hxa and iru data quality
        which must be done by the caller (usually iruhxa2sxt).
        The obtained hxa - iru fit is only good for time periods up to
        10 - 15 minutes.  Splitting the data into 10 min. intervals must
        also be done by the caller.
 PROCEDURE:
        The HXA detectors provide absolute suncenter positions, but with a
        relatively coarse resolution.  The gyros (IRU) have better resolution
        but poor longterm stability.  The program fits the gyro data onto
        the HXA data to obtain the absolute accuracy of the HXA, and the
        high resolution of the gyros.
 MODIFICATION HISTORY:
        20-Jul-93 (JPW)  From get_suncenter.


IRUHXASCAN2SXT [1] $SSW/yohkoh/gen/galileo/idl/lmsal/iruhxascan2sxt.pro
[Previous] [Next]
 NAME:
        IRUHXASCAN2SXT
 PURPOSE:
        Calculate suncenter positions (in SXT pixel coordinates) by
        combining IRU and HXA scan data.
        This program should be called with only one orbit worth of data
        at a time.
 CATEGORY:
 CALLING SEQUENCE:
        sunc = iruhxascan2sxt(iru_i,iru_d,hxa_i,hir_d,hxa_d,hxa_scan)
        sunc = iruhxascan2sxt(atr,atr.iru,atr,atr.iru,atr.hxa,hxa_scan)
        sunc = iruhxascan2sxt(mk_timarr(ada_index,8,/struct), $
                          reform(ada_data.iru,3,8*n_elements(ada_data)), $
                          ada_index,gt_iru(ada_data.iru),gt_hxa(ada_data), $
                          hxa_scan)
 INPUTS:
        iru_i = index for iru_d. pnt, atr, or mk_timarr(ada_index,8,/struct)
        iru_d = array(3,m). iru data, e.g., pnt.iru, reform(ada_data.iru,3,n8)
        hxa_i = index for hxa_d and hir_d, e.g., pnt, atr, or ada_index
        hir_d = array(3,n)iru data COTEMPORAL with hxa_d, e.g. pnt.iru
        hxa_d = array(4,n). HXA data, e.g., pnt.hxa or gt_hxa(ada_data)
        hxa_scan = vector of struct.  Straight output of rd_hxa for 1 orbit
 KEYWORDS (INPUT):
 OUTPUTS:
        sunc = suncenter coordinates in SXT full resolution pixels for
               all times in iru_i.  sunc(0,*) = x, sunc(1,*) = y
 KEYWORDS (OUTPUT):
        code = vector.  Indicates the reliability of each sun center position.
               1: plain S/C commanded value used, no dejittering with IRU.
               2: S/C commanded value dejittered with IRU.
               4: HXA value dejittered with IRU.  Standard result, ok.
               8: HXA scan data result dejittered with IRU.
               Notes: - S/C commanded values can be several pixels off.
                      - HXA scan data is better than regular data since the
                        degradation of the HXA detector (after fall 1997).
 CALLS: ***
	HXA2HXAXY [1], HXA2HXAXY [2], HXASCAN2HXAXY, HXAXY2SXT, IRUHXA_FIT [1]
	IRUHXA_FIT [2], IRU_FILT, IRU_S2Y, anytim2ints [1], anytim2ints [2], gt_day [1]
	gt_day [2], int2secarr [1], int2secarr [2], sel_timrange [1], sel_timrange [2]
	sxt_cmd_pnt, tim2dset [1], tim2dset [2]
 CALLED BY:
	mk_att [1], mk_att [2]
 COMMON BLOCKS:
        None.
 SIDE EFFECTS:
 RESTRICTIONS:
        This program should be called with only one orbit worth of data
        at a time.
 PROCEDURE:
        The HXA detectors provide absolute suncenter positions, but with a
        relatively coarse resolution.  The gyros (IRU) have better resolution
        but poor longterm stability.  The program fits the gyro data onto
        the HXA data to obtain the absolute accuracy of the HXA, and the
        high resolution of the gyros.  The gyros show a drift which can
        assumed to be linear for time intervals of up to about 10 minutes.
        If the covered time period is longer, the program splits the data
        into shorter intervals and performs a linear fit for each interval.
 MODIFICATION HISTORY:
        19-Jul-93 (JPW)  From get_suncenter.
        27-Sep-93 (JPW)  Added call to iru_s2y to correct for iru switch.
        26-Sep-98 (JPW)  From iruhxa2sxt, adding code to use hxa scan data.
                         Also made sure that IRU is not fitted to a mix of
                         hxa and commanded pointing (caused spurious drift).
        16-Mar-99 (JPW)  Fixed bug (in some cases, scan data was selected
                         even if less than two data points were available).
         8-May-03 (JPW)  Use scan data only on or after 28-sep-97.
        19-May-03 (JPW)  Use scan data only on or after 2-jun-96 and
                         add fudge constant -0.3 to hxa scan data
                         [modified lines marked with ;03;]
        29-May-03 (JPW)  Extend search for scan data after 26-sep-00
                         [modified lines marked with ;03;]


IRUHXASCAN2SXT [2] $SSW/yohkoh/ucon/idl/wuelser/iruhxascan2sxt.pro
[Previous] [Next]
 NAME:
        IRUHXASCAN2SXT
 PURPOSE:
        Calculate suncenter positions (in SXT pixel coordinates) by
        combining IRU and HXA scan data.
        This program should be called with only one orbit worth of data
        at a time.
 CATEGORY:
 CALLING SEQUENCE:
        sunc = iruhxascan2sxt(iru_i,iru_d,hxa_i,hir_d,hxa_d,hxa_scan)
        sunc = iruhxascan2sxt(atr,atr.iru,atr,atr.iru,atr.hxa,hxa_scan)
        sunc = iruhxascan2sxt(mk_timarr(ada_index,8,/struct), $
                          reform(ada_data.iru,3,8*n_elements(ada_data)), $
                          ada_index,gt_iru(ada_data.iru),gt_hxa(ada_data), $
                          hxa_scan)
 INPUTS:
        iru_i = index for iru_d. pnt, atr, or mk_timarr(ada_index,8,/struct)
        iru_d = array(3,m). iru data, e.g., pnt.iru, reform(ada_data.iru,3,n8)
        hxa_i = index for hxa_d and hir_d, e.g., pnt, atr, or ada_index
        hir_d = array(3,n)iru data COTEMPORAL with hxa_d, e.g. pnt.iru
        hxa_d = array(4,n). HXA data, e.g., pnt.hxa or gt_hxa(ada_data)
        hxa_scan = vector of struct.  Straight output of rd_hxa for 1 orbit
 KEYWORDS (INPUT):
 OUTPUTS:
        sunc = suncenter coordinates in SXT full resolution pixels for
               all times in iru_i.  sunc(0,*) = x, sunc(1,*) = y
 KEYWORDS (OUTPUT):
        code = vector.  Indicates the reliability of each sun center position.
               1: plain S/C commanded value used, no dejittering with IRU.
               2: S/C commanded value dejittered with IRU.
               4: HXA value dejittered with IRU.  Standard result, ok.
               8: HXA scan data result dejittered with IRU.
               Notes: - S/C commanded values can be several pixels off.
                      - HXA scan data is better than regular data since the
                        degradation of the HXA detector (after fall 1997).
 CALLS: ***
	HXA2HXAXY [1], HXA2HXAXY [2], HXASCAN2HXAXY, HXAXY2SXT, IRUHXA_FIT [1]
	IRUHXA_FIT [2], IRU_FILT, IRU_S2Y, anytim2ints [1], anytim2ints [2], gt_day [1]
	gt_day [2], int2secarr [1], int2secarr [2], sel_timrange [1], sel_timrange [2]
	sxt_cmd_pnt, tim2dset [1], tim2dset [2]
 CALLED BY:
	mk_att [1], mk_att [2]
 COMMON BLOCKS:
        None.
 SIDE EFFECTS:
 RESTRICTIONS:
        This program should be called with only one orbit worth of data
        at a time.
 PROCEDURE:
        The HXA detectors provide absolute suncenter positions, but with a
        relatively coarse resolution.  The gyros (IRU) have better resolution
        but poor longterm stability.  The program fits the gyro data onto
        the HXA data to obtain the absolute accuracy of the HXA, and the
        high resolution of the gyros.  The gyros show a drift which can
        assumed to be linear for time intervals of up to about 10 minutes.
        If the covered time period is longer, the program splits the data
        into shorter intervals and performs a linear fit for each interval.
 MODIFICATION HISTORY:
        19-Jul-93 (JPW)  From get_suncenter.
        27-Sep-93 (JPW)  Added call to iru_s2y to correct for iru switch.
        26-Sep-98 (JPW)  From iruhxa2sxt, adding code to use hxa scan data.
                         Also made sure that IRU is not fitted to a mix of
                         hxa and commanded pointing (caused spurious drift).
        16-Mar-99 (JPW)  Fixed bug (in some cases, scan data was selected
                         even if less than two data points were available).


isalpha $SSW/yohkoh/ucon/idl/linford/isalpha.pro
[Previous] [Next]
	NAME: isalpha
	purpose: test a char for alpha char eg A-Z or a-z.
	
	parameter:
		t or f = isalpha(c)   note: T=1 and F=0
		c 	is a input character to test
		plus	is a additional non-alpha character 
			be considered as alpha for this test.
		num	is a switch to include all numerics 0-9.
 CALLED BY:
	str2alp
	history:
	 	writen by gal, 6-Mar-96


isas_ps_print $SSW/yohkoh/ucon/idl/acton/isas_ps_print.pro
[Previous] [Next]
 NAME:
	isas_ps_print
 PURPOSE
	To set up the device parameters for making nice centered
	  and appropriately sized postscript prints on the cp2 or cp3
	  color printers at ISAS from an IDL bytescaled image.
	*** DEFAULT IS TO SEND THE PICTURE TO THE cp2 PRINTER. ***
	*** 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
	  you 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 then
	  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
	isas_ps_print
	isas_ps_print,img
	isas_ps_print,img,file='imgname.ps'
	isas_ps_print,img,file=file,x0=x0,y0=y0,xoffset=xoffset,$
          yoffset=yoffset,landscape=landscape,window=window
	isas_ps_print,img2,file='sxt_mlso.ps',/noprint,ct=ct,$
	   hwtxt='SXT and MLSO -- 1992 May 8',xtxt=30,ytxt=25,col=240,$
	   rescale=240,strech=st,gama=0.5
 OPTIONAL INPUT
	img = picture you want to print
 OPTIONAL KEYWORD INPUT
	file = filename (say, 'mypix.ps')
	x0<6.875, y0<8.875 are dimensions of allowed print area in inches.
	xoffset>0.1875 and yoffset>1.0 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 = string array with text for xyouts2 to write in hardware font
	xtxt,ytxt = pixel location to write hwtxt
	col = color to use for hwtxt (default = 255)
	rescale = max value for bytscl of img (default = 240)
	strech = array like, e.g., [255,0] for use by color table stretch
	gama = value for use by the gamma_ct command, default = 1
 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.
	  This scaling can be overridden by the keyword "rescale."
	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.
	LWA 10/20/95 - Added rescale keyword and undeleted device lines.
	LWA 10/21/95 - Added strech and gama keywords.
	LWA 11/08/95 - Adapted for use at ISAS.
 CALLS:


iword $SSW/yohkoh/bcs/idl/micro/iword.pro
[Previous] [Next]
 NAME:
	iword
 PURPOSE:
	Swaps pair of bytes within a "word"
 CATEGORY:
 CALLING SEQUENCE:
	result = iword(bytes)
 INPUTS:
	bytes	pair on input bytes (byte pair, or word)
 OUTPUTS:
	Return word with input bytes swapped
 OPTIONAL OUTPUT PARAMETERS:
 CALLED BY:
	pr_plan_area [1], pr_plan_area [2]
 COMMON BLOCKS:
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
	Swaps pair of bytes (IBM/DEC compatability...)
 MODIFICATION HISTORY:
	RDB  1990