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

 PURPOSE:  Calculate the featureless background of an Halpha or white light 
           image. It is mainly ment for use with SXT aspect sensor images
	    but with the /GBO keyword it should work on other spectral data.

 METHOD:   Find the center, calculate radial values, use a gaussian fit to 
	    histograms of pixels in radial bins to select `background' value 
           for those pixels.
	    This has been fixed to handle signals at the center.
	    

 CALLING SEQUENCE: 
                   back=rad_bck(image,profile[,target=trgt][,step=step]
				      [,res=res][,binsize=binsize][,/gbo])

 PARAMETERS:

          image   	is assumed to have be circular. (how much tolorance?)

	   profile	returns the limbdarkening profile, vector. The first
			entry gives the step size.

 KEYWORDS:

	res		for QR or FR SXT images this must be set as 4.0 and 1.0
			respectively.

   	target  	contains the centroid and radius of the input image.
               	if this is missing they will be calculated.

   	step    	the step size for incrementing the radius. 
			Note reducing this increases the running time.

   	binsize 	sets the binsize for the histogram routine. 
			Default value is 1.0, this is also the minimum.

   	gbo	    	when set expects a GBO image and calls GEN_LOC to 
			make the target.

 CALLS: ***
	FIND_LIMB, GEN_LOC, r_coord
 CALLED BY:
	wl_process
 HISTORY: Rewrote from BACKGROUND using histograms, jan. 1993 A. McA.
	   Cut out MODE_FIT as a separate routine, 
	   and added GBO keyword, june 1993 AMcA.
	   added special central treatment, june 8, 1993, AMcA.
	   added profile variable, june 15, 1993, AMcA.
	   added trap for infinities, june 16, 1993, AMcA.
	   reworked bad case handling, june 18, 1993, AMcA.
	   set up graded stepsize, june 24, 1993, AMcA.
	   trap for residual noise in creating REFF, july 2, 1993, AMcA.
	   fix bug in recording last profile entry, jan. 31, 1994, AMcA.
	   added case for average values less than szero, feb. 2, 1994, AMcA.
	   replaced MODE_FIT call with straight average, feb. 7, 1994, AMcA.
	   added RES keyword for non-GBO resolution, feb. 10, 1994, AMcA. 


RAD_LOSS [2] $SSW/yohkoh/ucon/idl/shimizu/rad_loss.pro
[Previous] [Next]
 NAME:
      RAD_LOSS
 PURPOSE:
      Calculate the radiative loss energy with Raymond, Cox, & 
     Smith(1976).
 CALLING SEQUENCE:
      out= RAD_LOSS(temp, density, volumne)
 INPUTS:
      temp - Plasma Temperature (K)
      density - Electron Density N_e (cm^-3)
      volume - Plasma volume (cm^3)
 OPTIONAL INPUTS:
 
 OUTPUT:
      out - Radiative Loss from the volume (ergs s^-1)
 CALLS: ***
	FB_RAD_LOSS, FF_RAD_LOSS, LANDSCAPE, MINMAX [1], MINMAX [2], SETUP_ELEMENTS
	bb_rad_loss
 PROCEDURE:
      Call rad_raymond for radiative loss function P(T)
      rad_loss = N_e^2 P(T) V,
           where V is the plasma volume.
 HISTROY:
      Written on 25 Nov, 1993 by T.Shimizu


RAD_RAYMOND $SSW/yohkoh/ucon/idl/shimizu/rad_raymond.pro
[Previous] [Next]
 NAME:
     RAD_RAYMOND
 PURPOSE:
     Obtain radiative loss function in optically-thin gas by
    using Raymond, Cox, & Smith 1976 ApJ 204 290.
 CALLING SEQUENCE:
     out = rad_raymond(temp)
 INPUTS:
     temp - temperature (K) 
 OUTPUTS:
     out - radiative loss function P(T)
         Note:  radiative loss(erg sec^-1 cm^-3)= Ne^2 * P(T)
 PROCEDURE:
     This function uses a analytical fit by Rosner, Tucker, &
    Vaiana 1978 ApJ 220 643. 
 HISTORY:
     Toshi Shimizu   witten on 23 Aug, 1993
     Revised 25 Nov, 1993  accept the input of array "temp" 


radial $SSW/yohkoh/ucon/idl/foley/radial.pro
[Previous] [Next]
 NAME:
   radial.pro

 PURPOSE
   Construct the data cube with pixel values containing
   the radial distance from origin in pixels from specified
   origin.

 CALLING SEQUENCE
   radial,img,x0,y0,rr
   
 INPUT
  img :
   x0 :
   y0 :

 OUTPUT
   rr :

 OPTIONAL OUTPUT
  

 OPTIONAL KEYWORD INPUT
 	
 RESTRICTION
  none
 HISTORY
  Written CRF 12 NOV 95 : caf@mssl.ucl.ac.uk
 CALLED BY
	azi_calc, lineofsight [1], lineofsight [2]


radial_avg $SSW/yohkoh/ucon/idl/acton/radial_avg.pro
[Previous] [Next]
 NAME:
       radial_avg
 PURPOSE
	To compute the area-averaged radial intensity distribution from
	some origin -- either the center of the sun or an input location.
 CALLING SEQUENCE
	radial_avg,image,index,xxx,out [,rr,origin=origin, $
	   xy=xy,new=new,fit_param=fit_param,yfit=yfit,$
	   noplot-noplot,multiple=multiple
       radial_avg,image,index,xxx,out
	radial_avg,image,origin=[361,400],xxx,out, $
		fit_param=fit_param,yfit=yfit,multiple=2
	radial_avg,image,index,xxx,out,rr,/new,/origin,/noplot
 INPUT
       img - Fully corrected image.
	Either:  index, origin or both.
 OPTIONAL OUTPUT
	xxx - linear array of R values for plotting
	out - array of signal values, averaged over annuli, function of R
		units are DN/pixel for pixel size in image
       rr - array of radii of all distances from origin
		units are pixels (pixel size of image)
 OPTIONAL INPUT
	rr, return from first run and input for subsequent runs 
		to save time.
 OPTIONAL KEYWORD INPUT
	index - to permit getting suncenter from the data base
		and labelling of output figures
	origin - origin of coordinates for radial averaging, if this is
		 specified it takes priority over suncenter from index
		 but one or the other must be provided.

 CALLS: ***
	POLY_FIT, WDEF [1], WDEF [2], fmt_tim [1], fmt_tim [2], gt_corner, gt_filtb, gt_res
	plusmark, sfd_comp, tbeep [1], tbeep [2], tbeep [3], wdefroi [1], wdefroi [2]
	wdefroi [3], wdefroi [4]
	Note: 	origin = [x0,y0] chooses x0,y0 as origin of coordinates.
	      	/origin allows choosing origin by click on image.

	xy - array defining target area,
	     	default is to read from image with WDEFROI
       /new - set if rr array exists but you wish to recompute it
		forces recomputation of xy also.
	fit_param - set this to execute and plot a log10-log10 fit 
		to xxx vs. out and, if you wish, return the parameters
	yfit - values of the fitted log10-log10 curve at xxx
	/noplot - causes program to skip plotting of raw data, saves time.
	multiple - Use for 2 or more disconnected regions (e.g., multiple=3)
 RESTRICTION
	Origin must not be included in selected area xy.
 HISTORY
       LWA 26-June-1994, wrote original program.
	LWA 2-Dec-1994, added capability for non-suncenter origin.
	LWA 26-Jan-1995, cleaned up header and fixed /new omission.
		Changed order of variables in call.
	LWA 29-Jan-1995, added keyword for disconnected regions.
	LWA 16-Mar-1995, replaced sxt_cen with -gt_corner(index,/from_sc)
	                 and made index a keyword.
	LWA 23-Mar-1995, Corrected to include negative values in averages.
			 and added keyword /noplot.


RADIO_FLUX $SSW/yohkoh/ucon/idl/hudson/radio_flux.pro
[Previous] [Next]
 NAME:
	RADIO_FLUX
 PURPOSE:
	Estimate the free-free emission level in the microwave range
	(15 GHz) for a specified temperature and emission measure.
	Formula from Steve White, same as in GOES_REDUCER.
 CATEGORY:
	Yohkoh analysis
 CALLING SEQUENCE:
	ff = radio_flux(temp,em)
 INPUTS:
	temp in million K
	em in 1e55 em^-3
 OPTIONAL (KEYWORD) INPUT PARAMETERS:
 OUTPUTS:
	radio flux density in solar flux units (10^-22 W/m^2 Hz)
 COMMON BLOCKS:
 SIDE EFFECTS:
 RESTRICTIONS:
 MODIFICATION HISTORY:
	HSH 23-Aug-93


RADPOW $SSW/yohkoh/ucon/idl/lemen/radpow.pro
[Previous] [Next]
 NAME:
   RADPOW
 PURPOSE:
   Compute the radiative power (erg cm^3 s-1) for the Mewe 
   spectrum with coronal abundances.
 MODIFICATION HISTORY:
    8-jul-93, J. R. Lemen


range $SSW/yohkoh/bcs/idl/util/range.pro
[Previous] [Next]
 pro range,pstring,narray,outarr,ier
 atp 16-5-91 

 purpose: to parse an input string for ranges and
	output a list of corresponding subscripts
	ie array has elements 0....255
	input string in response to question 'plot which scans?'
	is '1,2,5,6-200'
	output array should be [0,1,4,5,6,7,8,9.....198,199]
	yes the offset is intentional and occurs at end of program 
	to disable put offset = 0 in variables section	

 valid options
	1,2,3 2-5 * any combination of above

 in:	pstring - string containing options
	narray - number of elements in target array

 optional in: offset - the offset for the start of the array - added at end
	                if not given assumed to be 1

 out:	outarr - subscripts selected
	ier - error code
		0 = ok , 1 = error out of bounds(non-fatal) ,
		2 = error out of bounds (fatal)
                 
 CALLED BY:
	BCS_FIXBPC, LCBDA, PLOTBSD v306 IDL2, lcbsd, lcobs, plotbft [2], plotbth v30 IDL2
 history: Regexp engine written atp 1991
          upgraded to allow for offset atp 1992


RAT2POWL $SSW/yohkoh/ucon/idl/hudson/rat2powl.pro
[Previous] [Next]
 NAME:
	RAT2POWL
 PURPOSE:
	convert HXT spectral ratio to power-law parameters
 CALLING SEQUENCE:
	powl = rat2powl(ratio, low_channel, low_counts)
 INPUT PARAMETERS:
	ratio is an HXT spectral ratio, adjacent channels
	low_channel is the lower of the two: 0 is LO,..., 2 is M2
	low_counts is the counts in the lower channel
 OUTPUT:
	fltarr(2) = slope, normalization at 1 keV
 BACKGROUND:
 	uses output from Inda-san's data, as gotten by hxt_powl.pro;
	normalization by mean value at channel center energies
	(18.3, 27.7, 42.7, 72.8 keV) is only good to 20% or so.
 CALLED BY:
	HXT_POWERLAW, hxt_survey
 HISTORY:
	written by HSH, Oct. 29, 1992
	HSH fixed a big bug 12-feb-92


RAT2POWL2 $SSW/yohkoh/ucon/idl/hudson/rat2powl2.pro
[Previous] [Next]
 NAME:
	RAT2POWL2
 PURPOSE:
	convert HXT spectral ratio to power-law parameters
 CALLING SEQUENCE:
	powl = rat2powl2(high_counts, low_counts, low_channel)
 INPUT PARAMETERS:
	high(low)_counts is the counts in the higher(lower) channel
	low_channel identifies the lower channel of the pair (0, 1, 2)
 OUTPUT:
	fltarr(2) = slope of spectral number flux, normalization at 1 keV
 BACKGROUND:
	uses Inda-san's fits
 CALLS: ***
	HXT_POWL, REVERSE, SPLINE
 HISTORY:
	written by HSH, 1 Feb 1993
       recoded CDP     4 Feb 1993


RAT2THERM $SSW/yohkoh/ucon/idl/hudson/rat2therm.pro
[Previous] [Next]
 NAME:
	RAT2THERM
 PURPOSE:
	Convert HXT spectral ratio to thermal source parameters (note:
	  this is intended to be a low-level routine, so that other
	  vitally important matters such as background correction, error
	  propagation, etc., are left for higher levels).
 	Uses output from response data file POSSI2.DAT (M. Inda).
	Uses parameters derived from conflx.pro (J. Lemen).
 CALLING SEQUENCE:
	therm = rat2therm(ratio, low_count,  low_channel)
 INPUT PARAMETERS:
	ratio is the count ratio of two adjacent HXT channels;
	low_channel is the count in the lower of the two (/cm^2 sec) 
	low_channel identifies the lower of the two: 0 is LO,..., 2 is M2
 OUTPUT:
	fltarr(2) = temperature, emission measure (in units of 10^50 cm^-3)
 WARNING:
	Outside the ranges of valid fits, zero is returned for each 
	  parameter.
	The accuracy of the fits is within 5% over the calculated ranges.
	The effective area of HXT is assumed to be 55 cm^2, independent
	  of energy.
 CALLED BY:
	HXT_SPEC_DRIVER, HXT_TEMPS
 HISTORY:
	HSH, written Nov. 17, 1992
       HSH 20-Nov-92 new parameters installed 
       HSH 21-Nov-92 new parameters installed 
	HSH 30-Nov-92 change normalization for input in counts/cm^2 sec 


RAT2THERM2 $SSW/yohkoh/ucon/idl/hudson/rat2therm2.pro
[Previous] [Next]
 NAME:
	RAT2THERM2
 PURPOSE:
	Convert HXT spectral ratio to thermal source parameters (note:
	  this is intended to be a low-level routine, so that other
	  vitally important matters such as background correction, error
	  propagation, etc., are left for higher levels).
 	Uses output from response data file provided by M. Inda-Koide.
         (most recent version, possi4.dat in $DIR_HXT_CAL)
	Uses parameters derived from MEWE_SPEC (J. Lemen) as interpreted
 	  by THERMAL_KEV.
 CALLING SEQUENCE:
	therm = rat2therm(ratio, low_count,  low_channel)
 INPUT PARAMETERS:
	ratio is the count ratio of two adjacent HXT channels;
	low_channel is the count in the lower of the two (counts/sec) 
	low_channel identifies the lower of the two: 0 is LO,..., 2 is M2
 OUTPUT:
	fltarr(n,3,2), where n is the number of points, 3 is the number
          of adjacent channel pairs, and then (temperature, em) with
         temperature in MK, emission measure in units of 10^44 cm^-3
 WARNING:
	Outside the ranges of valid fits, zero is returned for each 
	  parameter.
	The accuracy of the fits is within 4% over the calculated ranges.
	The effective area of HXT is assumed to be 55 cm^2, independent
	  of energy.
 CALLED BY:
	HXT_TEEM, HXT_THERMAL
 HISTORY:
	HSH, written Nov. 17, 1992
       HSH 20-Nov-92 new parameters installed 
       HSH 21-Nov-92 new parameters installed 
	HSH 30-Nov-92 change normalization for input in counts/cm^2 sec 
	HSH 11-Sep-93 correct humongous bug and install new fits from
	  possi4.dat (0.1 keV resolution). Also vectorize.
	HSH 2-oct-93 change input to counts/sec per channel


ratio_unc $SSW/yohkoh/ucon/idl/acton/ratio_unc.pro
[Previous] [Next]
NAME:
	ratio_unc
PURPOSE
	Compute the percent uncertainty in a ratio of images,
	to help evaluate where to use SXT temperature deteminations.
CALLLING SEQUENCE
	percent_unc=ratio_unc(alindex,aldata,dgindex,dgdata,[te=te])
INPUT
	alindex, 	index structure for Al.1 array
	aldata, 	Al.1 prep'd array
	dgindex,	index structure for AlMg array.
	dgdata,		AlMg prep'd array
OPTIONAL KEYWORD INPUT
	te - The log10 of electron temperature of the emitting plasma.  
		If omitted, then Te = alog10(3.e6) is assumed.
OUTPUT
	Percent error in the AlMg/Al.1 ratio.
PROGRAMS CALLED
	lwa_dn_unc, like sxt_dn_unc but without normalization check.
HISTORY
	15-Nov-96 [LWA]	 Written.
 CALLS:


RD_ADA $SSW/yohkoh/gen/idl/ref_access/rd_ada.pro
[Previous] [Next]
NAME:
	RD_ADA
PURPOSE:
	Read and extract Attitude records specified in the 'dset_arr'
	parameter from the Solar-A reformatted data base.
CALLING SEQUENCE:
	Rd_ADA, infil, dset_arr, index, data, roadmap, hxa_scan
       Rd_ADA, infil, dset_arr, index, data, roadmap
       Rd_ADA, infil, dset_arr, index, data
       rd_ada, infil, dset_arr, index, data, roadmap, dset_str=dset_arr
       Rd_ADA, infil, dset_arr, index, /nodata
INPUT:
       infil   : input file specification "infil" can be a vector of filenames
       dset_arr: vector of dataset numbers to extract (indices vector)
               * "dset_arr" can be
                     1. An indicie vector ("SS") from a search of the roadmap
                        of ALL of the files in "infil".
                     2. a structure with fields ".dset" and ".ifil".
                        ".dset" is the dataset number WITHIN THE FILE, and
                        ".ifil" is the index of the filename within the
                        infil array.  The structure is "N" elements long
                        where "N" is the total number of datasets to extract.
               * The order that the images are placed in the output
                 variable "data" is the same order that they
                 appear in "dset_arr"
               * If "-1" is passed, the whole file is read
                 and the dset_arr returned is the "indgen(ndset)"
OPTIONAL INPUT:
       nodata  : If present, only the index is read
OUTPUT:
	index	: data-index logical record (one for each 
		  record requested)
	data	: structure with all attitude data in it
OPTIONAL OUTPUT:
       roadmap : summary of data-index logical record, note
                 all roadmaps records in the file are returned.
                 In the case where "infil" is an array, roadmap
                 is the concatenated roadmap for all files that
                 are being read for the particular extraction.
       filidx  : a vector the same length as the roadmap
                 with the index of the file associated with that entry
                 (ie: 0,0,0,0,1,1,1,1,2,2,2,2,...)
                 This is output from RD_ROADMAP ONLY ON THE FILES FOR
                 WHICH DATA HAS BEEN SELECTED TO BE READ!
       dset_str: the structure form of the requested datasets
                 passed in with "dset_arr".  If user passes in
                 a simple vector ("SS"), "dset_str" is the structure
                 form of the output.
 CALLS: ***
	ATT_OLD_STRUCT, ATT_STRUCT [1], ATT_STRUCT [2], RD_HXA, RD_INDEX, Rd_Pointer [1]
	Rd_Pointer [2], Rd_Roadmap [2], UNIQ [1], UNIQ [2], UNIQ [3], get_data_rec
	mk_dset_str [1], mk_dset_str [2], rd_roadmap [1], rdwrt [1], rdwrt [2], rdwrt [3]
	str_copy
 CALLED BY:
	HXA_SUNC, HXA_SUNC2, IRU_OFFS, ada2str, mk_pnt, stt_plot
Examples:
	rd_ada, filename, indgen(10)+1, index, data, roadmap, hxa_scan
	returns 1st 10 records in file=filename
RESTRICION:
       CAUTION: If the filename list is long and RD_ADA is going to
       be called many times getting only a small number of data sets,
       then it is recommended to use the structure option for "dset_arr"
       (call MK_DSET_STR externally) because RD_FHEADER is called for
       all files each time RD_ADA is called when not using the
       structure option for "dset_arr".
HISTORY:
	Written by Mons Morrison, Fall 90.
	19-Nov-91 MDM - Added option to read all datasets by passing -1
        6-Mar-92 MDM - Changed calling sequence to allow "dset_arr"
                       to be a simple integer array ("SS") or a structure
                       with .DSET and .IFIL.  "SS" option can be used
                       even if infil is an array (previously restricted
                       to turn it into a structure in external routine)
                       Uses MK_DSET_STR internally.
                       Also added "dset_str" optional output capability
       19-Mar-92 MDM - Changed not to use the "roadmap2" method of getting
                       the byte offset.  Instead, uses the full roadmap.
                       This is to speed up the reading if reading the same
                       file multiple times.
                       Also, changed call to RD_INDEX to pass the byte offset
                       so it does not have to read RD_ROADMAP
       20-Mar-92 MDM - Changed so output structure version is not updated if
                       the different structure is switching to an OLDER version
	20-Jun-94 MDM - Changed some comments from WDA to ADA


RD_ADA_DATA $SSW/yohkoh/gen/idl/ref_access/rd_ada_data.pro
[Previous] [Next]
NAME:
	RD_ADA_DATA
PURPOSE:
	Perform the actual data read for ADA files (called from RD_XDA)
INPUT:
	lun	- the logical unit number where the file is open
	ibyt	- the starting byte value to read from
	idset	- the dataset number for the output matrix
	nout	- the total number of datasets to be extracted
	index	- the index structure for all output datasets
	roadmap	- the roadmap
	sel_dsets- the indicies of the datasets selected for extraction
	pointer	- pointer structure used to determine the data 
		  structure version
INPUT/OUTPUT:
	data	- the data
 CALLS: ***
	ATT_OLD_STRUCT, ATT_STRUCT [1], ATT_STRUCT [2], get_data_rec, rdwrt [1], rdwrt [2]
	rdwrt [3], str_copy
 CALLED BY:
	RD_XDA [1], RD_XDA [2]
HISTORY:
	written 21-Mar-92 by Mons Morrison


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


 CALLED BY:
	do_ads
HISTORY:
	Written Jul-92 by M.Morrison
	27-Aug-92 (MDM) - Added /ALL keyword - default is to pass only the
			  "final" processing solutions
       27-oct-92 (slf) - add diagnostic
	 4-Apr-93 (MDM) - Added OUTFIL option to get text summary


RD_AR $SSW/yohkoh/ucon/idl/metcalf/rd_ar.pro
[Previous] [Next]
NAME:
     RD_AR
PURPOSE:
     Read and align PFI and FFI active region data.  The AR is tracked
     using differential rotation.  This will align data spanning many
     orbits.   The data is corrected as follows:

       1) sxt_decomp, where the data is compressed
       2) dark_sub
       3) leak_sub

     It is possible to align data which has already been read in, though this
     could take a lot of memory if the dataset includes FFI images (when 
     rd_ar reads the data, the FFI's are read one at a time, requiring much 
     less memory).
CALLING SEQUENCE:
     rd_ar,infil,ss,index,data,roadmap  ; To read ss data from infil.
     rd_ar,index,data                   ; To align data already read in.
INPUTS:
     infil = list of filenames from which to read data
     ss = image selection index (vector of roadmap indices)
     
     If the data has already been read in:

     data = data cube
     index = index for the data cube
OPTIONAL INPUT PARAMETERS:
     roadmap = data roadmap (if not input, it will be read)
               Roadmap is not an optional input if the data has already been
               read in.
KEYWORD PARAMETERS
     ref_image = Passed to align_ar to select the PFI image to use as the
                 reference.  Ignored if there is no PFI data.
     /korrel = turns on the correlation procedure to attempt to get rid of
               some of the residual jitter in the images. Not very
               satifactory, you probably don't want to use this. 
     /quiet = if set, work silently
     latitude = reference latitude for alignment.  This should be the 
                position of the active region at some time, preferably near
                the time it crossed closest to the center of the disk.  
     longitue = reference longitude.
     date = reference date/time for reference latitude/longitude.
     size_ffi = the size of the (square) ffi image.  Only used if there
                is *no* pfi data.  If there is pfi data, the ffi images
                are the same size as the pfi mosaics.  OBSOLETE (but still
                works).
     ar_size = 2 element vector giving the x and y dimensions of the resulting
               data cube (in full-res pixels).  Supercedes the size_ffi
               keyword.
     missing = the data value which is used in the portions of the data array
               which are left undefined (PFI's only).
     /compress = Re-compress the data after alignment.
     /nocorrections = Turns off corrections to the data (does not
                      call dark_sub, or leak_sub).  This is 
                      useful if you have already done these corrections
                      and are passing data to be dejittered.
     /sfd = All FFI data is from an SFD file (applied to FFI only).
     norm_fact = Passed to MOD_RES.  Specifies how intensities are changed
                 when changing to full resolution.
OUTPUTS:
    index = data index
    data = data cube (integer)
    roadmap = data roadmap (unless the data has already been read in)
 CALLS: ***
	ALIGN_AR, DIFF_ROT [1], DIFF_ROT [2], Ex2Int [1], Ex2Int [2], GET_SUNCENTER [1]
	GET_SUNCENTER [2], HEL2ARCMIN [1], HEL2ARCMIN [2], RD_SDA [1], RD_SDA [2]
	RD_SDA [3], Rd_Roadmap [2], anytim2ex [1], anytim2ex [2], ass_or, dark_sub [1]
	dark_sub [2], dark_sub [3], fmt_tim [1], fmt_tim [2], gt_comp, gt_day [1]
	gt_day [2], gt_pfi_ffi, gt_pix_size, gt_res, gt_time [1], gt_time [2]
	int2secarr [1], int2secarr [2], leak_sub [1], leak_sub [2], leak_sub [3]
	mk_dset_str [1], mk_dset_str [2], mod_res, rd_fem, rd_pnt, rd_roadmap [1], sfd_comp
	sfd_decomp, sxt_comp, sxt_decomp [1], sxt_decomp [2], tim2dset [1], tim2dset [2]
COMMON BLOCKS:
SIDE EFFECTS:
     When the data is read previously and passed to rd_ar, the data and
     index variables are destroyed and replaced with the coaligned data.
RESTRICTIONS:

     When aligning data which has already been read in with yodat, it is
     very important that no other alignment routines have been run on the 
     data.  The data should be "raw", straight out of yodat.  FFI images
     must be full size.

     The korrel keyword can introduce spurious drifts in the images,
     particularly when the limb is in the FOV.  This can really foul you
     up, particularly if you are trying to do the alignment in several small 
     parts due to memory constraints.

     Relies on HXA/IRU data for alignment, the accuracy of the alignment
     will be greatly reduced if there is an HXA problem (warning is printed).

     Both FFI and PFI data are rebinned to full resolution, but the
     index is NOT changed to indicate the changes to the images.

     A combination of FFI and PFI data does not align very well over the 
     limb.  This is because the PFI FOV center is off the limb and it is 
     impossible to compute the differential rotation.  To correct this, use
     the ref_image keyword to select a reference PFI whose center is on
     the disk.  Or use the latitude/longitude keywords to specify the 
     position of the co-alignment.

     You can not mix SFD and SFR data.
PROCEDURE:
     The PFI's are aligned with the align_ar function.  A piece of the
     FFI of the same size as the PFI's and at the same heliographic
     position is extracted.  The output is thus a data cube which has
     a mixture of PFI and FFI data all aligned to the accuracy of the
     HXA/IRU data (sub-arcsecond??).  The heliographic position is derived 
     from an expression for the differential rotation.
EXAMPLES

    sel_ar, infil, roadmap, ss, lon=-15, lat=18, date='08-DEC-91 00:00:00'
    rd_ar, infil, ss, index, data, roadmap

       -OR-

    rd_ar,infil,ss,index,data,roadmap,lon=-15,lat=18,date='08-DEC-91 00:00:00'

       -OR-

    rd_ar,infil,ss,index,data,roadmap,ar_size=[128,128],lon=-15,lat=18,date='08-DEC-91 00:00:00'

MODIFICATION HISTORY:
     T. Metcalf  May, 1992

     T. Metcalf June 22, 1992:
         o  Changed lat/lon so that they apply to PFI data as well as FFI
            data.
         o  Added ar_size keyword so user can select the size of the output
            array.
         o  Changed the FFI read so that the FFI images are read in one at
            a time to save memory.
         The first two changes make it possible to run rd_ar on a long data
         set in several steps, but maintain the same alignment and array
         size so that the resulting data cubes can be combined.

     T. Metcalf July 15, 1992:
         o Fixed a bug which crashed the program when aligning full resolution
           FFI images.

     T. Metcalf October 27, 1992:
         o Switched to hxa_suncenter from gt_hxa.  This should give a more 
           accurate alignment.
     T. Metcalf February 27, 1993
         o Switched from hxa_suncenter to get_suncenter to give a still 
           better alignment.
     T. Metcalf March 12, 1993
         o Use change_res instead of rebin to put the FFI images into full
           resolution.  This corrects the column shift problem.
         o Compressed data is uncompressed before alignment.  The output
           is uncompressed data, unless the /compress keyword is set.
     T. Metcalf March 17, 1993
         o Added leak subtraction for FFI's and dark subtraction for both
           FFI's and PFI's.
         o Added /nocorrections keyword to turn off the corrections, if 
           desired.
     T. Metcalf April 12, 1993
         o Added leak subtraction for PFI's
     T. Metcalf January 7, 1994
         o Fixed a bug in the code which incorrectly shifted subimages of 
           an FFI image when the edge of the FFI image was in the FOV.
         o Use MOD_RES instead of CHANGE_RES.
         o Added /SFD keyword


rd_atodat [2] $SSW/yohkoh/gen/idl/spectra/rd_atodat.pro
[Previous] [Next]
  NAME:
    rd_atodat
  PURPOSE:
    Read the atomic data files: ssec3.dat, casec3.dat, fesec3.dat, f26sec.dat

  CALLING SEQUENCE:
    ato_data = rd_atodat( infil )

  INPUTS:
    infil   =  Input file name
  OUTPUTS:
    Returned parameter (ato_data) is a structure containing the data 
    read from the file.
 CALLS: ***
	FILE_EXIST [2], STR2ARR [1], STR2ARR [2], file_exist [1], file_exist [3]
	rd_tfile [1], rd_tfile [2], tbeep [1], tbeep [2], tbeep [3]
 CALLED BY:
	get_atomic [1], get_atomic [2]
  MODIFICATION HISTORY:
    11-oct-93, Written, J. R. Lemen
     9-mar-94, JRL, Read density data from the end of data file
    11-mar-94, JRL, Read letter identifier in D.R. list.  This is
			to identify the q, k and j lines.
     6-oct-94, JRL, Added code to flag the statistical weight of the D.R. lines


rd_atr $SSW/yohkoh/gen/idl/ref_access/rd_atr.pro
[Previous] [Next]
NAME:
	rd_atr
PURPOSE:
	Read the raw Yohkoh summary attitude (ATR) data files
CALLING SEQUENCE:
	rd_atr, roadmap(0),  roadmap(n), atr_data
	rd_atr, '1-dec-91', '30-dec-91', atr_data
	rd_atr,      weeks,       years, atr_data
INPUT:
		  INPUT CAN BE OF TWO FORMS

		  (A) Input starting and ending times
	input1	- Starting time in either (i) standard string format,
		  or (ii) a structure with .time and .day fields
		  (the 7 element time vector form is not allowed)
	input2	- Ending time.  If ending time is omitted, the
		  ending time is set to 24 hours after starting time.

		  (B) Input can be a vector of week/year number
	input1	- a vector of the week numbers to read
	input2	- a vector of the year of the week to be read
		  if the weeks vector is all within one year, the
		  year parameter can be a scalar.
OUTPUT:
	data	- the data structure containing the data in the files
		  See the structure definition for further information
 CALLS: ***
	rd_week_file [1], rd_week_file [2], rd_week_file [3], rd_week_file [4]
 CALLED BY:
	atr2hxa_dbase, get_atr, tim2tfss
OPTIONAL KEYWORD INPUT:
	indir	- Input directory of data files.  If not present, use
		  $DIR_GEN_xxx logical directory
	vnum	- The file version number to use.  If not present, a call
		  to WEEKID is made and that latest version is used.
	nearest	- If set, then the time span is adjusted a day at a time
		  until it finds some data.  It decrements the starting
		  date by a day and increments the ending date by a day
		  up to 14 days (28 day total span)
       full_weeks - If set, then do not extract the entries that just
                 cover the times covered in the start/end time.  Return
                 all data for weeks covered by the start/end time. This
                 allows a user to have start and end time be the same
                 and still get some data.
OPTIONAL KEYWORD OUTPUT:
	status	- The read status
		  Some data is available if (status le 0)
			 0 = no error
			 1 = cannot find the file
			 2 = cannot find data in the time period
			-1 = found data, but had to go outside of the requested
			     period (only true if /NEAREST is used).  
HISTORY:
	Written 16-Jul-93 by M.Morrison


rd_att $SSW/yohkoh/gen/idl/ref_access/rd_att.pro
[Previous] [Next]
NAME:
	rd_att
PURPOSE:
	Read the processed Yohkoh summary attitude (ATT) data files
CALLING SEQUENCE:
	rd_att, roadmap(0),  roadmap(n), att_data
	rd_att, '1-dec-91', '30-dec-91', att_data
	rd_att,      weeks,       years, att_data
INPUT:
		  INPUT CAN BE OF TWO FORMS

		  (A) Input starting and ending times
	input1	- Starting time in either (i) standard string format,
		  or (ii) a structure with .time and .day fields
		  (the 7 element time vector form is not allowed)
	input2	- Ending time.  If ending time is omitted, the
		  ending time is set to 24 hours after starting time.

		  (B) Input can be a vector of week/year number
	input1	- a vector of the week numbers to read
	input2	- a vector of the year of the week to be read
		  if the weeks vector is all within one year, the
		  year parameter can be a scalar.
OUTPUT:
	data	- the data structure containing the data in the files
		  See the structure definition for further information
 CALLS: ***
	FIX_OLD_ATT [1], FIX_OLD_ATT [2], FIX_OLD_ATT [3], rd_week_file [1]
	rd_week_file [2], rd_week_file [3], rd_week_file [4]
 CALLED BY:
	CHECK_SFC_PNT, QUICKATT [1], QUICKATT [2], QUICKLIMB [1], QUICKLIMB [2], TEST_ATT
	ads_into_att, get_att, kluge_att, mk_sfc [1], mk_sfc [2], sxt_patch_att
OPTIONAL KEYWORD INPUT:
	indir	- Input directory of data files.  If not present, use
		  $DIR_GEN_xxx logical directory
	vnum	- The file version number to use.  If not present, a call
		  to WEEKID is made and that latest version is used.
	nearest	- If set, then the time span is adjusted a day at a time
		  until it finds some data.  It decrements the starting
		  date by a day and increments the ending date by a day
		  up to 14 days (28 day total span)
       full_weeks - If set, then do not extract the entries that just
                 cover the times covered in the start/end time.  Return
                 all data for weeks covered by the start/end time. This
                 allows a user to have start and end time be the same
                 and still get some data.
OPTIONAL KEYWORD OUTPUT:
	status	- The read status
		  Some data is available if (status le 0)
			 0 = no error
			 1 = cannot find the file
			 2 = cannot find data in the time period
			-1 = found data, but had to go outside of the requested
			     period (only true if /NEAREST is used).  
       ibyt    - The byte position within the file where the data was extracted
       filename- The name of the file which was read
HISTORY:
	Written 16-Jul-93 by M.Morrison
       11-Aug-93 (MDM) - Added IBYT and FILENAME output parameters
	29-Aug-94 (MDM) - Added NOBACKUP option
       22-Sep-94 (SLF) - Added call to fix_old_att


RD_BCSCAL [1] $SSW/yohkoh/bcs/idl/atest/rd_bcscal.pro
[Previous] [Next]
 NAME:
	RD_BCSCAL
 PURPOSE:
       to obtain sensitivity factor, central wavelength, and
       physical position of right-hand boundaries of BCS bins.
 CALLING SEQUENCE:
	RD_BCSCAL,CHAN
 INPUTS:
	CHAN         - BCS channel
 KEYWORD OUTPUTS:
       W0           - start wavelength of detector (A)
       EDGES        - physical position of right-hand edges of bin
       SENS         - sensitivity factor for bin
       DISP         - dispersion (A/bin)
       EFAREA       - detector effective area(cm^2)
       BINARC       - bins per arcmin
       ROCKW        - rocking width (A)
       GAUSSW       - gaussian detector width (A)
       BSTART       - first valid bin number
       BEND         - last valid bin number
       VERSION      - version number of CAL file
	HEAD	     - Header string of the CAL file
 RESTRICTIONS
       Will reject old version calibration files that do not contain
       the version number and effective area value.
 CALLED BY:
	GT_BSC_BINCAL [1], GT_BSC_BINCAL [2], bcs_emiss   was bcs_counts
 PROCEDURE:
       Reads latest version of Sin(theta) vs Sensitivity file for
       specified channel.
       Determines first and last valid bin numbers (bstart,bend) from
       first and last non-zero sin(theta) values.
       Computes physical positions of RHS edges of each bin
       and start wavelengths of each bin using dispersion relation.
 CALLS: ***
	get_bcscal, rd_tfile [1], rd_tfile [2]
 RESTRICTIONS:
       The bins in the BCS calibration files correspond to ungrouped bins.
       The physical position, wavelength, and sensitivity of grouped data
       will depend on the grouping plan.
 HISTORY:
       Written Oct. 1992 by D. Zarro (Applied Research Corp).
	22-oct-93, J. R. Lemen (LPARL), Added Head keyword. Read file using rd_tfile to
					avoid comment lines which begin with ";"
	 3-nov-93, JRL, Updated to handle Format Ver 3 files (double column)
       D-Day'94, DMZ, changed variable twod to twod_s 
                      (conflicted with FCS twod function)


RD_BCSCAL [2] $SSW/yohkoh/bcs/idl/bsc/rd_bcscal.pro
[Previous] [Next]
 NAME:
	RD_BCSCAL
 PURPOSE:
       to obtain sensitivity factor, central wavelength, and
       physical position of right-hand boundaries of BCS bins.
 CALLING SEQUENCE:
	RD_BCSCAL,CHAN
 INPUTS:
	CHAN         - BCS channel
 KEYWORD OUTPUTS:
       W0           - start wavelength of detector (A)
       EDGES        - physical position of right-hand edges of bin
       SENS         - sensitivity factor for bin
       DISP         - dispersion (A/bin)
       EFAREA       - detector effective area(cm^2)
       BINARC       - bins per arcmin
       ROCKW        - rocking width (A)
       GAUSSW       - gaussian detector width (A)
       BSTART       - first valid bin number
       BEND         - last valid bin number
       VERSION      - version number of CAL file
	HEAD	     - Header string of the CAL file
 RESTRICTIONS
       Will reject old version calibration files that do not contain
       the version number and effective area value.
 CALLED BY:
	GT_BSC_BINCAL [1], GT_BSC_BINCAL [2], bcs_emiss   was bcs_counts
 PROCEDURE:
       Reads latest version of Sin(theta) vs Sensitivity file for
       specified channel.
       Determines first and last valid bin numbers (bstart,bend) from
       first and last non-zero sin(theta) values.
       Computes physical positions of RHS edges of each bin
       and start wavelengths of each bin using dispersion relation.
 CALLS: ***
	get_bcscal, rd_tfile [1], rd_tfile [2]
 RESTRICTIONS:
       The bins in the BCS calibration files correspond to ungrouped bins.
       The physical position, wavelength, and sensitivity of grouped data
       will depend on the grouping plan.
 HISTORY:
       Written Oct. 1992 by D. Zarro (Applied Research Corp).
	22-oct-93, J. R. Lemen (LPARL), Added Head keyword. Read file using rd_tfile to
					avoid comment lines which begin with ";"
	 3-nov-93, JRL, Updated to handle Format Ver 3 files (double column)


RD_BDA [1] $SSW/yohkoh/gen/idl/ref_access/rd_bda.pro
[Previous] [Next]
NAME:
	RD_BDA
PURPOSE:
	Read and extract BCS images specified in the 'dset_arr'
	parameter from the BCS Solar-A reformatted data base.
CALLING SEQUENCE:
	Rd_BDA, infil, dset_arr, index, data, roadmap
       Rd_BDA, infil, dset_arr, index, data
       rd_bda, infil, dset_arr, index, data, roadmap, dset_str=dset_arr
       Rd_BDA, infil, dset_arr, index, /nodata
INPUT:
	infil   : input file specification
		  "infil" can be a vector of filenames 
INPUT:
       infil   : input file specification "infil" can be a vector of filenames 
       dset_arr: vector of dataset numbers to extract (indices vector)
               * "dset_arr" can be
                     1. An indicie vector ("SS") from a search of the roadmap
                        of ALL of the files in "infil".
                     2. a structure with fields ".dset" and ".ifil".
                        ".dset" is the dataset number WITHIN THE FILE, and
                        ".ifil" is the index of the filename within the
                        infil array.  The structure is "N" elements long
                        where "N" is the total number of datasets to extract.
               * The order that the images are placed in the output
                 variable "data" is the same order that they
                 appear in "dset_arr"
               * If "-1" is passed, the whole file is read
                 and the dset_arr returned is the "indgen(ndset)"
OPTIONAL INPUT:
	nodata  : If present, only the index is read
OUTPUT:
	index	: data-index logical record (one for each 
		  image requested)
	data	: 2D array
	roadmap	: summary of data-index logical record, note
		  all roadmaps records in the file are returned.
		  In the case where "infil" is an array, roadmap
                 is the concatenated roadmap for all files that
                 are being read for the particular extraction.
	dp_sync :  dp sync section of infil
                               If the parameter is included
                               in the call, then it is read
       filidx  : a vector the same length as the roadmap
                 with the index of the file associated with that entry
                 (ie: 0,0,0,0,1,1,1,1,2,2,2,2,...)
                 This is output from RD_ROADMAP ONLY ON THE FILES FOR
                 WHICH DATA HAS BEEN SELECTED TO BE READ!
       dset_str: the structure form of the requested datasets
                 passed in with "dset_arr".  If user passes in
                 a simple vector ("SS"), "dset_str" is the structure
                 form of the output.
 CALLS: ***
	BCS_OLD_STRUCT, BCS_STRUCT, RD_BDA_DP, RD_INDEX, Rd_Roadmap [2], Rd_fHeader [1]
	Rd_fHeader [2], Rd_fHeader [3], UNIQ [1], UNIQ [2], UNIQ [3], mk_dset_str [1]
	mk_dset_str [2], rd_roadmap [1], rdwrt [1], rdwrt [2], rdwrt [3], str_copy
	tag_index [1], tag_index [2]
 CALLED BY:
	MK_BSC [1], MK_BSC [2], WBDA [1], WBDA [2], first_bcs, get_bcs
Examples:
	rd_bda, filename, indgen(10), index, data, roadmap
	returns 1st 10 images in file=filename
RESTRICION:
       CAUTION: If the filename list is long and RD_BDA is going to
       be called many times getting only a small number of data sets,
       then it is recommended to use the structure option for "dset_arr"
       (call MK_DSET_STR externally) because RD_FHEADER is called for
       all files each time RD_BDA is called when not using the
       structure option for "dset_arr".
HISTORY:
	written by Mons Morrison, Fall 90.
	 7-Dec-91 MDM - added option to pass a vector of filenames
			as well as the "filidx" parameter
	 2-Mar-92 MDM - Changed "data" array output size to look at the
			"roadmap.length" values for the datasets to be
			extracted instead of the "file_header.maxsamps"
			value.  Saves memory.
        6-Mar-92 MDM - Changed calling sequence to allow "dset_arr"
                       to be a simple integer array ("SS") or a structure
                       with .DSET and .IFIL.  "SS" option can be used
                       even if infil is an array (previously restricted
                       to turn it into a structure in external routine)
                       Uses MK_DSET_STR internally.
                       Also added "dset_str" optional output capability
	19-Mar-92 MDM - Changed not to use the "roadmap2" method of getting
			the byte offset.  Instead, uses the full roadmap.
			This is to speed up the reading if reading the same
			file multiple times.
			Also, changed call to RD_INDEX to pass the byte offset
			so it does not have to read RD_ROADMAP
       20-Mar-92 MDM - Changed so output structure version is not updated if
                       the different structure is switching to an OLDER version


RD_BDA [2] $SSW/yohkoh/gen/idl/ref_access/rd_bda_tmp.pro
[Previous] [Next]
NAME:
	RD_BDA
PURPOSE:
	Read and extract BCS images specified in the 'dset_arr'
	parameter from the SXT Solar-A reformatted data base.
CALLING SEQUENCE:
	Rd_BDA, infil, dset_arr, index, data, roadmap
INPUT:
	infil   : input file specification
		  "infil" can be a vector of filenames 
	dset_arr: image indices vector.  The order that the images are
		  placed in the output variable "data" is the same
		  order that they appear in "dset_arr"
		  If "-1" is passed, the whole file is read
		  and the dset_arr returned is the "indgen(ndset)"
		  If infil is a scalar, then dset_arr should be
		  a scaler or 1-D vector.  i
		  If infil is a vector of files, then dset_arr should 
		  be a structure with fields ".dset" and ".ifil".
		  ".dset" is the dataset number WITHIN THE FILE, and
		  ".ifil" is the index of the filename within the
		  infil array.
		  The structure is "N" elements long
		  where "N" is the total number of datasets to
		  extract.  
OPTIONAL INPUT:
	nodata  : If present, only the index is read
OUTPUT:
	index	: data-index logical record (one for each 
		  image requested)
	data	: 2D array
	roadmap	: summary of data-index logical record, note
		  all roadmaps records in the file are returned.
		  In the case where "infil" is an array, roadmap
		  is the concatenated roadmap for all files.
	dp_sync :  dp sync section of infil
                               If the parameter is included
                               in the call, then it is read
       filidx  : a vector the same length as the roadmap
                 with the index of the file associated with that entry
                 (ie: 0,0,0,0,1,1,1,1,2,2,2,2,...)
		  This is output from RD_ROADMAP
 CALLED BY:
	MK_BSC [1], MK_BSC [2], WBDA [1], WBDA [2], first_bcs, get_bcs
Examples:
	rd_bda, filename, indgen(10), index, data, roadmap
	returns 1st 10 images in file=filename
HISTORY:
	written by Mons Morrison, Fall 90.
	 7-Dec-91 MDM - added option to pass a vector of filenames
			as well as the "filidx" parameter


RD_BDA_DATA $SSW/yohkoh/gen/idl/ref_access/rd_bda_data.pro
[Previous] [Next]
NAME:
       RD_BDA_DATA
PURPOSE:
       Perform the actual data read for BDA files (called from RD_XDA)
INPUT:
       lun     - the logical unit number where the file is open
       ibyt    - the starting byte value to read from
       idset   - the dataset number for the output matrix
       nout    - the total number of datasets to be extracted
       index   - the index structure for all output datasets
       roadmap - the roadmap
       sel_dsets- the indicies of the datasets selected for extraction
INPUT/OUTPUT:
       data    - the data
 CALLS: ***
	Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3], rdwrt [1], rdwrt [2], rdwrt [3]
	tag_index [1], tag_index [2]
 CALLED BY:
	RD_XDA [1], RD_XDA [2]
RESTRICTIONS:
	There might be problems if using old data files (prior to Dec-91)
	mixed with new data files.  The "length" field might be non-zero
	only in a few files and the maximum sample length used might be
	wrong (too small)...
HISTORY:
       written 21-Mar-92 by Mons Morrison


RD_BDA_DP $SSW/yohkoh/gen/idl/ref_access/rd_bda_dp.pro
[Previous] [Next]
	Name: RD_BDA_DP

	Purpose: Read and extract the DP Syncronoous data from Solar-A 
		BCS reformatted data files

	Input Parameters:
		 infil = bcs file name
	Output Parameters:
		 dp_sync = dp sync section of infil 

	Modfication History:
		Version 1.0, M.Morrison, July 20, 1991
		16-Nov-91 (MDM) Modified to check the structure version
		21-Nov-91 (MDM) Fixed bug in reading structure version
		12-Dec-91 (MDM) Allowed passing a vector of filenames
		15-Jan-93 (MDM) Moved FREE_LUN command outside conditional
				to work properly for cases when there is
				no optional DP_SYNC data section.
 CALLS:
 CALLED BY
	FIND_CAL [1], FIND_CAL [2], FIND_SEU, RD_BDA [1], RD_XDA [1], RD_XDA [2], SUMM_CALS
	get_bcs, mk_obs_str


rd_bpc $SSW/yohkoh/bcs/idl/bsd/rd_bpc.pro
[Previous] [Next]
  procedure to read a BPC file and load the results into a structure
  for easy access for plotting etc

  The structure definition is no longer.......

 ARRAY(chan,spec).QUALITY(option,line)
 ARRAY(chan,spec).INTENSITY(option,line)
 ARRAY(chan,spec).IERR(option,line)
 ARRAY(chan,spec).WIDTH(option,line)
 ARRAY(chan,spec).WERR(option,line)
 ARRAY(chan,spec).POSITION(option,line)
 ARRAY(chan,spec).PERR(option,line)
 ARRAY(chan,spec).BACK1(option,line)
 ARRAY(chan,spec).BACK2(option,line)
 ARRAY(chan,spec).TIME(6)
 ARRAY(chan,spec).WO(3)
 ARRAY(chan,spec).DW
 ARRAY(chan,spec).NBACK
 ARRAY(chan,spec).NOPT_USED
 ARRAY(chan,spec).TOTAL
 ARRAY(chan,spec).SDGI

 Use:   First note that all counters start at zero!
        Produce a BPC file by using MKBSD, BSDCAL then

        idl>  rd_bpc,array,'bpc file name'

        idl> plot,array(3,*).intensity(1,2)   would then plot all the
                                              intensities derived for the
                                              3rd line in the second fit
                                              option of the SXV channel - 
                                              if such a beast were to exist.


     CDP  Nov 91

 CALLS:
 CALLED BY
	BCS_FIXBPC


rd_bsc $SSW/yohkoh/bcs/idl/bsc/rd_bsc.pro
[Previous] [Next]
 NAME:
       rd_bsc
 PURPOSE:
       to read a BSC file
 CALLING SEQUENCE:
      rd_bsc,bsc_file,dset_arr,bsc_index,bsc_data,bsc_roadmap,$
		nodata=nodata, filidx=filidx, dset_str=dset_arr0
                                               
 INPUTS:
      bsc_file = BSC file 
      dset_arr = array of indicies of elements to select [def = -1; all]
 OUTPUTS:
      bsc_index = BSC index
 OPTIONAL OUTPUTS:
      bsc_data  = BSC data
      bsc_roadmap = BSC roadmap
 KEYWORDS:
      novalid= If set, returns all raw data.  Default is to return
		only the valid bins (non-zero wavelength bins).
      nodata = inhibit data read (if set)
      (refer to RD_XDA for definition of remaining keywords)
 CALLED BY:
	BSC2BSD, LIST_BSC [1], LIST_BSC [2], mk_bscfit_eps
 PROCEDURE:
      Calls RD_XDA to read BSC (or BSA) file.
 CALLS: ***
	BSC_VALID, DATATYPE [1], DATATYPE [2], DATATYPE [3], FILE_EXIST [2], RD_XDA [1]
	RD_XDA [2], file_exist [1], file_exist [3], prstr [1], prstr [2]
 RESTRICTIONS:
      BSC_DATA will be meaningless if file contains only BSA
      answer structure.
 HISTORY:
      Written Jan'93 by DMZ (ARC)
      11-Sep-93, DMZ+JRL, Added /novalid keywords checks for old index version
      10-May-94, DMZ, fixed bug in maxb


RD_BSC_DATA $SSW/yohkoh/gen/idl/ref_access/rd_bsc_data.pro
[Previous] [Next]
NAME:
	RD_BSC_DATA
PURPOSE:
	Perform the actual data read for BSC files (called from RD_XDA)
INPUT:
	lun	- the logical unit number where the file is open
	ibyt	- the starting byte value to read from
	idset	- the dataset number for the output matrix
	nout	- the total number of datasets to be extracted
	index	- the index structure for all output datasets
	roadmap	- the roadmap
	sel_dsets- the indicies of the datasets selected for extraction
INPUT/OUTPUT:
	data	- the data
 CALLS: ***
	MK_BSC_STR [1], MK_BSC_STR [2], rdwrt [1], rdwrt [2], rdwrt [3]
 CALLED BY:
	RD_XDA [1], RD_XDA [2]
HISTORY:
	written 13-Nov-92 by Mons Morrison


rd_bsd $SSW/yohkoh/ucon/idl/mariska/rd_bsd.pro
[Previous] [Next]
	NAME:
		rd_bsd

	PURPOSE:
		Read the data sections of BSD files

	INPUT:
		infil	file name

		dset_arr	data set indices to extract

		chan	BCS channel 1 to 4

		roadmap		roadmp array for channel

		header		bsd file header structure

	OUTPUT:
		rec_head	record header structure

		datab	bin arrays

		datac	count arrays

		wave	wavelength arrays

 CALLS: ***
	BSD_STRUCT
	HISTORY:
		JTM: (25 Oct 91)


rd_bsd_data v097 $SSW/yohkoh/bcs/idl/bsd/rd_bsd_data.pro
[Previous] [Next]
 NAME:			rd_bsd_data v0.97

 PURPOSE:		read bsd data block + return in structure

 CALLING SEQUENCE:     rd_bsd_header
			rd_bsd_rdmap
			rd_bsd_data

 INPUTS:		lun_filename - Lun/or filename.
			header - header structure - see rd_bsd_header
			rdmap  - roadmap structure - see rd_bsd_rdmap
			dset_arr - dataset array. 

 OPTIONAL INPUTS:	channels - array of channel numbers (*) default.
			/nodata  - if this flag then do not extract data
				(useful if you only want the index struct).

 OUTPUTS:		index  - data index structure.
			data   - data structure. 
			 For structure definitions see file bsd_struct.pro

 OPTIONAL OUTPUTS:  	none

 CALLS: ***
	BSD_STRUCT, RD_BSD_DATA
 RESTRICTIONS:		Filename must match that in calls to rd_bsd_header
			and rd_bsd_rdmap

 PROCEDURE:		read record at a time, insert into structure, create
			wavelength array.

 MODIFICATION HISTORY: v0.0  written atp 5/92 from jtm's rd_bsd.pro
			v0.03 modified to account for uncertainties/internal 
				time errors atp may92 
			v0.9  clean up, minor bug fixes (7/7/92)     
			v0.95 Lun_fixed and nodata keyword atp
			v0.97 fixed bug with nodata keyword.


rd_bsd_header v09 $SSW/yohkoh/bcs/idl/bsd/rd_bsd_header.pro
[Previous] [Next]
	NAME:
		rd_bsd_header v0.9

	PURPOSE:
		Read and extract the header section from a BSD file

	CALLING SEQUENCE:
		rd_bsd_header, lun_filnam, header

	INPUT:
		lun_filnam	input file specification or the unit number
				of an opened BSD file

	OUTPUT:
		header		the header section see bsd_struct.pro

 CALLS: ***
	BSD_STRUCT, RD_BSD_HEADER
	HISTORY:
		JTM: (24 Oct 91)
		ATP: (13 may 92)
		ATP: (18 may 92)
		atp: (7/7/92) header, minor fixes


rd_bsd_rdmap v09 $SSW/yohkoh/bcs/idl/bsd/rd_bsd_rdmap.pro
[Previous] [Next]
	NAME:
		rd_bsd_rdmap v0.9

	PURPOSE:
		Read the roadmap section of a BSD file

	CALLING SEQUENCE:
		rd_bsd_rdmap, lun_filnam, header, roadmap

	INPUT:
		lun_filnam	input file specification or the
				unit number of an opened BSD file

               Header 		The BSD_header record for the current file.
				(see rd_bsd_header.pro)

	OUTPUT:
		roadmap   	BSD_roadmap structure. see bsd_struct.pro for 
				details.

 CALLS: ***
	BSD_STRUCT, RD_BSD_RDMAP
	HISTORY:
		JTM: (24 Oct 91)
 		atp: march 1992 - mods for new bsd structures/cleanup
		atp: (7/7/92) v0.9 - minor fixes, header, allow different 
				     roadmap sizes for each channel.


RD_CARD $SSW/yohkoh/ucon/idl/sakao/rd_card.pro
[Previous] [Next]
 NAME:
	RD_CARD
 PURPOSE:
	A procedure that reads in a CARD data file of the following format and 
	sets values in ss_arr and fr_arr that are used in mk_hxt_sum.
 CALLED BY:
	PREP_HXTDAT
 OPTIONAL KEYWORD INPUT:
	file	- If set, then specifies a CARD data file which is read-in 
		  by this program.
		  If not set, then the filename is asked. 

	Format of a CARD data file :
	--------( file starts from here)-------
	hda920206.0254
	405  0    406  3
	407  0    407  2
	407  3    408  1
	408  2    409  3
	410  0    410  3
	(etc.etc.)
 OUTPUT:
	ss_arr	- ss array with a format of intarr(SFs,Images)
	fr_arr	- fr array with a format of intarr(start/end fr,Images)
	rf_file	- Reformatted file name.
 CALLING SEQUENCE:
	rd_card, ss_arr, fr_arr, file='06feb92_card.data'
 HISTORY:
	version 1.0	93.03.25 (Thu)  T.Sakao written.
	version 1.1	95.09.11 (Mon)	MAX_IMAGE_NO increased from 100 to 
					300 according to Morimoto kun's 
					request. 


RD_CBA_DATA $SSW/yohkoh/gen/idl/ref_access/rd_cba_data.pro
[Previous] [Next]
NAME:
	RD_CBA_DATA
PURPOSE:
	Perform the actual data read for CBA files (called from RD_XDA)
INPUT:
	lun	- the logical unit number where the file is open
	ibyt	- the starting byte value to read from
	idset	- the dataset number for the output matrix
	nout	- the total number of datasets to be extracted
	index	- the index structure for all output datasets
	roadmap	- the roadmap
	sel_dsets- the indicies of the datasets selected for extraction
INPUT/OUTPUT:
	data	- the data
 CALLS: ***
	CBA_STRUCT, rdwrt [1], rdwrt [2], rdwrt [3]
 CALLED BY:
	RD_XDA [1], RD_XDA [2]
HISTORY:
	written 21-Mar-92 by Mons Morrison


rd_conroi $SSW/yohkoh/ucon/idl/linford/rd_conroi.pro
[Previous] [Next]
	NAME:
		rd_conroi
	PURPOSE:
		Read conroi.dat file and return the indices of the 
		contour.
	Calling Sequence:
		a = rd_conroi(filename, contour_header, nodel=nodel)
	
	INPUTS:
		filename 	Data file NAME from contour/path_filename.	
		nodel		Flag to inhibit deleting the file after
				closing the file.
	Optional Inputs:
		nodel	if not set will delete contour data file after
			reading.
		threshold	threshold for the minimum number of pixels
				for a given contoured region to be returned.
				default is 1 (ie all contour data).
	OUTPUTS: 
		Function returns the (x,y,n) values from the contour file, 
		units are in normalize coord.  N is the number of contours.
		Contour_header 		structured header for each contour.
				(see appendix D, "path_filename" for fields).
 CALLED BY:
	conroi, wconroi
	Note:   If two or more contours present then Contour_header will
		be an array (one for each) and the (x,y) values for
		each contour are appended to a single list.  The "num"
		field in each header gives the number of pixels
		associated with each contour.

	History:
		written, gal 28-July-92
		mod. to return multiple contours, gal 3-Feb-93.
		added threshold, for the minimum number of pixels within
		a contour. 26-Oct-93 and changed return data to a 3-dim
		array.
		25-May-94, gal, updated to the new file format which has
		x list followed by y list, thanks to the IDL release notes
		for v. 3.5 IDL.
		1-Jun-94, gal, added code to make the change for reading 
		the new format files somewhat downward compat.


RD_CPU_DTB $SSW/yohkoh/bcs/idl/micro/rd_cpu_dtb.pro
[Previous] [Next]
 NAME:
	RD_CPU_DTB
 PURPOSE:
	Reads a BCS CPU database file
 CATEGORY:
 CALLING SEQUENCE:
	rd_cpu_dtb,type,database,ierror
 INPUTS:
	type		string specifying list type; allowed values are:
			'SEQN', 'FLOP', 'PLAN'
 OPTIONAL INPUT PARAMETERS:
 KEYWORD PARAMETERS:
 OUTPUTS:
	database	database for specified type
	ierror		sety to -1 if error occured, otherwise zero
 OPTIONAL OUTPUT PARAMETERS:
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], concat_dir [4]
 CALLED BY:
	BCS_GRP_PLAN
 COMMON BLOCKS:
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:
	RDB  Autumn-91
	RDB  17-May-94	Added call to concat_dir; this ducumentation
			Made files /xdr


rd_dsktapdir $SSW/yohkoh/gen/idl/tape/rd_dsktapdir.pro
[Previous] [Next]
	NAME:
		rd_dsktapdir
	Purpose:
		Read and return contents of binary tape directory disk
		file.
	CALLING SEQUENCE:
		rd_dsktapdir, fn, hdr, drecs
	Input:
		fn	file name
	Output:
		hdr	returned header section of tape dir file
		drecs	data section of tape dir file
 CALLS: ***
	mkdirst, rdwrt [1], rdwrt [2], rdwrt [3], tar_size
 CALLED BY:
	Rd_TapDir
	History:
		14-May-92, written by GAL
		16-May-92, released date
		15-Jan-93 (MDM) - Removed a print statement
		11-Jun-93 (gal) - updated call to mkdirst to include
			mktapverno.


rd_fem $SSW/yohkoh/gen/idl/ref_access/rd_fem.pro
[Previous] [Next]
NAME:
	rd_fem
PURPOSE:
       Read the FEM files (reduced ephemeris files that contain
       the S/C day/night, SAA, and station contact times)
CALLING SEQUENCE:
	rd_fem, roadmap(0),  roadmap(n), fem_data
	rd_fem, '1-dec-91', '30-dec-91', fem_data
	rd_fem,      weeks,       years, fem_data
INPUT:
		  INPUT CAN BE OF TWO FORMS

		  (A) Input starting and ending times
	input1	- Starting time in either (i) standard string format,
		  or (ii) a structure with .time and .day fields
		  (the 7 element time vector form is not allowed)
	input2	- Ending time.  If ending time is omitted, the
		  ending time is set to 24 hours after starting time.

		  (B) Input can be a vector of week/year number
	input1	- a vector of the week numbers to read
	input2	- a vector of the year of the week to be read
		  if the weeks vector is all within one year, the
		  year parameter can be a scalar.
OUTPUT:
	data	- the data structure containing the data in the files
		  See the structure definition for further information
 CALLS: ***
	rd_week_file [1], rd_week_file [2], rd_week_file [3], rd_week_file [4]
 CALLED BY:
	ALIGN_AR, HXA_SUNCENTER, NEAR_CONJ, NOV93_ECLIPSE, NOV_ECLIPSE, RD_AR, SXT_ECLIPSE
	SXT_OBSRPT, YOHKOH_EVENTS, auto_toban, contact_num [1], contact_num [2]
	contacts [1], contacts [2], do_ads, fem_grid [1], fem_grid [2], get_sunset
	may_eclipse, mk_evn [1], mk_evn [2], mk_fem [1], mk_fem [2], mk_gev [1], mk_gev [2]
	mk_nar [1], mk_nar [2], mk_orbit [1], mk_orbit [2], op_times, plot_evn, plot_fem
	pr_fem, pro loadopfemfiletimeOGfemverboseverbose, show_obs3, show_obs4
	tim2orbit [1], tim2orbit [2], xfem_grid
OPTIONAL KEYWORD INPUT:
	indir	- Input directory of data files.  If not present, use
		  $DIR_GEN_xxx logical directory
	vnum	- The file version number to use.  If not present, a call
		  to WEEKID is made and that latest version is used.
	nearest	- If set, then the time span is adjusted a day at a time
		  until it finds some data.  It decrements the starting
		  date by a day and increments the ending date by a day
		  up to 14 days (28 day total span)
       full_weeks - If set, then do not extract the entries that just
                 cover the times covered in the start/end time.  Return
                 all data for weeks covered by the start/end time. This
                 allows a user to have start and end time be the same
                 and still get some data.
	asca	- If set, read the ASCA spacecraft FEM files
OPTIONAL KEYWORD OUTPUT:
	status	- The read status
		  Some data is available if (status le 0)
			 0 = no error
			 1 = cannot find the file
			 2 = cannot find data in the time period
			-1 = found data, but had to go outside of the requested
			     period (only true if /NEAREST is used).  
HISTORY:
	Written Jun-92 by M.Morrison
	 5-Apr-93 (MDM) - Modified to use RD_WEEK_FILE
	 7-Apr-93 (MDM) - Added FULL_WEEKS and QDEBUG options
			- Added ASCA option


Rd_fHeader [2] $SSW/yohkoh/gen/idl/atest/rd_fheader.pro
[Previous] [Next]
       NAME:
               Rd_fHeader
       PURPOSE:
               Read and extract the file header section from
               requested file.
       CALLING SEQUENCE:
               Rd_fHeader, lun_filnam, file_header, ndset
       INPUT:
               lun_filnam      input file specification or the
                               unit number of an openned reformatted
                               file.
       Output:
               file_header     a logical record containning the
                               standard file header section.
               ndset           number of data sets contained within
                               the file (number of logical roadmap
                               records).
 CALLS: ***
	GEN_STRUCT [1], GEN_STRUCT [2], Rd_Pointer [1], Rd_Pointer [2], rdwrt [1]
	rdwrt [2], rdwrt [3]
 CALLED BY:
	BCS_24HR_PLOT [1], BCS_24HR_PLOT [3], CkTimeNkey, GetNarOrb get nearest orbit
	Load_recs, RD_BDA [1], RD_BDA_DATA, RD_BDA_DP, RD_XDA [1], RD_XDA [2]
	Rd_NewOrb_p [1], Rd_NewOrb_p [2], ada2str, ads_into_att, ads_into_pnt
	filetimes [1], filetimes [2], kluge_att, mk_att [1], mk_att [2], mk_dset_str [1]
	mk_dset_str [2], mk_evn [1], mk_evn [2], mk_gx, mk_mo_log, mk_obs_str, mk_pnt, mk_sd2
	mk_sdc [2], mk_sdc [3], mk_sdc [4], mk_sdl, mk_sl [1], mk_sl [2], mk_sot, mk_ssl, mk_sxc
	mk_sxl, mk_week_file [1], mk_week_file [2], newsfd, nn_rd2_sxt_noaa
	nn_rd3_sxt_noaa, nn_rd_sxt_noaa, plot_gsn, pnt2atr, rd_gsn, rd_old_obs
	rd_roadmap [1], rd_sdl, rd_sld, rd_sls, rd_sot, rd_ssl, rd_week_file [1]
	rd_week_file [2], rd_week_file [3], rd_week_file [4], sav_bda, sav_bsc, sav_hxi
	sav_sda [1], sav_sda [2], sav_sda [3], weekid [2], wrt1orbit [1], wrt1orbit [2]
	ydb_exist [2], yoyo_man2
       History:
               written by Mons Morrison, Fall 90.
		12-Dec-91 (MDM) Changed to allow a vector of filenames
		25-May-01 (LWA) Made variable in "for" call a longword


Rd_fHeader [3] $SSW/yohkoh/gen/idl/ref_access/rd_fheader.pro
[Previous] [Next]
       NAME:
               Rd_fHeader
       PURPOSE:
               Read and extract the file header section from
               requested file.
       CALLING SEQUENCE:
               Rd_fHeader, lun_filnam, file_header, ndset
       INPUT:
               lun_filnam      input file specification or the
                               unit number of an openned reformatted
                               file.
       Output:
               file_header     a logical record containning the
                               standard file header section.
               ndset           number of data sets contained within
                               the file (number of logical roadmap
                               records).
 CALLS: ***
	GEN_STRUCT [1], GEN_STRUCT [2], Rd_Pointer [1], Rd_Pointer [2], rdwrt [1]
	rdwrt [2], rdwrt [3]
 CALLED BY:
	BCS_24HR_PLOT [1], BCS_24HR_PLOT [3], CkTimeNkey, GetNarOrb get nearest orbit
	Load_recs, RD_BDA [1], RD_BDA_DATA, RD_BDA_DP, RD_XDA [1], RD_XDA [2]
	Rd_NewOrb_p [1], Rd_NewOrb_p [2], ada2str, ads_into_att, ads_into_pnt
	filetimes [1], filetimes [2], kluge_att, mk_att [1], mk_att [2], mk_dset_str [1]
	mk_dset_str [2], mk_evn [1], mk_evn [2], mk_gx, mk_mo_log, mk_obs_str, mk_pnt, mk_sd2
	mk_sdc [2], mk_sdc [3], mk_sdc [4], mk_sdl, mk_sl [1], mk_sl [2], mk_sot, mk_ssl, mk_sxc
	mk_sxl, mk_week_file [1], mk_week_file [2], newsfd, nn_rd2_sxt_noaa
	nn_rd3_sxt_noaa, nn_rd_sxt_noaa, plot_gsn, pnt2atr, rd_gsn, rd_old_obs
	rd_roadmap [1], rd_sdl, rd_sld, rd_sls, rd_sot, rd_ssl, rd_week_file [1]
	rd_week_file [2], rd_week_file [3], rd_week_file [4], sav_bda, sav_bsc, sav_hxi
	sav_sda [1], sav_sda [2], sav_sda [3], weekid [2], wrt1orbit [1], wrt1orbit [2]
	ydb_exist [2], yoyo_man2
       History:
               written by Mons Morrison, Fall 90.
		12-Dec-91 (MDM) Changed to allow a vector of filenames


RD_FULL_LOAD [1] $SSW/yohkoh/bcs/idl/atest/rd_full_load.pro
[Previous] [Next]
 NAME:
	RD_FULL_LOAD
 PURPOSE:
	Reads image of BCS memory load from specified file
	Default is: $DIR_BCS_MICRO:full_load.dat
 CATEGORY:
 CALLING SEQUENCE:
	rd_full_load,full_load [,file=file]
 INPUTS:
 OPTIONAL INPUT PARAMETERS:
 KEYWORD PARAMETERS:
	file=file	filename to use for read
 OUTPUTS:
 OPTIONAL OUTPUT PARAMETERS:
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], concat_dir [4]
 COMMON BLOCKS:
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:
	RDB   7-May-94	Split into own routine
	RDB  28-Nov-97  Added file keyword


RD_FULL_LOAD [2] $SSW/yohkoh/bcs/idl/micro/rd_full_load.pro
[Previous] [Next]
 NAME:
	RD_FULL_LOAD
 PURPOSE:
	reads image of BCS memory load from $DIR_BCS_MICRO:full_load.dat
 CATEGORY:
 CALLING SEQUENCE:
	rd_full_load,full_load
 INPUTS:
 OPTIONAL INPUT PARAMETERS:
 KEYWORD PARAMETERS:
 OUTPUTS:
 OPTIONAL OUTPUT PARAMETERS:
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], concat_dir [4]
 COMMON BLOCKS:
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:
	RDB   7-AMy-94	Split into own routine


rd_gbe_raw $SSW/yohkoh/gen/idl/ref_access/rd_gbe_raw.pro
[Previous] [Next]
NAME:
	rd_gbe_raw
PURPOSE:
	To read the raw BATSE event log file
 CALLS: ***
	GBO_STRUCT [1], GBO_STRUCT [2], yoh_vax2ieee [1], yoh_vax2ieee [2]
 CALLED BY:
	mk_week1_file
HISTORY:
	Written 13-Apr-93 by M.Morrison
	18-May-93 (MDM) - Modified to be able to read the FTPed file.
	 6-Oct-93 (MDM) - 18-May-93 patch was not needed any more.


rd_gbl $SSW/yohkoh/gen/idl/ref_access/rd_gbl.pro
[Previous] [Next]
NAME:
	rd_gbl
PURPOSE:
	Read the GRE/BATSE Event Log file
CALLING SEQUENCE:
	rd_gbl, roadmap(0),  roadmap(n), gbl_data
	rd_gbl, '1-dec-91', '30-dec-91', gbl_data
	rd_gbl,      weeks,       years, gbl_data
INPUT:
		  INPUT CAN BE OF TWO FORMS

		  (A) Input starting and ending times
	input1	- Starting time in either (i) standard string format,
		  or (ii) a structure with .time and .day fields
		  (the 7 element time vector form is not allowed)
	input2	- Ending time.  If ending time is omitted, the
		  ending time is set to 24 hours after starting time.

		  (B) Input can be a vector of week/year number
	input1	- a vector of the week numbers to read
	input2	- a vector of the year of the week to be read
		  if the weeks vector is all within one year, the
		  year parameter can be a scalar.
OUTPUT:
	data	- the data structure containing the data in the files
		  See the structure definition for further information
 CALLS: ***
	rd_week_file [1], rd_week_file [2], rd_week_file [3], rd_week_file [4]
 CALLED BY:
	NEUPERT_PLOT, OBS_PLOT, plot_gbl [1], plot_gbl [2]
OPTIONAL KEYWORD INPUT:
	indir	- Input directory of data files.  If not present, use
		  $DIR_GEN_xxx logical directory
	vnum	- The file version number to use.  If not present, a call
		  to WEEKID is made and that latest version is used.
	nearest	- If set, then the time span is adjusted a day at a time
		  until it finds some data.  It decrements the starting
		  date by a day and increments the ending date by a day
		  up to 14 days (28 day total span)
       full_weeks - If set, then do not extract the entries that just
                 cover the times covered in the start/end time.  Return
                 all data for weeks covered by the start/end time. This
                 allows a user to have start and end time be the same
                 and still get some data.
OPTIONAL KEYWORD OUTPUT:
	status	- The read status
		  Some data is available if (status le 0)
			 0 = no error
			 1 = cannot find the file
			 2 = cannot find data in the time period
			-1 = found data, but had to go outside of the requested
			     period (only true if /NEAREST is used).  
HISTORY:
	Written 16-Apr-93 by M.Morrison
	17-Jun-93 (MDM) - Minor modification to the documenation header


rd_gbl_raw [1] $SSW/yohkoh/gen/idl/atest/rd_gbl_raw.pro
[Previous] [Next]
NAME:
	rd_gbl_raw
PURPOSE:
	Read the IDL save file with the GRO/BATSE light curve
SAMPLE CALLING SEQUENCE:
	rd_gbl_raw, '/yd3/morrison/batse_raw/gbl910508.1312_f0100_sav', out
	rd_gbl_raw, '/yd3/morrison/batse_raw/gbl930410.2118_f3881_sav', out
INPUT:
	infil	- The IDL save file (it has to be XDR format to be read
		  on the Unix machine)
 CALLS: ***
	FILE_EXIST [2], GBO_STRUCT [1], GBO_STRUCT [2], MIPSEB_DBLFIXUP, anytim2ex [1]
	anytim2ex [2], anytim2ints [1], anytim2ints [2], ex2fid [1], ex2fid [2]
	file_exist [1], file_exist [3]
 CALLED BY:
	mk_gx, mk_week_file [1], mk_week_file [2]
HISTORY:
	Written 14-Apr-93 by M.Morrison
	19-Apr-93 (MDM) - Made changes after getting Kim Tolberts message
			  as to how to interpret ARCHIVE_SEC and ARCHIVE_DATA
	 7-May-93 (MDM) - Added the -2.042 sec offset for data taken 
			  before /92/6/25 10:55
	18-May-93 (MDM) - Changed to use the new IDL (XDR) save files
	14-Mar-98 (GLS) - Commented out references to MIPS fixes.  It would
			  cleaner to test for machine type, but we are no
			  longer using any MIPS machines.


rd_gbl_raw [2] $SSW/yohkoh/gen/idl/gbo/rd_gbl_raw.pro
[Previous] [Next]
NAME:
	rd_gbl_raw
PURPOSE:
	Read the IDL save file with the GRO/BATSE light curve
SAMPLE CALLING SEQUENCE:
	rd_gbl_raw, '/yd3/morrison/batse_raw/gbl910508.1312_f0100_sav', out
	rd_gbl_raw, '/yd3/morrison/batse_raw/gbl930410.2118_f3881_sav', out
INPUT:
	infil	- The IDL save file (it has to be XDR format to be read
		  on the Unix machine)
 CALLS: ***
	FILE_EXIST [2], GBO_STRUCT [1], GBO_STRUCT [2], MIPSEB_DBLFIXUP, anytim2ex [1]
	anytim2ex [2], anytim2ints [1], anytim2ints [2], ex2fid [1], ex2fid [2]
	file_exist [1], file_exist [3]
 CALLED BY:
	mk_gx, mk_week_file [1], mk_week_file [2]
HISTORY:
	Written 14-Apr-93 by M.Morrison
	19-Apr-93 (MDM) - Made changes after getting Kim Tolberts message
			  as to how to interpret ARCHIVE_SEC and ARCHIVE_DATA
	 7-May-93 (MDM) - Added the -2.042 sec offset for data taken 
			  before /92/6/25 10:55
	18-May-93 (MDM) - Changed to use the new IDL (XDR) save files


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

 PURPOSE:
	Read SXT generic file and return contents in appropriate data
	structure.  

 CALLING SEQUENCE:
	RD_GEN, filename, data [,TEXT=TEXT, HEADER=HEADER]

 INPUTS:
	FILENAME - string containing generic file name

 OUTPUTS:
	DATA - structure containing contents of file
	       (one tag field per stored data structure)

 OPTIONAL KEYWORD PARAMETERS:
 	TEXT - Generic file text description
	HEADER - System imposed header (version/creattion date)

 COMMON BLOCKS;
	NONE

 CALLS: ***
	FMT_TAG [1], FMT_TAG [2], MAKE_STR [1], MAKE_STR [2], STR2ARR [1], STR2ARR [2]
 CALLED BY:
	INQ_GEN [1], INQ_GEN [2]
 MODIFICATION HISTORY:
	Version 1 - SLF, 3/5/91
			 21-dec-92 	; restore text as array if it
					; is delimited by wrt_gen del= '\\'
	


rd_goes3sec [1] $SSW/yohkoh/gen/idl/atest/rd_goes3sec.pro
[Previous] [Next]
NAME:
	rd_goes3sec
PURPOSE:
	Read the raw GOES 3 sec data file
INPUT:
	infil	- The raw data file name(s)
 CALLS: ***
	GBO_STRUCT [1], GBO_STRUCT [2], anytim2ints [1], anytim2ints [2], doytim2ex [1]
	doytim2ex [2], file_info2 [1], file_info2 [2]
 CALLED BY:
	mk_gx, mk_week_file [1], mk_week_file [2]
OPTIONAL KEYWORD INPUT:
	rm_bad	- If set, then remove the bad datapoints (negative counts)
OUTPUT:
	header	- The header structure of that file
	data	- The data within that file
OPTIONAL KEYWORD OUTPUT:
	outrec	- The Yohkoh data structure with the information in the
		  data file.
HISTORY:
	Written Fall '92 by M.Morrison
	15-Apr-93 (MDM) - Expanded to have OUTREC (to be used by MK_GX)


rd_goes3sec [2] $SSW/yohkoh/gen/idl/gbo/rd_goes3sec.pro
[Previous] [Next]
NAME:
	rd_goes3sec
PURPOSE:
	Read the raw GOES 3 sec data file
INPUT:
	infil	- The raw data file name(s)
 CALLS: ***
	GBO_STRUCT [1], GBO_STRUCT [2], anytim2ints [1], anytim2ints [2], doytim2ex [1]
	doytim2ex [2], file_info2 [1], file_info2 [2]
 CALLED BY:
	mk_gx, mk_week_file [1], mk_week_file [2]
OPTIONAL KEYWORD INPUT:
	rm_bad	- If set, then remove the bad datapoints (negative counts)
OUTPUT:
	header	- The header structure of that file
	data	- The data within that file
OPTIONAL KEYWORD OUTPUT:
	outrec	- The Yohkoh data structure with the information in the
		  data file.
HISTORY:
	Written Fall '92 by M.Morrison
	15-Apr-93 (MDM) - Expanded to have OUTREC (to be used by MK_GX)


rd_goes_fits $SSW/yohkoh/gen/idl/gbo/rd_goes_fits.pro
[Previous] [Next]
NAME:
	rd_goes_fits
PURPOSE:
	Read the GOES FITS data file
OPTIONAL INPUT:
	infil	- The data file name.  If not passed, then the name can be
		  derived from "sttim", "indir", and "spacecraft"
	sttime	- The starting time to extract
	entim	- The ending time to extract
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], GBO_STRUCT [1]
	GBO_STRUCT [2], GET_NBYTES, READFITS [1], READFITS [2], READFITS [3]
	anytim2ex [1], anytim2ex [2], anytim2ints [1], anytim2ints [2], concat_dir [4]
	dec2sun [1], dec2sun [2], file_exist [1], file_exist [3], sel_timrange [1]
	sel_timrange [2]
 CALLED BY:
	mk_week_file [1], mk_week_file [2]
OPTIONAL KEYWORD INPUT:
	rm_bad	- If set, then remove the bad datapoints (negative counts)
	indir	- The input directory for the data file
	spacecraft - Used when generating the input file name.  It should be
		  the integer 6 or 7.
OUTPUT:
	returns the data structure
OPTIONAL KEYWORD OUTPUT:
	outrec	- The Yohkoh data structure with the information in the
		  data file.
HISTORY:
	Written 12-Oct-93 by M.Morrison (using RD_GOES_CDROM as a start)
	13-Oct-93 (MDM) - Allowed capability of generating the filename from
			  the input times.
	26-Jan-95 (MDM) - Changed input file creation.  Made it upper case
			  and appended a ";"
			- Also changed to use FSTAT instead of FILE_INFO


rd_gol $SSW/yohkoh/gen/idl/gbo/rd_gol.pro
[Previous] [Next]
NAME:
	rd_gol
PURPOSE:
       Read the GBO observing log files 
CALLING SEQUENCE:
	rd_gol, roadmap(0),  roadmap(n), gol_data
	rd_gol, '1-dec-91', '30-dec-91', gol_data
	rd_gol,      weeks,       years, gol_data
INPUT:
		  INPUT CAN BE OF TWO FORMS

		  (A) Input starting and ending times
	input1	- Starting time in either (i) standard string format,
		  or (ii) a structure with .time and .day fields
		  (the 7 element time vector form is not allowed)
	input2	- Ending time.  If ending time is omitted, the
		  ending time is set to 24 hours after starting time.

		  (B) Input can be a vector of week/year number
	input1	- a vector of the week numbers to read
	input2	- a vector of the year of the week to be read
		  if the weeks vector is all within one year, the
		  year parameter can be a scalar.
OUTPUT:
	data	- the data structure containing the data in the files
		  See the structure definition for further information
 CALLS: ***
	rd_week_file [1], rd_week_file [2], rd_week_file [3], rd_week_file [4]
OPTIONAL KEYWORD INPUT:
	indir	- Input directory of data files.  If not present, use
		  $DIR_GEN_xxx logical directory
	vnum	- The file version number to use.  If not present, a call
		  to WEEKID is made and that latest version is used.
	nearest	- If set, then the time span is adjusted a day at a time
		  until it finds some data.  It decrements the starting
		  date by a day and increments the ending date by a day
		  up to 14 days (28 day total span)
       full_weeks - If set, then do not extract the entries that just
                 cover the times covered in the start/end time.  Return
                 all data for weeks covered by the start/end time. This
                 allows a user to have start and end time be the same
                 and still get some data.
OPTIONAL KEYWORD OUTPUT:
	status	- The read status
		  Some data is available if (status le 0)
			 0 = no error
			 1 = cannot find the file
			 2 = cannot find data in the time period
			-1 = found data, but had to go outside of the requested
			     period (only true if /NEAREST is used).  
HISTORY:
	Written 28-Mar-94 by M.Morrison


rd_gsn $SSW/yohkoh/gen/idl/gbo/rd_gsn.pro
[Previous] [Next]
NAME:
	rd_gsn
PURPOSE:
	Read the SOON/SPOT Catalog
CALLING SEQUENCE:
INPUT:
OUTPUT:
 CALLS: ***
	FILE_EXIST [2], GET_NBYTES, OBS_STRUCT [1], OBS_STRUCT [2], Rd_Pointer [1]
	Rd_Pointer [2], Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3], SOON_STRUCT
	file_exist [1], file_exist [3], rdwrt [1], rdwrt [2], rdwrt [3]
 CALLED BY:
	plot_gsn, pr_gsn [1], pr_gsn [2], soon_catstat, soon_search [1], soon_search [3]
	sooncat_cadence
OPTIONAL KEYWORD INPUT:
OPTIONAL KEYWORD OUTPUT:
RESTRICTIONS:
HISTORY:
	Written 7-Dec-93 by M.Morrison
       23-Sep-94 (MDM) - Changed definition of FMAP slightly
	 2-Aug-95 (MDM) - Added HMAP


rd_guf $SSW/yohkoh/gen/idl/gbo/rd_guf.pro
[Previous] [Next]
NAME: 
	rd_guf
PURPOSE:
	Read the contents of the GUF files  (Ulysses Ephemeris)
CALLING SEQUENCE:
	rd_guf, '1-sep-91', '1-nov-91', data

INPUT:
	sttim	- start time in any format
	entim	- end time in any format

OUTPUT:
      data - ulysses ephemeris structure

 CALLS: ***
	rd_week_file [1], rd_week_file [2], rd_week_file [3], rd_week_file [4]
 CALLED BY:
	TIM2UPOS
OPTIONAL KEYWORD INPUT:
      status   - (output) status from rd_week_file
      nearest -  (input) (pass to rd_week_file)
      quiet   -  (input) if set, dont print status error messages

HISTORY:
	9-Mar-1994 (SLF)
      17-Mar-1994 (SLF) Correct documentation


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

   Purpose: read Ulysses epehmeris file (ascii) and return Yohkoh structure

 CALLS: ***
	ARR2STR [1], Arr2Str [2], CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3]
	GBO_STRUCT [1], GBO_STRUCT [2], TIMSTR2TIM, concat_dir [4], rd_tfile [1]
	rd_tfile [2], sel_timrange [1], sel_timrange [2], sort_index [1], sort_index [2]
 CALLED BY:
	mk_week_file [1], mk_week_file [2]
   History:
      10-Mar-1994 (SLF)
       5-Apr-1994 (SLF) ascii format change


rd_gxd [2] $SSW/yohkoh/gen/idl/atest/rd_gxd.pro
[Previous] [Next]
NAME:
	rd_gxd
PURPOSE:
	Read the GXD type files (GOES 3 sec light curve data files for
	S/C 6,7,8,9, or derived 1 minute average data files).  Default is
	to read 3 sec data for spacecraft 7.
CALLING SEQUENCE:
	rd_gxd, roadmap(0),  roadmap(n), gxd_data
	rd_gxd, '1-dec-91', '30-dec-91', gxd_data
	rd_gxd,      weeks,       years, gxd_data
INPUT:
		  INPUT CAN BE OF TWO FORMS

		  (A) Input starting and ending times
	input1	- Starting time in either (i) standard string format,
		  or (ii) a structure with .time and .day fields
		  (the 7 element time vector form is not allowed)
	input2	- Ending time.  If ending time is omitted, the
		  ending time is set to 24 hours after starting time.

		  (B) Input can be a vector of week/year number
	input1	- a vector of the week numbers to read
	input2	- a vector of the year of the week to be read
		  if the weeks vector is all within one year, the
		  year parameter can be a scalar.
OUTPUT:
	data	- the data structure containing the data in the files
		  See the structure definition for further information
 CALLS: ***
	anytim2ints [1], anytim2ints [2], get_goes_defsat [1], get_goes_defsat [2]
	rd_week_file [1], rd_week_file [2], rd_week_file [3], rd_week_file [4]
	strlastchar [1], strlastchar [2], week2ex [1], week2ex [2]
 CALLED BY:
	AR_AREAS, AR_SPECTRUM, GOES2DPE, GOES_SAFE, GOES_TEK [1], GOES_TEK [2]
	HSI_SSR_FILL_PER_ORBIT [2], NEUPERT_PLOT, OBS_PLOT, QUICK_DPE, RD_GOES
	SXT_COVERAGE, eit_proton_summary, goes_plot [1], goes_plot [2], goes_plot [3]
	goes_plot [4], goes_plot [5], goes_reducer [1], hsi_ssr_fill_per_orbit [1]
	mk_week_file [1], mk_week_file [2], multi_hda2hxi, rd_sxtgoes
OPTIONAL KEYWORD INPUT:
	goes6	- If set, use 3 sec data for GOES spacecraft 6
	goes7	- If set, use 3 sec data for GOES spacecraft 7
	goes8	- If set, use 3 sec data for GOES spacecraft 8
	goes9	- If set, use 3 sec data for GOES spacecraft 9
       goes10  - If set, use 3 sec data for GOES 10
       goes12  - If set, use 3 sec data for GOES 12
	one_minute- If set, use 1 minute average light curve data derived
		  from 3 sec digitial data.
	five_minute- If set, use 5 minute average light curve data derived
		  from 3 sec digitial data.

	indir	- Input directory of data files.  If not present, use
		  $DIR_GEN_xxx logical directory
	vnum	- The file version number to use.  If not present, a call
		  to WEEKID is made and that latest version is used.
	nearest	- If set, then the time span is adjusted a day at a time
		  until it finds some data.  It decrements the starting
		  date by a day and increments the ending date by a day
		  up to 14 days (28 day total span)
       full_weeks - If set, then do not extract the entries that just
                 cover the times covered in the start/end time.  Return
                 all data for weeks covered by the start/end time. This
                 allows a user to have start and end time be the same
                 and still get some data.
OPTIONAL KEYWORD OUTPUT:
	status	- The read status
		  Some data is available if (status le 0)
			 0 = no error
			 1 = cannot find the file
			 2 = cannot find data in the time period
			-1 = found data, but had to go outside of the requested
			     period (only true if /NEAREST is used).  
HISTORY:
	Written 15-Apr-93 by M.Morrison
	15-Aug-94 (MDM) - Added ;+ to the header
       29-aug-95 (SLF) - Added ONE_MINUTE and FIVE_MINUTE keyword and function
        2-apr-96 (SLF) - Add GOES8 and GOES9 support
	30-Oct-96 (RDB) - Default to GOES9 if start date is after 1-Jul-96
       21-Jul-98 (SLF) - update for GOES10
        8-APR-2003  (SLF) - update for GOES12
       16-Apr-2003 (SLF) - enhanced time dependent defaults a bit


rd_gxd [3] $SSW/yohkoh/gen/idl/gbo/rd_gxd.pro
[Previous] [Next]
NAME:
	rd_gxd
PURPOSE:
	Read the GXD type files (GOES 3 sec light curve data files for
	S/C 6,7,8,9, or derived 1 minute average data files).  Default is
	to read 3 sec data for spacecraft 7.
CALLING SEQUENCE:
	rd_gxd, roadmap(0),  roadmap(n), gxd_data
	rd_gxd, '1-dec-91', '30-dec-91', gxd_data
	rd_gxd,      weeks,       years, gxd_data
INPUT:
		  INPUT CAN BE OF TWO FORMS

		  (A) Input starting and ending times
	input1	- Starting time in either (i) standard string format,
		  or (ii) a structure with .time and .day fields
		  (the 7 element time vector form is not allowed)
	input2	- Ending time.  If ending time is omitted, the
		  ending time is set to 24 hours after starting time.

		  (B) Input can be a vector of week/year number
	input1	- a vector of the week numbers to read
	input2	- a vector of the year of the week to be read
		  if the weeks vector is all within one year, the
		  year parameter can be a scalar.
OUTPUT:
	data	- the data structure containing the data in the files
		  See the structure definition for further information
 CALLS: ***
	anytim2ints [1], anytim2ints [2], get_goes_defsat [1], get_goes_defsat [2]
	rd_week_file [1], rd_week_file [2], rd_week_file [3], rd_week_file [4]
	strlastchar [1], strlastchar [2], week2ex [1], week2ex [2]
 CALLED BY:
	AR_AREAS, AR_SPECTRUM, GOES2DPE, GOES_SAFE, GOES_TEK [1], GOES_TEK [2]
	HSI_SSR_FILL_PER_ORBIT [2], NEUPERT_PLOT, OBS_PLOT, QUICK_DPE, RD_GOES
	SXT_COVERAGE, eit_proton_summary, goes_plot [1], goes_plot [2], goes_plot [3]
	goes_plot [4], goes_plot [5], goes_reducer [1], hsi_ssr_fill_per_orbit [1]
	mk_week_file [1], mk_week_file [2], multi_hda2hxi, rd_sxtgoes
OPTIONAL KEYWORD INPUT:
	goes6	- If set, use 3 sec data for GOES spacecraft 6
	goes7	- If set, use 3 sec data for GOES spacecraft 7
	goes8	- If set, use 3 sec data for GOES spacecraft 8
	goes9	- If set, use 3 sec data for GOES spacecraft 9
	one_minute- If set, use 1 minute average light curve data derived
		  from 3 sec digitial data.
	five_minute- If set, use 5 minute average light curve data derived
		  from 3 sec digitial data.

	indir	- Input directory of data files.  If not present, use
		  $DIR_GEN_xxx logical directory
	vnum	- The file version number to use.  If not present, a call
		  to WEEKID is made and that latest version is used.
	nearest	- If set, then the time span is adjusted a day at a time
		  until it finds some data.  It decrements the starting
		  date by a day and increments the ending date by a day
		  up to 14 days (28 day total span)
       full_weeks - If set, then do not extract the entries that just
                 cover the times covered in the start/end time.  Return
                 all data for weeks covered by the start/end time. This
                 allows a user to have start and end time be the same
                 and still get some data.
OPTIONAL KEYWORD OUTPUT:
	status	- The read status
		  Some data is available if (status le 0)
			 0 = no error
			 1 = cannot find the file
			 2 = cannot find data in the time period
			-1 = found data, but had to go outside of the requested
			     period (only true if /NEAREST is used).  
HISTORY:
	Written 15-Apr-93 by M.Morrison
	15-Aug-94 (MDM) - Added ;+ to the header
       29-aug-95 (SLF) - Added ONE_MINUTE and FIVE_MINUTE keyword and function
        2-apr-96 (SLF) - Add GOES8 and GOES9 support
	30-Oct-96 (RDB) - Default to GOES9 if start date is after 1-Jul-96


rd_gxt $SSW/yohkoh/gen/idl/gbo/rd_gxt.pro
[Previous] [Next]
NAME:
	rd_gxt
PURPOSE:
	Read the GXT files (GOES 1 minute average light curve data files
	which were derived from the tektronics plot files)
CALLING SEQUENCE:
	rd_gxt, roadmap(0),  roadmap(n), gxt_data
	rd_gxt, '1-dec-91', '30-dec-91', gxt_data
	rd_gxt,      weeks,       years, gxt_data
INPUT:
		  INPUT CAN BE OF TWO FORMS

		  (A) Input starting and ending times
	input1	- Starting time in either (i) standard string format,
		  or (ii) a structure with .time and .day fields
		  (the 7 element time vector form is not allowed)
	input2	- Ending time.  If ending time is omitted, the
		  ending time is set to 24 hours after starting time.

		  (B) Input can be a vector of week/year number
	input1	- a vector of the week numbers to read
	input2	- a vector of the year of the week to be read
		  if the weeks vector is all within one year, the
		  year parameter can be a scalar.
OUTPUT:
	data	- the data structure containing the data in the files
		  See the structure definition for further information
 CALLS: ***
	rd_week_file [1], rd_week_file [2], rd_week_file [3], rd_week_file [4]
 CALLED BY:
	goes_gaps, goes_log, goes_plot [1], goes_plot [2], goes_plot [3], goes_plot [4]
	goes_plot [5], last_lc
OPTIONAL KEYWORD INPUT:
	indir	- Input directory of data files.  If not present, use
		  $DIR_GEN_xxx logical directory
	vnum	- The file version number to use.  If not present, a call
		  to WEEKID is made and that latest version is used.
	nearest	- If set, then the time span is adjusted a day at a time
		  until it finds some data.  It decrements the starting
		  date by a day and increments the ending date by a day
		  up to 14 days (28 day total span)
       full_weeks - If set, then do not extract the entries that just
                 cover the times covered in the start/end time.  Return
                 all data for weeks covered by the start/end time. This
                 allows a user to have start and end time be the same
                 and still get some data.
	convert	- If set, then convert the arbitrary scale to real data
		  values.  If you do not use /CLEAN, then you will need
		  to filter out all values LE 1e-10
	clean 	- If set, then remove all instances when the value is -1
		  in any of the 4 channels.  
OPTIONAL KEYWORD OUTPUT:
	status	- The read status
		  Some data is available if (status le 0)
			 0 = no error
			 1 = cannot find the file
			 2 = cannot find data in the time period
			-1 = found data, but had to go outside of the requested
			     period (only true if /NEAREST is used).  
HISTORY:
	Written Jun-92 by M.Morrison
	15-Apr-93 (MDM) - Replaced specific RD_GXT with call to RD_WEEK_FILE
	17-Dec-93 (MDM) - Modified to return a real*4 structure with true
			  data values rather than a scaled "TEK" value


RD_HDA_DATA $SSW/yohkoh/gen/idl/ref_access/rd_hda_data.pro
[Previous] [Next]
NAME:
	RD_HDA_DATA
PURPOSE:
	Perform the actual data read for HDA files (called from RD_XDA)
INPUT:
	lun	- the logical unit number where the file is open
	ibyt	- the starting byte value to read from
	idset	- the dataset number for the output matrix
	nout	- the total number of datasets to be extracted
	index	- the index structure for all output datasets
	roadmap	- the roadmap
	sel_dsets- the indicies of the datasets selected for extraction
INPUT/OUTPUT:
	data	- the data
 CALLS: ***
	rdwrt [1], rdwrt [2], rdwrt [3]
 CALLED BY:
	RD_XDA [1], RD_XDA [2]
HISTORY:
	written 21-Mar-92 by Mons Morrison


rd_hirsaiso $SSW/yohkoh/gen/idl/gbo/rd_hiraiso.pro
[Previous] [Next]
NAME:
	rd_hirsaiso
PURPOSE:
	Read the CRL Hiraiso h-alpha images 
INPUT:
	infil	- A single input file name.  The extension must
		  be .hfd for full disk images and .haf for large
		  scale images.
 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], RD_HIRAISO, break_file [4], concat_dir [4], ex2fid [1], ex2fid [2]
	mk_fits_head [1], mk_fits_head [2], wrt_fits [1], wrt_fits [2]
OPTIONAL KEYWORD INPUT:
	write	- If set, write the image out in FITS format
	outdir	- If "write" is set, then you can override the
		  default output directory of $DIR_GBO_CRL using
		  this keyword.
OUTPUT:
	fhead	- The FITS string array image header
	img	- The image (generally a byte array 640x480)
OPTIONAL OUTPUT:
	bhead	- binary header array (bytarr of 512 elements)
HISTORY:
	Written 11-Dec-92 by M.Morrison
	21-Jan-93 (MDM) - Correction to FITS header.  It was always saying
			  h-alpha, when some input files were calcium.
			- It was supposed to be all h-alpha


RD_HXA $SSW/yohkoh/gen/idl/ref_access/rd_hxa.pro
[Previous] [Next]
NAME:
	RD_HXA
PURPOSE:
	Read and extract the HXA scan portion of the ADA file.
CALLING SEQUENCE:
	Rd_HXA, infil, data
INPUT:
	infil   : input file specification
OUTPUT:
	data	: structure with HXA scan data in it
 CALLS: ***
	ATT_OLD_STRUCT, ATT_STRUCT [1], ATT_STRUCT [2], Rd_Pointer [1], Rd_Pointer [2]
	rdwrt [1], rdwrt [2], rdwrt [3]
 CALLED BY:
	RD_ADA, RD_XDA [1], RD_XDA [2]
HISTORY:
	Written 6-Mar-92 by Mons Morrison
	14-May-92 (MDM) - zero out data variable before reading - free up memory
	22-Sep-93 (MDM) - Moved close command to the proper level


RD_HXI_DATA $SSW/yohkoh/gen/idl/ref_access/rd_hxi_data.pro
[Previous] [Next]
NAME:
	RD_HXI_DATA
PURPOSE:
	Perform the actual data read for HXI files (called from RD_XDA)
INPUT:
	lun	- the logical unit number where the file is open
	ibyt	- the starting byte value to read from
	idset	- the dataset number for the output matrix
	nout	- the total number of datasets to be extracted
	index	- the index structure for all output datasets
	roadmap	- the roadmap
	sel_dsets- the indicies of the datasets selected for extraction
INPUT/OUTPUT:
	data	- the data
 CALLS: ***
	rdwrt [1], rdwrt [2], rdwrt [3]
 CALLED BY:
	RD_XDA [1], RD_XDA [2]
HISTORY:
	written 27-Jul-92 by Mons Morrison


RD_HXT_DBOOK $SSW/yohkoh/ucon/idl/sakao/rd_hxt_dbook.pro
[Previous] [Next]
 NAME:
	RD_HXT_DBOOK
 PURPOSE:
	Reads HXT Flarelist and creates an array of structure.
	The list needs to have the format generated by CONV_HXT_FLRLST.

00010 91/10/01 142430  142432  142436     3    -    -    - C3.5 SF S11W05 6850
00020 91/10/01 222848  222852  223520    27   28   16   14 M1.8 1B S12W08 6850
00030 91/10/03 100906  100928  101040    18    -    -    - C5.8 SF S13W20 6850

 CALLING SEQUENCE:
	RD_HXT_DBOOK, hxt, filename, cts=cts, goes=goes, time=time
 INPUT:
	filename	- Specifies flare list to be read by this program.
			  This should be a file created by CONV_HXT_FLRLST.
 OUTPUT:
	hxt	- Structure variable which contains HXT flare info.
 OPTIONAL KEYWORD OUTPUT:
	cts	- If set, peak count rates (in integer) are stored in an array.
	goes	- If set, GOES X-ray classes (in float) are stored in an array.
	time	- If set, time tags for flares (in ANYTIM2INTS structure) are 
			stored in an array.
 CALLS: ***
	GOES_FLUX, HXTTIM2EX, anytim2ints [1], anytim2ints [2], tbeep [1], tbeep [2]
	tbeep [3]
 RESTRICTIONS:
 HISTORY:
	version 1.0	93.02.27 (Sat)	T.Sakao written.
	version 1.1	94.09.19 (Mon)
		Default flare list was changed.
	version 1.2	95.03.31 (Fri)
		Default flare list was changed. Modified so that the program 
		can read-in HXT CAL flares.
	version 1.3	96.10.22 (Tue)
		Program was renamed from rd_hxt_flrlst to RD_HXT_DBOOK. 
		The variable 'filename' was changed to be a must as an input. 
	version 1.4	98.08.10 (Mon)
		Format of the input flare-list file was changed. The flare 
		list should be created via CONV_HXT_FLRLST before being read 
		by this program. 


rd_hxtcal $SSW/yohkoh/ucon/idl/sato/rd_hxtcal.pro
[Previous] [Next]
NAME:
      rd_hxtcal
PURPOSE:
       get hxtcal data to be full 64x64 datasets
       output data 64x64xm (energyxsensors)

INPUT
 infil from .run yodat
OUT
 index_in,data_out 
USAGE
 rd_hxtcal,indfil,index_out,data_out
 rd_hxtcal,indfil,index_out,data_out,ref_phase=1
Optional Input
 If ref_phase is 0, we assume that FIRST of data is not saturated.
 If ref_phase is 1, we assume that END of data is not saturated.
 default is 0
HISTORY
    Jun Sato 15-Sep-94  first written
    Jun Sato 14-Mar-99  add documentation


 CALLS:


RD_HXTIMG $SSW/yohkoh/ucon/idl/sakao/rd_hxtimg.pro
[Previous] [Next]
 NAME:
	RD_HXTIMG
 PURPOSE:
	To read-in hxt images and header information created by the 
	Fortran code HXT image synthesis program. 
 CALLING SEQUENCE:
	RD_HXTIMG, image, header, image_info, filename
 INPUT:
	filename	- Image file.
 OUTPUT:
	image		- A series of HXT images in the format of 
			  BYTARR(64,64,n_images). 
	header		- Header info. (structure variable). 
	image_info	- Info. for each of the images such as data 
			  accumulation interval (structure variable). 
 CALLS: ***
	SET_HDR_STRUCT, SET_HXTIMG_STR
 CALLED BY:
	DISP_HXTIMG, MAKE_VTRANGE, fort2hxi [1], fort2hxi [2]
 HISTORY:
  procedure rd_hxtimg

  A test program for reading HXT image files which are generated by movie 
  program on workstations. 

  version 1.0          93.04.02 (Fri)

  version 1.1          93.04.17 (Sat)
    A simple display routine was implemented. An image can be displayed 
    with an option /display. Though the function is still primitive, 
    nevertheless it is useful, I think.

  version 1.2          93.04.29 (Thu)
    Program was greatly changed. This version corresponds to image file 
    version 2.1.

    Usage :
      image = rd_hxtimg(file='#hxt_img.dat',hdr=hdr,info=info)

  version 1.3          93.05 07 (Fri)
    A bug was fixed.

  version 1.4          93.06.07 (Mon)
    File name is specified by a nominal argument, not by an option 'file'.

  version 1.5          93.06.15 (Tue)
    Program was again changed to a procedure. 

    Usage :
      IDL > rd_hxtimg,img,hdr,info,'#hxt_img.dat"

  version 1.6		96.10.21 (Mon)
	Added documentation. 


rd_ionbal [2] $SSW/yohkoh/gen/idl/spectra/rd_ionbal.pro
[Previous] [Next]
  NAME:
    rd_ionbal
  PURPOSE:
    Read ascii files containing ionization balance calculations.
  CALLING SEQUENCE:
    bal_data = rd_ionbal(infil)	; Reads first calculation in file
    bal_data = rd_ionbal(infil,1)	; Reads 2nd calculation (if any) in file.
  INPUTS:
    infil	= File name of ionization balance file (ascii)
  OPTIONAL INPUTS:
    calculation = 0 	(default) to read the first calculation, 1 for 2nd, etc.
  OUTPUT:
    Returns a data structure containing the contents of the 
    requested calculation.  Returns Log10(Abun) vs Log10(Temp)
  METHOD:
    rd_ionbal reads the BCS format of ionization balance files.  rd_ionbal
    makes use of the point_lun procedure to parse the file.

 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], FILE_EXIST [2], STR2ARR [1]
	STR2ARR [2], break_file [4], file_exist [1], file_exist [3]
 CALLED BY:
	get_ionbal [1], get_ionbal [2]
  MODIFICATION HISTORY:
    11-oct-93, J. R. Lemen (LPARL), Written


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

       PURPOSE: Read heliocentric sets of coordinates from an image.

       METHOD: Similar to the READ_OUT option of SXT_GRID, except that
		it returns the selected values, and it will work on
		non SXT images. The image is refreshed unless the /norefresh
		keyword is used.
		Assumes tilt/roll is zero.

       CALLING SEQUENCE:  lonlat=rd_lonlat(main,data[,index][,target=trgt]
				 	[,date=date][,xy_cent=cent][,/norefresh])


       PARAMETERS:  main	the number of the main window
		     data	the image you want the coordinates for
		     index   	the index if its an SXT image

       KEYWORDS:    target  	centroid and radius of image, in pixels
		     date    	for GBO images you need to pass in the 
				time of the image. Anything the ANYTIM2EX
				can handle.
		     xy_cent 	output the image coordinates
		     norefresh  when set, do not refresh image

	CALLS: ***
	TARGET [1], anytim2ex [1], anytim2ex [2], conv_p2h [1], conv_p2h [2], gt_pix_size
	new_win, target [2]
 CALLED BY:
	ar_prep
       HISTORY: Drafted by A.McAllister, mar-93.
		 [Based on code from SXT_GRID, by G. Slater]
		 Added xy_cent keyword, AMcA. 18-mar-93.
		 Added norefresh keyword, AMcA. 25-mar-93.
		 Changed to use pixel corner, AMcA. 23-may-93.
		 Reversed output order to x,y convention, and
		  replaced VEC_P2H with CONV_P2H, AMcA. 23-jun-93.
		 Fixed readout format, AMcA. 29-jun-93.
		 Changed "tilt" to "roll" in CONV_P2H call, AMcA. 29-nov-93.


RD_LP $SSW/yohkoh/ucon/idl/shimizu/rd_lp.pro
[Previous] [Next]
 NAME:
	RD_LP
 PURPOSE:
	Read and extract LaPalma images specified in the 'dset_arr'. 
 CALLING SEQUENCE:
	Rd_LP, infil, dset_arr, index, data
 CATEGORY:
	LaPalma data analysis
 INPUTS:
	infil - file name specification. 
		For example, 'le75f2w6302m60rcpn####.strt'
	dset_arr - vector of dataset numbers to extract
 OPTIONAL INPUTS:
	noprint - for No detailed data information display
	timeprint - for only date/time information display
	rot - rotation to be same as the SXT images
	extract - define an extract region, if a part of area is needed.
	          Should be 2x2 array, for instatnce,
			in case of data(50:149, 180:279)
			   extract = intarr(2, 2)
			   extract(0, 0) = 50, extract(1, 0)= 149
			   extract(0, 1) = 180, extract(1, 1)= 279
 OUTPUTS:
	index - data information.
	data - 2D or 3D image array
 CALLS: ***
	CONV_LP2INDEX, F1, FNS, str_concat [1], str_concat [2]
 CALLED BY:
	SEEIGN_CHECKER
 EXAMPLES:
	rd_lp, filename, indgen(10)+1, index, data
	returns 1st 10 images of 'le75f2w6302m60rcpn####.strt' files. 
 HISTORY:
	11 Mar, 94  written by TShimizu (Univ. of Tokyo).
		    add "noprint" option.
	17 Jun, 94  option "rot"
	18 Jun, 94  option "timeprint"
	 3 Jul, 94  option "extract"


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

   Purpose: read in a generic file containing path/filename map information
	     (ie. read files created by mk_mapfile.pro)

   Optional Keyword Paramters:
       infile 	- string containing generic file to read 
	          (default names are keyword dependent)
       sw 	- if set, file name = $DIR_GEN_SETUP/data/swmap.genx
       data	- if set, file name = $DIR_GEN_SETUP/data/datamap.genx

   Output Parameters:
       paths	- string array of pathnames
	files	- string array of files
	map	- path/file index 
	          (full name(n) = concat_dir(paths(map(n)),files(n))
    
 CALLS:


rd_modb $SSW/yohkoh/gen/idl/mo_disk/rd_modb.pro
[Previous] [Next]
	NAME: rd_modb
	PURPOSE: read the MO disk map database and return the 
		requested entry.

	CALLING SEQUENCE:
		mo_db = rd_modb( mo_wkno, [mo_label, /all] )
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], UNIQ [1], UNIQ [2], UNIQ [3]
	concat_dir [4], restgen [1], restgen [2], wmenu_sel [1], wmenu_sel [2]
 CALLED BY:
	disk2_mo [1], disk2_mo [2], fid2mo, mo_check, mo_fndirck, mo_patch, mobad_summ
	examples:
		mo_db = rd_modb(5)	;index 5 of MO disk map
		mo_db = rd_modb(5, mo_label)	;return the mo_label
		mo_db = rd_modb(/all)	;return the full database
		mo_db = rd_modb(uniq_sides=uniq_sides)

	INPUT:
		mo_wkno		selected index of the MO disk map
				if undefined will, prompt user
		[all]		optional, request full MO database
	OUTPUT:
		mo_db		selected MO database entry
		mo_label	the mo label for that entry

	HISTORY:
		written 13-May-93, gal
		         7-Jul-94, slf, added UNIQ_SIDES keyword (output)
				        removed for loop 


rd_mwltlog $SSW/yohkoh/ucon/idl/wuelser/rd_mwltlog.pro
[Previous] [Next]
 NAME:
        rd_mwltlog
 PURPOSE:
        read all of Elaine's mwlt logs in the given directory
 CATEGORY:
 CALLING SEQUENCE:
        rd_mwltlog,dir,dayhist=dayhist
 INPUTS:
        dir = directory to be searched.  Default=current.
 KEYWORDS (INPUT):
 OUTPUTS:
 KEYWORDS (OUTPUT):
        dayhist = structure.  One entry per (Mees) day (or file).
               .day = in Yohkoh format
               .time = in Yohkoh format
               .npic = number of images for that day
 CALLS: ***
	FITIM2INTS
 CALLED BY:
	mwlt_select
 COMMON BLOCKS:
        None.
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:
        JPW, 27-feb-96


Rd_NewOrb_p [2] $SSW/yohkoh/gen/idl/ref_access/rd_neworb_p.pro
[Previous] [Next]
	Name:
		Rd_NewOrb_p
 CALLS: ***
	OBS_STRUCT [1], OBS_STRUCT [2], Rd_Pointer [1], Rd_Pointer [2], Rd_fHeader [1]
	Rd_fHeader [2], Rd_fHeader [3], rdwrt [1], rdwrt [2], rdwrt [3]
 CALLED BY:
	GetNarOrb get nearest orbit, ads_into_att, ads_into_pnt, kluge_att, mk_att [1]
	mk_att [2], mk_gx, mk_pnt, mk_week_file [1], mk_week_file [2], pnt2atr, rd_old_obs
	rd_week_file [1], rd_week_file [2], rd_week_file [3], rd_week_file [4]
	weekid [2], ydb_exist [2]
	History:
		written by MDM March-91


rd_obs $SSW/yohkoh/gen/idl/ref_access/rd_obs.pro
[Previous] [Next]
Name:
	rd_obs
Purpose:
	Routine to read the observing log into vectors
CALLING SEQUENCE:
	rd_obs, sttim, entim, bcs, sxtf, sxtp, w_h, fid
	rd_obs, sttim, entim, bcs, sxtf, sxtp, w_h
	rd_obs, sttim, entim, bcs, sxtf, sxtp, w_h, /sxtp, /sxtf
	rd_obs, sttim, entim, bcs, sxtf, sxtp, w_h, /nobcs
INPUT:
       sttim   - start time in any format
       entim   - end time in any format
OUTPUT:
	bcs	- The BCS observing log structure
	hxt	- The HXT observing log structure
	sxtf	- The SXT FFI observing log structure
	sxtp	- The SXT PFI observing log structure
	w_h	- The WBS and HXT observing log structure
	fid	- The File ID observing log structure
 CALLS: ***
	GEN_STRUCT [1], GEN_STRUCT [2], OBS_STRUCT [1], OBS_STRUCT [2], rd_old_obs
	rd_week_file [1], rd_week_file [2], rd_week_file [3], rd_week_file [4]
 CALLED BY:
	BCS_24HR_PLOT [1], BCS_24HR_PLOT [3], CHECK_FOR_30S, FIND_FAST_DATA, GET_POINTS
	GOES2DPE, GOES_TEK [1], GOES_TEK [2], OBS_PLOT, PATROL_ORDER, PREFLARE_SEARCH
	QUICKATT [1], QUICKATT [2], RdObsDat, SXT_COVERAGE, SXT_EXPOSURE_MAP, SXT_OBSRPT
	THICK_FFI, evt_demo, get_hxt_pos, get_sscinfo [1], get_utevent [1]
	get_utevent [2], last_lc, lcobs, mk_evn [1], mk_evn [2], mk_sdmi, obs_summary, pfi_loc
	plot_ssw_fov, plott_bda, plott_hda, plott_wda, ploty [1], ploty [2]
	pr_his_index [1], pr_his_index [2], pr_his_index [3], pr_sxtobs, res_freq
	sxtpnt_sum, term_obs
OPTIONAL KEYWORD INPUT:
	/bcs	- Indicates that the BCS entries should be read

		  (The "positive" or "negative (/nobcs)" switches 
		  can be used in conjunction with the parameter
		  list in the calling sequence to determine which
		  instrument logs to read)
		  
		  (if SXTP and W_H are not included in the call to RD_OBS, 
		  then they will not be read)

	/sxtf	- Indicates that the SXT full frame entries should be read
	/sxtp	- Indicates that the SXT partial frame entries should be read
	/w_h	- Indicates that the WBS/HXT entries should be read
	/nobcs	- Don't read the BCS entries
	/nosxtf	- Don't read the SXT full frame entries
	/nosxtp	- Don't read the SXT parital frame entries
	/now_h	- Don't read the WBS/HXT entries
	infil	- It is posssible to pass in the file name directly
		  instead of the starting/ending times.
OPTIONAL KEYWORD OUTPUT:
       status  - The read status
                 Some data is available if (status le 0)
                        0 = no error
                        1 = cannot find the file
                        2 = cannot find data in the time period
                       99 = cannot recognize the data_type (prefix)
                       -1 = found data, but had to go outside of the requested
                            period (only true if /NEAREST is used).
MORE SAMPLE CALLING SEQUENCES:
	The negative or positive keyword switches are provided to eliminate
	reading unneccessary logs and to reduce typing, e.g.,

	To return only BCS observing log
       	rd_obs, sttim, entim, bcs
	To return all observing logs
		rd_obs, sttim, entim, bcs, sxtf, sxtp, w_h
	To return only the WBS/HXT observing log
		rd_obs, sttim, entim, bcs, sxtf, sxtp, w_h, /nobcs, /nosxtf, /nosxtp
	or, use the positive keyword switch
		rd_obs, sttim, entim, bcs, sxtf, sxtp, w_h, /w-h
	To return only the SXT-FFI observing log
		rd_obs, sttim, entim, bcs, sxtf, /nobcs
 	or 	rd_obs, sttim, entim, bcs, sxtf, /sxtf
	To return the WBS/HXT and BCS logs
		rd_obs, sttim, entim, bcs, sxtf, sxtp, w_h, /nosxtf, /nosxtp
	or	rd_obs, sttim, entim, bcs, sxtf, sxtp, w_h, /bcs, /w_h
COMMENTS:
	The observing log data files must be located in the $DIR_GEN_OBS
	directory.

	The output arrays are positional instead of keyword to allow
	for less typing.  The order of the outputs is alphabetical in
	order to be more easily memorized (except the fid file is at
	the end)
HISTORY:
	Written Summer '91 by M.Morrison
	 9-Jul-92 (MDM) - Changed the calling sequence to match all of the
			  other reading routines (RD_PNT, RD_FEM, ...)
	26-Oct-92 (MDM) - Moved the FREE_LUN call to inside the week loop
			- Changed the names of the buffer variables.
			  Used to be BCS,SXTP, ... now is BCS00,SXTP00, ...
			  since there is keyword input /BCS - dont want
			  to clobber that input.
			- Checked to see how many parameters there were on
			  the calling sequence and read/save the data
			  accordingly (if don't have SXTP in calling seqence
			  positionally, then don't save them)
	23-Nov-92 (MDM) - Adjusted logic so that if "bcs=0" keyword option 
			  was used, it would be recognized (since KEYWORD_SET
			  would not recognized it and saying "no")
			- Added comments to the header
	28-Jan-93 (MDM) - Modified to return only the entries between the
			  requested times (before, it returned full orbits
			  of data)
	15-Apr-93 (MDM) - Changed {obs_bcs_rec} to {obs_bcs_obs_rec}
			  *****************************************************
	21-Apr-93 (MDM) - Changed to read the new observing log files which are
			  a file per instrument.  Call RD_OLD_OBS if the new
			  files are not available.
	 9-Jun-93 (MDM) - Corrected small bug
	 1-Oct-93 (MDM) - Added STATUS keyword
	21-Feb-94 (MDM) - Modified header information
	 8-Mar-94 (MDM) - Added /QUIET option


rd_obs_entry $SSW/yohkoh/gen/idl/ref_access/rd_obs_entry.pro
[Previous] [Next]
	Name:
		rd_obs_entry
	Purpose:
		Read a single observing log entry out a log file

	input:
		lun   		unit number of openned observing log
		data_section	initial pointer to "data-section" of obs
				log.
		recsize		File record size
		block		index to "data-section", ranges from 1
				to number of data-sets (ndset)
	Output:
		struct		output data for section "block".
		next_block	block number for the next entry (cases where
				there are mulitple block entries)

 CALLS: ***
	rdwrt [1], rdwrt [2], rdwrt [3]
 CALLED BY:
	rd_old_obs
HISTORY:
	Written Fall '91 by M.Morrison
       15-Apr-93 (MDM) - Changed {obs_bcs_rec} to {obs_bcs_obs_rec}
	


rd_old_obs $SSW/yohkoh/gen/idl/ref_access/rd_old_obs.pro
[Previous] [Next]
Name:
	rd_old_obs
Purpose:
	Routine to read the observing log into vectors
CALLING SEQUENCE:
	rd_old_obs, sttim, entim, bcs, sxtf, sxtp, w_h, fid
	rd_old_obs, sttim, entim, bcs, sxtf, sxtp, w_h
	rd_old_obs, sttim, entim, bcs, sxtf, sxtp, w_h, /sxtp, /sxtf
	rd_old_obs, sttim, entim, bcs, sxtf, sxtp, w_h, /nobcs
INPUT:
       sttim   - start time in any format
       entim   - end time in any format
OUTPUT:
	bcs	- The BCS observing log structure
	hxt	- The HXT observing log structure
	sxtf	- The SXT FFI observing log structure
	sxtp	- The SXT PFI observing log structure
	w_h	- The WBS and HXT observing log structure
	fid	- The File ID observing log structure
 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], Rd_NewOrb_p [1], Rd_NewOrb_p [2]
	Rd_Pointer [1], Rd_Pointer [2], Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3]
	anytim2ints [1], anytim2ints [2], anytim2weeks [1], anytim2weeks [2]
	concat_dir [4], file_exist [1], file_exist [3], file_list [1], file_list [2]
	int2secarr [1], int2secarr [2], rd_obs_entry, sel_timrange [1], sel_timrange [2]
	tbeep [1], tbeep [2], tbeep [3]
 CALLED BY:
	rd_obs
OPTIONAL KEYWORD INPUT:
	/bcs	- Read the BCS entries
	/sxtf	- Read the SXT full frame entries
	/sxtp	- Read the SXT partial frame entries
	/w_h	- Read the WBS/HXT entries
	/nobcs	- Don't read the BCS entries
	/nosxtf	- Don't read the SXT full frame entries
	/nosxtp	- Don't read the SXT parital frame entries
	/now_h	- Don't read the WBS/HXT entries
	infil	- It is posssible to pass in the file name directly
		  instead of the starting/ending times.
COMMENTS:
	The observing log data files must be located in the $DIR_GEN_OBS
	directory.

	The output arrays are positional instead of keyword to allow
	for less typing.  The order of the outputs is alphabetical in
	order to be more easily memorized (except the fid file is at
	the end)
HISTORY:
	Written Summer '91 by M.Morrison
	 9-Jul-92 (MDM) - Changed the calling sequence to match all of the
			  other reading routines (RD_PNT, RD_FEM, ...)
	26-Oct-92 (MDM) - Moved the FREE_LUN call to inside the week loop
			- Changed the names of the buffer variables.
			  Used to be BCS,SXTP, ... now is BCS00,SXTP00, ...
			  since there is keyword input /BCS - dont want
			  to clobber that input.
			- Checked to see how many parameters there were on
			  the calling sequence and read/save the data
			  accordingly (if don't have SXTP in calling seqence
			  positionally, then don't save them)
	23-Nov-92 (MDM) - Adjusted logic so that if "bcs=0" keyword option 
			  was used, it would be recognized (since KEYWORD_SET
			  would not recognized it and saying "no")
			- Added comments to the header
	28-Jan-93 (MDM) - Modified to return only the entries between the
			  requested times (before, it returned full orbits
			  of data)
	15-Apr-93 (MDM) - Changed {obs_bcs_rec} to {obs_bcs_obs_rec}
	21-Apr-93 (MDM) - Renamed from RD_OBS to RD_OLD_OBS when the
			  OBS file organization was changed to be one
			  instrument per file.
	 9-Jun-93 (MDM) - Modification to not even try to read the old
			  files if there are non online


rd_orb $SSW/yohkoh/gen/idl/ref_access/rd_orb.pro
[Previous] [Next]
NAME:
	rd_orb
PURPOSE:
       Read the ORB files (spacecraft position against time)
CALLING SEQUENCE:
	rd_orb, roadmap(0),  roadmap(n), orb_data
	rd_orb, '1-dec-91', '30-dec-91', orb_data
	rd_orb,      weeks,       years, orb_data
INPUT:
		  INPUT CAN BE OF TWO FORMS

		  (A) Input starting and ending times
	input1	- Starting time in either (i) standard string format,
		  or (ii) a structure with .time and .day fields
		  (the 7 element time vector form is not allowed)
	input2	- Ending time.  If ending time is omitted, the
		  ending time is set to 24 hours after starting time.

		  (B) Input can be a vector of week/year number
	input1	- a vector of the week numbers to read
	input2	- a vector of the year of the week to be read
		  if the weeks vector is all within one year, the
		  year parameter can be a scalar.
OUTPUT:
	data	- the data structure containing the data in the files
		  See the structure definition for further information
 CALLS: ***
	rd_week_file [1], rd_week_file [2], rd_week_file [3], rd_week_file [4]
 CALLED BY:
	yoh_orb_interp [1], yoh_orb_interp [2]
OPTIONAL KEYWORD INPUT:
	indir	- Input directory of data files.  If not present, use
		  $DIR_GEN_xxx logical directory
	vnum	- The file version number to use.  If not present, a call
		  to WEEKID is made and that latest version is used.
	nearest	- If set, then the time span is adjusted a day at a time
		  until it finds some data.  It decrements the starting
		  date by a day and increments the ending date by a day
		  up to 14 days (28 day total span)
       full_weeks - If set, then do not extract the entries that just
                 cover the times covered in the start/end time.  Return
                 all data for weeks covered by the start/end time. This
                 allows a user to have start and end time be the same
                 and still get some data.
	asca	- If set, read the ASCA spacecraft ORB files
OPTIONAL KEYWORD OUTPUT:
	status	- The read status
		  Some data is available if (status le 0)
			 0 = no error
			 1 = cannot find the file
			 2 = cannot find data in the time period
			-1 = found data, but had to go outside of the requested
			     period (only true if /NEAREST is used).  
HISTORY:
	Written Sep-96 by R.D.Bentley  (Base on RD_FEM by M.Morrison)


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

  PURPOSE:
    Read orbital predictions file written by dsnfil_XXX (AOSLOS) FORTRAN program.

  CALLING SEQUENCE:
    rd_orbit_event, lun_filnam, out, start_rec=start_rec, end_rec=end_rec
    rd_orbit_event, lun_filnam, out, start_rec=start_rec, end_rec=end_rec, $
				/new,/plus

  INPUTS:
    lun_filnam	AOSLOS file name or the unit number of an opened data
		base file.
  OUTPUTS:
    out	Structure containing contents of the file.

  OPTIONAL INPUT KEYWORDS:
    start_rec	  = Starting record number (fixed-length records assumed).
		    start_rec = 0 is the first non-header record
    end_rec	  = Ending record number   

  OPTIONAL OUTPUT KEYWORDS:
    orbit_params = String of the time of the orbital parameters.
    eof_flag	  = Set to 1 when EOF is reached or the next record is the EOF.
    max_rec	  = Maximum value of end_rec that is allowed
    newfmt	  = If set, return the new style format (incs. Wallops columns)
    plus	  = If set, change  'U+' to '+' to be consistent with earlier
		    versions of the dsnfil (AOSLOS) format.
		    If n_elements(newfmt) and n_elements(plus), this will cause 
		    plus to default to /plus.

 CALLS: ***
	wc_where [1], wc_where [2]
 CALLED BY:
	MK_ORB_WEEK, get_sunset, mk_fem [1], mk_fem [2], mk_orbit_sum, op_times
  RESTRICTIONS:
    If start_rec is specified, it must be greater than 0 and less than
    the number of non-header records in the file.  There are 12 header records.

  MODIFICATION HISTORY:
    5-Oct-91, Written, MDM/JRL
	12-Oct-91 MDM	updated "i" to be long word type
	12-Oct-91 MDM	- Changed array dimension size to
			  divide the size by 138, not 137
			  (there is a CR in there)
	15-oct-91 JRL	Updated: Added START_rec, END_rec, keywords
			Uses point_lun to get to the starting record in
			the file.  Changed the time format in the
			returned structure to reflect the standard
			Yohkoh External Time format (d,m,s,ms, d,m,y).
	 6-Mar-95 JRL   Many changes to eliminate format read statments that
		        were causing problems for OSF IDL V3.6.
	15-Mar-95 JRL	Changed so that the routine works out the record
			length automatically in preparation for Wallops.
	20-Mar-95 JRL   Enable the code to read the columns that contain Wallops info.


RD_PLAN_AREA $SSW/yohkoh/bcs/idl/micro/rd_plan_area.pro
[Previous] [Next]
 NAME:
	RD_PLAN_AREA
 PURPOSE:
	reads image and history records of bcs micro parameter area
 CATEGORY:
 CALLING SEQUENCE:
	rd_plan_area,plan_area,history,jhist,jhist_max
 INPUTS:
 OPTIONAL INPUT PARAMETERS:
 KEYWORD PARAMETERS:
 OUTPUTS:
	plan_area		512 byte image of plan area
	history			structure describing changes
	jhist			no. of change records
	jhist_max		max no of records (100)
 OPTIONAL OUTPUT PARAMETERS:
 CALLS: ***
	BCS_CPU_STRUCT, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], concat_dir [4]
	fmt_tim [1], fmt_tim [2]
 COMMON BLOCKS:
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:
	rdb   5-may-94	written
	RDB  17-May-94	Made file /xdr


rd_pnt $SSW/yohkoh/gen/idl/ref_access/rd_pnt.pro
[Previous] [Next]
NAME:
	rd_pnt
PURPOSE:
	Read the Yohkoh pointing log file.  It reads the ATR file.
CALLING SEQUENCE:
	rd_pnt, roadmap(0),  roadmap(n), pnt
	rd_pnt, '1-dec-91', '30-dec-91', pnt
	rd_pnt,      weeks,       years, pnt
INPUT:
		  INPUT CAN BE OF TWO FORMS

		  (A) Input starting and ending times
	input1	- Starting time in either (i) standard string format,
		  or (ii) a structure with .time and .day fields
		  (the 7 element time vector form is not allowed)
	input2	- Ending time.  If ending time is omitted, the
		  ending time is set to 24 hours after starting time.

		  (B) Input can be a vector of week/year number
	input1	- a vector of the week numbers to read
	input2	- a vector of the year of the week to be read
		  if the weeks vector is all within one year, the
		  year parameter can be a scalar.
OUTPUT:
	data	- the data structure containing the data in the files
		  See the structure definition for further information
 CALLS: ***
	rd_week_file [1], rd_week_file [2], rd_week_file [3], rd_week_file [4]
	ydb_exist [1], ydb_exist [2], ydb_exist [3], ydb_exist [4]
 CALLED BY:
	ALIGN_AR, GET_SUNCENTER [1], GET_SUNCENTER [2], HXA2HEL, HXA_SUNCENTER, PFI_CENT
	RD_AR, ads_into_pnt, get_pnt, get_suncenter2, mk_pnt
OPTIONAL KEYWORD INPUT:
	indir	- Input directory of data files.  If not present, use
		  $DIR_GEN_xxx logical directory
	vnum	- The file version number to use.  If not present, a call
		  to WEEKID is made and that latest version is used.
	nearest	- If set, then the time span is adjusted a day at a time
		  until it finds some data.  It decrements the starting
		  date by a day and increments the ending date by a day
		  up to 14 days (28 day total span)
       full_weeks - If set, then do not extract the entries that just
                 cover the times covered in the start/end time.  Return
                 all data for weeks covered by the start/end time. This
                 allows a user to have start and end time be the same
                 and still get some data.
OPTIONAL KEYWORD OUTPUT:
	status	- The read status
		  Some data is available if (status le 0)
			 0 = no error
			 1 = cannot find the file
			 2 = cannot find data in the time period
			-1 = found data, but had to go outside of the requested
			     period (only true if /NEAREST is used).  
	flag	- Error word (same as "status" but kept so that there
		  is compatablility with the old RD_PNT program.
			Value = 0 means ok
			Value = 1 means could not find file(s)
COMMENTS:
       The pointing data files must be located in the $DIR_GEN_PNT
       directory.

	Data is returned in blocks of orbits, so even if the input
	time spans 5 minutes, approximately 60 minutes of data could be
	returned.
HISTORY:
	Written Feb-92 by M.Morrison
	 5-Mar-92 (MDM) fix various bugs
	 8-Mar-92 (MDM) Added "infil" option
	20-apr-92 (JRL) Fixed "infil" option
	23-Apr-92 (MDM) Minor adjustments to code
	 5-May-92 (MDM) added "flag" option
	22-May-92 (MDM) Fixed bug where trying to access the last orbit
			of data in the PNT file.
	18-Jul-92 (MDM) Added "filnam" and "ibyt" option
	23-Sep-92 (MDM) Modification to grab the proper orbit when the
			input time is exactly the start time of the orbit
	23-Oct-92 (MDM) Revamp logic to select orbits to use.  Introducted
			SEL_TIMRANGE.
	29-Oct-92 (MDM) Modification to SEL_TIMRANGE so 23-Oct-92 version
			would work right
	30-Oct-92 (MDM) More SEL_TIMRANGE modifications - it was missing the
			the last orbit in a selected time range
	23-Nov-92 (MDM) Added comments to the header
	25-Nov-92 (MDM) Corrected special error where the pointer points past
			the last dataset (error since MK_PNT makes a pointer
			for the last orbit, even if there is no data).
	 8-Feb-93 (MDM) Adjustment since temporary PNT file can have data out
			of order, which is causing problems.
	12-Jul-93 (MDM) Corrected error which occurs when reading across a
			year boundary
			--------------------------------------------------
	13-Oct-93 (MDM) Removed the code and replaced it with a call to 
			RD_WEEK_FILE.  It will read the ATR file if present
			and will the default back to the PNT file


rd_pnt_hist $SSW/yohkoh/gen/idl/ref_access/rd_pnt_hist.pro
[Previous] [Next]
NAME:
	rd_pnt_hist
PURPOSE:
	To read the Yohkoh pointing history log file
CALLING SEQUENCE:
	rd_pnt_hist, data
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], anytim2ints [1], anytim2ints [2]
	concat_dir [4], int2secarr [1], int2secarr [2], rd_tfile [1], rd_tfile [2]
 CALLED BY:
	get_del_pnt, pr_pnt_hist
OPTIONAL KEYWORD INPUT:
	infil	- The data file to read.  If not passed, it
		  uses ???
OUTPUT:
	data	- A structure with the following fields:
			.time
			.day
			.offset - 3 element array in arcseconds from
				  a TFSS BIAS value of FFB8 FF9E which
				  is the setting established on 29-Oct-91
					(0) = E/W
					(1) = N/S
					(2) = Roll
HISTORY:
	Written 4-Jun-92 by M.Morrison
	 5-Jun-92 (MDM) - Modified to read the BIAS file and adjust
			  the output accordingly.
	18-Jul-93 (MDM) - Made the file header have 9 lines
	 5-Oct-93 (MDM) - Time sorted 
	16-Mar-95 (MDM) - Changed to use RD_TFILE to speed things up


Rd_Pointer [2] $SSW/yohkoh/gen/idl/ref_access/rd_pointer.pro
[Previous] [Next]
	NAME:
		Rd_Pointer
	PURPOSE:
		Read and extract the pointer section from requested
		file.
	CALLING SEQUENCE:
		Rd_Pointer, lun_filnam, pointer, recsize
	INPUT:
		lun_filnam	input file specification or the
				unit number of an openned reformatted
				file.
	Output:
		pointer a logical record containning the pointer
			section. 
		recsize	VMS record size			
 CALLS: ***
	GEN_STRUCT [1], GEN_STRUCT [2], rdwrt [1], rdwrt [2], rdwrt [3]
 CALLED BY:
	RD_ADA, RD_BDA_DP, RD_HXA, RD_XDA [1], RD_XDA [2], Rd_NewOrb_p [1], Rd_NewOrb_p [2]
	Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3], ckcopy, kluge_att, mk_att [1]
	mk_att [2], mk_evn [1], mk_evn [2], mk_gx, mk_pnt, mk_week_file [1]
	mk_week_file [2], pnt2atr, rd_gsn, rd_old_obs, rd_roadmap [1], rd_sdl, rd_sld, rd_sls
	rd_sot, rd_ssl, rd_week_file [1], rd_week_file [2], rd_week_file [3]
	rd_week_file [4], ref_bad, sav_bda, sav_bsc, sav_hxi, sav_sda [1], sav_sda [2]
	sav_sda [3], weekid [2], wrt1orbit [1], wrt1orbit [2], ydb_exist [2]
	yo_file_check [1], yo_file_check [2], ys_file_check [1], ys_file_check [2]
	History:
		written by Mons Morrison, Fall 90.
		12-Dec-91 (MDM) Changed to allow a vector of filenames


rd_rasm $SSW/yohkoh/gen/idl/orbit/rd_rasm.pro
[Previous] [Next]
 NAME:
   rd_rasm
 PURPOSE:
   Special purpose routine to read the raw RASM files
   Returns the information in a structure called pass

   This routine will read following types of files:
		7dayss.wXX, forecast.wXX, strawman.wXX
		solass.wXX, rasmss.wXX,      solasf.wXX, rasmsf.wXX
		astdss.wXX, rasmss_astd.wXX, astdsf.wXX, rasmsf_astdf.wXX
 CALLING SEQUENCE:
   rd_rasm,'strawman',18,pass	; read strawman.w18
   rd_rasm,'solass',  18,pass	; read solass.w18
 INPUTS:
   file_prefix	= File prefix (string)
   week	= Week number
 OUTPUTS:
   pass	= String array of pass information. This is just like the line
		  in the file, except the year number is added to the beginning 
		  of the line.
   status	= 0 if file does not exist, 1 if file exists
 OPTIONAL OUTPUTS:
   select	= Search string (for example, 'SOLA')
   rasmfile	= Name of the file that was read

   
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], DELVARX [1], DELVARX [2]
	DELVARX [3], DELVARX [4], FILE_EXIST [2], MAKE_STR [1], MAKE_STR [2], STR2ARR [1]
	STR2ARR [2], anytim2ints [1], anytim2ints [2], concat_dir [4], delvarx [5]
	doy2ex [1], doy2ex [2], file_exist [1], file_exist [3], str_replace [1]
	str_replace [2]
 CALLED BY:
	cancel_dsn, dsn_check [1], dsn_check [2], dsn_input, fmt_rasm
 MODIFICATION HISTORY:
   17-apr-93, J. R. Lemen, Written.
   23-apr-93, J. R. Lemen, Fixed a bug; Added code to pair passes and playbacks
   29-apr-93, J. R. Lemen, Changed to use WRK CAT field to detect pass/playback
    1-jul-93, J. R. Lemen, Added Path= keyword for test purposes
   15-jul-94, JRL, Added start1, bot1, eot1, endd1 to pass structure which 
		    represents time in standard Yohkoh internal format
    6-Jan-95, JRL, Allow DSS- or SPC- fields (SPC- was new in 1995)
    1-Feb-96, JRL, Enable to read 7dayss, forecast files.


rd_roadmap [1] $SSW/yohkoh/gen/idl/ref_access/rd_roadmap.pro
[Previous] [Next]
NAME:
	rd_roadmap
PURPOSE:
	Read and extract the entire roadmap from any of 
	the reformatted data base files.  If the variable "roadmap"
	is defined, and the requested file is the same as the last
	call to rd_roadmap, then the data is not read a second time.
CALLING SEQUENCE:
	rd_roadmap, lun_filnam, roadmap, ndset, recsize
INPUT:
	lun_filnam -	input file name(s).  It can be a scalar or a vector.  
 CALLS: ***
	ATT_STRUCT [1], ATT_STRUCT [2], BCS_STRUCT, BSC_STRUCT [1], BSC_STRUCT [2]
	CBA_STRUCT, FILE_EXIST [2], GEN_STRUCT [1], GEN_STRUCT [2], HXT_STRUCT [1]
	HXT_STRUCT [2], Rd_Pointer [1], Rd_Pointer [2], Rd_fHeader [1], Rd_fHeader [2]
	Rd_fHeader [3], STR_DIFF, SXT_STRUCT, WBS_STRUCT, file_exist [1], file_exist [3]
	rdwrt [1], rdwrt [2], rdwrt [3]
 CALLED BY:
	BCS_24HR_PLOT [1], BCS_24HR_PLOT [3], BCS_CAT, BCS_COMPARE, BCS_FREE_DATA
	BUILD_SSX, CHECK_SFC_PNT, FIRST_LIGHT [1], FIRST_LIGHT [2], FIX_SFD, GET_SUBARR2
	GET_TRACUBE, GLITCH_TRACKER, GetSDAVec, HXA_SUNC, HXA_SUNC2, HXT_CAL_FIX [1]
	HXT_CAL_FIX [2], IRU_OFFS, LASTSFD_DIFF, LATEST_SFDS_GIF, MK_SSX, NEUPERT_PLOT
	QUICKDARK [2], QUICKDRIFT [1], QUICKDRIFT [2], QUICKLIMB [1], QUICKLIMB [2]
	QUICKSTRAY [2], QUICK_DPE, RD_ADA, RD_AR, RD_BDA [1], RD_XDA [1], RD_XDA [2]
	READ_HXT_CAL, RECONCILE_SFD_INFIL, SEL_AR, SXT_HYST, TERM_FIDS, TERM_QUICK
	TERM_REVIEW, TERM_REVIEW_GIF, TEST_ATT, WBDA [1], WBDA [2], WBS_DB, WBS_DB2
	XMOVIE_SFM, carr2btime [2], chk_pointing, comp_sfr_arch, daily_forecast [2]
	fl_goesplot [1], fl_goesplot [2], fl_goesplot [3], fl_sxtobsnar [1]
	fl_sxtobsnar [2], fort2hxi_tim, fstepper, get_bcs, get_sfm, get_ssc_best, get_sxa
	go_comp_sfr_arch, go_lasdisk golaserdisk, go_lasdisk2 golaserdisk, go_nvs4
	go_nvs5, last_lc, lastsfd [1], lastsfd [2], lastspd, mk_desat, mk_desat_wl, mk_obs_str
	mk_pnt, mk_sd2, mk_sdc [2], mk_sdc [3], mk_sdc [4], mk_sdl, mk_sdm, 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_spd, mk_ssl, mk_strip_file, mk_sxc, mk_sxh, mk_sxl
	mk_week_file [1], mk_week_file [2], newsfd, nn_rd2_sxt_noaa, nn_rd3_sxt_noaa
	nn_rd_sxt_noaa, op_term_score, ploty [1], ploty [2], pr_sxt_term, rd_hxtcal
	rd_sda_flare, rd_sfd_carr, rd_sxa, rd_sxc, rd_sxl, rd_sxs_pha [1], rd_sxs_pha [2]
	rd_xda_same, read_yohkoh_4_spex [1], read_yohkoh_4_spex [2], ref_day_plot
	ref_term [2], ret_day, rt_sxtdt, sav_sda [1], sav_sda [2], sav_sda [3], sda2fits
	sda_look [1], sel_dc_image [1], sel_dc_image [2], sel_dc_image [3]
	sel_leak_image [1], sel_leak_image [3], sel_leak_image [4], sft2sfc, sxt2mpeg
	sxt_dark_sample, sxt_his2dbase, sxt_ssc2sss, sxt_ssn2fits [1], sxt_ssn2fits [2]
	termlite, video_test, xspr [1], xspr [2]
			NOTE: They must all be for the same instrument!!
				OR 
			the logical unit number of an openned
			data base file. scalar or vector
Output:
	roadmap		summary of data-index logical records 
	ndset		number of roadmap records/image blocks
			If "lun_filnam" is an array, ndset is an
			array
	recsize		VMS record size			
OPTIONAL KEYWORD OUTPUT:
	filidx		a vector the same length as the roadmap
			with the index of the file associated with that entry
			(ie: 0,0,0,0,1,1,1,1,2,2,2,2,...)
History:
	written by Mons Morrison, Fall 90.
	 7-Dec-91 (MDM) - Added option of passing multiple file names
	18-Mar-92 (MDM) - Added capability to not re-read the roadmap from the
			  files if the last read was using the same file.  The
			  roadmap variable has to be passed back into the
			  routine for this to work.
	11-Jun-92 (MDM) - Fixed bug where there is trouble when there are
			  zero datasets in the first file
	 7-Jul-92 (MDM) - Added check to see if file exists - only checks the
			  first file if the input filename list is an array.
			  Also, only works if the input is a string type
	20-Jul-92 (MDM) - Updated the header
	23-Jul-92 (MDM) - Added HXI_ROADMAP structure
	13-Aug-92 (MDM) - Added SXL_ROADMAP structure
	13-Nov-92 (MDM) - Added BSC_ROADMAP structure
	19-Mar-93 (MDM) - Correction for SXL structure name since structure
			  name was changed to include the version number
	 9-Jun-93 (MDM) - Modified the way that the individual roadmaps
			  from each file are appended into the output array
	28-Jul-94 (MDM) - Modified documentation header
	15-Nov-94 (MDM) - Modified to allocate memory for all of the roadmaps
			  in advance and insert the roadmap for each file
			  into the large array (previously it was doing an
			  append for each file)
        5-oct-96 (SLF) - changed fildix references from BYTE to INTEGER
	18-Feb-01 (LWA) - Changed "for" loops to longword type


Rd_Roadmap [2] $SSW/yohkoh/gen/idl/ref_access/rd_roadmap_tmp.pro
[Previous] [Next]
NAME:
	Rd_Roadmap
PURPOSE:
	Read and extract the entire roadmap from any of 
	the reformatted data base files.
CALLING SEQUENCE:
	Rd_Roadmap, code, lun_filnam, roadmap, ndset, recsize
INPUT:
	lun_filnam	input file specification. It can be a
			scalar or a vector.  NOTE: They must all
			be for the same instrument!!
				OR 
			the unit number of an openned
			data base file. scalar or vector
Output:
	roadmap		summary of data-index logical records 
	ndset		number of roadmap records/image blocks
			If "lun_filnam" is an array, ndset is an
			array
	recsize		VMS record size			
OPTIONAL OUTPUT:
	filidx		a vector the same length as the roadmap
			with the index of the file associated with that entry
			(ie: 0,0,0,0,1,1,1,1,2,2,2,2,...)
 CALLED BY:
	BCS_24HR_PLOT [1], BCS_24HR_PLOT [3], BCS_CAT, BCS_COMPARE, BCS_FREE_DATA
	BUILD_SSX, CHECK_SFC_PNT, FIRST_LIGHT [1], FIRST_LIGHT [2], FIX_SFD, GET_SUBARR2
	GET_TRACUBE, GLITCH_TRACKER, GetSDAVec, HXA_SUNC, HXA_SUNC2, HXT_CAL_FIX [1]
	HXT_CAL_FIX [2], IRU_OFFS, LASTSFD_DIFF, LATEST_SFDS_GIF, MK_SSX, NEUPERT_PLOT
	QUICKDARK [2], QUICKDRIFT [1], QUICKDRIFT [2], QUICKLIMB [1], QUICKLIMB [2]
	QUICKSTRAY [2], QUICK_DPE, RD_ADA, RD_AR, RD_BDA [1], RD_XDA [1], RD_XDA [2]
	READ_HXT_CAL, RECONCILE_SFD_INFIL, SEL_AR, SXT_HYST, TERM_FIDS, TERM_QUICK
	TERM_REVIEW, TERM_REVIEW_GIF, TEST_ATT, WBDA [1], WBDA [2], WBS_DB, WBS_DB2
	XMOVIE_SFM, carr2btime [2], chk_pointing, comp_sfr_arch, daily_forecast [2]
	fl_goesplot [1], fl_goesplot [2], fl_goesplot [3], fl_sxtobsnar [1]
	fl_sxtobsnar [2], fort2hxi_tim, fstepper, get_bcs, get_sfm, get_ssc_best, get_sxa
	go_comp_sfr_arch, go_lasdisk golaserdisk, go_lasdisk2 golaserdisk, go_nvs4
	go_nvs5, last_lc, lastsfd [1], lastsfd [2], lastspd, mk_desat, mk_desat_wl, mk_obs_str
	mk_pnt, mk_sd2, mk_sdc [2], mk_sdc [3], mk_sdc [4], mk_sdl, mk_sdm, 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_spd, mk_ssl, mk_strip_file, mk_sxc, mk_sxh, mk_sxl
	mk_week_file [1], mk_week_file [2], newsfd, nn_rd2_sxt_noaa, nn_rd3_sxt_noaa
	nn_rd_sxt_noaa, op_term_score, ploty [1], ploty [2], pr_sxt_term, rd_hxtcal
	rd_sda_flare, rd_sfd_carr, rd_sxa, rd_sxc, rd_sxl, rd_sxs_pha [1], rd_sxs_pha [2]
	rd_xda_same, read_yohkoh_4_spex [1], read_yohkoh_4_spex [2], ref_day_plot
	ref_term [2], ret_day, rt_sxtdt, sav_sda [1], sav_sda [2], sav_sda [3], sda2fits
	sda_look [1], sel_dc_image [1], sel_dc_image [2], sel_dc_image [3]
	sel_leak_image [1], sel_leak_image [3], sel_leak_image [4], sft2sfc, sxt2mpeg
	sxt_dark_sample, sxt_his2dbase, sxt_ssc2sss, sxt_ssn2fits [1], sxt_ssn2fits [2]
	termlite, video_test, xspr [1], xspr [2]
History:
	written by Mons Morrison, Fall 90.
	7-Dec-91 (MDM) - Added option of passing multiple file names


RD_SDA [1] $SSW/yohkoh/gen/idl/ref_access/rd_sda.pro
[Previous] [Next]
NAME:
	RD_SDA
PURPOSE:
	Read and extract SXT images specified in the 'dset_arr'
	parameter from the SXT Solar-A reformatted data base.
CALLING SEQUENCE:
	Rd_SDA, infil, dset_arr, index, data, roadmap
	Rd_SDA, infil, dset_arr, index, data
	rd_sda, infil, dset_arr, index, data, roadmap, dset_str=dset_arr
	Rd_SDA, infil, dset_arr, index, /nodata
INPUT:
	infil   : input file specification (SPR... or SFR...)
		  "infil" can be a vector of filenames (WARNING - 
		  do not mix and match FFI and PFI)
	dset_arr: vector of dataset numbers to extract (indices vector)
               * "dset_arr" can be
                     1. An indicie vector ("SS") from a search of the roadmap
			 of ALL of the files in "infil".
                     2. a structure with fields ".dset" and ".ifil".
                        ".dset" is the dataset number WITHIN THE FILE, and
                        ".ifil" is the index of the filename within the
                        infil array.  The structure is "N" elements long
                        where "N" is the total number of datasets to extract.
		* The order that the images are placed in the output 
		  variable "data" is the same order that they 
		  appear in "dset_arr"
               * If "-1" is passed, the whole file is read
                 and the dset_arr returned is the "indgen(ndset)"
OPTIONAL INPUT:
	nodata  : If present, only the index is read
OUTPUT:
	index	: data-index logical record (one for each 
		  image requested)
	data	: 2D or 3D image array
OPTIONAL OUTPUT:
	roadmap	: summary of data-index logical record, note
		  all roadmaps records in the file are returned.
		  In the case where "infil" is an array, roadmap
		  is the concatenated roadmap for all files that
		  are being read for the particular extraction.
       filidx  : a vector the same length as the roadmap
                 with the index of the file associated with that entry
                 (ie: 0,0,0,0,1,1,1,1,2,2,2,2,...)
		  This is output from RD_ROADMAP ONLY ON THE FILES FOR
		  WHICH DATA HAS BEEN SELECTED TO BE READ!
	dset_str: the structure form of the requested datasets 
		  passed in with "dset_arr".  If user passes in
		  a simple vector ("SS"), "dset_str" is the structure
		  form of the output.
 CALLS: ***
	RD_XDA [1], RD_XDA [2]
 CALLED BY:
	BUILD_SSX, GET_SDA, MK_SSX, RD_AR, SXT_QLOOK, TERM_QUICK, TERM_REVIEW, TERM_REVIEW_GIF
	XMOVIE_SFM, carr2btime [2], chk_pointing, fstepper, get_sfm, go_nvs4, go_nvs5
	his_suncen, lastsfd [1], lastsfd [2], lastspd, mk_desat_wl, mk_sdp, mk_sfc [1]
	mk_sfc [2], mk_sfs, mk_sft [1], mk_sft [2], mk_sfw, mk_spd, mk_ssc [1], mk_ssc [2]
	newsfd, nn_rd2_sxt_noaa, nn_rd3_sxt_noaa, nn_rd_sxt_noaa, pr_sfc, pr_sxt_term
	rd_sda_flare, rd_sfd_carr, ret_day, sel_leak_image [1], sel_leak_image [3]
	sel_leak_image [4], sft2sfc, sxt2file, sxt2mpeg, sxt_align, sxt_dark_sample, sxt_tfl
	synop_movie, xspr [1], xspr [2]
Examples:
	rd_sda, filename, indgen(10), index, data, roadmap
	returns 1st 10 images in file=filename
RESTRICION:
	CAUTION: If the filename list is long and RD_SDA is going to
	be called many times getting only a small number of data sets,
	then it is recommended to use the structure option for "dset_arr"
	(call MK_DSET_STR externally) because RD_FHEADER is called for
	all files each time RD_SDA is called when not using the 
	structure option for "dset_arr".
HISTORY:
	written by Mons Morrison, Fall 90.
	11-Nov-91 MDM - Added option to not read the data
	12-Nov-91 MDM - added the option to read the whole
			file by passing a -1
	 7-Dec-91 MDM - added option to pass a vector of filenames
			as well as the "filidx" parameter
	19-Dec-91 MDM - Changed "roadmap" reading to only read the
			files that are being extracted from.
	10-Jan-92 MDM - Moved "idset" increment command outside of
			the read data option so that the /nodata
			option would work properly (fixed bug)
	10-Jan-91 MDM - Allowed user to pass "-1" for datasets with
			an array of file names.
	28-Feb-92 MDM - Changed calling sequence to allow "dset_arr"
			to be a simple integer array ("SS") or a structure
			with .DSET and .IFIL.  "SS" option can be used 
			even if infil is an array (previously restricted
			to turn it into a structure in external routine)
			Uses MK_DSET_STR internally.
			Also added "dset_str" optional output capability
	 6-Mar-92 MDM - Adjusted the documentation header some
       19-Mar-92 MDM - Changed not to use the "roadmap2" method of getting
                       the byte offset.  Instead, uses the full roadmap.
                       This is to speed up the reading if reading the same
                       file multiple times.
                       Also, changed call to RD_INDEX to pass the byte offset
                       so it does not have to read RD_ROADMAP
	20-Mar-92 MDM - Changed so output structure type is not updated if
			the different structure is switching to an OLDER version
	25-Jun-92 MDM - Added capability to have INTEGER*4 data
	23-Oct-92 MDM - Use STR_COPY_TAGS instead of STR_COPY
	 4-Jan-94 MDM - Removed all code and replaced with a call to RD_XDA


RD_SDA [2] $SSW/yohkoh/gen/idl/ref_access/rd_sda_sav.pro
[Previous] [Next]
NAME:
	RD_SDA
PURPOSE:
	Read and extract SXT images specified in the 'dset_arr'
	parameter from the SXT Solar-A reformatted data base.
CALLING SEQUENCE:
	Rd_SDA, infil, dset_arr, index, data, roadmap
INPUT:
	infil   : input file specification (SPR... or SFR...)
		  "infil" can be a vector of filenames (WARNING - 
		  do not mix and match FFI and PFI)
	dset_arr: image indices vector.  The order that the images are
		  placed in the output variable "data" is the same
		  order that they appear in "dset_arr"
		  If "-1" is passed, the whole file is read
		  and the dset_arr returned is the "indgen(ndset)"
		  If infil is a scalar, then dset_arr should be
		  a scaler or 1-D vector.  i
		  If infil is a vector of files, then dset_arr should 
		  be a structure with fields ".dset" and ".ifil".
		  ".dset" is the dataset number WITHIN THE FILE, and
		  ".ifil" is the index of the filename within the
		  infil array.
		  The structure is "N" elements long
		  where "N" is the total number of datasets to
		  extract.  
OPTIONAL INPUT:
	nodata  : If present, only the index is read
OUTPUT:
	index	: data-index logical record (one for each 
		  image requested)
	data	: 2D or 3D image array
	roadmap	: summary of data-index logical record, note
		  all roadmaps records in the file are returned.
		  In the case where "infil" is an array, roadmap
		  is the concatenated roadmap for all files that
		  are being read for the particular extraction.
       filidx  : a vector the same length as the roadmap
                 with the index of the file associated with that entry
                 (ie: 0,0,0,0,1,1,1,1,2,2,2,2,...)
		  This is output from RD_ROADMAP
 CALLED BY:
	BUILD_SSX, GET_SDA, MK_SSX, RD_AR, SXT_QLOOK, TERM_QUICK, TERM_REVIEW, TERM_REVIEW_GIF
	XMOVIE_SFM, carr2btime [2], chk_pointing, fstepper, get_sfm, go_nvs4, go_nvs5
	his_suncen, lastsfd [1], lastsfd [2], lastspd, mk_desat_wl, mk_sdp, mk_sfc [1]
	mk_sfc [2], mk_sfs, mk_sft [1], mk_sft [2], mk_sfw, mk_spd, mk_ssc [1], mk_ssc [2]
	newsfd, nn_rd2_sxt_noaa, nn_rd3_sxt_noaa, nn_rd_sxt_noaa, pr_sfc, pr_sxt_term
	rd_sda_flare, rd_sfd_carr, ret_day, sel_leak_image [1], sel_leak_image [3]
	sel_leak_image [4], sft2sfc, sxt2file, sxt2mpeg, sxt_align, sxt_dark_sample, sxt_tfl
	synop_movie, xspr [1], xspr [2]
Examples:
	rd_sda, filename, indgen(10), index, data, roadmap
	returns 1st 10 images in file=filename
HISTORY:
	written by Mons Morrison, Fall 90.
	11-Nov-91 MDM - Added option to not read the data
	12-Nov-91 MDM - added the option to read the whole
			file by passing a -1
	 7-Dec-91 MDM - added option to pass a vector of filenames
			as well as the "filidx" parameter
	19-Dec-91 MDM - Changed "roadmap" reading to only read the
			files that are being extracted from.
	10-Jan-92 MDM - Moved "idset" increment command outside of
			the read data option so that the /nodata
			option would work properly (fixed bug)
	10-Jan-91 MDM - Allowed user to pass "-1" for datasets with
			an array of file names.


RD_SDA [3] $SSW/yohkoh/gen/idl/ref_access/rd_sda_tmp.pro
[Previous] [Next]
NAME:
	RD_SDA
PURPOSE:
	Read and extract SXT images specified in the 'dset_arr'
	parameter from the SXT Solar-A reformatted data base.
CALLING SEQUENCE:
	Rd_SDA, infil, dset_arr, index, data, roadmap
INPUT:
	infil   : input file specification (SPR... or SFR...)
		  "infil" can be a vector of filenames (WARNING - 
		  do not mix and match FFI and PFI)
	dset_arr: image indices vector.  The order that the images are
		  placed in the output variable "data" is the same
		  order that they appear in "dset_arr"
		  If "-1" is passed, the whole file is read
		  and the dset_arr returned is the "indgen(ndset)"
		  If infil is a scalar, then dset_arr should be
		  a scaler or 1-D vector.  i
		  If infil is a vector of files, then dset_arr should 
		  be a structure with fields ".dset" and ".ifil".
		  ".dset" is the dataset number WITHIN THE FILE, and
		  ".ifil" is the index of the filename within the
		  infil array.
		  The structure is "N" elements long
		  where "N" is the total number of datasets to
		  extract.  
OPTIONAL INPUT:
	nodata  : If present, only the index is read
OUTPUT:
	index	: data-index logical record (one for each 
		  image requested)
	data	: 2D or 3D image array
	roadmap	: summary of data-index logical record, note
		  all roadmaps records in the file are returned.
		  In the case where "infil" is an array, roadmap
		  is the concatenated roadmap for all files.
       filidx  : a vector the same length as the roadmap
                 with the index of the file associated with that entry
                 (ie: 0,0,0,0,1,1,1,1,2,2,2,2,...)
		  This is output from RD_ROADMAP
 CALLED BY:
	BUILD_SSX, GET_SDA, MK_SSX, RD_AR, SXT_QLOOK, TERM_QUICK, TERM_REVIEW, TERM_REVIEW_GIF
	XMOVIE_SFM, carr2btime [2], chk_pointing, fstepper, get_sfm, go_nvs4, go_nvs5
	his_suncen, lastsfd [1], lastsfd [2], lastspd, mk_desat_wl, mk_sdp, mk_sfc [1]
	mk_sfc [2], mk_sfs, mk_sft [1], mk_sft [2], mk_sfw, mk_spd, mk_ssc [1], mk_ssc [2]
	newsfd, nn_rd2_sxt_noaa, nn_rd3_sxt_noaa, nn_rd_sxt_noaa, pr_sfc, pr_sxt_term
	rd_sda_flare, rd_sfd_carr, ret_day, sel_leak_image [1], sel_leak_image [3]
	sel_leak_image [4], sft2sfc, sxt2file, sxt2mpeg, sxt_align, sxt_dark_sample, sxt_tfl
	synop_movie, xspr [1], xspr [2]
Examples:
	rd_sda, filename, indgen(10), index, data, roadmap
	returns 1st 10 images in file=filename
HISTORY:
	written by Mons Morrison, Fall 90.
	11-Nov-91 MDM - Added option to not read the data
	12-Nov-91 MDM - added the option to read the whole
			file by passing a -1
	 7-Dec-91 MDM - added option to pass a vector of filenames
			as well as the "filidx" parameter


RD_SDA_DATA [1] $SSW/yohkoh/gen/idl/atest/rd_sda_data.pro
[Previous] [Next]
NAME:
	RD_SDA_DATA
PURPOSE:
	Perform the actual data read for SDA files (called from RD_XDA)
INPUT:
	lun	- the logical unit number where the file is open
	ibyt	- the starting byte value to read from
	idset	- the dataset number for the output matrix
	nout	- the total number of datasets to be extracted
	index	- the index structure for all output datasets
	roadmap	- the roadmap
	sel_dsets- the indicies of the datasets selected for extraction
OPTIONAL INPUT:
	nlin_out - the number of output lines (size of output array)
	nlin_read - the number of lines to read for this image
INPUT/OUTPUT:
	data	- the data
 CALLS: ***
	MASK, data_compress [1], data_compress [2], data_compress [3], rdwrt [1]
	rdwrt [2], rdwrt [3]
 CALLED BY:
	RD_XDA [1], RD_XDA [2]
HISTORY:
	written 21-Mar-92 by Mons Morrison
	30-Nov-94 (MDM) - Modified to allow partial reads of images
	 7-Mar-95 (MDM) - 30-Nov-94 mod was not put online yet
			- Modified to read compressed data sections
	15-Mar-95 (MDM) - Expanded to handle INTEGER*4 (because of
			  ground based data sets.
       12-Jan-98 (PGS) - re-zeros compression information bits after
                         decompressing.


RD_SDA_DATA [2] $SSW/yohkoh/gen/idl/ref_access/rd_sda_data.pro
[Previous] [Next]
NAME:
	RD_SDA_DATA
PURPOSE:
	Perform the actual data read for SDA files (called from RD_XDA)
INPUT:
	lun	- the logical unit number where the file is open
	ibyt	- the starting byte value to read from
	idset	- the dataset number for the output matrix
	nout	- the total number of datasets to be extracted
	index	- the index structure for all output datasets
	roadmap	- the roadmap
	sel_dsets- the indicies of the datasets selected for extraction
OPTIONAL INPUT:
	nlin_out - the number of output lines (size of output array)
	nlin_read - the number of lines to read for this image
INPUT/OUTPUT:
	data	- the data
 CALLS: ***
	MASK, data_compress [1], data_compress [2], data_compress [3], rdwrt [1]
	rdwrt [2], rdwrt [3]
 CALLED BY:
	RD_XDA [1], RD_XDA [2]
HISTORY:
	written 21-Mar-92 by Mons Morrison
	30-Nov-94 (MDM) - Modified to allow partial reads of images
	 7-Mar-95 (MDM) - 30-Nov-94 mod was not put online yet
			- Modified to read compressed data sections
	15-Mar-95 (MDM) - Expanded to handle INTEGER*4 (because of
			  ground based data sets.


rd_sda_flare $SSW/yohkoh/ucon/idl/lemen/rd_sda_flare.pro
[Previous] [Next]
 NAME:
   rd_sda_flare
 PURPOSE:
   Read SXT flare mode data from a file
 CALLING SEQUENCE:
   rd_sda_flare,fn,index,data
   rd_sda_flare,fn,index,data,ss1,ss2
   rd_sda_flare,fn,index,data,ss1,ss2,filter1=filter1,filter2=filter2
 INPUTS:
   fn	= File name
 OUTPUTS:
   index  = SXT index structure
   data   = SXT data cube
   ss1	   = Index of images corresponding to filter 1
   ss2	   = Index of images corresponding to filter 2
 OPTIONAL INPUTS:
   filter1= Specifies filter number to read  Defaults to 2 (=Al.1)
   filter2= Specifies filter number to read. Defaults to 4 (=Be119)
 CALLS: ***
	DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], DOC_LIBRARY, RD_SDA [1]
	RD_SDA [2], RD_SDA [3], Rd_Roadmap [2], delvarx [5], file_menu [1], file_menu [2]
	gt_dp_mode [1], gt_dp_mode [2], gt_expmode, gt_filtb, gt_res, rd_roadmap [1]
 PROCEDURE:
   Will read only normal (not dark) exposures in flare mode with
   full resolution.
 MODIFICATION HISTORY:
  1-apr-93, J. Lemen, Written


rd_sdl $SSW/yohkoh/gen/idl/ref_access/rd_sdl.pro
[Previous] [Next]
NAME: 
	rd_sdl
PURPOSE:
	Read the contents of the SDL data files (SXT Dark Current Log)
INPUT:
	sttim	- start time in any format
	entim	- end time in any format
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], RD_INDEX
	Rd_Pointer [1], Rd_Pointer [2], Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3]
	SXT_STRUCT, concat_dir [4], file_exist [1], file_exist [3], get_index_ver
	rdwrt [1], rdwrt [2], rdwrt [3], str_copy_tags [1], str_copy_tags [2]
	str_copy_tags [3], str_copy_tags [4], week_loop [1], week_loop [2]
	week_loop [3]
 CALLED BY:
	mk_sd2, mk_sdc [2], mk_sdc [3], mk_sdc [4]
OPTIONAL KEYWORD INPUT:
	infil	- The user can specify the input file name
		  instead of the start/end times.  Must be a scalar.
	match	- Can have a image selection criteria to reduce the
		  number of datasets to return.  An example is
			match = 'where((gt_res(index0) eq 1) and (gt_dpe(index0) eq 23))'
OUTPUT:
	index	- the data index
	data	- an array structure
HISTORY:
	Written 15-Apr-92 by M.Morrison
	18-Dec-92 (MDM) - Modified to use STR_COPY_TAGS instead of STR_COPY
	 2-Feb-93 (MDM) - Added match keyword option
	18-Aug-93 (MDM) - Replaced directory reference with DIR_SXT_SDL


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

   Purpose: read selsis region reports and convert-> NAR structures

 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], FILE_EXIST [2], GBO_STRUCT [1]
	GBO_STRUCT [2], STR2ARR [1], STR2ARR [2], break_file [4], file_exist [1]
	file_exist [3], gt_day [1], gt_day [2], rd_tfile [1], rd_tfile [2]
 CALLED BY:
	mk_gev [1], mk_gev [2], mk_nar [1], mk_nar [2]
   History:
      1-jan-1992 (Circa) - Mons Morrrison
      24-jan-97 - S.L.Freeland - major rewrite (simplify via use of rd_tfile, $
                                 str2arr, etc handle new SEL formats
      5-Oct-2000 - S.L.Freeland - added 'strupcase' call to deal with
                                   SEL mixed case update (2-oct-2000)


rd_selsisi $SSW/yohkoh/gen/idl/gbo/rd_selsisi.pro
[Previous] [Next]
NAME:
	rd_selsisi
PURPOSE:
	To read the SELSIS image data files
CALLING SEQUENCE:
	img = rd_selsisi(infil, head=head)
	img = rd_selsisi(infil, head=head, fits_head=fits_head)
INPUT:
	infil	- The input file name.  This needs to be the standard
		  SELSIS format in order to extract the date/time
OUTPUT:
	Returns a 512x512 byte array with the image.  The image is
	rotated and translated so that it appears properly using IDL
KEYWORD OUTPUT:
	head	- a structure with the header information
	fits_head- A string array with the fits header
	bhead	- the raw header array (a 512 byte array)
	outfil	- The YOHKOH output file name
	qerror	- Set if there was an error reading the file.
 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], break_file [4], fid2ex [1]
	fid2ex [2], int2secarr [1], int2secarr [2]
 CALLED BY:
	selsisi2fits
HISTORY:
	Written 1-Jul-92 by M.Morrison
	16-Jul-92 (MDM) - Expanded header information and FITS header
			  Added "outfil" parameter
	13-Oct-92 (MDM) - Added QERROR
	 9-Aug-93 (MDM) - Added check that the time/header was not
			  corrupted
	 4-Oct-93 (MDM) - Added another check that the time/header was not
			  corrupted
			- Added /QSTOP


rd_selsisi_dir $SSW/yohkoh/gen/idl/gbo/rd_selsisi_dir.pro
[Previous] [Next]
NAME:
	rd_selsisi_dir
PURPOSE:
	To read the SELSIS image directory file and optionally select
	a subset of the images listed
CALLING SEQUENCE:
	infil = rd_selsisi_dir()
	infil = rd_selsisi_dir(selimg='full disk h-alpha')
	infil = rd_selsisi_dir(selloc=['hmn', 'kpno'])
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], concat_dir [4]
	file_exist [1], file_exist [3], where_arr [1], where_arr [2]
 CALLED BY:
	selsisi_copy
OPTIONAL KEYWORD INPUT:
	infil	- The input file.  If not defined it is ???
		  $DIR_GBO_SELSISI/copy_directory.lis
	selimg	- A string array containing a list of the images to
		  select.  Optional vaules are:
			'Full Disk H-alpha'
			'Full Disk Helium 10830A'
			'Full Disk Magnetic'
			'Full Disk Unknown'		;CaK
			'Lrg Scale H-alpha'
			'Lrg Scale White Light/B2'
	selloc	- A string array containing a list of the locations to
		  select.  Optional values are:
			LEAR, APOL, HMN, KPNO, BOU
	new	- If set, then check the log of all images copied over so
		  far and only copy new files
OUTPUT:
	Returns a string array with the selected lines from the directory
	listing.  The file name is the first 15 characters
OPTIONAL KEYWORD OUTPUT:
	outfil	- The file names of the selected files
HISTORY:
	Written 2-Jul-92 by M.Morrison


rd_sfd_carr $SSW/yohkoh/ucon/idl/hara/rd_sfd_carr.pro
[Previous] [Next]
NAME:
    rd_sfd_carr
PURPOSE
    read SFD data required for synoptic charts from reformated database
INPUT
    indir:  name of directory where input data are stored
    outdir: name of directory where outputs are stored    
OUTPUT
    files as sfd1850.00 - sfd1850.28 which include index and data
    one dataset for a synoptic chart consists of 29 images 
CALLING SEQUENCE
    rd_sfd_carr,'/mo0.flare4','/flare4.data/sxt/someone',/mo
    rd_sfd_carr,'/yd1/sfd','/flare4.data/sxt/someone'
KEYWORD
    mo: use this keyword when you read data from MO drive
RESTRICTION
    select an image per day
HISTORY
    Dec 15, 1993, made by H. Hara
 CALLS:
 CALLED BY
	carr2btime [2], ret_day


rd_sld $SSW/yohkoh/gen/idl/ref_access/rd_sld.pro
[Previous] [Next]
NAME: 
	rd_sld
PURPOSE:
	Read the contents of the SLD data files
INPUT:
	sttim	- start time in any format
	entim	- end time in any format
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], RD_INDEX
	Rd_Pointer [1], Rd_Pointer [2], Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3]
	SXT_STRUCT, concat_dir [4], file_exist [1], file_exist [3], get_index_ver
	rdwrt [1], rdwrt [2], rdwrt [3], str_copy_tags [1], str_copy_tags [2]
	str_copy_tags [3], str_copy_tags [4], week_loop [1], week_loop [2]
	week_loop [3]
OPTIONAL KEYWORD INPUT:
	infil	- The user can specify the input file name
		  instead of the start/end times.  Must be a scalar.
OUTPUT:
	index	- an index structure
	data	- an array structure
HISTORY:
	Written 8-Dec-92 by M.Morrison


rd_sls $SSW/yohkoh/gen/idl/ref_access/rd_sls.pro
[Previous] [Next]
NAME: 
	rd_sls
PURPOSE:
	Read the contents of the SLS data files
INPUT:
	sttim	- start time in any format
	entim	- end time in any format
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], RD_INDEX
	Rd_Pointer [1], Rd_Pointer [2], Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3]
	SXT_STRUCT, concat_dir [4], file_exist [1], file_exist [3], get_index_ver
	rdwrt [1], rdwrt [2], rdwrt [3], str_copy_tags [1], str_copy_tags [2]
	str_copy_tags [3], str_copy_tags [4], week_loop [1], week_loop [2]
	week_loop [3]
OPTIONAL KEYWORD INPUT:
	infil	- The user can specify the input file name
		  instead of the start/end times.  Must be a scalar.
OUTPUT:
	index	- an index structure
	data	- an array structure
HISTORY:
	Written 8-Dec-92 by M.Morrison


rd_sol $SSW/yohkoh/gen/idl/orbit/rd_sol.pro
[Previous] [Next]
 NAME:
   rd_sol
 PURPOSE:
   Read the Yohkoh orbital elements file
 CALLS: ***
	anytim2ints [1], anytim2ints [2]
 CALLED BY:
	yo_height
 HISTORY:
   7-jul-93, J. Lemen, Written


rd_sot $SSW/yohkoh/gen/idl/ref_access/rd_sot.pro
[Previous] [Next]
NAME: 
	rd_sot
PURPOSE:
	Read the contents of the SOT data files
INPUT:
	sttim	- start time in any format
	entim	- end time in any format
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], RD_INDEX
	Rd_Pointer [1], Rd_Pointer [2], Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3]
	SXT_STRUCT, concat_dir [4], file_exist [1], file_exist [3], get_index_ver, ofr2fre
	rdwrt [1], rdwrt [2], rdwrt [3], str_copy_tags [1], str_copy_tags [2]
	str_copy_tags [3], str_copy_tags [4], week_loop [1], week_loop [2]
	week_loop [3]
OPTIONAL KEYWORD INPUT:
	infil	- The user can specify the input file name
		  instead of the start/end times.  Must be a scalar.
	old	- Use the .01 files instead of the new .02 files.
OUTPUT:
	index	- an index structure
	data	- an array structure
HISTORY:
	Written 20-Apr-92 by M.Morrison
	26-Aug-92 (MDM) - Used STR_COPY_TAGS instead of STR_COPY
			- Added keyword /OLD
	14-Jul-93 (MDM) - Added call to OFR2FRE


rd_soup $SSW/yohkoh/gen/idl/gbo/rd_soup.pro
[Previous] [Next]
NAME:
	rd_soup
PURPOSE:
	To read the LPARL SOUP LaPalma data files
CALLING SEQUENCE:
	img = rd_soup(infil)
	img = rd_soup(infil, head=head)
INPUT:
	infil	- The input file name
 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], PATH_LIB [1], PATH_LIB [2], STR2ARR [1], STR2ARR [2]
	anytim2ints [1], anytim2ints [2], break_file [4], concat_dir [4], dec2sun [1]
	dec2sun [2]
 CALLED BY:
	mk_soup_hcat
OPTIONAL KEYWORD INPUT:
	nodata	- If set, do not read the data (just read the header)
OUTPUT:
	returns the image
OPTIONAL KEYWORD OUTPUT:
	head	- A structure with header information
COMMENTS:
	The routine currently will only work on uncompressed data files
HISTORY:
	Written 3-Mar-93 by M.Morrison
	 4-Mar-93 (MDM) - Modifications and tuning it up
	 8-Mar-93 (MDM) - Added "polarity" field
			- Added /NODATA and /QDEBUG options
			- Added decompression (call to Shine's decrunch)
			- Allow an array of input file names
	 9-Mar-93 (MDM) - Byte swapping is only needed some times(?)
	16-Apr-93 (MDM) - Expanded the output structure to include the
			  sequence number and frame number
			- Deleted the original header from the structure


rd_spc_data v09 $SSW/yohkoh/bcs/idl/bsd/rd_spc_data.pro
[Previous] [Next]
 NAME:			rd_spc_data v0.9

 PURPOSE:		read spc data block + return in structure

 CALLING SEQUENCE:     rd_spc_header
			rd_spc_rdmap
			rd_spc_data

 INPUTS:		lun_filename - Logical unit number or filename.
			dset_arr - dataset array for corresponding bsd file. 
			header - header structure - see rd_spc_header
			rdmap  - roadmap structure - see rd_spc_rdmap
			/data_only - return only those data elements present
			 in the SPC file. Id est don't return a data structure
			 the same as the corresponding BSD file.

 OPTIONAL INPUTS:	channels - array of channel numbers (*) default.

 OUTPUTS:		data   - data structure. 
			index  - data index structure.
			 For structure definitions see file spc_struct.pro

 OPTIONAL OUTPUTS:  	none

 CALLS: ***
	RD_SPC_DATA, SPC_STRUCT
 RESTRICTIONS:		Filename must match that in calls to rd_spc_header
			 and rd_spc_rdmap
			Dataset numbers correspond to equivalents in parent
$			 BSD file unless /data_only flag is used.
			 Datasets without fits are blank as well as being
			 indicated by roadmap.exist = 0

 PROCEDURE:		read record at a time, insert into structure, create
			wavelength array.

 MODIFICATION HISTORY: written atp 5/92 from jtm's rd_bsd.pro
			modified to account for uncertainties/internal time 
			errors atp may92
			modified atp july 92 for spc files
			minor mods debug atp (7/7/92) v0.9


rd_spc_header v09 $SSW/yohkoh/bcs/idl/bsd/rd_spc_header.pro
[Previous] [Next]
	NAME:
		rd_spc_header v0.9

	PURPOSE:
		Read and extract the header section from a BTH (SPC) file

	CALLING SEQUENCE:
		rd_spc_header, lun_filnam, header

	INPUT:
		lun_filnam	input file specification or the unit number
				of an opened BTH file

	OUTPUT:
		header		the header section

 CALLS: ***
	RD_SPC_HEADER, SPC_STRUCT
	HISTORY:
		JTM: (24 Oct 91)
		ATP: (13 may 92)
		ATP: (18 may 92)
		ATP: (6  jly 92) - convert to spc files
		atp: (7/7/92) cleanup - header v0.9


rd_spc_rdmap v 09 $SSW/yohkoh/bcs/idl/bsd/rd_spc_rdmap.pro
[Previous] [Next]
	NAME:
		rd_spc_rdmap v 0.9

	PURPOSE:
		Read the roadmap section of record locations

	CALLING SEQUENCE:
		rd_spc_rdmap, lun_filnam, header, roadmap

	INPUT:
		lun_filnam	input file specification or the
				unit number of an opened BTH(SPC) file

               Header 		The SPC_header record for the current file.

	OUTPUT:
		roadmap   	SPC_roadmap structure. see SPC_struct.pro for 
				details.

 CALLS: ***
	RD_SPC_RDMAP, SPC_STRUCT
	HISTORY:
		JTM: (24 Oct 91)
 		atp: march 1992 - mods for new bsd structures/cleanup
		atp: july  1992 - converted to spc files.
		atp: (7/7/92) - header, minor fixes, heterogenous rdmap sizes:-)


rd_srspas $SSW/yohkoh/gen/idl/reformat/rd_srspas.pro
[Previous] [Next]
NAME:
	rd_srspas
PURPOSE:
	To read the SIRIUS database listing file contents into
	a structure
CALLING SEQUENCE:
	out = rd_srspas()
 CALLS: ***
	FILE_EXIST [2], STR2ARR [1], STR2ARR [2], anytim2ints [1], anytim2ints [2]
	file_exist [1], file_exist [3], int2secarr [1], int2secarr [2]
OPTIONAL KEYWORD INPUT:
	infil	- The input file name.  If not set, then it
		  uses /ys/site/logs/srspas.new
	sort	- If set, return the data sorted by time
OPTIONAL KEYWORD OUTPUT:
	barr	- The byte array 80xN of the input file
HISTORY:
	Written 4-Jan-93 by M.Morrison
	13-Jan-93 (MDM) - made infil a positional parameter instead
			  of a keyword parameter
	 8-Feb-93 (MDM) - added BARR output 
	 6-May-93 (MDM) - Added /TO_INF option to read TO_INF script results
	22-May-93 (MDM) - Added check to see if the file existed
	 7-Oct-93 (MDM) - Replaced /ys with $ys
	 7-may-95 (SLF) - problem if nulls in srspas (shuto "fix")


rd_ssl $SSW/yohkoh/gen/idl/ref_access/rd_ssl.pro
[Previous] [Next]
NAME: 
	rd_ssl
PURPOSE:
	Read the contents of the SSL data files (SXT Summary Log)
INPUT:
	sttim	- start time in any format
	entim	- end time in any format
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], Rd_Pointer [1]
	Rd_Pointer [2], Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3], SXT_STRUCT
	concat_dir [4], deriv_arr [1], deriv_arr [2], file_exist [1], file_exist [3]
	int2secarr [1], int2secarr [2], rdwrt [1], rdwrt [2], rdwrt [3], week_loop [1]
	week_loop [2], week_loop [3]
 CALLED BY:
	plot_ssl, pr_dates_warm [1], pr_dates_warm [2]
OPTIONAL KEYWORD INPUT:
	infil	- The user can specify the input file name
		  instead of the start/end times.  Must be a scalar.
OUTPUT:
	data	- an array structure
HISTORY:
	Written 24-Apr-92 by M.Morrison
	 1-May-92 (MDM) - Adjusted to take into account the change
			  in units of expdur field between version
			  1.00 and 1.01 of MK_SSL
	 9-Jul-92 (MDM) - Modified to not return the anomalous data caused
			  by a "temp" file after REFORMAT2 runs


RD_STR_DATA $SSW/yohkoh/gen/idl/ref_access/rd_str_data.pro
[Previous] [Next]
NAME:
	RD_STR_DATA
PURPOSE:
	Perform the actual data read for SXT files which structures for
	the data portion.  These include:
		SDL, SLD, SLS, SOT, SXC, SXL, SXA
INPUT:
	lun	- the logical unit number where the file is open
	ibyt	- the starting byte value to read from
	idset	- the dataset number for the output matrix
	nout	- the total number of datasets to be extracted
	index	- the index structure for all output datasets
	roadmap	- the roadmap
	sel_dsets- the indicies of the datasets selected for extraction
	type	- the data type (SDL, SLD, SLS, SOT, SXC, SXL, SXA)
INPUT/OUTPUT:
	data	- the data
 CALLS: ***
	SXT_STRUCT, rdwrt [1], rdwrt [2], rdwrt [3]
 CALLED BY:
	RD_XDA [1], RD_XDA [2]
HISTORY:
	written 12-Jul-93 by M.Morrison
	18-Nov-93 (MDM) - Corrected to use the new .02 SXL structure


rd_sxa $SSW/yohkoh/gen/idl/ref_access/rd_sxa.pro
[Previous] [Next]
NAME: 
	rd_sxa
PURPOSE:
	Read the contents of the SXA data files
INPUT:
	sttim	- start time in any format
	entim	- end time in any format
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], GET_NBYTES
	RD_XDA [1], RD_XDA [2], Rd_Roadmap [2], concat_dir [4], file_exist [1]
	file_exist [3], prstr [1], prstr [2], rd_roadmap [1], sel_timrange [1]
	sel_timrange [2], week_loop [1], week_loop [2], week_loop [3]
OPTIONAL KEYWORD INPUT:
	infil	- The user can specify the input file name
		  instead of the start/end times.  Must be a scalar.
OUTPUT:
	index	- an index structure
	data	- an array structure
HISTORY:
	Written 11-Oct-93 by M.Morrison
	15-Nov-93 (MDM) - Added check that the requested file exists.


rd_sxc $SSW/yohkoh/gen/idl/ref_access/rd_sxc.pro
[Previous] [Next]
NAME: 
	rd_sxc
PURPOSE:
	Read the contents of the SXC data files
INPUT:
	sttim	- start time in any format
	entim	- end time in any format
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], GET_NBYTES
	RD_XDA [1], RD_XDA [2], Rd_Roadmap [2], SXT_STRUCT, concat_dir [4], file_exist [1]
	file_exist [3], ofr2fre, prstr [1], prstr [2], rd_roadmap [1], sel_timrange [1]
	sel_timrange [2], week_loop [1], week_loop [2], week_loop [3]
OPTIONAL KEYWORD INPUT:
	infil	- The user can specify the input file name
		  instead of the start/end times.  Must be a scalar.
OUTPUT:
	index	- an index structure
	data	- an array structure
HISTORY:
	Written 26-May-93 by M.Morrison
	14-Jul-93 (MDM) - Added call to OFR2FRE
	20-Jan-93 (SLF) - use rd_sxl as template (rd via rd_xda)


rd_sxg $SSW/yohkoh/gen/idl/ys_util/rd_sxg.pro
[Previous] [Next]
NAME:
	rd_sxg
PURPOSE:
	Read the SXG files (SXL/GOES X-Ray Log)
CALLING SEQUENCE:
	rd_sxg, roadmap(0),  roadmap(n), sxg_data
	rd_sxg, '1-dec-91', '30-dec-91', sxg_data
	rd_sxg,      weeks,       years, sxg_data
       rd_sxg,'1-dec-91', '30-dec-91', sxg_data, /almg  ; only dagwood filter
INPUT:
		  INPUT CAN BE OF TWO FORMS

		  (A) Input starting and ending times
	input1	- Starting time in either (i) standard string format,
		  or (ii) a structure with .time and .day fields
		  (the 7 element time vector form is not allowed)
	input2	- Ending time.  If ending time is omitted, the
		  ending time is set to 24 hours after starting time.

		  (B) Input can be a vector of week/year number
	input1	- a vector of the week numbers to read
	input2	- a vector of the year of the week to be read
		  if the weeks vector is all within one year, the
		  year parameter can be a scalar.
OUTPUT:
	sxgdata	- the data structure containing the data in the files
		  See the structure definition for further information
 CALLS: ***
	ARR2STR [1], Arr2Str [2], data_chk [1], data_chk [2], get_logenv [1]
	get_logenv [2], gt_filtb, rd_week_file [1], rd_week_file [2], rd_week_file [3]
	rd_week_file [4]
OPTIONAL KEYWORD INPUT:
	indir	- Input directory of data files.  If not present, use
		  $DIR_SXT_SXG
	vnum	- The file version number to use.  If not present, a call
		  to WEEKID is made and that latest version is used.
	nearest	- If set, then the time span is adjusted a day at a time
		  until it finds some data.  It decrements the starting
		  date by a day and increments the ending date by a day
		  up to 14 days (28 day total span)
       full_weeks - If set, then do not extract the entries that just
                 cover the times covered in the start/end time.  Return
                 all data for weeks covered by the start/end time. This
                 allows a user to have start and end time be the same
                 and still get some data.
       almg - switch, if set, return only AlMg filter SXL records
       dagwood - switch, if set, return only AlMg (dagwood) filter SXL records
       al1 - switch, if set, return only Aluminum filter SXL records

OPTIONAL KEYWORD OUTPUT:
	status	- The read status
		  Some data is available if (status le 0)
			 0 = no error
			 1 = cannot find the file
			 2 = cannot find data in the time period
			-1 = found data, but had to go outside of the requested
			     period (only true if /NEAREST is used).  
HISTORY:
	12-sep-1995 (S.L.Freeland) Written 
       21-sep-1995 (S.L.Freeland) add filter keywords 


rd_sxl $SSW/yohkoh/gen/idl/ref_access/rd_sxl.pro
[Previous] [Next]
NAME: 
	rd_sxl
PURPOSE:
	Read the contents of the SXL data files (SXT X-Ray Log)
CALLING SEQUENCE:
	rd_sxl, '1-sep-91', '1-nov-91', index, data
	rd_sxl, '1-dec-91', '1-jun-92', roadmap, /summary
INPUT:
	sttim	- start time in any format
	entim	- end time in any format
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], GET_NBYTES
	RD_XDA [1], RD_XDA [2], Rd_Roadmap [2], concat_dir [4], file_exist [1]
	file_exist [3], prstr [1], prstr [2], rd_roadmap [1], sel_timrange [1]
	sel_timrange [2], week_loop [1], week_loop [2], week_loop [3]
 CALLED BY:
	rd_sxtgoes
OPTIONAL KEYWORD INPUT:
	infil	- The user can specify the input file name
		  instead of the start/end times.  Must be a scalar.
	summary - If set, just read the roadmaps of the times selected
	new	- If set, read the .02 SXL files
	old	- If set, read the .01 SXL files
OUTPUT:
	index	- the data index
	data	- an array structure
HISTORY:
	Written 13-Aug-92 by M.Morrison
	21-Apr-93 (MDM) - Modified to use STR_COPY_TAGS
	 9-Jul-93 (MDM) - Added /NEW option
	19-Aug-93 (MDM) - Added /OLD option
			- Made the default to read the .02 files
			 ---------------------------------------
	15-Nov-93 (MDM) - Modified significantly to use RD_XDA instead of
			  doing the reading within RD_SXL.
	18-Nov-93 (MDM) - Corrected oversight - /SUMMARY option was not
			  coded at all
	10-Jan-2001 (GLS) - Added modulo operator to the file name construction to
			    handle 3 or 4 digit years.


RD_SXL_DATA $SSW/yohkoh/gen/idl/ref_access/rd_sxl_data.pro
[Previous] [Next]
NAME:
	RD_SXL_DATA
PURPOSE:
	Perform the actual data read for SXL files (called from RD_XDA)
INPUT:
	lun	- the logical unit number where the file is open
	ibyt	- the starting byte value to read from
	idset	- the dataset number for the output matrix
	nout	- the total number of datasets to be extracted
	index	- the index structure for all output datasets
	roadmap	- the roadmap
	sel_dsets- the indicies of the datasets selected for extraction
INPUT/OUTPUT:
	data	- the data
 CALLS: ***
	SXT_STRUCT, rdwrt [1], rdwrt [2], rdwrt [3]
HISTORY:
	written 19-Apr-93 by M.Morrison


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

   Purpose: read SXL & corresponding GOES record and return merged (SXG) record

   Input Parameters:
      t0, t1 - start and stop time (required)

   Output Parameters:
      sxg - sxg records - merge of SXT and GOES records (time=SXL)

   Keyword Parameters:
      one_minute, five_minute - switches determine which GOES file to use
				 (default is one_minute averages)
      goes6,goes8 - switch to select GOES satellite (default=goes7)
      window - GOES read window size (secondes) - if vector, will expand 
               read window and retry until data found or all windows tried.

 CALLED BY:
	mk_week_file [1], mk_week_file [2]
   History:
      11-sep-1995 (SLF) - generate SXT/GOES  input structures for SXG files
      21-sep-1995 (SLF) - Revised SXG structure (add sxt_flux tag)

 CALLS: ***
	PRCOL, SXT_STRUCT, data_chk [1], data_chk [2], fmt_tim [1], fmt_tim [2], prstr [1]
	prstr [2], rd_gxd [1], rd_gxd [2], rd_gxd [3], rd_sxl, sel_timrange [1]
	sel_timrange [2], sfd_decomp, str_copy_tags [1], str_copy_tags [2]
	str_copy_tags [3], str_copy_tags [4], tim2dset [1], tim2dset [2], timegrid
   Restrictions:
      WINDOW currently only applied during GOES read (no SXL records omitted)
      GOES 7 only for now


rd_taer $SSW/yohkoh/ucon/idl/lemen/rd_taer.pro
[Previous] [Next]
 NAME:
   rd_taer
 PURPOSE:
   Read the ascii file containing travel information for mk_taer
 CALLING SEQUENCE:
   rd_taer,filein,data,data2

 The Valid Item list is as follows:
	other		- Other column, such as taxi, foreign exchange commission
	airfare_emp	- Airfare payed for by the employee
	airfare_comp	- Airfare payed for the company
	auto_person	- Personal auto mileage
	auto_rental	- Rental car fees
	hotel		- Hotel 
	meet		- Meeting fees
	off		- To specify a day off (no M&IE)
	m_ie		- To specify a specific m_ie for a certain day
	avg_start	- Start averaging from this day (allows for multiple
				locations on one taer).
			 Format is avg_start  0.00 dd-mmm-yy 0 "New City"

 CALLS: ***
	STR2ARR [1], STR2ARR [2], rd_tfile [1], rd_tfile [2]
 MODIFICATION HISTORY:
   23-mar-92, JRL
   21-oct-92, jrl, Don't choke on blank lines at end of the file
    8-nov-93, JRL, Changed to call rd_tfile to read the file
    2-jun-94, JRL, Added an M_IE option to specify an amount for a given day
    1-mar-95, JRL, Don't choke on blank lines at end of the file.
		    (earlier fix disappeared when change was made to use rd_tfile).
   12-mar-95, JRL, Changed the Taer_Num and Continue to Strings
    9-dec-95, JRL, Added the AVG_START option
    5-aug-96, JRL, Make exchange variable a vector of length 5


Rd_TapDir $SSW/yohkoh/gen/idl/tape/rd_tapdir.pro
[Previous] [Next]
	NAME:
		Rd_TapDir
	PURPOSE:
		Read and return the binary tape directory from an 
		Archive tape.
	INPUT:
		unit	if integer--unit number of tape drive
			if string---disk filename of tape dir file

	Output:
		hdr	header to tape directory file
		drecs	tape directory data-records
 CALLS: ***
	LSswap, bytetostr, mkdirst, mt, rd_dsktapdir, tar_size
 CALLED BY:
	ACOPY [1], RdTap [1], RdTap [2], RdTap [3], arctap2tap, cktapdir, diff_file
	gen_file_id [1], gen_file_id [2], gen_fn [1], gen_fn [2], get_afile_size [1]
	get_afile_size [2], get_tapename, getm1ans, go_mk_cd, go_rdtap [1], go_rdtap [2]
	mo_tap_dump, pfi_dominant, prep_week [1], prep_week [2], rd_xbd, tap_wrt_chk, wfile
	ycopy, ydump, yo_arch_size
	History:
		written 10-Oct-91 by GAL
		structure update -24-Oct-91
		updated 19-Feb-92, for reading disk files
		3-Mar-92, update for reading old vers of the file.
		9-Mar-92, vms !err problem corrected and /block sw for
			disk files added
		12-Mar-92, increased VMS tape-read buffer size 
		17-Mar-92, updated to call rd_dsktapdir, which reads 
			tape-dir files from sun and iris systems in
			addition to the Dec systems.
		11-Jun-93, updated to call mkdirst with structure ver#.
		14-Jun-93, added byte swap for mktapver reads from 
			which have a different byte order than DEC 
			machines.
		16-Jun-93, update VMS read of June-93 changes: tape-dir
			file > 8192 bytes due to expanded structure.
		14-Feb-94, gal, added another machine, OSF, system 
			dependent sections for reading tape dir.


RD_TAR $SSW/yohkoh/ucon/idl/morrison/rd_tar.pro
[Previous] [Next]
NAME:
     	RD_TAR
PURPOSE:
       Program extracts tar archived files.  First the specific tape is
	chosen from a list of names in the tar_lists directory.
		currently in: '/0p/chen/tar_lists' 
	The user then choses the files to be extracted.
CALLING SEQUENCE:
	RD_TAR [[, DEV= 0 or 1][, /MK_LIST]]
INPUTS: 
	dev:  device number  0= master drive
			     1= copy drive			        
OUTPUTS:
	tar files are extracted into current directory
	If /mk_list is entered, then a tar list is created, which can be used
	by rd_tar later.
KEYWORDS:
	/mk_list:  creates tar list 
KNOWN BUGS:
	program not compatible with all tape drives
	(definately works on SXT0 while extracting byte swapped files.)
PROGRAMS/FUNCTIONS CALLED:
	REFORM1	:  just like normal REFORM(array) but doesn't bomb with 1x1 
			array
	WNMENU_SEL :  nice mouse interface for choosing files
NOTES:
		RD_TAR reads tar listings which are made from the UNIX 
	'tar -t' command.  The file names generated must be rather 
	specific, so please follow these directions carefully.
   		The minimum requirement is that the file name must be 17
	characters long with the '_set#' if the tar file is not the
	first set on the tape.
   		The standard file name is as follows:
	    	     EX: SFD-91_36a-1.SXT0_set2   
                         |     |   |   |    |
     		     file id    |   |   |    tape file number
	        	        |   |   tape origin
		  first file date   version of tape 

	If an error comes up saying requested menu is too large for display, 
	run 'wmenu_sel_set'.  (see wmenu_sel_set's own documentation)
 CALLS: ***
	REFORM1, STR2ARR [1], STR2ARR [2], def_tapd [1], def_tapd [2], def_tapd [3]
	wmenu_sel [1], wmenu_sel [2], yesnox [1], yesnox [2]
HISTORY:
	MGC, Mar, 1993.
	MGC, Apr, 1993  Checks if size is given in listing.  Added 'NOTES:'
		Added user specified path.
	MGC, Apr, 1993  Adds tar list making feature.


rd_telem $SSW/yohkoh/gen/idl/reformat/rd_telem.pro
[Previous] [Next]
Name:
	rd_telem
Purpose:
	To read raw telemetry file
Input:
	lun_filnam	- logical unit or file name of file to read
	irec		- record number (starting at 0)
OPTIONAL INPUT:
	force		- if present and non-zero, read that major frame
			  no mater what the error check says
			  CURRENTLY: any bad minor frames and the procedure
			  automatically skips it
	reverse		- Go BACKWARDS until finding a good record.  This
			  allows us to check last valid data in a file.
Output:
	rec1		- one major frame (144x64)
	err		- error flag
				= 0	is ok
				= 36 (0010 0100)	is end of file (or file not found)
			  When using the "forced" mode, if the error ne 36, then check the following bits
			  (note: cannot use b5 in order to maintain EOF = 36)
				b/0  (0000 0001)	is bad sync word
				b/1  (0000 0010)	is bad frame indicator
	badmf		- 64 element vector showing where bad minor frame is
			  1 indicates a bad minor frame 
 CALLED BY:
	table_dump
History:
	Written Fall '91 by M.Morrison
	14-Nov-91 (MDM) - Added "reverse" option
	


RD_TXT $SSW/yohkoh/ucon/idl/kawai/rd_txt.pro
[Previous] [Next]
NAME:    RD_TXT
PURPOSE: Read text file and store the contents into string array
CATEGORY:
CALLING SEQUENCE:  LINESTRINGS = RD_TXT(FILENAME)
INPUTS:            FILENAME : string = name of a text file
OUTPUTS:           string array = contents of the specified text file
COMMON BLOCKS:
SIDE DEFFECTS:            
RESTRICTIONS:
MODIFICATION HISTORY:
                  6-nov-92 g.kawai
EXAMPLES:


rd_video_menu $SSW/yohkoh/gen/idl/movie/rd_video_menu.pro
[Previous] [Next]
NAME:
	rd_video_menu
PURPOSE:
	Read the video menu data file
OPTIONAL INPUT:
	infil	- The input file name
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], STR2ARR [1], STR2ARR [2]
	concat_dir [4], remtab [1], remtab [2]
 CALLED BY:
	video_menu
HISTORY:
	Written 18-Jun-93 by M.Morrison


RD_WDA_DATA $SSW/yohkoh/gen/idl/ref_access/rd_wda_data.pro
[Previous] [Next]
NAME:
	RD_WDA_DATA
PURPOSE:
	Perform the actual data read for WDA files (called from RD_XDA)
INPUT:
	lun	- the logical unit number where the file is open
	ibyt	- the starting byte value to read from
	idset	- the dataset number for the output matrix
	nout	- the total number of datasets to be extracted
	index	- the index structure for all output datasets
	roadmap	- the roadmap
	sel_dsets- the indicies of the datasets selected for extraction
INPUT/OUTPUT:
	data	- the data
 CALLS: ***
	rdwrt [1], rdwrt [2], rdwrt [3]
 CALLED BY:
	RD_XDA [1], RD_XDA [2]
HISTORY:
	written 21-Mar-92 by Mons Morrison


rd_week_file [3] $SSW/yohkoh/gen/idl/atest/rd_week_file.pro
[Previous] [Next]
NAME:
	rd_week_file
PURPOSE:
	Read the weekly files which do not have orbit pointers (EVN, FEM,
	NAR, GEV, and GXT)
CALLING SEQUENCE:
	rd_week_file, roadmap(0),  roadmap(n), 'FEM', fem_data
	rd_week_file, '1-dec-91', '30-dec-91', 'EVN', evn_data
	rd_week_file,      weeks,       years, 'GEV', gev_data
INPUT:
		  INPUT CAN BE OF TWO FORMS

		  (A) Input starting and ending times
	input1	- Starting time in either (i) standard string format,
		  or (ii) a structure with .time and .day fields
		  (the 7 element time vector form is not allowed)
	input2	- Ending time.  If ending time is omitted, the
		  ending time is set to 24 hours after starting time.

		  (B) Input can be a vector of week/year number
	input1	- a vector of the week numbers to read
	input2	- a vector of the year of the week to be read
		  if the weeks vector is all within one year, the
		  year parameter can be a scalar.
	data_type - The type of data to read.  Either EVN, FEM, NAR,
		  GEV or GXT
OUTPUT:
	data	- the data structure containing the data in the files
		  See the structure definition for further information
	orb_pointer - the set of orbit pointers from the files
 CALLS: ***
	ATT_STRUCT [1], ATT_STRUCT [2], EVN_STRUCT, Ex2Int [1], Ex2Int [2], FEM_OLD_STRUCT
	FEM_STRUCT, GBO_STRUCT [1], GBO_STRUCT [2], GET_NBYTES, Int2Ex [1], Int2Ex [2]
	OBS_STRUCT [1], OBS_STRUCT [2], ORB_STRUCT, PNT_STRUCT, Rd_NewOrb_p [1]
	Rd_NewOrb_p [2], Rd_Pointer [1], Rd_Pointer [2], Rd_fHeader [1], Rd_fHeader [2]
	Rd_fHeader [3], SXT_STRUCT, anytim2ex [1], anytim2ex [2], anytim2ints [1]
	anytim2ints [2], anytim2weeks [1], anytim2weeks [2], ex2fid [1], ex2fid [2]
	file_compress [1], file_compress [2], file_list [1], file_list [2]
	file_uncompress [1], file_uncompress [2], fmt_tim [1], fmt_tim [2], gt_day [1]
	gt_day [2], int2secarr [1], int2secarr [2], is_member [1], is_member [2]
	rdwrt [1], rdwrt [2], rdwrt [3], sel_timrange [1], sel_timrange [2]
	str_copy_tags [1], str_copy_tags [2], str_copy_tags [3], str_copy_tags [4]
	wc_where [1], wc_where [2], weekid [1], weekid [2], weekid [3]
 CALLED BY:
	mk_gx, mk_week_file [1], mk_week_file [2], rd_atr, rd_att, rd_fem, rd_gbl, rd_gol
	rd_guf, rd_gxd [1], rd_gxd [2], rd_gxd [3], rd_gxt, rd_obs, rd_orb, rd_pnt, rd_sxg
	weekid [2], ydb_exist [2], yopos [1], yopos [2]
OPTIONAL KEYWORD INPUT:
	indir	- Input directory of data files.  If not present, use
		  $DIR_GEN_xxx logical directory
	vnum	- The file version number to use.  If not present, a call
		  to WEEKID is made and that latest version is used.
	nearest	- If set, then the time span is adjusted a day at a time
		  until it finds some data.  It decrements the starting
		  date by a day and increments the ending date by a day
		  up to 14 days (28 day total span)
	full_weeks - If set, then do not extract the entries that just
		  cover the times covered in the start/end time.  Return
		  all data for weeks covered by the start/end time. This
		  allows a user to have start and end time be the same
		  and still get some data.
       nobackup - If set, then do not back up a week if the start
                  time is within 90 minutes of the first day of the week.
OPTIONAL KEYWORD OUTPUT:
	status	- The read status
		  Some data is available if (status le 0)
			 0 = no error
			 1 = cannot find the file
			 2 = cannot find data in the time period
			99 = cannot recognize the data_type (prefix)
			-1 = found data, but had to go outside of the requested
			     period (only true if /NEAREST is used).
	ibyt	- The byte position within the file where the data was extracted
	filename- The name of the file which was read
RESTRICTIONS:
	Assumes that all files have the same data structure version.
HISTORY:
	Written 5-Apr-93 by M.Morrison
	 6-Apr-93 (MDM) - Modification to not change the input variable type
	 7-Apr-93 (MDM) - Added /FULL_WEEKS option
	12-Apr-93 (MDM) - Modification to allow first week to be missing
	13-Apr-93 (MDM) - Modified to work with the weekly files that have
			  orbit pointers
	15-Apr-93 (MDM) - Expanded to handle PNT, G6D, G7D
			- Expanded to handle the new OBS files
			  (OBD, OSF, OSP, OWH)
			- Removed the "ndatasets-1" restriction, made it
			  "ndatasets" (-1 was a carry over from RD_PNT)
	16-Apr-93 (MDM) - Some debugging statement
	19-Apr-93 (MDM) - Expanded to handle NEL files
	20-Apr-93 (MDM) - Expanded to handle OGB files
	21-Apr-93 (MDM) - Renamed OGB to GOL
			- Added ORB_POINTER so that the FIDs can be passed
			  out for the OBS file reads
	13-May-93 (MDM) - Expanded to handle NTS files
	14-May-93 (MDM) - Removed the special handling of OBS directory
	17-May-93 (MDM) - Minor modification
	20-May-93 (MDM) - Allowed 7-element array external time representation
			  as input.
	12-Jul-93 (MDM) - Use TEMPORARY function some more
	16-Apr-93 (MDM) - Expanded to handle ATR and ATT files
	11-Aug-93 (MDM) - Added IBYT and FILENAME output parameters
			- Modification so that if the input times match, it
			  will increment the end time by one second because
			  otherwise the /FULL_WEEK option will not work.
	 9-Mar-94 (SLF) - GUF (Ulysees Ephemeris) support
	29-Aug-94 (MDM) - Added /QSTOP option
       29-Aug-94 (MDM) - Added /NOBACKUP option to NOT back up a week
                         when start time is within 90 minutes of the first
                         day of the week - it is passed to ANYTIM2WEEKS
       25-Oct-94 (SLF) - allow use of compressed files
        8-Dec-94 (MDM) - Patch for cases where there is no data but there
                         is an orbit pointer entry
	19-Dec-94 (MDM) - Modified to correct a problem caused by the modification
			  to MK_WEEK_FILE which used a different NEWORB_P
			  structure for all weekly files.
	23-Mar-95 (MDM) - Modified to accept new version of FEM structure
       29-aug-95 (SLF) - Add GOES averages (g61/g71/g65/g75)
        1-apr-96 (SLF) -
	29-Aug-96 (RDB) - Added ORB file (orbital position file)
       21-Jul-98 (SLF) - GOES 10
	17-Dec-99 (GLS) - Y2K FIX - Modified test of input1 to accomodate Y2K values
       18-Jan-2001 (SLF) - made loop counter LONG
	19-Jun-2001, Paul Hick; fixed two obscure bugs triggered when specifying
		input times as week/year.


rd_week_file [4] $SSW/yohkoh/gen/idl/ref_access/rd_week_file.pro
[Previous] [Next]
NAME:
	rd_week_file
PURPOSE:
	Read the weekly files which do not have orbit pointers (EVN, FEM, 
	NAR, GEV, and GXT)
CALLING SEQUENCE:
	rd_week_file, roadmap(0),  roadmap(n), 'FEM', fem_data
	rd_week_file, '1-dec-91', '30-dec-91', 'EVN', evn_data
	rd_week_file,      weeks,       years, 'GEV', gev_data
INPUT:
		  INPUT CAN BE OF TWO FORMS

		  (A) Input starting and ending times
	input1	- Starting time in either (i) standard string format,
		  or (ii) a structure with .time and .day fields
		  (the 7 element time vector form is not allowed)
	input2	- Ending time.  If ending time is omitted, the
		  ending time is set to 24 hours after starting time.

		  (B) Input can be a vector of week/year number
	input1	- a vector of the week numbers to read
	input2	- a vector of the year of the week to be read
		  if the weeks vector is all within one year, the
		  year parameter can be a scalar.
	data_type - The type of data to read.  Either EVN, FEM, NAR,
		  GEV or GXT
OUTPUT:
	data	- the data structure containing the data in the files
		  See the structure definition for further information
	orb_pointer - the set of orbit pointers from the files
 CALLS: ***
	ATT_STRUCT [1], ATT_STRUCT [2], EVN_STRUCT, Ex2Int [1], Ex2Int [2], FEM_OLD_STRUCT
	FEM_STRUCT, GBO_STRUCT [1], GBO_STRUCT [2], GET_NBYTES, Int2Ex [1], Int2Ex [2]
	OBS_STRUCT [1], OBS_STRUCT [2], ORB_STRUCT, PNT_STRUCT, Rd_NewOrb_p [1]
	Rd_NewOrb_p [2], Rd_Pointer [1], Rd_Pointer [2], Rd_fHeader [1], Rd_fHeader [2]
	Rd_fHeader [3], SXT_STRUCT, anytim2ex [1], anytim2ex [2], anytim2ints [1]
	anytim2ints [2], anytim2weeks [1], anytim2weeks [2], ex2fid [1], ex2fid [2]
	file_compress [1], file_compress [2], file_list [1], file_list [2]
	file_uncompress [1], file_uncompress [2], fmt_tim [1], fmt_tim [2], gt_day [1]
	gt_day [2], int2secarr [1], int2secarr [2], is_member [1], is_member [2]
	rdwrt [1], rdwrt [2], rdwrt [3], sel_timrange [1], sel_timrange [2]
	str_copy_tags [1], str_copy_tags [2], str_copy_tags [3], str_copy_tags [4]
	wc_where [1], wc_where [2], weekid [1], weekid [2], weekid [3]
 CALLED BY:
	mk_gx, mk_week_file [1], mk_week_file [2], rd_atr, rd_att, rd_fem, rd_gbl, rd_gol
	rd_guf, rd_gxd [1], rd_gxd [2], rd_gxd [3], rd_gxt, rd_obs, rd_orb, rd_pnt, rd_sxg
	weekid [2], ydb_exist [2], yopos [1], yopos [2]
OPTIONAL KEYWORD INPUT:
	indir	- Input directory of data files.  If not present, use
		  $DIR_GEN_xxx logical directory
	vnum	- The file version number to use.  If not present, a call
		  to WEEKID is made and that latest version is used.
	nearest	- If set, then the time span is adjusted a day at a time
		  until it finds some data.  It decrements the starting
		  date by a day and increments the ending date by a day
		  up to 14 days (28 day total span)
	full_weeks - If set, then do not extract the entries that just
		  cover the times covered in the start/end time.  Return
		  all data for weeks covered by the start/end time. This
		  allows a user to have start and end time be the same
		  and still get some data.
       nobackup - If set, then do not back up a week if the start
                  time is within 90 minutes of the first day of the week.
OPTIONAL KEYWORD OUTPUT:
	status	- The read status
		  Some data is available if (status le 0)
			 0 = no error
			 1 = cannot find the file
			 2 = cannot find data in the time period
			99 = cannot recognize the data_type (prefix)
			-1 = found data, but had to go outside of the requested
			     period (only true if /NEAREST is used).  
	ibyt	- The byte position within the file where the data was extracted
	filename- The name of the file which was read
RESTRICTIONS:
	Assumes that all files have the same data structure version.
HISTORY:
	Written 5-Apr-93 by M.Morrison
	 6-Apr-93 (MDM) - Modification to not change the input variable type
	 7-Apr-93 (MDM) - Added /FULL_WEEKS option
	12-Apr-93 (MDM) - Modification to allow first week to be missing
	13-Apr-93 (MDM) - Modified to work with the weekly files that have
			  orbit pointers
	15-Apr-93 (MDM) - Expanded to handle PNT, G6D, G7D
			- Expanded to handle the new OBS files 
			  (OBD, OSF, OSP, OWH)
			- Removed the "ndatasets-1" restriction, made it 
			  "ndatasets" (-1 was a carry over from RD_PNT)
	16-Apr-93 (MDM) - Some debugging statement
	19-Apr-93 (MDM) - Expanded to handle NEL files
	20-Apr-93 (MDM) - Expanded to handle OGB files
	21-Apr-93 (MDM) - Renamed OGB to GOL
			- Added ORB_POINTER so that the FIDs can be passed
			  out for the OBS file reads
	13-May-93 (MDM) - Expanded to handle NTS files
	14-May-93 (MDM) - Removed the special handling of OBS directory
	17-May-93 (MDM) - Minor modification
	20-May-93 (MDM) - Allowed 7-element array external time representation
			  as input.
	12-Jul-93 (MDM) - Use TEMPORARY function some more
	16-Apr-93 (MDM) - Expanded to handle ATR and ATT files
	11-Aug-93 (MDM) - Added IBYT and FILENAME output parameters
			- Modification so that if the input times match, it
			  will increment the end time by one second because
			  otherwise the /FULL_WEEK option will not work.
	 9-Mar-94 (SLF) - GUF (Ulysees Ephemeris) support
	29-Aug-94 (MDM) - Added /QSTOP option
       29-Aug-94 (MDM) - Added /NOBACKUP option to NOT back up a week
                         when start time is within 90 minutes of the first
                         day of the week - it is passed to ANYTIM2WEEKS
       25-Oct-94 (SLF) - allow use of compressed files
        8-Dec-94 (MDM) - Patch for cases where there is no data but there
                         is an orbit pointer entry
	19-Dec-94 (MDM) - Modified to correct a problem caused by the modification
			  to MK_WEEK_FILE which used a different NEWORB_P
			  structure for all weekly files.
	23-Mar-95 (MDM) - Modified to accept new version of FEM structure
       29-aug-95 (SLF) - Add GOES averages (g61/g71/g65/g75)
        1-apr-96 (SLF) - 
	29-Aug-96 (RDB) - Added ORB file (orbital position file)


rd_xbd $SSW/yohkoh/gen/idl/tape/rd_xbd.pro
[Previous] [Next]
   Name: rd_xbd
 
   Purpose: read highest version of all tape binary directory files (xbd)
	     return array of structures (1/file=1/week)

   Calling Sequence: xbdinfo=rd_xbd()

 CALLS: ***
	Rd_TapDir, str_concat [1], str_concat [2], weekfiles
 CALLED BY:
	revchk
   History: slf, 26-Oct-92


RD_XDA [1] $SSW/yohkoh/gen/idl/atest/rd_xda.pro
[Previous] [Next]
NAME:
	RD_XDA
PURPOSE:
	Read and extract data from any of the Yohkoh data files 
	(SDA, BDA, WDA, HDA, ADA, or CBA).  
CALLING SEQUENCE:
	Rd_XDA, infil, dset_arr, index, data, roadmap
	Rd_XDA, infil, dset_arr, index, data
	rd_xda, infil, dset_arr, index, data, roadmap, dset_str=dset_arr
	Rd_XDA, infil, dset_arr, index, /nodata
INPUT:
	infil	- input file specification - it can be a vector
		  (WARNING - do not mix and match FFI and PFI)
	dset_arr: vector of dataset numbers to extract (indices vector)
               * "dset_arr" can be
                     1. An indicie vector ("SS") from a search of the roadmap
			 of ALL of the files in "infil".
                     2. a structure with fields ".dset" and ".ifil".
                        ".dset" is the dataset number WITHIN THE FILE, and
                        ".ifil" is the index of the filename within the
                        infil array.  The structure is "N" elements long
                        where "N" is the total number of datasets to extract.
		* The order that the images are placed in the output 
		  variable "data" is the same order that they 
		  appear in "dset_arr"
               * If "-1" is passed, the whole file is read
                 and the dset_arr returned is the "indgen(ndset)"
 CALLS: ***
	HIS_EXIST, RD_ADA_DATA, RD_BDA_DATA, RD_BDA_DP, RD_BSC_DATA, RD_CBA_DATA
	RD_HDA_DATA, RD_HXA, RD_HXI_DATA, RD_INDEX, RD_SDA_DATA [1], RD_SDA_DATA [2]
	RD_STR_DATA, RD_WDA_DATA, Rd_Pointer [1], Rd_Pointer [2], Rd_Roadmap [2]
	Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3], WBS_SWAP, get_index_ver, gt_corner
	gt_res, gt_shape, his_index, mk_dset_str [1], mk_dset_str [2], rd_roadmap [1]
	rdwrt [1], rdwrt [2], rdwrt [3], str_copy_tags [1], str_copy_tags [2]
	str_copy_tags [3], str_copy_tags [4]
 CALLED BY:
	Check the ATT database vs the SXC limb fit database to look for bad
	FIX_SFD, GET_SUBARR2, GET_TRACUBE, GLITCH_TRACKER, HXT_AUTOIMG, HXT_CAL_FIX [1]
	HXT_CAL_FIX [2], LASTSFD_DIFF, LATEST_SFDS_GIF, MK_SSX, NEUPERT_PLOT
	QUICKDARK [2], QUICKSTRAY [2], RD_SDA [1], READ_HXT_CAL, RECONCILE_SFD_INFIL
	SFD_PHOT, SXT_HYST, SYNOP_3_ROTS, TV_SYNOP, WL_CUBE_II, comp_sda, daily_forecast [2]
	disp_synop, ffi_prep, fort2hxi [1], fort2hxi [2], get_dc_image [2]
	get_dc_image [3], get_dc_warm, get_epoch_sfcs [1], get_epoch_sfcs [2]
	get_leak_image [1], get_leak_image [2], get_leak_image [3], get_ssc_best
	get_sxa, go_hxt_hk_temps, go_lasdisk golaserdisk, go_lasdisk2 golaserdisk
	hxt_impulsivness, mk_desat, mk_sd2, mk_sdc [2], mk_sdc [3], mk_sdc [4], mk_sdl, mk_sdm
	mk_sdmi, mk_sfd [1], mk_sfd [2], mk_sfd [3], mk_sfd [4], mk_sff_pair [1]
	mk_sff_pair [2], mk_sl [1], mk_sl [2], mk_sot, mk_ssc [1], mk_ssc [2], mk_ssl
	mk_strip_file, mk_sxc, mk_sxh, mk_sxl, multi_hda2hxi, rd_bsc, rd_hxtcal, rd_sxa, rd_sxc
	rd_sxl, rd_sxs_pha [1], rd_sxs_pha [2], rd_wbs_pha [1], rd_wbs_pha [2]
	rd_xda_same, read_yohkoh_4_spex [1], read_yohkoh_4_spex [2], reget_dc_image
	rt_sxtdt, sda2fits, sel_dc_image [1], sel_dc_image [2], sel_dc_image [3]
	ssc_scan2, ssw_fov_context, sxl_analysis, sxt_his2dbase, sxt_mauna, sxt_prep [1]
	sxt_prep [2], sxt_prep [3], sxt_ssc2file, sxt_ssc2sss, termlite, video_test
	wl_process, wrt1orbit [1], wrt1orbit [2], yo_mkos1_dbase, yo_sethisflags
OPTIONAL KEYWORD INPUT:
	nodata  : If present, only the index is read
	start_end: Optionally read only a portion of the image.
		  For SXT:	START_END is a 2-element array specifying 
				the absolute FRE IDL coordinates of the
				start and the number of lines to read.
				It reads full strips (all columns)
OUTPUT:
	index	: data-index logical record (one for each 
		  image requested)
	data	: 2D or 3D image array
	extra	: Only applicable for BCS and ATT files.  If the call
		  includes a variable name here, then:
			For BCS, the DP_SYNC records are returned
			For ATT, the HXA_SCAN records are returned
OPTIONAL OUTPUT:
	roadmap	: summary of data-index logical record, note
		  all roadmaps records in the file are returned.
		  In the case where "infil" is an array, roadmap
		  is the concatenated roadmap for all files that
		  are being read for the particular extraction.
OPTIONAL KEYWORD OUTPUT:
       filidx  : a vector the same length as the roadmap
                 with the index of the file associated with that entry
                 (ie: 0,0,0,0,1,1,1,1,2,2,2,2,...)
	dset_str: the structure form of the requested datasets 
		  passed in with "dset_arr".  If user passes in
		  a simple vector ("SS"), "dset_str" is the structure
		  form of the output.
EXAMPLES:
	rd_xda, filename, indgen(10), index, data, roadmap
	returns 1st 10 images in file=filename
RESTRICION:
	CAUTION: If the filename list is long and RD_XDA is going to
	be called many times getting only a small number of data sets,
	then it is recommended to use the structure option for "dset_arr"
	(call MK_DSET_STR externally) because RD_FHEADER is called for
	all files each time RD_XDA is called when not using the 
	structure option for "dset_arr".  

	Also, if RD_XDA is going to be called many times with the same
	"infil" is is good to use the roadmap parameter.  Since the
	roadmap will match the previous read made by RD_ROADMAP, it
	will not be read again and this will save time
HISTORY:
	written by Mons Morrison, Fall 90.
	11-Nov-91 MDM - Added option to not read the data
	12-Nov-91 MDM - added the option to read the whole
			file by passing a -1
	 7-Dec-91 MDM - added option to pass a vector of filenames
			as well as the "filidx" parameter
	19-Dec-91 MDM - Changed "roadmap" reading to only read the
			files that are being extracted from.
	10-Jan-92 MDM - Moved "idset" increment command outside of
			the read data option so that the /nodata
			option would work properly (fixed bug)
	10-Jan-91 MDM - Allowed user to pass "-1" for datasets with
			an array of file names.
	28-Feb-92 MDM - Changed calling sequence to allow "dset_arr"
			to be a simple integer array ("SS") or a structure
			with .DSET and .IFIL.  "SS" option can be used 
			even if infil is an array (previously restricted
			to turn it into a structure in external routine)
			Uses MK_DSET_STR internally.
			Also added "dset_str" optional output capability
	 6-Mar-92 MDM - Adjusted the documentation header some
       19-Mar-92 MDM - Changed not to use the "roadmap2" method of getting
                       the byte offset.  Instead, uses the full roadmap.
                       This is to speed up the reading if reading the same
                       file multiple times.
                       Also, changed call to RD_INDEX to pass the byte offset
                       so it does not have to read RD_ROADMAP
	20-Mar-92 MDM - Changed so output structure version is not updated if
			the different structure is switching to an OLDER version
	21-Mar-92 (MDM) -------------------------------------------------------
			* Changed from several routines (RD_SDA, RD_BDA, RD_WDA, 
			  RD_HDA, RD_ADA, and RD_CBA) to be one main driver and
			  several specialized data extraction routines.
			* Also allowed the data to be extracted in any order
			  but to do this, the original implementation where 
			  the routines only called RD_ROADMAP with the files
			  that were to have data extract was removed.  This 
			  should be ok since RD_ROADMAP now avoids reading the
			  roadmap if the same files are specified two times in
			  a row.
	27-Jul-92 (MDM) - Added HXI data extraction capability
       23-Oct-92 (MDM) - Use STR_COPY_TAGS instead of STR_COPY
	13-Nov-92 (MDM) - Added BSC data extraction capability
	19-Apr-93 (MDM) - Added SXL data extraction capability
	12-Jul-93 (MDM) - Expanded to be able to extract SXT secondary database
			  files: (SDL, SLD, SLS, SOT, SXC, SXL)
	11-Oct-93 (MDM) - Expanded to handle SXA
	 4-Jan-94 (MDM) - Big changes with the index reading (because of 
			  SXT .HIS records)
			- Modified to set /NODATA automatically if the data
			  variable is not included in the RD_XDA call
			- Added /QSTOP
	28-Jul-94 (MDM) - Made the loop variable INTEGER*4 so that over
			  32,000 datasets can be read.
	30-Nov-94 (MDM) - Modified to add START_END option (to read a portion
			  of the image)
	29-Mar-95 (MDM) - Put the 30-Nov-94 modifications online
			- SXT compression data portion added to RD_SDA_DATA
       11-May-98 (SLF) - add /CLEAR_COMPRESS keyword and function
	25-May-01 (LWA) - Changed one "for" loop index to longword.


RD_XDA [2] $SSW/yohkoh/gen/idl/ref_access/rd_xda.pro
[Previous] [Next]
NAME:
	RD_XDA
PURPOSE:
	Read and extract data from any of the Yohkoh data files 
	(SDA, BDA, WDA, HDA, ADA, or CBA).  
CALLING SEQUENCE:
	Rd_XDA, infil, dset_arr, index, data, roadmap
	Rd_XDA, infil, dset_arr, index, data
	rd_xda, infil, dset_arr, index, data, roadmap, dset_str=dset_arr
	Rd_XDA, infil, dset_arr, index, /nodata
INPUT:
	infil	- input file specification - it can be a vector
		  (WARNING - do not mix and match FFI and PFI)
	dset_arr: vector of dataset numbers to extract (indices vector)
               * "dset_arr" can be
                     1. An indicie vector ("SS") from a search of the roadmap
			 of ALL of the files in "infil".
                     2. a structure with fields ".dset" and ".ifil".
                        ".dset" is the dataset number WITHIN THE FILE, and
                        ".ifil" is the index of the filename within the
                        infil array.  The structure is "N" elements long
                        where "N" is the total number of datasets to extract.
		* The order that the images are placed in the output 
		  variable "data" is the same order that they 
		  appear in "dset_arr"
               * If "-1" is passed, the whole file is read
                 and the dset_arr returned is the "indgen(ndset)"
 CALLS: ***
	HIS_EXIST, RD_ADA_DATA, RD_BDA_DATA, RD_BDA_DP, RD_BSC_DATA, RD_CBA_DATA
	RD_HDA_DATA, RD_HXA, RD_HXI_DATA, RD_INDEX, RD_SDA_DATA [1], RD_SDA_DATA [2]
	RD_STR_DATA, RD_WDA_DATA, Rd_Pointer [1], Rd_Pointer [2], Rd_Roadmap [2]
	Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3], WBS_SWAP, get_index_ver, gt_corner
	gt_res, gt_shape, his_index, mk_dset_str [1], mk_dset_str [2], rd_roadmap [1]
	rdwrt [1], rdwrt [2], rdwrt [3], str_copy_tags [1], str_copy_tags [2]
	str_copy_tags [3], str_copy_tags [4]
 CALLED BY:
	Check the ATT database vs the SXC limb fit database to look for bad
	FIX_SFD, GET_SUBARR2, GET_TRACUBE, GLITCH_TRACKER, HXT_AUTOIMG, HXT_CAL_FIX [1]
	HXT_CAL_FIX [2], LASTSFD_DIFF, LATEST_SFDS_GIF, MK_SSX, NEUPERT_PLOT
	QUICKDARK [2], QUICKSTRAY [2], RD_SDA [1], READ_HXT_CAL, RECONCILE_SFD_INFIL
	SFD_PHOT, SXT_HYST, SYNOP_3_ROTS, TV_SYNOP, WL_CUBE_II, comp_sda, daily_forecast [2]
	disp_synop, ffi_prep, fort2hxi [1], fort2hxi [2], get_dc_image [2]
	get_dc_image [3], get_dc_warm, get_epoch_sfcs [1], get_epoch_sfcs [2]
	get_leak_image [1], get_leak_image [2], get_leak_image [3], get_ssc_best
	get_sxa, go_hxt_hk_temps, go_lasdisk golaserdisk, go_lasdisk2 golaserdisk
	hxt_impulsivness, mk_desat, mk_sd2, mk_sdc [2], mk_sdc [3], mk_sdc [4], mk_sdl, mk_sdm
	mk_sdmi, mk_sfd [1], mk_sfd [2], mk_sfd [3], mk_sfd [4], mk_sff_pair [1]
	mk_sff_pair [2], mk_sl [1], mk_sl [2], mk_sot, mk_ssc [1], mk_ssc [2], mk_ssl
	mk_strip_file, mk_sxc, mk_sxh, mk_sxl, multi_hda2hxi, rd_bsc, rd_hxtcal, rd_sxa, rd_sxc
	rd_sxl, rd_sxs_pha [1], rd_sxs_pha [2], rd_wbs_pha [1], rd_wbs_pha [2]
	rd_xda_same, read_yohkoh_4_spex [1], read_yohkoh_4_spex [2], reget_dc_image
	rt_sxtdt, sda2fits, sel_dc_image [1], sel_dc_image [2], sel_dc_image [3]
	ssc_scan2, ssw_fov_context, sxl_analysis, sxt_his2dbase, sxt_mauna, sxt_prep [1]
	sxt_prep [2], sxt_prep [3], sxt_ssc2file, sxt_ssc2sss, termlite, video_test
	wl_process, wrt1orbit [1], wrt1orbit [2], yo_mkos1_dbase, yo_sethisflags
OPTIONAL KEYWORD INPUT:
	nodata  : If present, only the index is read
	start_end: Optionally read only a portion of the image.
		  For SXT:	START_END is a 2-element array specifying 
				the absolute FRE IDL coordinates of the
				start and the number of lines to read.
				It reads full strips (all columns)
OUTPUT:
	index	: data-index logical record (one for each 
		  image requested)
	data	: 2D or 3D image array
	extra	: Only applicable for BCS and ATT files.  If the call
		  includes a variable name here, then:
			For BCS, the DP_SYNC records are returned
			For ATT, the HXA_SCAN records are returned
OPTIONAL OUTPUT:
	roadmap	: summary of data-index logical record, note
		  all roadmaps records in the file are returned.
		  In the case where "infil" is an array, roadmap
		  is the concatenated roadmap for all files that
		  are being read for the particular extraction.
OPTIONAL KEYWORD OUTPUT:
       filidx  : a vector the same length as the roadmap
                 with the index of the file associated with that entry
                 (ie: 0,0,0,0,1,1,1,1,2,2,2,2,...)
	dset_str: the structure form of the requested datasets 
		  passed in with "dset_arr".  If user passes in
		  a simple vector ("SS"), "dset_str" is the structure
		  form of the output.
EXAMPLES:
	rd_xda, filename, indgen(10), index, data, roadmap
	returns 1st 10 images in file=filename
RESTRICION:
	CAUTION: If the filename list is long and RD_XDA is going to
	be called many times getting only a small number of data sets,
	then it is recommended to use the structure option for "dset_arr"
	(call MK_DSET_STR externally) because RD_FHEADER is called for
	all files each time RD_XDA is called when not using the 
	structure option for "dset_arr".  

	Also, if RD_XDA is going to be called many times with the same
	"infil" is is good to use the roadmap parameter.  Since the
	roadmap will match the previous read made by RD_ROADMAP, it
	will not be read again and this will save time
HISTORY:
	written by Mons Morrison, Fall 90.
	11-Nov-91 MDM - Added option to not read the data
	12-Nov-91 MDM - added the option to read the whole
			file by passing a -1
	 7-Dec-91 MDM - added option to pass a vector of filenames
			as well as the "filidx" parameter
	19-Dec-91 MDM - Changed "roadmap" reading to only read the
			files that are being extracted from.
	10-Jan-92 MDM - Moved "idset" increment command outside of
			the read data option so that the /nodata
			option would work properly (fixed bug)
	10-Jan-91 MDM - Allowed user to pass "-1" for datasets with
			an array of file names.
	28-Feb-92 MDM - Changed calling sequence to allow "dset_arr"
			to be a simple integer array ("SS") or a structure
			with .DSET and .IFIL.  "SS" option can be used 
			even if infil is an array (previously restricted
			to turn it into a structure in external routine)
			Uses MK_DSET_STR internally.
			Also added "dset_str" optional output capability
	 6-Mar-92 MDM - Adjusted the documentation header some
       19-Mar-92 MDM - Changed not to use the "roadmap2" method of getting
                       the byte offset.  Instead, uses the full roadmap.
                       This is to speed up the reading if reading the same
                       file multiple times.
                       Also, changed call to RD_INDEX to pass the byte offset
                       so it does not have to read RD_ROADMAP
	20-Mar-92 MDM - Changed so output structure version is not updated if
			the different structure is switching to an OLDER version
	21-Mar-92 (MDM) -------------------------------------------------------
			* Changed from several routines (RD_SDA, RD_BDA, RD_WDA, 
			  RD_HDA, RD_ADA, and RD_CBA) to be one main driver and
			  several specialized data extraction routines.
			* Also allowed the data to be extracted in any order
			  but to do this, the original implementation where 
			  the routines only called RD_ROADMAP with the files
			  that were to have data extract was removed.  This 
			  should be ok since RD_ROADMAP now avoids reading the
			  roadmap if the same files are specified two times in
			  a row.
	27-Jul-92 (MDM) - Added HXI data extraction capability
       23-Oct-92 (MDM) - Use STR_COPY_TAGS instead of STR_COPY
	13-Nov-92 (MDM) - Added BSC data extraction capability
	19-Apr-93 (MDM) - Added SXL data extraction capability
	12-Jul-93 (MDM) - Expanded to be able to extract SXT secondary database
			  files: (SDL, SLD, SLS, SOT, SXC, SXL)
	11-Oct-93 (MDM) - Expanded to handle SXA
	 4-Jan-94 (MDM) - Big changes with the index reading (because of 
			  SXT .HIS records)
			- Modified to set /NODATA automatically if the data
			  variable is not included in the RD_XDA call
			- Added /QSTOP
	28-Jul-94 (MDM) - Made the loop variable INTEGER*4 so that over
			  32,000 datasets can be read.
	30-Nov-94 (MDM) - Modified to add START_END option (to read a portion
			  of the image)
	29-Mar-95 (MDM) - Put the 30-Nov-94 modifications online
			- SXT compression data portion added to RD_SDA_DATA


rd_xda_same $SSW/yohkoh/ucon/idl/bentley/rd_xda_same.pro
[Previous] [Next]
 NAME:
	rd_xda_same
 PURPOSE:
	Reads index/data records from another file type that match the
	times given in the supplied index structure of the current file
 CATEGORY:
 CALLING SEQUENCE:
	rd_xda_same,fileid,index,ftype_out,index_out [,data_out]
 INPUTS:
	fileid		file id current file
	index		index of data extracted from current file
	ftype_out	string of file type, ('bda', 'hda', etc)
 OPTIONAL INPUT PARAMETERS:
	path		path to be used in search [def = data_paths+currdir]
 KEYWORD PARAMETERS:
	roadmap		If present, returned array is roadmap
	nodata		If present and non-zero, does not read data
 OUTPUTS:
	index_out	index structure of selected records from required file
 OPTIONAL OUTPUT PARAMETERS:
	data_out	data matching index_out; not read if /nodata used
 CALLS: ***
	DATA_PATHS, RD_XDA [1], RD_XDA [2], Rd_Roadmap [2], curdir [1], curdir [2]
	file_list [1], file_list [2], fmt_tim [1], fmt_tim [2], rd_roadmap [1]
	tim2dset [1], tim2dset [2]
 COMMON BLOCKS:
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:
	rdb  10-mar-93
	rdb  11-mar-93	Changed to use rd_xda instead of case statement
			other improvments...
	RDB  20-Oct-93	Corrected problem where only read nearest records
			Now reads all between lowest and highest
	RDB  27-jan-94	Added 'nodata' and 'roadmap' keywords


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

   Purpose: read / extract data from ydb tape

   Calling Sequence:
      rd_ydbtap [dev=NN]	; default is drive 0, NN={1,2,3...}

   Input Parameters:
      patttern - NOT YET IMPLEMENTED string (including wild cards)

   History:
      28-Jan-1994 (SLF) 
	5-Feb-1994 (SLF) rename rd_ydbtape to rd_ydbtap
       9-Jun-1994 (SLF) read dir from tape via rd_ydbtapdir.pro
      14-Jun-1994 (SLF) script file or spawn now option
      15-Jun-1994 (SLF) minor mods
      29-Jun-1994 (SLF) add OVERRIDE switch / call ydbtapsets to verify 
      30-Jun-1994 (SLF) use mtcmd for mt command generation

 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], RD_YDBTAPDIR
	UNIQ [1], UNIQ [2], UNIQ [3], concat_dir [4], def_tapd [1], def_tapd [2]
	def_tapd [3], deriv_arr [1], deriv_arr [2], file_append [1], file_append [2]
	file_exist [1], file_exist [3], get_logenv [1], get_logenv [2], get_ydbhelp [1]
	get_ydbhelp [2], mail [1], mail [2], mtcmd [1], mtcmd [2], rd_tfile [1]
	rd_tfile [2], str_replace [1], str_replace [2], strjustify, strsplit, tbeep [1]
	tbeep [2], tbeep [3], uniqo [1], uniqo [2], where_arr [1], where_arr [2]
	wmenu_sel [1], wmenu_sel [2], ydb_pre2dir [1], ydb_pre2dir [2], ydbtapsets
   Restrictions: UNIX only for now (on VMS, use tar utility)


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

   Purpose: read directory file from ydb tape

 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], POPD, PUSHD, RD_YDBTAPDIR, break_file [4], concat_dir [4]
	curdir [1], curdir [2], def_tapd [1], def_tapd [2], def_tapd [3], mtcmd [1]
	mtcmd [2], rd_tfile [1], rd_tfile [2], uniqo [1], uniqo [2]
   Restrictions: proto, UNIX only 

   History:
      25-Jan-1994 (SLF) - ydb tape 
      31-Jan-1994 (SLF) - fix directory file via tar (proto-beta-kludge)
      30-Jun-1994 (SLF) - use mtcmd.pro for machine dependent rewind


RDFILE [2] $SSW/yohkoh/gen/idl/util/rdfile.pro
[Previous] [Next]
 NAME:
	RDFILE
 PURPOSE:
	Open and read an ASCII file. Read N_column columns 
	and skip first N_SKIP records. 

 CALLING SEQUENCE:
	Data = RDFILE(0)		; Will prompt for file name
	Data = RDFILE(NAME)		; Will prompt for N_COLUMN,N_SKIP
	Data = RDFILE(NAME,N_COLUMN)	; No prompts, no records skipped
	Data = RDFILE(NAME,N_COLUMN,N_SKIP)
	Data = RDFILE(NAME,N_COLUMN,N_SKIP,N_READ) ;All records are read if
						   ; N_READ is omitted
 INPUTS:
	No required inputs
 OPTIONAL INPUT PARAMETERS:
	NAME	  String variable containing input file name.
	N_COLUMN  Number of columns to read.
	N_SKIP	  Number of records at beginning of file to skip.
	N_READ	  Number of records to read after any skipped records.

 KEYWORDS:
	DOUBLE	  If true, i.e. 1, then data is read in double precision.
	HEADER	  If present, returns string array with N_SKIP records.

 OUTPUTS:
	Two dimensional data array returned: DATA(i,j)
		where 	i = 0:N_column - 1
			j = 0:Number of records - 1

 CALLED BY:
	ACRIM_READER, HXT_EFF, HXT_POSSI4, HXT_POWL, HXT_PROB, NOV93_ECLIPSE, NOV_ECLIPSE
	SXS_EFF, ULYSSES_FEM, do_ads, may_eclipse
 COMMON BLOCKS:
	None.

 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	NAME	must be a scalar string variable.
	N_COLUMN, N_SKIP, and N_READ must be scalar byte, integer or real.

 PROCEDURE:

	If no arguments are present, the routine will prompt for
		NAME (filename), N_COLUMN and N_SKIP.
	If only the file name is present, routine will prompt for 
		N_COLUMN and N_SKIP.
	If NAME and N_COLUMN are present, but not N_SKIP, N_SKIP will
		be set to 0.
	If N_READ is present, then N_READ records will be read in, otherwise
		all records will be read.  (N_READ does not include skipped
               records.)  
	If keyword DOUBLE is true, i.e. 1, then data is read in double
		precision.  Syntax in procedure call is ,/DOUBLE or ,DOUBLE=1 .
	If keyword HEADER is present, will return N_SKIP header lines.

 MODIFICATION HISTORY:
	Sep, 1985,	Written, J.R. Lemen, MSSL
	Dec, 1990,	Modified, J.R. Lemen, LPARL, to make compatible with V2.
	Feb, 1991,	Modified, E.S. Claflin, LPARL, N_READ parameter and
			  DOUBLE keyword added.
 	Mar, 1991,	Modified, J.R. Lemen, LPARL, to add HEADER keyword


RdObsDat $SSW/yohkoh/gen/idl/dbase/rdobsdat.pro
[Previous] [Next]
	NAME: 
		RdObsDat
	PURPOSE:
		Read and return observing log data for the requested
		times and key values.  Note: the procedure buffers 
		the data requests into several reads and searchs 
		(if requested).  Each buffered read is appended to
		the prior read until the full request is satisfied.
	CALLING SEQUENCE:
		RdObsDat, fileNa, w, logRecPtr1, logRecPtr2, ukey, 
		[key=key, maxLogRec=maxLogRec, fid=fid, sxtp=sxtp, 
		sxtf=sxtf, hxt=hxt, wbs=wbs, bcs=bcs]
	INPUT:
		fileNa	observing log file name
		which	reserved parameter for control of low-level
			access routines.
		logRecPtr1	Start Rec in units of 32-byte offset 
		logRecPtr2	End Record in units of 32-byte offset
		ukey		logical flag for presence of Key
	Keyword/INPUT:
		key 		list of search keys
		maxLogRec	buffer size for reading the observing
				log in units of 32-byte logical records.
	Keyword/OUTPUT:
		fid	file identification corresponding to the time 
			tag on the data records.
		sxtp	data-index for partial frame image vector
		sxtf	data-index for Full frame image vector
		hxt	data-index for HXT data
		wbs	data-index for WBS data
		bcs	data-index for BCS data
 CALLS: ***
	CreHXTWBS, GET_NBYTES, KeySea [1], KeySea [2], Split_w_h, rd_obs
 CALLED BY:
	GetObsDat
	HISTORY:
		written 14-June-91 by GAL
		updated 12-Aug-91, for updated Rd_Obs routine.
		updated 13-Aug-91, for w_h and bcs parameters
		updated 20-Aug-91, for hxt and wbs as seperate items
		updated 16-Oct-91 (MDM) to check to see if the output
			vectors are defined by looking at how many
			bytes the variable uses instead of using
			n_elements so that it can be "re-initialized"
			by setting it to a byte scaler
		updated 22-Oct-91, GAL to call KeySea function instead of
			KeySearch the procedure.


RDPIX2 $SSW/yohkoh/ucon/idl/naoj_nkr/rdpix2.pro
[Previous] [Next]
 NAME:
	RDPIX2
 PURPOSE:
	Display the X, Y, and pixel value of the cursor
 CATEGORY:
	Image display
 CALLING SEQUENCE:
	RDPIX, Image [, X0, Y0]
 INPUTS:
	Image = Array containing values that are displayed.  May be
	  any type.  Rather than pixel values being read from the display
	  they are taken from this parameter, avoiding scaling difficulties.
 OPTIONAL INPUT PARAMETERS:
	X0, Y0 = Optional location of lower left corner of image area on
	  screen.
 OUTPUTS:
	None.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	The X, Y and value of pixel under the cursor are constantly 
	displayed.

	Pressing left or center mouse button, makes a new line of output,
		saving the old.
	Pressing right mouse button, exits the procedure.

 RESTRICTIONS:
	None.
 PROCEDURE:
	Straightforward.
 MODIFICATION HISTORY:
	DMS, Dec, 1987.


rdspc2_data $SSW/yohkoh/bcs/idl/bsd/rdspc2_data.pro
[Previous] [Next]
 IDL v.2

 For a required channel CHAN and a required spectrum number SPCNUM, 
 reads the roadmap, fit results and the fitted theory spectrum from
 SPC file by direct access method. 
 On each call SPC file is opened and closed

input:
     file = ' '         ; filename to be read
     chan = long(0)     ; required channel number of the spectrum to be read
     spcnum = long(0)   ; required number of the spectrum to be read
     pointr = lonarr(4) ; pointers to records containing roadmaps for records
                          for each channel. RDSPC_HEAD should be run 
                          first to get it


output:
	time                  time of the spectrum (?)
	npts                  number of bins in the spectrm (?)
	spectrum              total fitted spectrum (?)
	velfit		      velocity component if velfit > 0  (?)
	primary		      primary component if velfit > 0    (?)
	found 	              error flag ? 10 if sucessful -10 if not (?)

 Subroutines required:
 RDSPC_HEAD must be run once before calling RDSPC_DATA

 Written:
     rdbsd2_data.pro atp.
     rewritten as rdspc2_data AF, May-1991
     nrecs shift corrected    AF, Nov 1991


rdspc2_head $SSW/yohkoh/bcs/idl/bsd/rdspc2_head.pro
[Previous] [Next]
 IDL v. 2

 Purpose:
 
 read the first seven records in the SPC file with the theory spectra
 File is openned for sequential reading, then closed. 

input:
	file = name of SPC file to be read 
output:

 numbsd = total number of raw spectra in BSD file
 numthe = total number of theory spectra in each channel
 firchn = spectrum number of the first theory spectrum in each 
          channel
 pointr = pointer to the roadmap (i.e. record number where the 
          roadmap for each channel begins
 spcnam = name of the SPC file
 bpcnam =  name of BPC file used to run BSDFIT 
 version = text with version number etc.
 balcal =  ionization balance calculation used
 
 Written:
    AF, May-1991


RdTap [1] $SSW/yohkoh/gen/idl/atest/rdtap.pro
[Previous] [Next]
	NAME:
		RdTap
	PURPOSE:
		Read ARCHIVE tape and write the requested files to
		the default directory.
	CALLING SEQUENCE:
		rdtap, dev [,files, prefix=prefix,fileid=fileid,week=week,
			dir=dir, range=range, software=software, 
			swpos=swpos, dpath=dpath, wpath=wpath]
	INPUT:
		dev	device name of the tape unit.
		file 	a list of requested file names.
		prefix	a list of file prefixes.
		fileID	a list of fileIDs or archive files.
		week	list of weekly files to restore (eg. obs, pnt)
		dir	flag present to create both TAPE directory files
			on default dir or specified dir.  If specified
			dir = log then xad=>$dir_gen_xad and $xbd=>dir_gen_xbd
		range	flag present to create range of files 
		software flag present to restore software tree
		swpos	flag to position tape to software tar files & ret
		dpath	dir specification for restored data files
		wpath	dir specification for restored weekly files
		put_ydb	if present will restore requested weekly files to
			the appropriate $DIR_GEN_* directories.
		script	generate a script file to do the tape extraction
		alpha	generate a script file to do the tape extraction
			with alpha specific commands.
			(note this might be better to call it machine_type)
		edit	switch to allow user to edit (vi) the script
			before execution
		noexec	switch to allow user to start the execution of the
			script, otherwise the script is started automatically.
		notape	force rdtap to read an online tape-dir file
			instead reading it off tape.
		unload	switch to request a tape unload command be placed
			in the script.  Default is no-unload and rewind.
		rdtap_script switch to request a string-array with commands
			needed to dump the tape.

 CALLS: ***
	ARR2STR [1], Arr2Str [2], GetRng, PREFIXCK, RdTapeDoc, Rd_TapDir, STR2ARR [1]
	STR2ARR [2], UNIQ [1], UNIQ [2], UNIQ [3], WrtDat3, ck, def_tapd [1], def_tapd [2]
	def_tapd [3], file_list [1], file_list [2], input [1], input [2], move_weekly, mt
	mtcmd [1], mtcmd [2], prstr [1], prstr [2], sw_tape, wmenu_sel [1], wmenu_sel [2]
	wrttapdir, wrtwkdat
 CALLED BY:
	go_mk_cd, go_rdtap [1], mk_mo_disk, mk_mo_disk2, mo_patch, mo_tap_dump
	prep_week [1], prep_week [2]
	HISTORY:
		written Nov-91, gal
		update 27-Feb-92 (ver2.0) for new weekly files archive 
			structure, creates both types of tape dir. files 
			with /dir.
		2-Mar-92 update to prefixck w/o obs log file.
		6-Mar-92 whole-Lot-A-Changes
		9-Mar-92, see update to rd_tapdir, and opens binary
		tape-dir file w/block .
		10-Mar-92, added swpos keyword, and device "dev" to 
			sw_tape function calls.
		3-Apr-92, added path options to restores
		14-apr-92, updated online documentation
		23-Apr-92, corrected check of requested file against
			the tape contents.
		27-Apr-92, minor bug fix to return when no files are
			requested.
		26-May-92, added mount switch to mt /open command for
			vms machines
		9-Feb-93, modified error reporting to be more specific
			of the type of IO error encountered and added
			a "err_recover.dat" file for automated recovery.
		26-Apr-93, added put_ydb switch to restore weeklys to
			database directories.
                9-Jul-94 (SLF) - added files=files(sort(files)) 
		19-Apr-95 (GAL) - added script and alpha switches, and
					notape
		 8-May-95 (GAL) - added unload switch and made no-unload
			the default, and a minor change to the way
			scripts are made.
		 8-Jun-95 (GAL) - Replaced rdtap v 2.7 with v. 3.1
		21-Aug-95 (GAL) - added rdtap_script return option.
		23-Oct-96 (GAL) - change the routine so that the 
				rdtap_script is always available.


RdTap [2] $SSW/yohkoh/gen/idl/tape/rdtap.pro
[Previous] [Next]
	NAME:
		RdTap
	PURPOSE:
		Read ARCHIVE tape and write the requested files to
		the default directory.
	CALLING SEQUENCE:
		rdtap, dev [,files, prefix=prefix,fileid=fileid,week=week,
			dir=dir, range=range, software=software, 
			swpos=swpos, dpath=dpath, wpath=wpath]
	INPUT:
		dev	device name of the tape unit.
		file 	a list of requested file names.
		prefix	a list of file prefixes.
		fileID	a list of fileIDs or archive files.
		week	list of weekly files to restore (eg. obs, pnt)
		dir	flag present to create both TAPE directory files
			on default dir or specified dir.  If specified
			dir = log then xad=>$dir_gen_xad and $xbd=>dir_gen_xbd
		range	flag present to create range of files 
		software flag present to restore software tree
		swpos	flag to position tape to software tar files & ret
		dpath	dir specification for restored data files
		wpath	dir specification for restored weekly files
		put_ydb	if present will restore requested weekly files to
			the appropriate $DIR_GEN_* directories.
		script	generate a script file to do the tape extraction
		alpha	generate a script file to do the tape extraction
			with alpha specific commands.
			(note this might be better to call it machine_type)
		edit	switch to allow user to edit (vi) the script
			before execution
		noexec	switch to allow user to start the execution of the
			script, otherwise the script is started automatically.
		notape	force rdtap to read an online tape-dir file
			instead reading it off tape.
		unload	switch to request a tape unload command be placed
			in the script.  Default is no-unload and rewind.
		rdtap_script switch to request a string-array with commands
			needed to dump the tape.

 CALLS: ***
	ARR2STR [1], Arr2Str [2], GetRng, PREFIXCK, RdTapeDoc, Rd_TapDir, STR2ARR [1]
	STR2ARR [2], UNIQ [1], UNIQ [2], UNIQ [3], WrtDat3, ck, def_tapd [1], def_tapd [2]
	def_tapd [3], file_list [1], file_list [2], input [1], input [2], move_weekly, mt
	mtcmd [1], mtcmd [2], prstr [1], prstr [2], sw_tape, wmenu_sel [1], wmenu_sel [2]
	wrttapdir, wrtwkdat
 CALLED BY:
	go_mk_cd, go_rdtap [1], mk_mo_disk, mk_mo_disk2, mo_patch, mo_tap_dump
	prep_week [1], prep_week [2]
	HISTORY:
		written Nov-91, gal
		update 27-Feb-92 (ver2.0) for new weekly files archive 
			structure, creates both types of tape dir. files 
			with /dir.
		2-Mar-92 update to prefixck w/o obs log file.
		6-Mar-92 whole-Lot-A-Changes
		9-Mar-92, see update to rd_tapdir, and opens binary
		tape-dir file w/block .
		10-Mar-92, added swpos keyword, and device "dev" to 
			sw_tape function calls.
		3-Apr-92, added path options to restores
		14-apr-92, updated online documentation
		23-Apr-92, corrected check of requested file against
			the tape contents.
		27-Apr-92, minor bug fix to return when no files are
			requested.
		26-May-92, added mount switch to mt /open command for
			vms machines
		9-Feb-93, modified error reporting to be more specific
			of the type of IO error encountered and added
			a "err_recover.dat" file for automated recovery.
		26-Apr-93, added put_ydb switch to restore weeklys to
			database directories.
                9-Jul-94 (SLF) - added files=files(sort(files)) 
		19-Apr-95 (GAL) - added script and alpha switches, and
					notape
		 8-May-95 (GAL) - added unload switch and made no-unload
			the default, and a minor change to the way
			scripts are made.
		 8-Jun-95 (GAL) - Replaced rdtap v 2.7 with v. 3.1
		21-Aug-95 (GAL) - added rdtap_script return option.
		23-Oct-96 (GAL) - change the routine so that the 
				rdtap_script is always available.


RdTap [3] $SSW/yohkoh/gen/idl/tape/rdtap2.pro
[Previous] [Next]
	NAME:
		RdTap
	PURPOSE:
		Read ARCHIVE tape and write the requested files to
		the default directory.
	CALLING SEQUENCE:
		rdtap, dev [,files, prefix=prefix,fileid=fileid,week=week,
			dir=dir, range=range, software=software, 
			swpos=swpos, dpath=dpath, wpath=wpath]
	INPUT:
		dev	device name of the tape unit.
		file 	a list of requested file names.
		prefix	a list of file prefixes.
		fileID	a list of fileIDs or archive files.
		week	list of weekly files to restore (eg. obs, pnt)
		dir	flag present to create both TAPE directory files
			on default dir or specified dir.  If specified
			dir = log then xad=>$dir_gen_xad and $xbd=>dir_gen_xbd
		range	flag present to create range of files 
		software flag present to restore software tree
		swpos	flag to position tape to software tar files & ret
		dpath	dir specification for restored data files
		wpath	dir specification for restored weekly files
		put_ydb	if present will restore requested weekly files to
			the appropriate $DIR_GEN_* directories.
		script	generate a script file to do the tape extraction
		alpha	generate a script file to do the tape extraction
			with alpha specific commands.
			(note this might be better to call it machine_type)
		edit	switch to allow user to edit (vi) the script
			before execution
		noexec	switch to allow user to start the execution of the
			script, otherwise the script is started automatically.
		notape	force rdtap to read an online tape-dir file
			instead reading it off tape.
		unload	switch to request a tape unload command be placed
			in the script.  Default is no-unload and rewind.


 CALLS: ***
	ARR2STR [1], Arr2Str [2], GetRng, PREFIXCK, RDTAP2, RdTapeDoc, Rd_TapDir, STR2ARR [1]
	STR2ARR [2], UNIQ [1], UNIQ [2], UNIQ [3], WrtDat3, ck, def_tapd [1], def_tapd [2]
	def_tapd [3], dont_use_this [1], dont_use_this [2], file_list [1], file_list [2]
	input [1], input [2], move_weekly, mt, mtcmd [1], mtcmd [2], prstr [1], prstr [2]
	sw_tape, wmenu_sel [1], wmenu_sel [2], wrttapdir, wrtwkdat
 CALLED BY:
	go_mk_cd, go_rdtap [1], mk_mo_disk, mk_mo_disk2, mo_patch, mo_tap_dump
	prep_week [1], prep_week [2]
	HISTORY:
		written Nov-91, gal
		update 27-Feb-92 (ver2.0) for new weekly files archive 
			structure, creates both types of tape dir. files 
			with /dir.
		2-Mar-92 update to prefixck w/o obs log file.
		6-Mar-92 whole-Lot-A-Changes
		9-Mar-92, see update to rd_tapdir, and opens binary
		tape-dir file w/block .
		10-Mar-92, added swpos keyword, and device "dev" to 
			sw_tape function calls.
		3-Apr-92, added path options to restores
		14-apr-92, updated online documentation
		23-Apr-92, corrected check of requested file against
			the tape contents.
		27-Apr-92, minor bug fix to return when no files are
			requested.
		26-May-92, added mount switch to mt /open command for
			vms machines
		9-Feb-93, modified error reporting to be more specific
			of the type of IO error encountered and added
			a "err_recover.dat" file for automated recovery.
		26-Apr-93, added put_ydb switch to restore weeklys to
			database directories.
                9-Jul-94 (SLF) - added files=files(sort(files)) 
		19-Apr-95 (GAL) - added script and alpha switches, and
					notape
		 8-May-95 (GAL) - added unload switch and made no-unload
			the default, and a minor change to the way
			scripts are made.


RdTapeDoc $SSW/yohkoh/gen/idl/tape/rdtapedoc.pro
[Previous] [Next]
	NAME:
		RdTapeDoc
	PURPOSE:
		Document for the HOW-TOs of the "rdtape.pro" program.  
 CALLED BY:
	RdTap [1], RdTap [2], RdTap [3]
	HISTORY:
		written '91 by gal
		slf, 21-may-92 - syntax corrections


rdtbl $SSW/yohkoh/ucon/idl/kano/rdtbl.pro
[Previous] [Next]
NAME:
	rdtbl
PURPOSE:
	Call the SXT table and search the longest exposures
	for each X-ray filters.

	<< CAUTION >>
	   Now this procedure is put in /home/flare1/sxt/idlpro.
	   Thus only "sxt1@flare1" uses this directly.
	   Because it uses the reformatted data, please wait
          until the reformat has finished.

CALLING SEQUENCE:
	rdtbl                       ; for The latest SXT table
	rdtbl,893                   ; by  Table Number
	rdtbl,'21-Mar-94 14:00'     ; by  Date/Time
	rdtbl,index                 ; by  Index
	rdtbl,/ffi                  ;     FFI only
	rdtbl,/all,/hc              ;     All SXT table
INPUT:
	itab0  - Table number to display
	               (or)
	         A string time representation. If this value is not
	         present, the present UT-time is used.
OPTIONAL KEYWORD
	ffi    - If present, ENTRY table and FFI tables for both QT-HI
	         and QT-ME are displayed with the list of the longest
	         exposures.
	all    - If present, all of SXT table is called.
	hc     - If present, the resolt is printed out. You can select
	         the printer in KSC or SSOC by menu.
 CALLS: ***
	ADDTIME [1], ADDTIME [2], UNIQ [1], UNIQ [2], UNIQ [3], fmt_tim [1], fmt_tim [2]
	gt_filtb, gtab_comm, gtab_entry, gtab_ffi, gtab_file, gtab_pfi, gtab_roi, syst2ex [1]
	syst2ex [2], syst2ex [3]
HISTORY:
	Written 25-Mar-94 by R.Kano

pro rdtbl,itab0,hc=hc,ffi=ffi,all=all


rdwrt [2] $SSW/yohkoh/gen/idl/atest/rdwrt.pro
[Previous] [Next]
NAME:
	rdwrt
PURPOSE:
	All input and output to the reformatted data files is done
	by this routine.
INPUT:
	code		'W' for write, 'R' for read
	lun		logical unit of file to write to
	ibyt		starting byte to write data to
	rsiz		record size of output file (in bytes)
INPUT/OUTPUT:
	data		data array to read/write
OPTIONAL INPUT:
	qupdate_ibyt	If set, the value "ibyt" is updated to the current 
			position within the file
	qdebug		If set, a debut line is printed
 CALLS: ***
	IS_LENDIAN, dec2sun [1], dec2sun [2], yoh_ieee2vax [1], yoh_ieee2vax [2]
	yoh_vax2ieee [1], yoh_vax2ieee [2]
 CALLED BY:
	RD_ADA, RD_ADA_DATA, RD_BDA [1], RD_BDA_DATA, RD_BDA_DP, RD_BSC_DATA, RD_CBA_DATA
	RD_HDA_DATA, RD_HXA, RD_HXI_DATA, RD_SDA_DATA [1], RD_SDA_DATA [2], RD_STR_DATA
	RD_SXL_DATA, RD_WDA_DATA, RD_XDA [1], RD_XDA [2], Rd_NewOrb_p [1], Rd_NewOrb_p [2]
	Rd_Pointer [1], Rd_Pointer [2], Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3]
	ads_into_att, ads_into_pnt, data_compress [1], data_compress [2]
	data_compress [3], kluge_att, mk_att [1], mk_att [2], mk_evn [1], mk_evn [2]
	mk_fem_file [1], mk_fem_file [2], mk_gbl, mk_gev [1], mk_gev [2], mk_gsn_obs, mk_gx
	mk_nar [1], mk_nar [2], mk_orb_file, mk_pnt, mk_sd2, mk_sdl, mk_sl [1], mk_sl [2]
	mk_sot, mk_ssl, mk_sxc, mk_sxl, mk_week1_file, mk_week_file [1], mk_week_file [2]
	pnt2atr, rd_dsktapdir, rd_gsn, rd_obs_entry, rd_roadmap [1], rd_sdl, rd_sld, rd_sls
	rd_sot, rd_ssl, rd_week_file [1], rd_week_file [2], rd_week_file [3]
	rd_week_file [4], sav_bda, sav_bsc, sav_hxi, sav_sda [1], sav_sda [2], sav_sda [3]
	sxt_patch_att, weekid [2], wrt1cba, wrt1orbit [1], wrt1orbit [2], wrtsxtmap
	ydb_exist [2]
OPTIONAL KEYWORD INPUT:
	quiet		If set, do not print error messages when writing
			does not end of a record boundary
HISTORY:
	Written Jun 1991 by M.Morrison
	19-Oct-91 (MDM) Added option of byte swapping if on Sun system
	 9-Nov-91 (MDM) Made swaping occur always unless it is run on
			a VMS or ULTRIX machine
	12-Dec-91 (MDM) Used "dec2sun" instead of "vax2sun" and "sun2vax"
	21-May-92 (MDM) Modified so that the input variable "data" is not
			changed for the cases where the machine writing the
			data is non-DEC (since it must do byte swapping before
			the write)
	12-Oct-92 (MDM) Removed check to see where pointer was left from
			the last read/write
			Added QUIET option so that funny shaped images
			can be saved with SAV_SDA.
	13-Apr-93 (MDM) Added calls to YOH_IEEE2VAX and YOH_VAX2IEEE to
			convert the REALs when on the VMS machine
	 8-Jun-93 (MDM) Added the capability to override the default which
			is to convert the REAL*4 values from VAX to IEEE
			format before writing, and then back again during
			reading.
	 3-Aug-93 (MDM) Expanded the list of operating systems that do not
			swap bytes to include 'OSF' (and vms and ultrix)
	 9-Sep-95 (ATP) Expanded list of operating systems that do not
			swap bytes to include 'linux' (i386)
       25-May-98 (DMZ) Further expanded noswap list to Windows systems
       15-Jan-00 (DMZ) Added ON_IOERROR check and ERR keyword


rdwrt [3] $SSW/yohkoh/gen/idl/ref_access/rdwrt.pro
[Previous] [Next]
NAME:
	rdwrt
PURPOSE:
	All input and output to the reformatted data files is done
	by this routine.
INPUT:
	code		'W' for write, 'R' for read
	lun		logical unit of file to write to
	ibyt		starting byte to write data to
	rsiz		record size of output file (in bytes)
INPUT/OUTPUT:
	data		data array to read/write
OPTIONAL INPUT:
	qupdate_ibyt	If set, the value "ibyt" is updated to the current 
			position within the file
	qdebug		If set, a debut line is printed
 CALLS: ***
	IS_LENDIAN, dec2sun [1], dec2sun [2], yoh_ieee2vax [1], yoh_ieee2vax [2]
	yoh_vax2ieee [1], yoh_vax2ieee [2]
 CALLED BY:
	RD_ADA, RD_ADA_DATA, RD_BDA [1], RD_BDA_DATA, RD_BDA_DP, RD_BSC_DATA, RD_CBA_DATA
	RD_HDA_DATA, RD_HXA, RD_HXI_DATA, RD_SDA_DATA [1], RD_SDA_DATA [2], RD_STR_DATA
	RD_SXL_DATA, RD_WDA_DATA, RD_XDA [1], RD_XDA [2], Rd_NewOrb_p [1], Rd_NewOrb_p [2]
	Rd_Pointer [1], Rd_Pointer [2], Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3]
	ads_into_att, ads_into_pnt, data_compress [1], data_compress [2]
	data_compress [3], kluge_att, mk_att [1], mk_att [2], mk_evn [1], mk_evn [2]
	mk_fem_file [1], mk_fem_file [2], mk_gbl, mk_gev [1], mk_gev [2], mk_gsn_obs, mk_gx
	mk_nar [1], mk_nar [2], mk_orb_file, mk_pnt, mk_sd2, mk_sdl, mk_sl [1], mk_sl [2]
	mk_sot, mk_ssl, mk_sxc, mk_sxl, mk_week1_file, mk_week_file [1], mk_week_file [2]
	pnt2atr, rd_dsktapdir, rd_gsn, rd_obs_entry, rd_roadmap [1], rd_sdl, rd_sld, rd_sls
	rd_sot, rd_ssl, rd_week_file [1], rd_week_file [2], rd_week_file [3]
	rd_week_file [4], sav_bda, sav_bsc, sav_hxi, sav_sda [1], sav_sda [2], sav_sda [3]
	sxt_patch_att, weekid [2], wrt1cba, wrt1orbit [1], wrt1orbit [2], wrtsxtmap
	ydb_exist [2]
OPTIONAL KEYWORD INPUT:
	quiet		If set, do not print error messages when writing
			does not end of a record boundary
HISTORY:
	Written Jun 1991 by M.Morrison
	19-Oct-91 (MDM) Added option of byte swapping if on Sun system
	 9-Nov-91 (MDM) Made swaping occur always unless it is run on
			a VMS or ULTRIX machine
	12-Dec-91 (MDM) Used "dec2sun" instead of "vax2sun" and "sun2vax"
	21-May-92 (MDM) Modified so that the input variable "data" is not
			changed for the cases where the machine writing the
			data is non-DEC (since it must do byte swapping before
			the write)
	12-Oct-92 (MDM) Removed check to see where pointer was left from
			the last read/write
			Added QUIET option so that funny shaped images
			can be saved with SAV_SDA.
	13-Apr-93 (MDM) Added calls to YOH_IEEE2VAX and YOH_VAX2IEEE to
			convert the REALs when on the VMS machine
	 8-Jun-93 (MDM) Added the capability to override the default which
			is to convert the REAL*4 values from VAX to IEEE
			format before writing, and then back again during
			reading.
	 3-Aug-93 (MDM) Expanded the list of operating systems that do not
			swap bytes to include 'OSF' (and vms and ultrix)
	 9-Sep-95 (ATP) Expanded list of operating systems that do not
			swap bytes to include 'linux' (i386)


READ_EYE [1] $SSW/yohkoh/gen/idl/gbo/read_eye.pro
[Previous] [Next]
 NAME:
        READ_EYE
 PURPOSE:
        Reads BBSO Quantex, Datacube, and Eyecom files.
 CATEGORY:
        Input/Output.
 CALLING SEQUENCE:
        result = read_eye(filename)
 INPUTS:
        filename = string containing the file name.
 OUTPUTS:
        result = byte, integer, or long array, containing the FITS data
	   array.  The dimensionality of result reflects the structure
	   of the FITS data.
 OPTIONAL (KEYWORD) OUTPUT PARAMETERS:
        date = date of observation (string).
        time = time of observation (string).
        header = string containing the full FITS header (80 characters
	   per FITS keyword parameter).
 RESTRICTIONS:
        Only works on simple BBSO FITS files.  FITS extensions
	   (e.g., groups and tables) are not supported.
 MODIFICATION HISTORY:
        Version 1.0 - GLS, Dec, 1990.


READ_EYE [2] $SSW/yohkoh/gen/idl/gbo/read_eye_old.pro
[Previous] [Next]
 NAME:
        READ_EYE
 PURPOSE:
        Reads BBSO Quantex, Datacube, and Eyecom files.
 CATEGORY:
        Input/Output.
 CALLING SEQUENCE:
        result = read_eye(filename)
 INPUTS:
        filename = string containing the file name.
 OUTPUTS:
        result = byte, integer, or long array, containing the FITS data
	   array.  The dimensionality of result reflects the structure
	   of the FITS data.
 OPTIONAL (KEYWORD) OUTPUT PARAMETERS:
        date = date of observation (string).
        time = time of observation (string).
        header = string containing the full FITS header (80 characters
	   per FITS keyword parameter).
 RESTRICTIONS:
        Only works on simple BBSO FITS files.  FITS extensions
	   (e.g., groups and tables) are not supported.
 MODIFICATION HISTORY:
        Version 1.0 - GLS, Dec, 1990.


READ_GIF2 $SSW/yohkoh/ucon/idl/metcalf/read_gif2.pro
[Previous] [Next]
 NAME:
	READ_GIF2

 PURPOSE:
	Read the contents of a GIF format image file and return the image
	and color table vectors (if present) in the form of IDL variables.

 CATEGORY:
	Input/Output.

 CALLING SEQUENCE:
	READ_GIF, File, Image [, R, G, B]

 INPUTS:
	File:	Scalar string giving the name of the rasterfile to read

 OUTPUTS:
	Image:	The 2D byte array to contain the image.


 OPTIONAL OUTPUT PARAMETERS:
     R, G, B:	The variables to contain the Red, Green, and Blue color vectors
		if the rasterfile containes colormaps.

 CALLS: ***
	GIFREADBYTE
 COMMON BLOCKS:
	GifRead

 SIDE EFFECTS:
	None.

 RESTRICTIONS:
	Local colormaps are read but not returned.
       Extention blocks are skipped, but may not be skipped correctly.

 EXAMPLE:
	To open and read the GIF image file named "foo.gif" in the current
	directory, store the image in the variable IMAGE1, and store the color
	vectors in the variables R, G, and B, enter:

		READ_GIF, "foo.gif", IMAGE1, R, G, B

	To load the new color table and display the image, enter:

		TVLCT, R, G, B
		TV, IMAGE1
 
 MODIFICATION HISTORY:
	Written June 1992, JWG
       1995-04-13 TRM Can now read multiple images and will skip local
                      color tables.  Modified skipping of extension blocks.


READ_HXT_CAL $SSW/yohkoh/ucon/idl/hudson/read_hxt_cal.pro
[Previous] [Next]
 NAME:
     READ_HXT_CAL
 PURPOSE:
     input HXT data taken in calibration mode (8 sec time resolution,
       64 energy channels)
     this program is basically a driver for Morrison's REFORM_HXTCAL
 CATEGORY:
     Yohkoh HXT
 CALLING SEQUENCE:
     read_hxt_cal, infil, index, counts
     read_hxt_cal, infil, index, counts, /four_ch, /plot
     read_hxt_cal, infil, index, data, /four       (for standard DATA)
 INPUTS:
     file specification, infil
 OPTIONAL (KEYWORD) INPUT PARAMETERS:
     four_ch returns 4-channel ordinary-looking data, padded with
       zeros. 
     plot plots in a rudimentary way (only for the four channels)
 OUTPUTS:
     counts(64,64,n) or counts(4,64,n) , where the first argument is energy,
       the second sensor, and the third the entry number (8 sec
       intervals). This variable is floating point.
     counts(4,64,4,n), in the /four case. Note that in this case, 
       the values of counts(*,*,1:3,*) = 0.
 CALLS: ***
	CLEAR_UTPLOT [1], CLEAR_UTPLOT [2], RD_XDA [1], RD_XDA [2], Rd_Roadmap [2]
	UTPLOT [1], UTPLOT [2], UTPLOT [3], UTPLOT [4], UTPLOT [5], UTPLOT [6]
	gt_dp_mode [1], gt_dp_mode [2], gt_dp_rate [1], gt_dp_rate [2], rd_roadmap [1]
	reform_hxtcal2
 COMMON BLOCKS:
 SIDE EFFECTS:
 WARNING:
     not tested with image-making software
 RESTRICTIONS:
     As of 10 July 1995, this program doesn't deal with medium rate data,
       sorry! 
 MODIFICATION HISTORY:
     HSH 10 July 1995, written
     HSH 11 July 1995, changed outputs and added keywords 
     HSH 14 July 1995, fixed bugs 
     HSH 20 July 1995, converted time output to index variable
     HSH 21 July 1995, converted /four output to compressed 4-channel
       data, to interface properly with other software
     HSH 14 Oct. 1995, fixed bug
     HSH 13 Nov. 1995, removed data compression correction
     HSH 16 Dec. 1995, tidy up
     HSH 15 Jan. 1996, switch to Sato's REFORM_HXTCAL


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

   Purpose: read daily Mees jpeg CaKline file

   6-nov-1995 (SLF) ; new First_Light image
 CALLS:


READ_SPFDGRS $SSW/yohkoh/ucon/idl/hiraoka/read_spfdgrs.pro
[Previous] [Next]

 NAME:
       READ_SPFDGRS
 PURPOSE:
       To read the spfd file.
 CALLING SEQUENCE:
       spfd = read_spfdgrs()
 INPUTS:
       none.
 OPTIONAL INPUTS:
       fn   - String containing the name of reading file. If not present,
              fn is 'GRS_RESULTS.DATA'
       xst  - Set at a start time for plot. If not present, xst is set at
              a start time flare data.
 CALLS: ***
	Ex2Int [1], Ex2Int [2], MAKE_STR [1], MAKE_STR [2], anytim2ex [1], anytim2ex [2]
 PROCEDURE:
       Xtime is a middle of flare time interval.
 HISTORY:
       Written 10-dec-93 by T.Hiraoka ( Rikkyo Univ.)


READ_SPFDHXS $SSW/yohkoh/ucon/idl/hiraoka/read_spfdhxs.pro
[Previous] [Next]

 NAME:
       READ_SPFDHXS
 PURPOSE:
       To read the spfd file.
 CALLING SEQUENCE:
       spfd = read_spfdhxs()
 INPUTS:
       none.
 OPTIONAL INPUTS:
       fn   - String containing the name of reading file. If not present,
              fn is 'HXS_RESULTS.DATA'
       xst  - Set at a start time for plot. If not present, xst is set at
              a start time flare data.
 CALLS: ***
	Ex2Int [1], Ex2Int [2], MAKE_STR [1], MAKE_STR [2], anytim2ex [1], anytim2ex [2]
 PROCEDURE:
       Xtime is a middle of flare time interval.
 HISTORY:
       Written 10-dec-93 by T.Hiraoka ( Rikkyo Univ.)


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

   Purpose: read various types of sxt files (sda, old fits etc)->standard struct

   Method:
      For 'standard' sxt formats, call rd_xda
      For FITS, call mreadfits, struct2ssw, rederive some info from fits

 CALLS: ***
	BOX_MESSAGE, BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], PB0R, break_file [4]
	data_chk [1], data_chk [2], gt_tagval [1], gt_tagval [2], mreadfits, struct2ssw
 CALLED BY:
	SXT__DEFINE, get_ssc_best
   History:
      10-March-1998 - S.L.Freeland - standard interface to several sxt formats
      19-May-1999 - S.L.Freeland - permit NEW fits as well as OLD fits


READBFT $SSW/yohkoh/bcs/idl/bsd/readbft.pro
[Previous] [Next]
 NAME:
	READBFT
 PURPOSE:
	Read the BFTxxxx.xxx files created by BSDFIT.
	Return the data in array DATA.

 CALLING SEQUENCE:
	READBFT,FILNAM,FIRST_TIME,DATA

 INPUTS:
	FILNAM	= The name of the BFTxxxx.file.
		  If FILNAM is undefined or the first letter is blank,
		  READBFT will prompt the user for the name.

 OPTIONAL INPUT PARAMETERS:
	None.

 OUTPUTS:
	FIRST_TIME = Vector containing the time and date of the first result.
	DATA	= 2-dimensional array containing the results from BSDFIT.

		The arguement of DATA is for the different cases.
		The first arguement of DATA is assigned as follows:

		0=SPC_NUM	  1=CHAN	    2=Relative time (min).
		3=SDGI( sec )	  4=DW (A/bin)	    5=Max # iterations
		6=# iterats.	  7=# degree free.  8=Reduced chi-square
		9=cnvrg flag	  10=velocity flag  11=lithium flag
		12=Te_6	    	  13=Td_6(w)        14=Td_6(k or j)
		15=Background	  16=EM (1.e50)     17=EM2 (1.e50) - second comp
		18=velocity	  19=N(Li)/N        20=L/C
		
		21 to 29 are uncertainties of 12 to 20.

		To choose data corresponding to a given channel (e.g. 
		electron temperature for channel 1) do the following:

		vv = where(data(1,*) eq 1)
		temp = data(12,*)
		temp = temp(vv)



 CALLS: ***
	SECS79
 CALLED BY:
	BCS2SXSPC, plotbft [1], plotbft [2]
 COMMON BLOCKS:
	None.

 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	FILNAM	must be of string type or undefined.

 PROCEDURE:
	The file is openned, the data is read in and time sorted.
	If channel 1 and channel 4 data is present in the file, they
	may be returned interleved.  Use where( DATA(1,*) eq chan ) to
	select the appropriate data.

 MODIFICATION HISTORY:
	Nov, 1985,	Written, J.R. Lemen, MSSL for SMM
	May, 1986	A.F. , Changed to read new two-component format.
	Nov, 1991       A.F. , converted to YOHKOH
	RDB  10-Mar-93	Removed use on time_ord


READEMM2 $SSW/yohkoh/ucon/idl/bentley/reademm2.pro
[Previous] [Next]
 NAME:
	READEMM2
 PURPOSE:
	Read EMMxxxx.xxx files which contain 
	emission functions calculated in ph cm-2 s-1 / abundance.

	EMM files are keyed, indexed files (isam).     

 CALLING SEQUENCE:
	READEMM, EMM_NAME, READEMM_DATA
	READEMM, EMM_NAME, READEMM_DATA, TEXT
	READEMM, EMM_NAME, READEMM_DATA, TEXT, ELEM

 INPUT:
	EMM_NAME= Character string containing name of EMM file.

 OPTIONAL INPUT PARAMETERS:
	None.

 OUTPUTS:
  READEMM_DATA	= 2-d array containing emission functions.
		  The first dimension is 9+N long, where N is the maximum
		  number of temperature steps (specified in header record).
		  The 2nd dimension is M long, where M is the number of 
		  different cases in the file.

READEMM_DATA(0,*) = Wavelength	(1,*) = T1,	(2,*) = dT,	(3,*) = npts,
      	     (4,*) = N1 (Mewe)	(5,*) = N2,	(6,*) = igo	(7,*) = abund,
	     (8,*) = log10(EM)	(9,*) = EMITS(0) ... (9+N-1,*) = EMITS(N-1)

 COMMON BLOCKS:
	None.

 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	EMM_NAME must be a character string.

 PROCEDURE:

	1) The isam format EMM file is opened and the version format is checked.
	2) The header record is read (primary key=0) to find out the size
	   of the arrays.
	3) The file is read and then closed.

  ----------------------------------------------------------------------

	EMM file format version = 1.0		( 22-nov-85 )

	The version number of the EMM file that this procedure can read
	is given by the value of VERSION (defined below).
  ----------------------------------------------------------------------

 MODIFICATION HISTORY:
	Nov, 1985,	Written, J.R. Lemen, MSSL
       Jul, 1992       modified to run in IDL2, Sri Moorthy, MSSL.


readout $SSW/yohkoh/ucon/idl/phillips/readout.pro
[Previous] [Next]
 Name : readout.pro
 Author: Andy Phillips mssl 1991
 Purpose: read in set of pha stats to arrays, for analysis by 
		dispout_pha,plotout_pha,reduce_pha
 Classification: BDA, Housekeeping, PHA, Spikes correction
 History: jan 1992 written atp



RECONCILE_SFD $SSW/yohkoh/ucon/idl/hudson/reconcile_sfd.pro
[Previous] [Next]
 NAME:
     RECONCILE_SFD
 PURPOSE:
     reconcile the Q and H res images in an SFD data cube
 CATEGORY:
 CALLING SEQUENCE:
     reconcile_sfd,index,data,iout,dout
 INPUTS:
 OPTIONAL (KEYWORD) INPUT PARAMETERS:
     SAMP calls the /samp keyword in REBIN
     QUART returns the whole array as Q res
 OUTPUTS:
     iout = index
     dout = decompressed data
 CALLS: ***
	gt_expdur [1], gt_expdur [2], gt_res
 COMMON BLOCKS:
 SIDE EFFECTS:
 RESTRICTIONS:
 WARNING:
     This routine does not fix the index information, so that STEPPER
       and other routines using exposure duration will fail
 MODIFICATION HISTORY:
     HSH, written 30-Apr-97 
     HSH, added keywords 11-Jun-97
     HSH, fixed bug 14-Oct-97 and re-fixed it, 23-Oct-97


RECONCILE_SFD_INFIL $SSW/yohkoh/ucon/idl/hudson/reconcile_sfd_infil.pro
[Previous] [Next]
 NAME:
     RECONCILE_SFD_INFIL
 PURPOSE:
     reconcile the Q and H res images in an SFD data cube
     returns a floating-point array, decompressed if necessary
 CATEGORY:
 CALLING SEQUENCE:
     reconcile_sfd,infil, index,data
 INPUTS:
 OPTIONAL (KEYWORD) INPUT PARAMETERS:
 OUTPUTS:
 CALLS: ***
	RD_XDA [1], RD_XDA [2], Rd_Roadmap [2], rd_roadmap [1], sfd_decomp, str_concat [1]
	str_concat [2]
 COMMON BLOCKS:
 SIDE EFFECTS:
     overwrites DATA with a floating-point array
 RESTRICTIONS:
 MODIFICATION HISTORY:
    HSH, written 21-Jul-97 (see RECONCILE_SFD)


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

       PURPOSE:  Convert rectangular coordinates to polar coordinates

       METHOD:  

       CALLING SEQUENCE: polar = rect2pol(x,y)

       PARAMETERS:	x,y	input rectangular cordinates
			polar	[radius, theta] 
				theta is in +/- radians from x-axis		

 CALLED BY:
	circle_fn, circle_trgt, ellipse_fit, ellipse_fn
       HISTORY: Copied from IDL manual, AMcA, August 1994.


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


 PURPOSE: To rotate a part of the solar disk forward or backward in time. 


 METHOD: You can enter the edges of the rectangle, or leave them
	  out and choose them interactively. The selected rectangle 
	  is rotated using SOL_ROT. The /RIGID keyword invokes rigid
	  rotation, meaning the whole region is rotated at the rate
	  calculated for its center point (using the differential 
	  formula). You can use HMS2DD to generate DELT.             

 CALLING SEQUENCE: trans=rect_rot(img,date,delt[,x0,x1,y0,y1][,target=trgt]
					         [,rigid=rdgd][,edges=edges])

 PARAMETERS:	img	the input image, you wish to rotate a part of
		date    the time of the image, in standard 7 part form, 
			[DD-MMM-YY HH:MM:SS].
		delt	the rotation time, in decimal days.
		trans 	the output is a matrix the same size as the input
			with the rotated pixels in their new locations. The
			rest is zero.

 OPTIONAL INPUT: x0,x1,y0,y1  	when you already know the edges you want
				then you can pass them in

 KEYWORDS:	trgt	a three vector with the centroid and radius of 
			the input image, in pixel units matching the image
		rigid  When set rotate the whole region at the rate for
			the center.
		edges 	returns the four selected edge values [x0,x1,y0,y1]

 RETURN TYPE:

 CALLS: ***
	GET_BOXCORN, TARGET [1], coord_l2v, draw_boxcorn [1], draw_boxcorn [2], match_type
	sol_rot [1], sol_rot [2], target [2]
 CALLED BY:
	gbo_pfi
 HISTORY: Drafted by A. McAllister Feb. 1993.
	   [Interactive code borrowed from PLOT_FOV by MDM]
	   Changed target to keyword, added rigid keyword, AMcA, Mar. 1993.
	   Added fill for blanks, AMcA, Jul. 1993.
	   Fixed a bug in the blank filling line, AMcA, Dec. 1993.


reduce_pha $SSW/yohkoh/ucon/idl/phillips/reduce_pha.pro
[Previous] [Next]
 NAME:  reduce_pha.pro

 PURPOSE:  To reduce the data from readout .pro into a series of numbers.
		Weighted and normal means are applied, with the weight being
		given by the inverse of the chi squared.

 CALLING SEQUENCE: .run reduce_pha.pro 

 INPUTS:  Data arrays from readout .pro

 OUTPUTS:  A table of values for the centre and fwhm of each channel.

 OPTIONAL OUTPUTS: none

 RESTRICTIONS: requires wstdev.pro - modified library procedure.

 PROCEDURE:

 MODIFICATION HISTORY:
      written atp - jan 1992.
	       


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


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

   Purpose: check ref file header size against actual size

   Input Parameters:
      files - string or string array of reformatted file names
      quiet - if set, info message suppressed

   Output: function returns boolean bit map
	0 - ok  
       1 - bad (bad implies reformatter size ne actual size)
           so on files(where(ref_bad(files))) if gives bad file list

   slf, 4-mar-92

 CALLS: ***
	Rd_Pointer [1], Rd_Pointer [2]
 CALLED BY:
	mktap_prep
   Restrictions: no validity checking on filenames


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

  Procedure to do summary plot of a day's worth of reformatted CaXIX data

   cdp    May 92

  Input:
          infil              The generic file name for the day of interest
                             eg. YDB:[BDA]BDA920401.*

  Use:
          IDL>  ref_day_plot,infil

 CALLS:


ref_super [1] $SSW/yohkoh/gen/idl/atest/ref_super.pro
[Previous] [Next]
NAME:
	ref_super
PURPOSE:
	To copy data from SIRIUS and reformat it.  There are several
	different reformatting stages and several different types of
	files that are produced.
STAGES:
		 (0) copy the data from SIRIUS in 24 hour chunks, 
		 (1) refomat the 24 hour chunks
		 (2) break the 24 hour files into 1 orbit per file
		 (3) create the PNT file
		 (4) create the OBS file
		 (5) send mail that data copy to on-line can start
		 (6) create the SDL and SDC files (and SDW if needed)
		 (7) create the SOT files
		 (8) create the SSL, SEL and SRD files	(TODO)
		 (9) create the SFS and SDP files
		(10) to make the SFD files.
		(11)         (spare)     (old ADS_INTO_PNT)
		(12)         (spare)     (old copy weekly files to LPARL)
		(13) create the SFT files
		(14) create the SFC files (slf 5-may-1995)
		(15)         (spare)
		(16)         (spare)
		(17)         (spare)
		(18) create the MKTAP.COM file
		(19) create the SXL and SXA files
		(20) create the SSC files
		(21) copy flares to flare disk
		(22) create the SLS and SLD files
		(23) call MK_MDM to make the MO disk map
		(24) creation of the GOES 3 sec data files (G6D, G7D)
		(25) create the SXC files
INPUT:
	week_str- The week to be reformatted in string for YY_WW
		  For example '91_49'
OPTIONAL INPUT:
	days0	- the days for stage 0.  It can be an array
		  0=sunday, 1=monday, ...
		  If not passed, all 7 days are done
	days1	- the days for stage 1.  It can be an array
		  0=sunday, 1=monday, ...
		  If not passed, all 7 days are done
	stages	- A boolean array of 10 elements long specifiying
		  whether a stage should be peformed or not.  If not
		  passed, then all stages are run.  See the above
		  description for details.
	notstages - a boolean array specifying wither a stage should
		  NOT be run.  All other stages are run.
	dir1	- The directory to put the output for stage one (the
		  copying of the raw telemetry)  It is also the input
		  directory for stage 2.
		  If not specified, the /yd disks are searched for the
		  directory "reformat_a1" and "reformat_a2"
	dir2	- The output directory for stage 2 (reformatting in 24
		  hour chunks)
		  If not specified, the /yd disks are searched for the
		  directory "reformat_b1" and "reformat_b2"
	dir3	- The output directory for stage 3 (breaking 24 hour 
		  chunks into one orbit files)
		  If not specified, the /yd disks are searched for the
		  directory "reformat_a1" and "reformat_a2"

		  NOTE: If the "dir" variables are arrays, the program
		  assumes that however the data had to be broken up in
		  stage 1, it will be broken up that way in stage 2.  And
		  however it is broken up in stage 2, it will be broken
		  up in stage 3 (broken up between directories/disks).

		  NOTE: Anytime all days are selected, all existing files
		  in the output directory are deleted before starting the
		  next stage.  This is because it assumes that it was used
		  for the output two stages ago and is no longer needed.
	dirweek	- The directory where the weekly files for MKTAP should be
		  copied to.  If not passed, it will search for "reformat_week"
	dir_reverse - Used when using the default directories and we now
		  want to start with "reformat_b" because of the odd number
		  of read/writes to the disks
	check_del - If set, it will check that the output directory for stage #1
		  is empty before continuing.  This allows the user to start
		  the SIRIUS copy before backing up the previous week and moving
		  it out of the way.  This is because the of the swapping back and forth
		  between a pair of directories and the automatic deleting of
		  files
	ftp	- If set, use FTP option for GET_SIRIUS
	start_stage - The stage number to start with (if 5 is passed, do stage
		  #5 and all stages after it)

	ref2_subset - The prefixes to perform REFORMAT2 stage on
		  ['sfr', 'spr', 'bda', 'wda', 'hda', 'ada', 'cba']
		     0      1      2      3      4      5      6
       nodelete - do not delete files prior to entry (caller handles during
                  multi-tasking operations)...
HISTORY:
	Written Dec '91 by M.Morrison
	   Mar-92 (MDM) - Modifications and refinement to work "smoother"
	13-Mar-92 (MDM) - Changed from 4 to 5 stages (broke obs and pnt
			  generation into two separate stages)
			- Made it so that the end time for the last day
			  gets an additional 1.5 hours of data to put datasets
			  in the proper week
	14-Mar-92 (MDM) - Modified to delete all files in the output directory
			  is the next stage is going to work on all 7 days.
	16-Mar-92 (MDM) - Changed MK_OBS and MK_PNT to use "file_list" instead
			  of "findfile"
	17-Mar-92 (MDM) - Changed GET_SIRIUS to use FLARE2
	18-Mar-92 (MDM) - Adjusted the log printing
	19-Mar-92 (MDM) - Changed so that "dir" can be an array and that the 
			  writing to the output disk checks to see if at least
			  200 megabytes are free before writting output file for
			  the stage1 (SIRIUS copy) - partition that way from then
			  on.
	20-Mar-92 (MDM) - Added stages 6 (MKTAP) and 7 (MK_SFD)
	21-Mar-92 (MDM) - Made the MKTAP portion generate a second MKTAP1.COM 
			  script file so can write to two tape drives at once.
			- Also MKTAP stage sends a mail message to whoever is
			  running the program to tell him it's ready for tape
			  making.
	24-Mar-92 (MDM) - Added option of using FLARE1 instead of FLARE2
	15-Apr-92 (MDM) - Modified so that MKTAP is only passed the directories
			  where there is data (dir3 value)
	16-Apr-92 (MDM) - Fixed major bug where last orbit file for a given day
			  was being clobbered by the partial first orbit of the
			  next day.  Should only effect the ADA and CBA files(?)
	17-Apr-92 (MDM) - Added "ref2_subset" to do only a subset of the prefixes
	18-Apr-92 (MDM) - Added "dirweek" option for MKTAP
	23-Apr-92 (MDM) - Added "ref2_day" option (only run reformat2 on one day)
			- Moved some of the stage definitions around, added stages
			  to create SSL, SEL, SRF, SDL, SDC, SOT and SFU files.
			- Added "check_del" option
			- Added linford to get all messages when MKTAP finishes
			- Made creation of log file a must
	26-Apr-92 (MDM) - Added SDW file creation also
	 3-May-92 (MDM) - Added "srsget" parameter input (to run srsget2 on 
			  flare1)
	 4-May-92 (MDM) - Adjusted way that # of days is calculated (because
			  of weeks 53 and 1)
			- Added MK_EVN to stage 5 (where MK_OBS is run)
	12-May-92 (MDM) - Adjusted to switch to second disk when 250 free (old was 200 megabytes)
	24-May-92 (MDM) - Added options "flare2" and "notstages"
			  Changed the default SRSGET to use FLARE1-SRSGET2
	25-May-92 (MDM) - Changed the logic of NOTSTAGES
	26-May-92 (MDM) - Changed MK_PNT and MK_OBS calls not to passed the
			  output file name.  It will be built in those
			  routines now.
	30-May-92 (MDM) - Changed to do a listing on the aborted output file
			  when GET_SIRIUS bombs out.
	 8-Jul-92 (MDM) - Modified so that stage 5 does not do the MKTAP
			  step, instead stage 11 does.  
			- Also added stage 12 which does a file copy of the 
			  weekly files to LPARL.
			- Wrote SFD and SFW files to weekly directory directly
			  instead of '/yd1/sfd'
			- Changed "rm" command to set default there first 
			  since the large number of files+pathname causes the
			  delete command to bomb
	18-Jul-92 (MDM) - Added FREELAND to get all mail messages
	 4-Aug-92 (MDM) - Removed "days" keyword and added "days0" and "days1" 
			  for stage 0 and 1 (days used to be used for both stage 0 and 1)
			- Added /AUTO_DEL to REFORMAT call so old files are automatically deleted if they already exist
	20-Aug-92 (MDM) - Added LEMEN to get all mail messages
	27-Aug-92 (MDM) - Moved MKTAP from stage 11 to stage 18
			- Deleted stage 12 (copy data to LPARL)
			- Added stages
				 (9) create the SFS file
				(11) ADS_INTO_PNT
				(18) create the MKTAP.COM file
				(19) create the SXL files
				(20) create the SSC files
				(21) copy flares to flare disk
			- Added keyword FTP for GET_SIRIUS
	28-Aug-92 (MDM) - Added /NOT_SXT_PATROL
			- Added START_STAGE
	 6-Oct-92 (MDM) - Adjusted call to CHK_FLARES to only pass the
			  directories which have data in them.
			  (passed "dir3_act" instead of "dir3")
	 9-Oct-92 (MDM) - Removed lemen from mail list
	14-Oct-92 (MDM)	- Changed from using a "hard wired" list of user's
			  to notify by mail to using the environment
			  variable $MAIL_REF_SUPER
	16-Oct-92 (MDM) - Modifed stage 20 to make SSE and SSW in addition
			  to making SSC (synoptic files)
	20-Oct-92 (MDM) - Changed /CHECK_DEL call to FILE_LIST from
				ff = file_list(dir2, '*') to
				ff = file_list(dir2, '')
			- Added /BIG switch CHK_FLARES call
	22-Oct-92 (SLF) - Changed do_ads call to do_aip call (stage 11)
			  (ads copy done external to ref_super)
	26-Oct-92 (SLF) - Use /actual switch in adsdirs call since old
			  data sets are not in standard 4 week queue
	15-Jan-93 (MDM) - Added stage 22 (create SLS and SLD)
	 3-Feb-93 (MDM) - Removed /BIG switch CHK_FLARES call
	24-Feb-93 (MDM) - Added SFD_IST keyword optional parameter so that
			  MK_SFD stage can start at a later image.
	29-Mar-93 (MDM) - Added a check to make sure that IDL is not
			  running away and starting over when it should not.
	29-Mar-93 (MDM) - added /all switch to ADSDIRS so that "oldads" 
			  directories will be used
	 9-Apr-93 (MDM) - Adjusted modification to check for "runaway" to
			  only run if stage 0 is selected
	 6-May-93 (MDM) - Added /OVERRIDE_RUNAWAY to allow partial reformatting
	14-May-93 (MDM) - Changed call to MK_OBS so that it used UNIQ_FID to be
			  sure to get all fileIDs.  It was not doing it properly
			  up until then.
	20-May-93 (MDM) - Added stage 23 - MK_MDM
	11-Jul-93 (MDM) - Gutted stage 12 (copy to LPARL)
			- Added stage 24 - MK_GX (G6D, G7D)
	10-Aug-93 (MDM) - Modified stage #0 so that it will try SRSGET again 
			  automatically (after a 10 minute pause) if it fails
			- Added creation of ATR files to stage #3
	17-Aug-93 (MDM) - Added creation of ATT and insertion of ADS information
			  into the ATT file.
			- Removed stage 11 (ADS_INTO_PNT)
	18-Aug-93 (MDM) - Modified header
	15-Sep-93 (MDM) - Added creation of SXC files
			- Added sending a REF_SUPER completed running
			  message at the end of REF_SUPER
			- Added print statement to the log file about how
			  long it took for all stages run
	 5-Oct-93 (MDM) - Added call to make MO listings text files
			- Print REFORMAT and SXL and SXC log times in hours
	13-Oct-93 (MDM) - Added creation of SXA files to stage 19
	16-Oct-93 (MDM) - Added RETRY option (number of retries to attempt for SRSGET)
	20-Oct-93 (MDM) - Changed the way that it figured out when to chose the second
			  disk (old way was break up the days the same way that they
			  were broken up for "dir1".  Changed to look at available space
			  when figuring for "dir2".
	19-Nov-93 (MDM) - Added creation of SFT files as stage 13
	22-Nov-93 (SLF) - Protect against incorrect week id string
	 7-Jan-94 (MDM) - Removed making PNT database files
	10-Jan-94 (MDM) - Patch for SRSGET problems spanning a year boundary
			  (added routine GET_SIRIUS_YR)
	14-Jan-94 (MDM) - Modified mail messages sent at the end
	 3-Aug-94 (MDM) - Added MK_SDP to stage 9
	 4-Aug-94 (MDM) - Make START_STAGE=1 if DAYS1 is passed in, and DAYS0 and
			  START_STAGE are not passed in.
       15-sep-94 (SLF) - bugfix - change 'mess' to 'message'
        3-oct-94 (SLF) - add NODELETE keyword (multi-tasking, caller handles)
	13-Jan-95 (MDM) - Changed header
	16-Jan-95 (MDM) - Further patch to GET_SIRIUS_YR
	31-Mar-95 (MDM) - Added MK_SDMI to stage 6
        5-may-95 (SLF) - Added STAGE 14 - mk_sfc
	22-Aug-95 (MDM) - Added mk_sxt_synmap call to stage 20 to build the synoptic map
	15-Nov-96 (GLS) - ADded ATR2HXA_DBASE step to stage 3 just ahead of
			  call to MK_ATT.
	25-Feb-98 (GLS) - Removed MK_SDMI from stage 6 because this database will no longer
			  be used during dark subtraction (It can be regenerated if
			  from the SDM files)
        6-Mar-98 (SLF) - remove ATR2HXA_DBASE (sepearte cron)
	23-Mar-98 (GLS) - Added mk_sfm to stage 10


ref_super [2] $SSW/yohkoh/gen/idl/reformat/ref_super.pro
[Previous] [Next]
NAME:
	ref_super
PURPOSE:
	To copy data from SIRIUS and reformat it.  There are several
	different reformatting stages and several different types of
	files that are produced.
STAGES:
		 (0) copy the data from SIRIUS in 24 hour chunks, 
		 (1) refomat the 24 hour chunks
		 (2) break the 24 hour files into 1 orbit per file
		 (3) create the PNT file
		 (4) create the OBS file
		 (5) send mail that data copy to on-line can start
		 (6) create the SDL and SDC files (and SDW if needed)
		 (7) create the SOT files
		 (8) create the SSL, SEL and SRD files	(TODO)
		 (9) create the SFS and SDP files
		(10) to make the SFD files.
		(11)         (spare)     (old ADS_INTO_PNT)
		(12)         (spare)     (old copy weekly files to LPARL)
		(13) create the SFT files
		(14) create the SFC files (slf 5-may-1995)
		(15)         (spare)
		(16)         (spare)
		(17)         (spare)
		(18) create the MKTAP.COM file
		(19) create the SXL and SXA files
		(20) create the SSC files
		(21) copy flares to flare disk
		(22) create the SLS and SLD files
		(23) call MK_MDM to make the MO disk map
		(24) creation of the GOES 3 sec data files (G6D, G7D)
		(25) create the SXC files
INPUT:
	week_str- The week to be reformatted in string for YY_WW
		  For example '91_49'
OPTIONAL INPUT:
	days0	- the days for stage 0.  It can be an array
		  0=sunday, 1=monday, ...
		  If not passed, all 7 days are done
	days1	- the days for stage 1.  It can be an array
		  0=sunday, 1=monday, ...
		  If not passed, all 7 days are done
	stages	- A boolean array of 10 elements long specifiying
		  whether a stage should be peformed or not.  If not
		  passed, then all stages are run.  See the above
		  description for details.
	notstages - a boolean array specifying wither a stage should
		  NOT be run.  All other stages are run.
	dir1	- The directory to put the output for stage one (the
		  copying of the raw telemetry)  It is also the input
		  directory for stage 2.
		  If not specified, the /yd disks are searched for the
		  directory "reformat_a1" and "reformat_a2"
	dir2	- The output directory for stage 2 (reformatting in 24
		  hour chunks)
		  If not specified, the /yd disks are searched for the
		  directory "reformat_b1" and "reformat_b2"
	dir3	- The output directory for stage 3 (breaking 24 hour 
		  chunks into one orbit files)
		  If not specified, the /yd disks are searched for the
		  directory "reformat_a1" and "reformat_a2"

		  NOTE: If the "dir" variables are arrays, the program
		  assumes that however the data had to be broken up in
		  stage 1, it will be broken up that way in stage 2.  And
		  however it is broken up in stage 2, it will be broken
		  up in stage 3 (broken up between directories/disks).

		  NOTE: Anytime all days are selected, all existing files
		  in the output directory are deleted before starting the
		  next stage.  This is because it assumes that it was used
		  for the output two stages ago and is no longer needed.
	dirweek	- The directory where the weekly files for MKTAP should be
		  copied to.  If not passed, it will search for "reformat_week"
	dir_reverse - Used when using the default directories and we now
		  want to start with "reformat_b" because of the odd number
		  of read/writes to the disks
	check_del - If set, it will check that the output directory for stage #1
		  is empty before continuing.  This allows the user to start
		  the SIRIUS copy before backing up the previous week and moving
		  it out of the way.  This is because the of the swapping back and forth
		  between a pair of directories and the automatic deleting of
		  files
	ftp	- If set, use FTP option for GET_SIRIUS
	start_stage - The stage number to start with (if 5 is passed, do stage
		  #5 and all stages after it)

	ref2_subset - The prefixes to perform REFORMAT2 stage on
		  ['sfr', 'spr', 'bda', 'wda', 'hda', 'ada', 'cba']
		     0      1      2      3      4      5      6
       nodelete - do not delete files prior to entry (caller handles during
                  multi-tasking operations)...
HISTORY:
	Written Dec '91 by M.Morrison
	   Mar-92 (MDM) - Modifications and refinement to work "smoother"
	13-Mar-92 (MDM) - Changed from 4 to 5 stages (broke obs and pnt
			  generation into two separate stages)
			- Made it so that the end time for the last day
			  gets an additional 1.5 hours of data to put datasets
			  in the proper week
	14-Mar-92 (MDM) - Modified to delete all files in the output directory
			  is the next stage is going to work on all 7 days.
	16-Mar-92 (MDM) - Changed MK_OBS and MK_PNT to use "file_list" instead
			  of "findfile"
	17-Mar-92 (MDM) - Changed GET_SIRIUS to use FLARE2
	18-Mar-92 (MDM) - Adjusted the log printing
	19-Mar-92 (MDM) - Changed so that "dir" can be an array and that the 
			  writing to the output disk checks to see if at least
			  200 megabytes are free before writting output file for
			  the stage1 (SIRIUS copy) - partition that way from then
			  on.
	20-Mar-92 (MDM) - Added stages 6 (MKTAP) and 7 (MK_SFD)
	21-Mar-92 (MDM) - Made the MKTAP portion generate a second MKTAP1.COM 
			  script file so can write to two tape drives at once.
			- Also MKTAP stage sends a mail message to whoever is
			  running the program to tell him it's ready for tape
			  making.
	24-Mar-92 (MDM) - Added option of using FLARE1 instead of FLARE2
	15-Apr-92 (MDM) - Modified so that MKTAP is only passed the directories
			  where there is data (dir3 value)
	16-Apr-92 (MDM) - Fixed major bug where last orbit file for a given day
			  was being clobbered by the partial first orbit of the
			  next day.  Should only effect the ADA and CBA files(?)
	17-Apr-92 (MDM) - Added "ref2_subset" to do only a subset of the prefixes
	18-Apr-92 (MDM) - Added "dirweek" option for MKTAP
	23-Apr-92 (MDM) - Added "ref2_day" option (only run reformat2 on one day)
			- Moved some of the stage definitions around, added stages
			  to create SSL, SEL, SRF, SDL, SDC, SOT and SFU files.
			- Added "check_del" option
			- Added linford to get all messages when MKTAP finishes
			- Made creation of log file a must
	26-Apr-92 (MDM) - Added SDW file creation also
	 3-May-92 (MDM) - Added "srsget" parameter input (to run srsget2 on 
			  flare1)
	 4-May-92 (MDM) - Adjusted way that # of days is calculated (because
			  of weeks 53 and 1)
			- Added MK_EVN to stage 5 (where MK_OBS is run)
	12-May-92 (MDM) - Adjusted to switch to second disk when 250 free (old was 200 megabytes)
	24-May-92 (MDM) - Added options "flare2" and "notstages"
			  Changed the default SRSGET to use FLARE1-SRSGET2
	25-May-92 (MDM) - Changed the logic of NOTSTAGES
	26-May-92 (MDM) - Changed MK_PNT and MK_OBS calls not to passed the
			  output file name.  It will be built in those
			  routines now.
	30-May-92 (MDM) - Changed to do a listing on the aborted output file
			  when GET_SIRIUS bombs out.
	 8-Jul-92 (MDM) - Modified so that stage 5 does not do the MKTAP
			  step, instead stage 11 does.  
			- Also added stage 12 which does a file copy of the 
			  weekly files to LPARL.
			- Wrote SFD and SFW files to weekly directory directly
			  instead of '/yd1/sfd'
			- Changed "rm" command to set default there first 
			  since the large number of files+pathname causes the
			  delete command to bomb
	18-Jul-92 (MDM) - Added FREELAND to get all mail messages
	 4-Aug-92 (MDM) - Removed "days" keyword and added "days0" and "days1" 
			  for stage 0 and 1 (days used to be used for both stage 0 and 1)
			- Added /AUTO_DEL to REFORMAT call so old files are automatically deleted if they already exist
	20-Aug-92 (MDM) - Added LEMEN to get all mail messages
	27-Aug-92 (MDM) - Moved MKTAP from stage 11 to stage 18
			- Deleted stage 12 (copy data to LPARL)
			- Added stages
				 (9) create the SFS file
				(11) ADS_INTO_PNT
				(18) create the MKTAP.COM file
				(19) create the SXL files
				(20) create the SSC files
				(21) copy flares to flare disk
			- Added keyword FTP for GET_SIRIUS
	28-Aug-92 (MDM) - Added /NOT_SXT_PATROL
			- Added START_STAGE
	 6-Oct-92 (MDM) - Adjusted call to CHK_FLARES to only pass the
			  directories which have data in them.
			  (passed "dir3_act" instead of "dir3")
	 9-Oct-92 (MDM) - Removed lemen from mail list
	14-Oct-92 (MDM)	- Changed from using a "hard wired" list of user's
			  to notify by mail to using the environment
			  variable $MAIL_REF_SUPER
	16-Oct-92 (MDM) - Modifed stage 20 to make SSE and SSW in addition
			  to making SSC (synoptic files)
	20-Oct-92 (MDM) - Changed /CHECK_DEL call to FILE_LIST from
				ff = file_list(dir2, '*') to
				ff = file_list(dir2, '')
			- Added /BIG switch CHK_FLARES call
	22-Oct-92 (SLF) - Changed do_ads call to do_aip call (stage 11)
			  (ads copy done external to ref_super)
	26-Oct-92 (SLF) - Use /actual switch in adsdirs call since old
			  data sets are not in standard 4 week queue
	15-Jan-93 (MDM) - Added stage 22 (create SLS and SLD)
	 3-Feb-93 (MDM) - Removed /BIG switch CHK_FLARES call
	24-Feb-93 (MDM) - Added SFD_IST keyword optional parameter so that
			  MK_SFD stage can start at a later image.
	29-Mar-93 (MDM) - Added a check to make sure that IDL is not
			  running away and starting over when it should not.
	29-Mar-93 (MDM) - added /all switch to ADSDIRS so that "oldads" 
			  directories will be used
	 9-Apr-93 (MDM) - Adjusted modification to check for "runaway" to
			  only run if stage 0 is selected
	 6-May-93 (MDM) - Added /OVERRIDE_RUNAWAY to allow partial reformatting
	14-May-93 (MDM) - Changed call to MK_OBS so that it used UNIQ_FID to be
			  sure to get all fileIDs.  It was not doing it properly
			  up until then.
	20-May-93 (MDM) - Added stage 23 - MK_MDM
	11-Jul-93 (MDM) - Gutted stage 12 (copy to LPARL)
			- Added stage 24 - MK_GX (G6D, G7D)
	10-Aug-93 (MDM) - Modified stage #0 so that it will try SRSGET again 
			  automatically (after a 10 minute pause) if it fails
			- Added creation of ATR files to stage #3
	17-Aug-93 (MDM) - Added creation of ATT and insertion of ADS information
			  into the ATT file.
			- Removed stage 11 (ADS_INTO_PNT)
	18-Aug-93 (MDM) - Modified header
	15-Sep-93 (MDM) - Added creation of SXC files
			- Added sending a REF_SUPER completed running
			  message at the end of REF_SUPER
			- Added print statement to the log file about how
			  long it took for all stages run
	 5-Oct-93 (MDM) - Added call to make MO listings text files
			- Print REFORMAT and SXL and SXC log times in hours
	13-Oct-93 (MDM) - Added creation of SXA files to stage 19
	16-Oct-93 (MDM) - Added RETRY option (number of retries to attempt for SRSGET)
	20-Oct-93 (MDM) - Changed the way that it figured out when to chose the second
			  disk (old way was break up the days the same way that they
			  were broken up for "dir1".  Changed to look at available space
			  when figuring for "dir2".
	19-Nov-93 (MDM) - Added creation of SFT files as stage 13
	22-Nov-93 (SLF) - Protect against incorrect week id string
	 7-Jan-94 (MDM) - Removed making PNT database files
	10-Jan-94 (MDM) - Patch for SRSGET problems spanning a year boundary
			  (added routine GET_SIRIUS_YR)
	14-Jan-94 (MDM) - Modified mail messages sent at the end
	 3-Aug-94 (MDM) - Added MK_SDP to stage 9
	 4-Aug-94 (MDM) - Make START_STAGE=1 if DAYS1 is passed in, and DAYS0 and
			  START_STAGE are not passed in.
       15-sep-94 (SLF) - bugfix - change 'mess' to 'message'
        3-oct-94 (SLF) - add NODELETE keyword (multi-tasking, caller handles)
	13-Jan-95 (MDM) - Changed header
	16-Jan-95 (MDM) - Further patch to GET_SIRIUS_YR
	31-Mar-95 (MDM) - Added MK_SDMI to stage 6
        5-may-95 (SLF) - Added STAGE 14 - mk_sfc
	22-Aug-95 (MDM) - Added mk_sxt_synmap call to stage 20 to build the synoptic map
	15-Nov-96 (GLS) - ADded ATR2HXA_DBASE step to stage 3 just ahead of
			  call to MK_ATT.


ref_term [1] $SSW/yohkoh/ucon/idl/freeland/go_refterm.pro
[Previous] [Next]
   Name: ref_term

   Purpose: reformat terminator images from DSN data
   


ref_term [2] $SSW/yohkoh/ucon/idl/freeland/refterm.pro
[Previous] [Next]
   Name: ref_term

   Purpose: reformat terminator images from DSN data

   Keyword Parameters:
      window - number of days ago to search (default is past week)

   Method:
      go_toban called for term_times (default is 8 days)
      log of previous successes checked to avoid reprocessing
      mail sent to sxt_co if new terminators processed

 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], REFTERM
	Rd_Roadmap [2], anytim2ints [1], anytim2ints [2], anytim2weekid [1]
	anytim2weekid [2], concat_dir [4], file_append [1], file_append [2]
	file_exist [1], file_exist [3], get_user [1], get_user [2], go_toban, gt_percentd
	mail [1], mail [2], newfiles [1], newfiles [2], newfiles [3], prstr [1], prstr [2]
	rd_roadmap [1], rd_tfile [1], rd_tfile [2], reltime [1], reltime [2], rem_elem [1]
	rem_elem [2], sel_timrange [1], sel_timrange [2], sort_index [1], sort_index [2]
	term_times, tim2dset [1], tim2dset [2], timegrid
   History:
      21-dec-1995 (SLF)
       9-jan-1996 (SLF) - cleanup status messages
      28-jan-1996 (SLF) - remove sxt_co from e-mail


REFORM1 $SSW/yohkoh/ucon/idl/morrison/reform1.pro
[Previous] [Next]
NAME:
	REFORM1
PURPOSE:
	Much like the normal 'reform' in idl, but if a single value is 
	inputted, then program doesn't bomb out.  Instead the single value is
	just returned.    (program made for RD_TAR.PRO)
CALLING SEQUENCE:
	name of new array/variable= REFORM1(array or single value)
 CALLED BY:
	RD_TAR
HISTORY:
	MGC, Mar, 1993.


reform_hxtcal $SSW/yohkoh/hxt/idl/util/reform_hxtcal.pro
[Previous] [Next]
NAME:
	reform_hxtcal
PURPOSE:
	Repack the HXT cal data to be full 64x64 datasets
	Input:	 4 x 64 x 4 x N   (energy x sensors x repeats)
	Output:	64 x 64     x M   (energy x sensors)
SAMPLE CALLING SEQUENCE:
	rd_roadmap, infil, rmap
	ss = where(rmap.datarectypes eq 2)
	rd_xda, infil, ss, index_in, data_in
	reform_hxtcal, index_in, data_in, index_out, data_out
 CALLS: ***
	MAP_DISCON
 CALLED BY:
	hxt_chsums
HISTORY:
	Written 1-Sep-94 by M.Morrison
	 9-Sep-94 (MDM) - Modified to assemble the daata properly.
			  Previous method assumed that the 4 major frame
			  commutation was syncronized with telemetry sub-frame
			  number.  That is not the case.  The syncronization
			  information for assembly of the data is contained
			  in INDEX.HXT.CHK_DATA which has the sensor number
			- Expanded to handle data dropouts


reform_hxtcal2 $SSW/yohkoh/ucon/idl/sato/reform_hxtcal2.pro
[Previous] [Next]
NAME:
	reform_hxtcal2
PURPOSE:
	Repack the HXT cal data to be full 64x64 datasets
	Input:	 4 x 64 x 4 x N   (CH x sensors x repeats)
	Output:	64 x 64     x M   (energy x sensors)
SAMPLE CALLING SEQUENCE:
	rd_roadmap, infil, rmap
	ss = where(rmap.datarectypes eq 2)
	rd_xda, infil, ss, index_in, data_in
	reform_hxtcal, index_in, data_in, index_out, data_out
	or reform_hxtcal, index_in, data_in, index_out, data_out,ref_phase=1
Optional Input 
 If ref_phase is 0, we assume that FIRST of data is not saturated.
 If ref_phase is 1, we assume that END of data is not saturated.
 default is 0
 CALLS: ***
	MAP_DISCON, hxt_cal_repair
 CALLED BY:
	AVE_CTS2 [1], AVE_CTS2 [2], AVE_CTS2 [3], READ_HXT_CAL, rd_hxtcal
HISTORY:
	Written 1-Sep-94 by M.Morrison
	 9-Sep-94 (MDM) - Modified to assemble the daata properly.
			  Previous method assumed that the 4 major frame
			  commutation was syncronized with telemetry sub-frame
			  number.  That is not the case.  The syncronization
			  information for assembly of the data is contained
			  in INDEX.HXT.CHK_DATA which has the sensor number
			- Expanded to handle data dropouts
       15-Sep-94 (J.Sato) -Modified to get perfect dataset.(min0,max3)
       07-May-99 (J.Sato) -Modified to add ref_phase option
       14-May-99 (J.Sato) -Modified to add documentation


reformat [3] $SSW/yohkoh/gen/idl/reformat/reformat.pro
[Previous] [Next]
NAME:
	reformat
PURPOSE:
	The Solar-A/Yohkoh reformatter for all instruments
INPUT:
	infil	- Input file name
OPTIONAL INPUT:
	strec	- Starting record (major frame) to begin reformatting
	enrec	- Ending record (major frame) to stop reformatting
	year	- Because telemetry does not have year number in it,
		  it was necessary to pass the year of the data being
		  reformatted
		  TEMPORARY FIX IS TO USE "LEAP YEAR NIBBLE" + 1991
		  to get the year, this works for 1991 and 1992
		  NEED TO HAVE THAT NIBBLE REDEFINED
	sxt	- If set (or "all" is set), reformat sxt data
	wbs	- If set (or "all" is set), reformat wbs data
	bcs	- If set (or "all" is set), reformat bcs data
	hxt	- If set (or "all" is set), reformat hxt data
	cba	- If set (or "all" is set), reformat cba data
	att	- If set (or "all" is set), reformat att data
	instru	- Reformat instrument data (sxt,bcs,hxt,wbs)
	dir_out	- The directory where reformatted data should be
		  written.
	reffil	- OBSOLETE: Used when reformatting from direct
		  BDR dump data that does not have actual observation
		  time (has ground receipt times instead)
	qstop	- If set, stop inside the routine at the end of
		  execution
	not_sxt_patrol - If set, it assumes that a buffer dump is
		  not an sxt patrol (internal handling is different)
	autodel	- If set, and the output file already exists, then
		  just go ahead and delete
OUTPUT:
	progverno- If input file name is a null string, just return the
		   program version number (to be logged elsewhere)
	fileid	- The file ID of the output files
	runtime	- The number of minutes it took to execute the routine
	nrec	- The number of major frames reformatter
 CALLS: ***
	REDUCE_MAIN, WRITE_CLOSED
 CALLED BY:
	go_get_sirius, yoyo_man2
HISTORY:
Ver 0.1 - Up to 1-Jun-91	Fortran Version, SXT, BCS only
Ver 0.2 - 17-Jun-91		IDL first version
Ver 0.43   5-Oct-91		Reversed the sign of the SXT_FOV_CENTER field
Ver 0.44  19-Oct-91		By now, roadmap structure version are being saved, as well as data structure versions
				for ATT and WDA files.  Also, this was the first location that data was written into the
				"pntg" fields in the ATT and GEN_INDEX structures.
Ver 0.45  12-Nov-91		Corrected error in SXT "mloop" and "loops" extraction - was getting wrong bytes
Ver 0.46  18-Nov-91		(A) When BCS mode header has three "FF" pattern, it was not handling it
				    properly (a double "FF" is the mark for a new spectra).
				(B) When DP rate changes from Med to High, the frame indicator telemetered down gets corrupted.
				    This was causing anomalous BCS quasi-static entries.  A patch was made to
				    ignore changes until at least 4 major frames after a rate change.  
				(C) Bob Bentley figured out that the S/C DP was corrupting the BCS spectral data in
				    Quiet/Medium rate.  He also figured out how to recover part of the data.  The
				    fix was implemented in the reformatter. 
				(D) It was discovered that the S/C has some processed pointing information available that 
				    is telemetered down (offset angle from sun center).  The ATT structure was expanded to 
				    include this information (new tag name "sc_pntg").
				(E) The BCS DP_Sync structure was expanded to include a new tag "commandStat" and the 
				    "accInterval" tag was changed from byte to integer*2 type.
Ver 0.47  19-Nov-91		Fixed "ext1ada" to take into account the sign bit while extracting "sc_pntg"
Ver 0.48  20-Nov-91		Forced the SXT table read to re-initialize the table read/listing since if the reformatter
				is run twice in a row, the tables in the directory are not read the second time.
Ver 0.49  21-Nov-91		Changed SXT table dump extraction to use "table_dump" instead of "table1"
Ver 0.50  23-Nov-91		Fixed trouble where BCS is putting out dummy data in Quiet/Medium rate - it was not
				recognizing it was all dummy data since the "QT/Med" 232 word fix was applied
Ver 0.51   2-Dec-91		Changed to call "ext1bcs" during all modes (not just QT/FL/and BCS-OUT)
				Also patched the date for the QT/Med BCS extraction fix which occurred on 27-Nov-91
Ver 0.52  10-Dec-91		Corrected HXT to look at proper bit to determine if PC or PH data
Ver 0.53  11-Dec-91		Added "telemetry" field to ATT roadmap
				Added "flare_status" field to SXT roadmap (and observing log)
				Added /progver option - just return from routine with program version
          27-Feb-92		Ran "update" with "update_wbs_rmap" and "update_hxt_rmap" to change the units on the
				summary light curve fields.  The "pointer.roadmap_version" was updated to "xxx2" hex for each
Ver 0.54  27-Feb-92		Changed HXT index and roadmap summary count variable (sum_l, sum_h1, ...) from total cnts/major 
				frame to cnts/sensor/sec
				Changed WBS index and roadmap summary count variables (sxs1, sxs2, hxs, ...) from cnts/integration
				interval to cnts/sec.
				In both cases above, the decompression algorithm was used before summing (it was not done
				before this version)
Ver 0.55   2-Mar-92		Added "qproblem" parameter to WRT1BDA to mark cases where spectra is extracted incorrectly
				(special case where #Extracted is greater than #Expected and there is a good modeID block)
Ver 0.56   3-Mar-92		Changed output filename generation to use "concat_dir"
Ver 0.57   4-Mar-92		Slight modification with respect to "qproblem" parameter for WRT1BDA - see it for more details.
				Changed the error log name from being ERRyyddmm.hhmm to ERRyyddmm.hhmm_LOG
Ver 0.58   6-Mar-92		Changed the writing of the CBA file to exclude the ground derived time information.
				This portion was 33% of the data file and was not being used.
Ver 0.59   8-Mar-92		Changed SXT index structure version from 3011 to 3012 (more housekeeping temperature data)
				Removed the setting of the year within the routine.  TTIM2EX was changed to use the
				"leap year nibble" to derive the year if the user does not specify it himself.
Ver 1.00   8-Mar-92		Reformatter used for first "offical" distribution tape
Ver 1.01  10-Mar-92		Added capability to delete existing reformatted data files if they have the same FileID
				(if they exist, and were written by another user, they must be explicitly deleted before
				reformatter can run)
Ver 1.02  10-Mar-92		Mod to "ext1ada" to put time tags on hxa scans that start at beginning of telemetry dump
Ver 1.03  13-Mar-92		Adjustment to handle the case where the first PFI or FFI image in the raw telemetry file is
				missing the "start image dump" mark.  IMPORTANT MODIFICATION
Ver 1.04  19-Mar-92		Changed logic for "qvalid_sxt" to not check the DP_ORBTIM (it used to check that it was day
				mode but data can be transmitted in the Morning ?!?)
Ver 1.05  20-Mar-92		BCS modification to WRT1BDA to mark spectra that have 'F9'x fill data with BLOCKID=5
Ver 1.06  24-Mar-92		BCS modification to WRT1BDA to mark spectra that have 'AA'x fill data with BLOCKID=5
Ver 1.07  25-Mar-92		Adjusted the SXT table writing software some
				Changed the .sxs1 from pc12 to pc21, and changed .sxs2 from pc21 to pc22
Ver 1.08  16-Apr-92		Change to REF_SUPER
 				Fixed major bug where last orbit file for a given day
                         	was being clobbered by the partial first orbit of the
                         	next day.  Should only effect the ADA and CBA files(?)
	   26-Apr-92		FileID definition was changed by 5 minutes
Ver 1.09  29-Apr-92		Change to EXT1FFI to check X range as well as Y range
				before inserting MF buffer into image array
Ver 1.10  21-May-92		Trouble with SXT FFI BUFF extraction.  Needed to have the "nx" and "ny" variables be 
				integer*4 because 256*512 in integer*2 equals 0
				Also changed logic to make sure SXT control is manual for buffer extraction
Ver 1.11   4-Jun-92		Modified so that WBS data set is written out when there is a discontinuity in the next
				frame (separate the two halfs)
				Also changed MAP_DISCON to allow an extra 0.25 seconds difference in the successive frames
				because there appears to be that error during rate changes.
Ver 1.12   9-Jun-92		MAJOR BUG fixed with WBS extraction.  Previously, it was possible to have the second half
				of the previous major frame pair written out with the "current" major frame pair.  THe data
				was out of time order because of this.
				Also changed to write out dataset when the DP rate changes
Ver 1.13  22-Jul-92		Modification to use BCS_CLOCK_FIX for the time period 16-Jul-92 17:00 to 20-Jul-92 14:50
				since an SEU caused the BCS clock value to not be telemetered down.  The fix was to use a
				single tie point and to re-calculate the reference time every major frame using that one tie
				point.  There is a 0.2-0.3 sec/day drift in the clock that was corrected for.  The calculation
				is done every major frame just because it is easier to tie into the way the clock was being used
				elsewhere in the code (it updated each time it rolled over).
Ver 1.14   4-Aug-92		Added keyword /AUTODEL
Ver 1.15   5-Aug-92		Modification so that BCS clock tie point routine is not called when in BCS memory dump mode
				(since DP_SYNC portion is overwritten with memory addresses).  BCS CPU must be enabled too.
Ver 1.16   6-Aug-92		Removed 8 lines of code (writing DIR_REFORMAT_STAT/refdata files for BCS team - obsolete now)
				in order to remove compile problem on isassX machines - not seen on sxt2!!
Ver 1.17   9-Oct-92		Modified the SXT patrol image buffer extraction - forced it to be quarter resolution
				(actually modified 28-Aug-92 but not put on-line)
	   30-Nov-92		Modified to change protection of ERR file to -rw-rw-rw
Ver 1.18   9-Apr-93		Modification to WRT1SDA to look at the next major frame when the exposure duration value
				is zero.
Ver 1.19  14-Jun-93		Corrected error where SXT images were not being reformatted when the telemetry was
				corrupted for the first frame of the image.
	   16-Jun-93		Added print statement about PFI/FFI serial numbers when they change and force a write
				Added /QDEBUG statement
Ver 1.20  11-Jul-93		Added code to flag when BLS is on for SXT FFI images
				Corrected error in extraction of WBS power status 
	   17-Jul-93		Corrected error of setting reformatter version to 1.12 instead of 1.20
	   18-Aug-93		Changed call to GET_TIM_ALL to simply set the /TABLES_DIR switch rather than pass the
				directory name
Ver 1.21  30-Sep-93		Modified so that the clock tie point is never used
				for a BCS clock value of 0 (avoid anomalous problem case of 24-Aug-93 23:00)
	   15-Nov-93		Modified WRT1SDA to delete the file if the image is all zeros
				and it is the first image being saved (other images
				might not appear and that leaves a bad file behind)
Ver 1.22  12-Apr-95		Changes to EXT1PFI and EXT1FFI to calculate the PercentD value properly


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

 NAME: REFRAC_INDEX

 PURPOSE: Returns index of refraction of materials


PRO refrac_index, name, wavel, index, biref=biref


 INPUT PARAMETERS:
	name = name of material, string.  Valid names are:
	['Al2O3', 'CaF2', 'CeF3', 'CeO2', 'HfO2', 'LaF3', $
       'La2O3', 'MgF2', 'MgO', 'NdF3', 'SiO2', 'Ta2O5', 'TiO2', $
       'Y2O3', 'ZnSe', 'ZnS', 'ZrO2']

	wavel = wavelengths in microns to compute index for, vector.

 OUTPUT PARAMETERS:
	index = index of refraction.  Returned as COMPLEX if
		absorption is known.

 OPTIONAL KEYWORDS:
	biref - If set, index is returned for extraordinary and
		ordinary directions of birefringent materials,
		dimensioned (nwavelengths, 2).
		Default returns the average.

 RESTRICTIONS:
	Index values usually valid over the range 0.25 to 2.0 microns
	wavelength.  Absorbance not accurate near
	absorption bands.  Data from Smith and Baumeister, 1979,
	Appl. Opt. 18, 111; Handbook of Optics; Melles Griot and
	CVI catalogs; Electro-Optics Handbook (1994); Edlou et al, 1993
	Appl. Opt 32, 5601.

 HISTORY: 
	Written February 16, 1995  Barry LaBonte


reget_dc_image $SSW/yohkoh/sxt/idl/util/reget_dc_image.pro
[Previous] [Next]
NAME:
	reget_dc_image
PURPOSE:
	To read the history portion of an index and to re-read
	the dark images used
 CALLS: ***
	HIS_EXIST, RD_XDA [1], RD_XDA [2], anytim2ints [1], anytim2ints [2]
	sel_dc_image [1], sel_dc_image [2], sel_dc_image [3], tim2dset [1], tim2dset [2]
HISTORY:
	Written 16-Mar-95 by M.Morrison


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

   Purpose: rename files renamed by mktap_prep to original file names

 CALLS:


REORDER_PATH $SSW/yohkoh/bcs/idl/util/reorder_path.pro
[Previous] [Next]
 NAME:
	REORDER_PATH
 PURPOSE:
	Changes the order of the fields in the IDL search path
 CALLING SEQUENCE:  
	reorder_path [,option='rev']
 INPUTS:
	option		keyword value, 'REV' means reverse
 OPTIONAL INPUTS:
	verbose		if keyword present, additional message printed
 OUTPUTS:
	none
 OPTIONAL OUTPUTS:
	new_path	the redefined path
 CALLS: ***
	STR2ARR [1], STR2ARR [2]
 RESTRICTIONS:
	
 PROCEDURE:
	Breaks the path into a string array, and then goes through 
	type by type (GEN, BCS, etc.). Fields ATEST and REL are 
	swopped if keyword OPTION='REV' to REL, ATEST. Normal is
	ATEST, REL
 MODIFICATION HISTORY:
	RDB,	19-Mar-92
	RDB,	20-MAR-92	modified to work on UNIX/ULTRIX
	RDB,	5-Jun-92	Added verbose keyword


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


ReqExpVal $SSW/yohkoh/gen/idl/dbase/reqexpval.pro
[Previous] [Next]
	NAME:
		ReqExpVal
	PURPOSE:
		Converts user requests for specific "ExpLevMode"
		status into a binary representation.
	CALLING SEQUENCE:
		seaVal = ReqExpVal( [expMode=expMode, explev=explev] )
	INPUT/Keyword:
		expMode 	if present, defines the exp mode
		explev		if present, defines the exp mailbox
				level
	RETURNED:
		returned value is the sum of all requests.
 CALLED BY:
	SXTKaySea [1], SXTKaySea [2]
	History:
		written 7-Aug-91 by GAL
		extened and ready for release 9-Aug


ReqImgVal $SSW/yohkoh/gen/idl/dbase/reqimgval.pro
[Previous] [Next]
	NAME:
		ReqImgVal
	PURPOSE:
		Converts user requests for specific "ImgParam" status
		into a binary representation.
	CALLING SEQUENCE:
		ImgVal = ReqImgVal([Cad=cad, Comp=comp, nRois=nrois, 
					Res=res])
	Keyword Input:
		cad 	if present, string val is converted to fix
		comp	if present, string val is converted to fix
		nRois	if present, string val is converted to fix
		res	if present, string val is converted to fix
	OUTPUT:
		returned value is the sum of all requests.
 CALLED BY:
	SXTKaySea [1], SXTKaySea [2]
	HISTORY:
		written 17-Oct-91, by gal


ReqPerVal [2] $SSW/yohkoh/gen/idl/dbase/reqperval.pro
[Previous] [Next]
	NAME:
		ReqPerVal
	Purpose:
		Converts user requests for specific "periph" status
		into a binary representation.
	CALLING SEQUENCE:
		seaVal = ReqPerVal([aspdr=aspdr, shut=shut, xray=xray,
			opt=opt])
	KeyWord Input:
		aspdr	Open if present, closed if not 
		shut 	mechinal if present, frame transfer if not.
		xray	if present, the string is converted to fix value
		opt 	if present, the string is converted to fix value
	Output:	
		returned value is the sum of all requests.
 CALLS: ***
	gt_filta, gt_filtb
 CALLED BY:
	SXTKaySea [1], SXTKaySea [2]
	History:
		written 29-Apr-91 for testing.
		modified 13-May-91 for use.
		mod 10-jan-92 for gt functions


RES_FFI $SSW/yohkoh/ucon/idl/hudson/res_ffi.pro
[Previous] [Next]
 NAME :
       RES_FFI
 PURPOSE:
       Restore low 8 bit images using compressed images which are close
       in time.
 CALLING SEQUENCE:
       res_ffi, ffi8, ffi, ind_ffi, ind_ffi8, reimg
 INPUTS:
       ffi8     = low 8 bit image array
       ffi      = compressed image array
       ind_ffi8 = structure of index of low 8 bit image 
       ind_ffi  = structure of index of compressed image
 OUTPUTS:
       reimg    = float array of restore image 
 SIDE EFFECT:

 CALLS: ***
	CLOS_TIM, RESTORE_FFI, gt_day [1], gt_day [2], gt_time [1], gt_time [2]
 COMMON BLOCKS:

 MODIFICATION HISTORY:
       Written  April 21, 1992 by Bachtiar Anwar


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

   Purpose: display frequency of exposure durations

 CALLS:


Respint $SSW/yohkoh/ucon/idl/mctiernan/respint.pro
[Previous] [Next]
 NAME:
	Respint
 CALLING SEQUENCE:
	Respint,f,c
 PURPOSE: 
	Respint will integrate the flux, or its derivative over the response.
	The flux is assumed to be given at the same energies as the response.
 INPUT:
	f=photon flux, or df/da, 
 OUTPUT:
	c=countrate or dc/da
 CALLED BY:
	hxt_cutoff
 COMMON BLOCKS:
	Common rsp,nch,nsc,esc,rsc
		nch= no. of channels used it fit
		nsc= no. of energies used,
		esc= energies used
		rsc= rde0, response*de for the channels used in the fit
 HISTORY:
	Spring '92 by JMcT


Responses [3] $SSW/yohkoh/ucon/idl/mctiernan/responses.pro
[Previous] [Next]
 NAME:
	Responses
 CALLING SEQUENCE:
	Responses,infile,ncm,nsc,esc,rsc0,rsc1,e1,e2,ebar
 PURPOSE: 
 	Responses reads in the response for one detector.
 INPUT:
	infile= input file name
 OUTPUT:
	ncm= no. of channels,
	nsc=no. of energies at which the response is given, 
	rsc0=sc response function
	rsc1=rsc0*de,
	e1,e2 = the channel boundaries,
	ebar= the channel midpoint energy.
 CALLS: ***
	Dummy_rd [1], Dummy_rd [2], Dummy_rd [3]
 CALLED BY:
	Multresponses, SXT_POWL, wbs_response [1], wbs_response [2]
 HISTORY:
	Spring '92 by JMcT


rest_low8_cube [1] $SSW/yohkoh/gen/galileo/idl/lmsal/rest_low8_cube.pro
[Previous] [Next]
NAME:
	rest_low8_cube
PURPOSE:
	To restore a cube of low8 data.  The input data must
	consist of low-8 AND compressed data.  The output will
	have the same number of images as the input (ie: some
	images are simple decompressed images, not 12-bit images)
RESTRICTION:
	The input data needs to all be all of the same type (ie:
	all PFI data or all FFI data).  Do not mix image types.
SAMPLE CALLING SEQUENCE:
	data = rest_low8_cube(index, data)
INPUT:
	index	- The index structure
	data	- The data cube
OUTPUT;
	Returns the 12-bit restored data.
 CALLS: ***
	RESTORE_LOW8 [1], RESTORE_LOW8 [2], RESTORE_LOW8 [3], WDEF [1], WDEF [2]
	align1img [1], align1img [2], fmt_tim [1], fmt_tim [2], gt_center, gt_comp
	gt_corner, gt_filta, gt_pix_size, gt_res, gt_shape, his_index, ocontour [1]
	ocontour [2], ocontour [3], ocontour [4], ocontour [5], required_tags, sxt_cen [1]
	sxt_cen [2], sxt_decomp [1], sxt_decomp [2], track_h2a [1], track_h2a [2]
	track_h2a [3]
 CALLED BY:
	sxt_prep [1], sxt_prep [2], sxt_prep [3]
HISTORY:
	Written 23-Mar-95 by M.Morrison
	11-Apr-95 (MDM) - Added the /PFI_STRIP command to the 
			  GT_CENTER call so the correct PFI strip
			  is selected.
			- Modified so that the final image selection
			  it to minimize the POINTING error, not the
			  closest image in time
			- Major modification to shift the compressed
			  image to the pointing of the low-8 image
			  TAKING DIFFERENTIAL ROTATION INTO ACCOUNT!!!
	17-Apr-95 (MDM) - Added a restriction that only PFI data be
			  passed in.
	21-Jul-04 (LWA) - Deleted obsolete commands
			  Modified to handle case of mixed ROI size.
	28-Jul-04 (LWA) - Modified to handle case of mixed resolutions.
       13-Dec-04 S.L.Freeland - externalize .HIS updates from restore_low8.pro
       10-Mar-05 (Aki T.) - Add .HIS tag to the input index.
	 5-Jul-05 (LWA) - Do not correct for solar rotation is center of
			  PFI-strip is beyond 0.85 Rsun.


rest_low8_cube [2] $SSW/yohkoh/sxt/idl/util/rest_low8_cube.pro
[Previous] [Next]
NAME:
	rest_low8_cube
PURPOSE:
	To restore a cube of low8 data.  The input data must
	consist of low-8 AND compressed data.  The output will
	have the same number of images as the input (ie: some
	images are simple decompressed images, not 12-bit images)
RESTRICTION:
	The input data needs to all be all of the same type (ie:
	all PFI data or all FFI data).  Do not mix image types.
SAMPLE CALLING SEQUENCE:
	data = rest_low8_cube(index, data)
INPUT:
	index	- The index structure
	data	- The data cube
OUTPUT;
	Returns the 12-bit restored data.
 CALLS: ***
	RESTORE_LOW8 [1], RESTORE_LOW8 [2], RESTORE_LOW8 [3], WDEF [1], WDEF [2]
	align1img [1], align1img [2], fmt_tim [1], fmt_tim [2], gt_center, gt_comp
	gt_corner, gt_filta, gt_pix_size, gt_res, gt_shape, his_index, ocontour [1]
	ocontour [2], ocontour [3], ocontour [4], ocontour [5], required_tags, sxt_cen [1]
	sxt_cen [2], sxt_decomp [1], sxt_decomp [2], track_h2a [1], track_h2a [2]
	track_h2a [3]
 CALLED BY:
	sxt_prep [1], sxt_prep [2], sxt_prep [3]
HISTORY:
	Written 23-Mar-95 by M.Morrison
	11-Apr-95 (MDM) - Added the /PFI_STRIP command to the 
			  GT_CENTER call so the correct PFI strip
			  is selected.
			- Modified so that the final image selection
			  it to minimize the POINTING error, not the
			  closest image in time
			- Major modification to shift the compressed
			  image to the pointing of the low-8 image
			  TAKING DIFFERENTIAL ROTATION INTO ACCOUNT!!!
	17-Apr-95 (MDM) - Added a restriction that only PFI data be
			  passed in.


rest_low8_ffi $SSW/yohkoh/gen/galileo/idl/lmsal/rest_low8_ffi.pro
[Previous] [Next]
NAME:
	rest_low8_ffi
PURPOSE:
	To restore a cube of low8 FFI data.  The input data must
	consist of low-8 AND compressed data.  The output will
	have the same number of images as the input (ie: some
	images are simple decompressed images, not 12-bit images)
RESTRICTION:
	The input data needs to all be FFI data.
	Program requires raw SFR data.
	Low8 and compressed images must be taken within 20 minutes
	   of each other.  This is determined in sxt_low8_match.pro.
SAMPLE CALLING SEQUENCE:
	data = rest_low8_ffi(index, data)
INPUT:
	index	- The index structure
	data	- The data cube, may be mixed resolutions and 
		  can contain any sort of images in addition
		  to the NaBan and WdBan images.
OUTPUT
	Returns the datacube 12-bit restored images for qualifying
	low8 images.  Returned datacube has been decompressed but
	not otherwise processed.  sxt_prep is only used for alignment
	of the compressed to the low8 images.
 CALLS: ***
	RESTORE_LOW8 [1], RESTORE_LOW8 [2], RESTORE_LOW8 [3], WDEF [1], WDEF [2], gt_filta
	gt_res, his_index, ocontour [1], ocontour [2], ocontour [3], ocontour [4]
	ocontour [5], required_tags, sxt_decomp [1], sxt_decomp [2], sxt_low8_match [1]
	sxt_low8_match [2], sxt_prep [1], sxt_prep [2], sxt_prep [3]
 CALLED BY:
	sxt_prep [1], sxt_prep [2], sxt_prep [3]
HISTORY:
	 2-Nov-2004 LWA  Written, borrowing from rest_low8_cube.
       11-Nov-2004 S.L.Freeland - update HIS vis modified restore_low8
       13-Dec-2004 S.L.Freeland - externalize HIS properly
	10-Feb-2005 LWA  Set up to handle diffuser images


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

   Purpose: restore data written with savedat

   slf, 28-feb-92  quick and dirty (pv-wave compatatible??)

   note: optional 3rd parameter (assoc) indicates binary file
	  not actually read - file is opened and returned value
	  is associated variable 


RESTORE_FFI $SSW/yohkoh/sxt/idl/util/restore_ffi.pro
[Previous] [Next]
 NAME:
 	RESTORE_FFI	
 PURPOSE:
       Restore a low-8 image by reference to a compressed image	
 CALLING SEQUENCE:
	img = restore_ffi(low8,comp) returns a corrected image that uses
	  a compressed image (comp) to reference the low-8 image (low8).
 WRITTEN:
	HSH, March 25, 1992 
 CALLS:
 CALLED BY
	NAME [3], RES_FFI


RESTORE_LOW8 [1] $SSW/yohkoh/gen/galileo/idl/lmsal/restore_low8.pro
[Previous] [Next]
 NAME:
 	RESTORE_LOW8
 PURPOSE:
       Restore a low-8 image by using a similar compressed image to 
	  guess the upper four bits of information.
 CALLING SEQUENCE:
	img = restore_ffi(low8,comp) returns a corrected image that uses
	  a compressed image (comp) to reference the low-8 image (low8).
         The user has to define which image is which. 'comp' can be a
	  raw compressed image if desired. 

 Keyword Parameters:
      index - (input/output) - optional input index record of low8 to restore
      comp_index (input) - optional input index record of compressed or hi-8 used in restore
 WRITTEN:
	HSH, March 25, 1992 
	HSH, March 28, 1992, modified to permit decompressed image input
	MDM, March 23, 1995, Modified how to recognize decompressed images
       10-November-2004 - S.L.Freeland - add INDEX and COMP_INDEX input keywords
                          and up date .HIStory record if supplied
 CALLS: ***
	data_chk [1], data_chk [2], data_type [1], data_type [2], his_index, required_tags
	sxt_decomp [1], sxt_decomp [2]
 CALLED BY:
	rest_low8_cube [1], rest_low8_cube [2], rest_low8_ffi
 Side Effects:
   If INDEX is supplied, then .HIS is updated to reflect images used in restore


RESTORE_LOW8 [2] $SSW/yohkoh/gen/galileo/idl/lmsal/restore_low82.pro
[Previous] [Next]
 NAME:
 	RESTORE_LOW8
 PURPOSE:
       Restore a low-8 image by using a similar compressed image to 
	  guess the upper four bits of information.
 CALLING SEQUENCE:
	img = restore_ffi(low8,comp) returns a corrected image that uses
	  a compressed image (comp) to reference the low-8 image (low8).
         The user has to define which image is which. 'comp' can be a
	  raw compressed image if desired. 

 Keyword Parameters:
      index - (input/output) - optional input index record of low8 to restore
      comp_index (input) - optional input index record of compressed or hi-8 used in restore
 WRITTEN:
	HSH, March 25, 1992 
	HSH, March 28, 1992, modified to permit decompressed image input
	MDM, March 23, 1995, Modified how to recognize decompressed images
       10-November-2004 - S.L.Freeland - add INDEX and COMP_INDEX input keywords
                          and up date .HIStory record if supplied
 CALLED BY:
	rest_low8_cube [1], rest_low8_cube [2], rest_low8_ffi
 Side Effects:
   If INDEX is supplied, then .HIS is updated to reflect images used in restore


RESTORE_LOW8 [3] $SSW/yohkoh/sxt/idl/util/restore_low8.pro
[Previous] [Next]
 NAME:
 	RESTORE_LOW8
 PURPOSE:
       Restore a low-8 image by using a similar compressed image to 
	  guess the upper four bits of information.
 CALLING SEQUENCE:
	img = restore_ffi(low8,comp) returns a corrected image that uses
	  a compressed image (comp) to reference the low-8 image (low8).
         The user has to define which image is which. 'comp' can be a
	  raw compressed image if desired. 
 WRITTEN:
	HSH, March 25, 1992 
	HSH, March 28, 1992, modified to permit decompressed image input
	MDM, March 23, 1995, Modified how to recognize decompressed images
 CALLS:
 CALLED BY
	rest_low8_cube [1], rest_low8_cube [2], rest_low8_ffi


ret_day $SSW/yohkoh/ucon/idl/hara/rd_sfd_carr.pro
[Previous] [Next]
NAME:
    ret_day
PURPOSE
    return the day and time corresponding to DOY79
INPUT 
    dday: day of year, dday=4749 <---> 1-JAN-92
OUTPUT
    y:year, m:month, d:day, t:time (hour)
HISTORY
    Dec 15, 1993, made by H. Hara    
 CALLS:
 CALLED BY
	carr2btime [1], carr2btime [2], pr_conf, rd_sfd_carr


REV_PATH $SSW/yohkoh/bcs/idl/util/rev_path.pro
[Previous] [Next]
 NAME:
	REV_PATH
 PURPOSE:
	Calls REORDER_PATH with OPTION='REV'
 CALLING SEQUENCE:  
	Run on entry if required by invoking IDL by the command
		IDL REV_PATH
 INPUTS:
	none
 OUTPUTS:
	none
 RESTRICTIONS:
	Can only be run on entry. Gives a compile error if run from
	within IDL since there is no END statement.
 PROCEDURE:
	reverse the order in !path to REL, ATEST, USERCONTRIB
	normally it is ATEST, REL
 MODIFICATION HISTORY:
	RDB	19-MAR-92


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

   Purpose: flag tapes older or newer than specified reformatter version

   Input Parameters:
      revision - string containing reformatter revision (ex: '1.170')

   Optional Keyword Parameters:
       newer - if set, flags Versions newer than revision (default is older)
       file  - if set, creates and prints file
	bindirs - (in/out) - input array of binary tape directory structures
		  (if not present, reads/returns all highest versions on line)

   History: slf 28-oct-92

   Method - search binary tape directory files for revision number

 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], DPRINT, concat_dir [4], rd_xbd
   Restrictions: probably Unix only

   Side Effects - if file switch is set, writes file:chkver.dat to home dir.


RFITS [3] $SSW/yohkoh/gen/idl/atest/rfits.pro
[Previous] [Next]
 NAME:
        RFITS
 PURPOSE:
        Reads a standard FITS disk file into an array.
 CATEGORY:
        Input/Output.
 CALLING SEQUENCE:
        result = rfits(filename)
 INPUTS:
        filename = string containing the file name.
 OPTIONAL (KEYWORD) INPUT PARAMETERS:
        index = nonnegative integer. If this parameter is present, a period
              and the index number are appended to the filename (e.g., '.34').
              This option makes handling of data in the MCCD file naming
              convention easier.
        scale = if set, floating point array is returned, reflecting
                that true value = read value * bscale + bzero.
	 nodata = If set, then just read the headers
 OUTPUTS:
        result = byte, integer, or long array, containing the FITS data array.
               The dimensionality of result reflects the structure of the FITS
               data.  If keyword scale is set, then floating point array.
 OPTIONAL (KEYWORD) OUTPUT PARAMETERS:
        date_obs = date of observation (string).
        time_obs = time of observation (string).
        header = string vector, containing the full FITS header (each element
                 of the vector contains one FITS keyword parameter).
 CALLS: ***
	dec2sun [1], dec2sun [2], yoh_ieee2vax [1], yoh_ieee2vax [2]
 CALLED BY:
	BFITS, RFITS2 [1], RFITS2 [2], RMOVIE, TEMP_CUBE, bbso_name_fix, cal_fig_mich
	check_dumps [1], check_ff_load, disp_sci5k, disp_synop, fits_disp_month [1]
	fits_disp_month [2], gbo_pfi, kp_name_fix, lastgki, mk_ascii_list, mk_dpc_image
	mk_ff_load, mk_limb_pixmap, mk_list_image, mk_list_load, mk_mdi_fits, mk_mdi_load
	mon_health [1], mon_health [2], msok_poi_copy [1], msok_poi_copy [2]
	mwlt_tape2jpeg, new_disp_sci5k [1], new_disp_sci5k [2], new_mon_health [1]
	new_mon_health [2], nob_name_fix, norik_name_fix, perf_vwbin, raw_list2pixmap
	rd_trace_i0 [1], rd_trace_i0 [2], read_mdi, rt_fits, rt_mag, set_list_addr, sun_grid
	synop_movie, tr_scan_images, trace_rd_jpeg, wrt_fits_bin_exten [1]
	wrt_sci160k_img, xdisp_fits, xdisp_sci5k
 COMMON BLOCKS:
        None.
 SIDE EFFECTS:
        None.
 RESTRICTIONS:
        Only simple FITS files are read. FITS extensions (e.g., groups and
        tables) are not supported.
 MODIFICATION HISTORY:
        JPW, Nov, 1989.
        nn, jan, 1992, to add the option to return array containing
                       true values calculated from bscale and bzero.
	MDM (16-Sep-92) - Added code to do byte swapping when the output
			  array is integer*2 or integer*4 and reading on a
			  DEC machine.
	MDM (16-May-93) - Expanded to handle REAL*4 and REAL*8 data types.
	MDM (27-Jan-94) - Corrected so that it could handle long 1 dimensional
			  arrays (replaced FIX with LONG)
       DMZ (6-Apr-94)  - added DEC/OSF check
	SLF (7-Apr-94)  - fixed typo
	MDM (13-Oct-95) - Added /QSTOP
			- Allowed NAXIS = 0 and not crash the reader
	MDM (22-Aug-96) - Added /nodata
       AAP (19-Feb-98) - Added 'linux' to the swap_os
       SLF (19-Feb-98) - call 'is_lendian' (single point 'swap_os' function)


RIG_AL $SSW/yohkoh/sxt/idl/register/rig_al.pro
[Previous] [Next]
 NAME:
	RIG_AL
	
 PURPOSE:
	Coalign a series of images using input offsets and POLY_2D

 CALLING SEQUENCE:
	DATA_OUT = RIG_AL(DATA_IN,SDC_OFF,SDC_DIM,FOV_OFF)

 INPUTS:
	DATA_IN = Data cube of images to be coaligned
	SDC_OFF (Sub-Data-Cube Offsets) = 2D array of indices of the lower
		left corners of the sub-arrays which will be extracted from
		the full data cube for registration.
	SDC_DIM (Sub-Data-Cube Dimensions) = Two element vector containing
		the x,y dimensions of the sub data cube to be extracted
		from the full data cube.
	FOV_OFF (Field Of View Offsets) = 2D array of x,y offsets between
		fov's between images (that is, the x,y offsets between
		common features within adjacent images).  This specifies
		the amount of shifting which will be done on each image
		by POLY_2D or BICUB_2D or BEZIER_2D or whatever.

 OUTPUTS:
	DATA_OUT = Data cube of images to be coaligned

 CALLS: ***
	CONGRID [1], CONGRID [2], CONGRID [3], XWIN [1], XWIN [2], xwin [3]
 MODIFICATION HISTORY:
	Version 1.0 - Mar, 1991, G. L. Slater, LPARL


RJPEG $SSW/yohkoh/ucon/idl/wuelser/rjpeg.pro
[Previous] [Next]
 NAME:
        RJPEG
 PURPOSE:
        Read a grayscale image in JPEG/JFIF format.
 CATEGORY:
 CALLING SEQUENCE:
        image = rjpeg(file)
 INPUTS:
        file = string.  File name.
 KEYWORDS (INPUT):
        scale = 1, 2, 4, or 8.  Reduce image by factor 1, 2, 4, or 8.
 OUTPUTS:
        image = bytarr.  The decompressed image.
 KEYWORDS (OUTPUT):
 COMMON BLOCKS:
        None.
 SIDE EFFECTS:
 RESTRICTIONS:
        Only greyscale output even if the JPEG image is color.
        (It's really just a quick-and-dirty program).
 PROCEDURE:
        RJPEG is a primitive IDL frontend to DJPEG, a C program from the
        Independent JPEG Group.  DJPEG is spawned to produce a PGM file
        which is then taken into IDL through a pipe.
 MODIFICATION HISTORY:
        JPW, 14-nov-94
        JPW, 23-nov-94  flipped image in y (JPEG: top-down, IDL: bottom-up)


rkey $SSW/yohkoh/ucon/idl/leka/rkey.pro
[Previous] [Next]
 NAME:
        rkey
 PURPOSE:
        Extracts a FITS value from a FITS header.
 CATEGORY:
        FITS
 CALLING SEQUENCE:
        result = rkey(header,keyword,ktype,num)
 INPUTS:
        header = string array containing lines of FITS header
	 keyword = string containing the keyword to extract
        ktype   = string containing type of keyword 
		   (INTEGER,REAL,CHAR,LOGICAL,COMMENT)
        num = Index for multiple keywords like HISTORY and COMMENT, eg if
              num is 2, take the second occurance of the keyword.
 OPTIONAL (KEYWORD) INPUT PARAMETERS:
	 None
 OUTPUTS:
        result = integer,float, or string  depending on keyword type.
                 If the keyword is not found, result is returned equal 
                 to 'undefined'
 OPTIONAL (KEYWORD) OUTPUT PARAMETERS:
        None
 CALLED BY:
	BFITS
 COMMON BLOCKS:
        None.
 SIDE EFFECTS:
        None.
 RESTRICTIONS:
        None.
 MODIFICATION HISTORY:
        TRM, Nov, 1990


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

 PURPOSE: Script to remove the limb darkening from optical images.

 METHOD: Starting from the center, takes concentric circles and performs
	  azimuthal fourier transforms, retains the first n modes (default
	  2) and inverse transforms them to construct a background. This is
	  then smoothed and subtracted from the original image. The SETBACK
	  keyword causes the surrounding background to be set to the minimum 
	  on disk value to leave a sharp limb for the limb-finding routines.
	  To retain an image of prominances etc. you can use the PROM keyword
	  Use of the MARGIN keyword can handle these cases, will exclude 
	  bright "features" above the limb such as labels.
 
 
 CALLING SEQUENCE:

         outimg=rm_darklimb(data,[target=trgt],[modes=mdnm],[/setback]
                                    [,/prom][,margin=margin])

 PARAMETERS:

	inimage   image/s from which the limbdarkening is to be removed.
	outimg    the processed result.

 KEYWORDS:

    	target 	  contains the centroid and radius of the input image.
	    	  if this is missing they will be calculated.
    	modes     sets the number of fourier modes used to construct the 
            	  background profile. Default is 2.
   	setback   to reset the background to the minimum on disk value.
	prom	  to retain the shape of prominances.
	margin    when set everything at a radius greater than limb + margin
		  is reset. In pixels.

 CALLED BY:
	fl_suntoday [1], fl_suntoday [2], fl_suntoday [3], get_newsoon, halp halphaprep
	mk_sun_mosaic, rt_fits, rt_hdha, rt_nkr, sun_today [1], sun_today [2], sun_today [3]
 RESTRICTIONS: It is expected that the image is already corrected for 
   	        oblateness due to the image format.
		The margin keyword cannot be set exactly to zero. If 
		so the keyword is ignored.

 RETURN TYPE:  Same as input data type.                                

 CALLS: ***
	TARGET [1], background, cut_lev, match_type, set_back, target [2]
 HISTORY: 
           drafted by A. McAllister, 17-apr-92.
           added optional mode number and target keywords, A.McA., 29-nov-92. 
	    added SET_BACK call, A.McA, 14-Jan-93.
	    added margin keyword for SET_BACK, A. McA. 4-Feb-93.
	    freed return data type, A.McA. 9-mar-93.
	    added prom keyword, A.McA. 10-mar-93.
	    reworked to take data cubes, A.McA. 5-dec-94.


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


       PURPOSE: decompress two sxt frames and subtract them


       METHOD: 


       CALLING SEQUENCE:  sxt_nrm=rm_df(sxt,dark)


       NOTES:


       PARAMETERS:


       KEYWORDS:


 CALLS: ***
	sxt_decomp [1], sxt_decomp [2]
       HISTORY: drafted by A. McAllister, jan. 23 1993.



RM_FEATURE $SSW/yohkoh/ucon/idl/metcalf/rm_feature.pro
[Previous] [Next]

function rm_feature,image,index

NAME:
     RM_FEATURE
PURPOSE:
     Remove a "feture" in an image by interpolating over all the
     nearby points not part of the feature
CATEGORY:
CALLING SEQUENCE:
     new_image = rm_feature(image,index)
INPUTS:
     image = 2D image array
     index = vector of indeices of image which are in the feature
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS
OUTPUTS:
     new_array = interpolated image array
 CALLS: ***
	where_arr [1], where_arr [2]
 CALLED BY:
	SDC_VERIFY
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
     Slow.  Should be vectorized.  Can't do corners.
PROCEDURE:
MODIFICATION HISTORY:
     T. Metcalf 1997-Nov-03


RMAP_TIM2REC $SSW/yohkoh/bcs/idl/util/rmap_tim2rec.pro
[Previous] [Next]
 NAME:
	RMAP_TIM2REC
 PURPOSE:
  	Code to translate a time interval into a data number range 
  	applicable to the roadmap (spectral) data.
 CALLING SEQUENCE:  
  	idl> .run rmap_tim2rec
 INPUT:
	time interval in hours.
 OUTPUT:
	SS array contains all data set numbers in time interval
       TTIME contains time (hours) of all data sets in interval
       DS_ST & DS_END contain start and stop data numbers.

 OPTIONAL OUTPUT:

 HISTORY
	CDP	Fall, 1991
	RB	Feb 22, 92	Small mods to format statements


RMOVIE $SSW/yohkoh/ucon/idl/wuelser/rmovie.pro
[Previous] [Next]
 NAME:
        RMOVIE
 PURPOSE:
        Reads a sequence of FITS images into an array.
        The array can be displayed with the "movie" users library routine.
 CALLING SEQUENCE:
        array = rmovie(file,from,count,scale)
 INPUTS:
        file = string containing the file name without the extension ".i"
        from = index number of the first file (extension .from)
        count = number of frames in movie.  Corresponds to number of files
                being read.  The file numbers must be contiguous.
        scale = scaling factor.  Image will be divided by scale to fit into
                a variable of type byte
 OUTPUTS:
        array = 3-D byte array. Output image array to be displayed by "movie".
 KEYWORDS (INPUT):
        channels = intarr : vector containing FITS channel numbers.  rmovie
                   places several spectral images side by side into each frame
                   if channel has several elements.  Only used if data is 3D.
                   Wavelength is assumed to run along the fast axis.
        difference = intarr : vector of channel numbers to be subtracted for
                     difference images.  Must have same number of elements as
                     channels.  Value = -1 means no difference image.
        sample = integer : sample if 1, else bilinear interpolation in zoom
        xzoom = integer : zoomfactor in x.  Default = 1
        yzoom = integer : zoomfactor in y.  Default = 1
        xsize = integer : size of subframe in x.  Default: full frame
        ysize = integer : size of subframe in y.  Default: full frame
        xoffset = integer : offset of subframe in x.  Default = 0
        yoffset = integer : offset of subframe in y.  Default = 0
        flip = switches on the "flip upside down" feature.  movie supposedly
               runs faster in the "upside down" mode.
 KEYWORDS (OUTPUT):
        time = string vector with the time for each frame.
        outheader = string vector.  Description of the movie, each line
                    (string element) starting with HISTORY.  Can be added
                    to a FITS header in wfits.
 CALLS: ***
	RFITS [1], RFITS [2], RFITS [3]
 COMMON BLOCKS:
        None.
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:
        JPW, 1991


ROT_PERIOD $SSW/yohkoh/ucon/idl/acton/rot_period.pro
[Previous] [Next]
NAME:
     ROT_PERIOD
       function rot_period, latitude, howard=howard, allen=allen, $
            synodic=synodic, sidereal=sidereal, carr=carr
PURPOSE:
     Computes the solar rotation period for a given latitude based on 
	differential or rigid rotation of the sun.
CALLING SEQUENCE:
     period = rot_period(latitude)
     period = rot_period(xxx, /carr)
     period = rot_period(25,/sidereal)
INPUTS:
     latitude = latitude in DEGREES
KEYWORD PARAMETERS
     allen = use values from Allen, Astrophysical Quantities (DEFAULT)
     howard = use values for small magnetic features from Howard et al.
     sidereal = use sidereal rotation rate 
     synodic = use synodic rotation rate  (DEFAULT)
     carr = return the Carrington period
OUTPUTS:
     solar rotation period in DAYS.
MODIFICATION HISTORY:
     LWA, 21-May-95,  Adapted from Metcalf program DIFF_ROT.


rot_pix2 $SSW/yohkoh/ucon/idl/slater/rot_pix2.pro
[Previous] [Next]
 NAME:
 	rot_pix2
 PURPOSE:
	Computes pixel coordinates (in arbitrary resolution pixels)
	in a series of full disk images of a differentially rotated
	
 CALL:
 	YZ_COORDS = ROT_PIX2(ITEM,Y0,Z0,REF_FRAME)
 CALLS: ***
	C2S, DR_PHOTO [1], DR_PHOTO [2], DR_PHOTO [3], S2C [1], S2C [2], get_pnt, get_rb0p [1]
	get_rb0p [2], gt_hxa, gt_res, int2secarr [1], int2secarr [2]
 CALLED BY:
	GET_SUBARR2
 HISTORY:
	Written 30-Sep-1992 - GLS


rot_trim $SSW/yohkoh/ucon/idl/labonte/rot_trim.pro
[Previous] [Next]
  Magnify and rotate an image by inserting it into a bigger array to 
  avoid cutting off data

PRO rot_trim, image, p, mag,  outimage, xoff, yoff

 Input:
	image =  image
	p = angle of rotation, in degrees, clockwise,  as per ROT_INT
	mag = magnification, > 1. => magnify, as per ROT_INT
 Output:
	outimage = rotated/magnified image in big array
	xoff, yoff = offsets of (0,0) pixel in bigger array
		before rotation/magnification

 CALLS: ***
	ROT
 CALLED BY:
	image_match
 History:
	Written June 8, 1993  Barry LaBonte
	Cleaned up  May 17, 1994  BJL


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

 PURPOSE:
	   Rotate an image about a point, and optionally recenter it.

 CALLED BY:
	ELL2CIR, rt_fits, rt_hdha, rt_mag, rt_nkr
 PROCEDURE:
	The POLY_2D function is used to rotate the original image.
	Note that the nearest neighbor method of interpolation
	is used.  Use ROT_INT for bilinear interpolation.                       

 CALLING SEQUENCE:
	             Result = ROTT(A,ANGLE,X0,y0[,xc,yc][,missing=value][,/interp])

 PARAMETERS:
	      	A  	Image, may be of any type, must have two dimensions.
		ANGLE   Angle of rotation in degrees CLOCKWISE. (Why?,
			because of an error in the old ROT.)
		X0  	Center of rotation, X subscript.  
		Y0  	Center of rotation, Y subscript.  

 OPTIONAL PARAMETERS:

	XC = Center of output, X subscript.  If omitted, YC = X0. 
	YC = Center of output, Y subscript.  If omitted, YC = Y0.

 KEYWORDS:

	Interp = keyword parameter, set to 1 for bilinear interpolation.
		0 or omitted for nearest neighbor.
	Missing = kwrd param, data value to substitute for pixels in the 
		output image that map outside the input image.

 MODIFICATION HISTORY:
	June, 1982, Written by DMS, RSI.
	Feb, 1986, Modified by Mike Snyder, ES&T Labs, 3M Company.
	 adjusted things so that rotation is exactly on the designated
	 center.
	October, 1986.  Modified by DMS to use POLY_2D Function.
	Aug, 1988.	Added interp param.
       Hacked to make a pure rotation routine, 12-dec-92, A.McA.


ROTWIN $SSW/yohkoh/ucon/idl/metcalf/rotwin.pro
[Previous] [Next]
NAME:
     ROTWIN
PURPOSE:
     Rotates a window by multiples of 90 degrees
CATEGORY:
CALLING SEQUENCE:
     rotwin,[direction]
INPUTS:
OPTIONAL INPUT PARAMETERS:
     direction = direction of rotation (see IDL rotate command).  The default
                 is to rotate 90 degrees CCW.
KEYWORD PARAMETERS
     window = window number to rotate (default is the current window)
OUTPUTS:
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
     uses the IDL rotate command to rotate the window
MODIFICATION HISTORY:
     T. Metcalf  June 1992


rough_loc $SSW/yohkoh/ucon/idl/mcallister/rough_loc.pro
[Previous] [Next]

  PURPOSE:
           To be a rough sxt locator when no info is given. 
           Should be able to start with a really rough quess
           and zero in.  





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

 PURPOSE: A script to read GBO fits files. It also allows you to match it 
          to another image (GBO or SXT), remove limbdarkening, and convert to 
          byte type. 

 METHOD:  Reads the file with RFITS, and calls a series of routines to do the
	   processing. The exact function can be controlled with keywords.
	   When limbdarkening removal is on, the default is to use the setback
	   keyword, which sets the background pixels to the minimum on disk
	   value. In this case using the /prom keyword preserves prominences.

 CALLING SEQUENCE:

       outimg=rt_fits(filename[,targt_img][,indx][,header=header][,modes=modes]
			       [,delang=da][,/nomatch][,/limbdark][,/nosetback]
                              [,/invert][,/prom][,/byte][,/sel])

	raw=rt_fits('path/filename',header=head,/nomatch,/limbdark,/byte)
       matched=rt_fits('path/filename',image,index,header=head,/limbdark,/byte)
       ld_rmvd=rt_fits('path/filename',image,index,header=head,/byte)
	calcium=rt_fits('path/filename',image,index,header=head,/invert,/byte)  

 PARAMETERS: 
            filename     GBO filename (with path).
            target       target image matched for size and location. Can
			  also be a 6 component vector,the CENTROID (0,1), 
                         the DIAMETERS(horizontal,vertical;2,3), and the pixel 
	                  size (x,y:4,5) of the target image.  
            indx         if the target is an sxt image you need to pass
                         in the associated index.
            outimg       output image scaled and centered to match the
                         target image.

 KEYWORDS:
    	     header       receives the header info for the Halpha image.
	     modes        number of fourier modes to use for LD profile.
			  The default is 2.
	     delang	  optional roll angle correction.
	     nomatch      omits matching. 
	     limbdark     if set leave limbdarkening.
	     nosetback    suppresses the setback function.
	     invert	  when set invert the image before matching.
	     prom	  when set leaves prominence outlines, when 
			  setback is called.
	     byte         if set return byte scaled output.
	     bbso	  removes the labels on BBSO processed GBO data.
	     sel	  removes the labels on SEL processed GBO data.             

 RETURN TYPE:  BYTE      if the byte keyword is set
               FLOAT     otherwise

 CALLS: ***
	IMGSCL2, IMG_MATCH, RFITS [1], RFITS [2], RFITS [3], ROTT, rm_darklimb
 HISTORY: drafted by A. McAllister, Apr. 1992. 
          slightly reworked to use gen_loc,  A.McA, May 1992.
          added keywords modes,limbdark,byte,nomatch, A.McA, Dec. 1992.
          added setback option, A. McA, Jan. 1993.
	   added sel keyword, A. McA, Feb. 1993.  
	   added delang keyword, made setback default, added invert 
	         keyword, added prom keyword, A. McA, Mar. 1993.
	   fixed but in nomatch section, AMcA, Dec. 1, 1993. 
	   Allow a vector target for matching, AMcA, Feb. 21, 1994.
	   Added BBSO keyword, AMcA, Feb. 3, 1995.   


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

 PURPOSE: 	To read and optionally process a Hida H alpha image for use 
               with Yohkoh SXT or other GBO data.

 METHOD: 	This reads an Hida H alpha image, inverts it, rotates it (if
		necessary), and repositions it to match a target (either SXT or 
		GBO). The result is then fed to RM_DARKLIMB to remove the 
		limb-darkening. To get the rotation angle it calls GET_RB0P. 
		To add roll correction use the DELANG keyword. As the resultant 
    		background is a mess, it is reset, unless you suppress it with 
		the NOSETBACK keyword. 

 CALLING SEQUENCE: 

       output=rt_hdha(filename,[target],[target_i],[delang=delang],[header=head],
                               [modes=mdnm],[/limbdark],[/nosetback],[/nomatch])

               filename  a string with the path/filename of a Hida Halpha image
               target    the SXT target image
               target_i  the index entry for the target image


 KEYWORDS:   
		delang    corrections to the solar axis tilt angle (clockwise degrees)
               header    if you wish, this returns the header.
		limbdark  if set leave limbdarkening
               modes	  number of fourier modes to use for LD profile
			  The default is 2.
		nosetback suppresses resetting the background.
		nomatch   omits rotation and matching
  			  

 RESTRICTIONS: The angle DELANG can be used to correct for the small (~1 deg) 
		SXT pointing error. There may also be small errors in GBO pointing. 
		When using a non-SXT image as target delang must be the whole
		rotation angle. Running GET_RB0P with the desired date and
		time will return it in the third component.

     		Omiting the NOSETBACK keyword will obscure the details of 
		limb prominances.


	CALLS: ***
	CENT, IMGSCL2, NKRGET, ROTT, TARGET [1], cut_lev, rm_darklimb, set_back, target [2]
       HISTORY: Drafted by A. McAllister feb-93.
		 Changed default to call SET_BACK, replaced, A.McA mar-93. 


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

 PURPOSE: A script to retrieve a fits format magnetogram and resize and
          position to match an SXT or GBO image. Keywords allow suppression 
	   of the matching function, or invocation of a croping function that
	   truncates all insensities greater than +/- 127 Guass. This is to
	   allow conversion to byte type without scaling. When the CROP
	   keyword is called with a value (crop=value) this replaces the 
	   default. You may also rotate about the centroid to align solar
	   north properly.

 CALLING SEQUENCES:

         outimg=rt_mag(filename,[targt_img],[indx][,header=header][,/crop]
                                [,zero=cent][,/nomatch][,delang=delang])

         outimg=rt_mag(filename,header=header,/nomatch)
         outimg=rt_mag(filename,header=header,/crop,zero=cent,/nomatch)
         outimg=rt_mag(filename,targt_img,[indx],header=header)
         outimg=rt_mag(filename,targt_img,[indx],header=header,/crop,zero=cent)

 PARAMETERS:

         filename     is the Magnetogram filename (with path).
         targt_img    is the target image matched for size and location.
         indx         if the target is an sxt image you need to pass
                      in the associated index.
         outimg       the output image scaled and centered to match the
                      target image.

 KEYWORDS:

         header       receives the header info for the magnetogram.
	  crop         if set then the image is truncated to +/- 127.
		       a value from 2-127 sets the truncation value.
	  zero 	       when cropping, output the new zero.
	  nomatch      don't match to another image.
	  delang       to rotate about the centroid (clockwise degrees).

 NOTES:	This works OK when /crop is NOT set, but the new limbfinder
		has troubled with the cropped data. Will try to adjust. AHM 3/8/95

 RETURN TYPE: FLOAT  when not cropped.
              BYTE   when cropped. 

 CALLS: ***
	IMG_MATCH, RFITS [1], RFITS [2], RFITS [3], ROTT, TARGET [1], bytcon, set_back
	target [2]
 HISTORY: drafted by A. McAllister, Dec. 2, 1992. 
          implimented user defined cropping, A.McA. Dec. 23, 1992.
	   added delang keyword, A.McA. Mar. 10, 1993.


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


 PURPOSE: 	To read and process a Mitaka H alpha image for use with SXT
               or other GBO data. 

 METHOD: 	This reads an NKR format image, such as Mitaka or Hida H alpha, 
		inverts and rotates it, and repositions it to match a target 
		(either SXT or GBO). The result is then fed to RM_DARKLIMB to 
		remove the limb-darkening. To get the rotation angle it calls 
               GET_RB0P (the norbp keyword suppresses this). To add further correction 
		for SXT roll error (or additional GBO uncertainty) use the DELANG 
		keyword. As the resultant background is a mess, it is reset, unless 
		you suppress it with the NOSETBACK keyword. To keep prominences when
		setback is called use /PROM.

 CALLING SEQUENCE: 

       output=rt_mtha(filename,[target],[target_i][,delang=delang][,header=head]
                               [,modes=mdnm][,/limbdark][,/nosetback][,/nomatch]
				[,/prom][,/norbp])

               filename  a string with the path/filename of an NKR image
               target    the SXT target image
               target_i  the index entry for the target image


 KEYWORDS:   
		delang    corrections to the solar axis tilt angle 
			  (clockwise degrees).
               header    if you wish, this returns the header.
		limbdark  if set leave limbdarkening.
               modes	  number of fourier modes to use for LD profile
			  The default is 2.
		nosetback suppresses resetting the background.
		nomatch   omits rotation and matching.
		prom	  when set leaves prominance outlines, when
			  setback is called.
		norbp	  uses only the delang value for rotation. 		  

 RESTRICTIONS: The angle DELANG can be used to correct for the small (~1 deg) 
		SXT pointing error. There may also be small errors in GBO 
               pointing. When using a non-SXT image as target DELANG must be 
               the whole rotation angle. Running GET_RB0P with the desired 
		date and time will return it in the P angle third component.

     		Omiting the NOSETBACK keyword will remove limb prominances.
		This can be somewhat aliviated by using the /prom keyword. 

 RETURN TYPE:  BYTE


 CALLS: ***
	IMGSCL2, NKRGET, ROTT, TARGET [1], fmt_tim [1], fmt_tim [2], get_rb0p [1]
	get_rb0p [2], rm_darklimb, target [2]
 HISTORY: Drafted by A. McAllister dec-92.
	   Changed default to call SET_BACK, added norbp keyword, 
	   added the prom keyword, etc. A.McA mar-93.
		 


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


       PURPOSE: To automate a direct retrieval of sxt data from sda files.


       METHOD: Passes string to FINDFILE, then reads the index with 
		RD_XDA, calls SSWHERE for data selection, then calls
		RD_XDA, again to get the data. If the INFO keyword is
		it will create an info array with GET_INFO2.


       CALLING SEQUENCE: rt_sxtdt,filestr,indx[,data][,/nodata][,ss=ss]
					[,info=info_array][,infil=infil]

       NOTES: 


       PARAMETERS:	filestr		string with source file
					may include wildcards
			data		retrieved data
			indx		index 

       KEYWORDS:	info		optional retrieval of info array
			infil		get expanded filelist
			ss		output of ss into whole data set

	CALLS: ***
	GET_INFO2, RD_XDA [1], RD_XDA [2], Rd_Roadmap [2], exp_file, rd_roadmap [1], sswhere
 CALLED BY:
	wl_process
       HISTORY: Drafted by A.McAllister  20-feb-93.
		 Removed the initial RD_XDA for the index, AMcA, 9-jul-93.


Rubber_band $SSW/yohkoh/ucon/idl/pike/rubber_band.pro
[Previous] [Next]
 NAME:    Rubber_band

 PURPOSE:  Draw a dynamic line on a plot, and return start and end points

 CALLING SEQUENCE:  rubber_band,xst,yst,xend,yend [,xdata,ydata]

 INPUTS:               none

 OPTIONAL INPUTS:      xdata,ydata     are the arrays which form the original
                                       plot over which the line is drawn.
                                       If they are not given the original
                                       plot can be erased as the rubberband
                                       moves around.

 KEYWORDS              thick           draws a thick line


 OUTPUTS:              xst,yst,xend,yend     The start and end points of the
                                             line (in data coords)

 OPTIONAL OUTPUTS:     none

 RESTRICTIONS:         To avoid erasing the original plot, the data are
                       redrawn everytime the cursor is moved - histogram
                       (psym=10) plot mode is NOT available.

 PROCEDURE:            Plot the original data and call rubber_band to 
                       overlay a line (eg continuum on a spectrum). The
                       first LEFT button click will determine the start
                       point and a RIGHT button click the end point (the
                       routine exits then)

 MODIFICATION HISTORY:  CDP  January 93


Ruler $SSW/yohkoh/ucon/idl/slater/ruler.pro
[Previous] [Next]
 NAME:
	Ruler
 PURPOSE:	
	Interactively draw a movable vector between arbitarry points
	on a displayed images, and continuously print the length of the
	vector in a separate window, in either kilometers or seconds of
	arc.
 CALLING SEQUENCE:
	RULER, ITEM [, PIX_SIZ=PIX_SIZ, ARCSEC=ARCSEC, DATA=DATA, $
	  THICK=THICK, COL=COL, SET_GRAPH_VAL=SET_GRAPH_VAL]
 INPUTS:
   PARAMETERS:
	ITEM	Either an SXT index record or a time in any Yohkoh format.
   KEYWORDS:
	PIX_SIZ	Pixel size of image in arcseconds.  Not necessary for
		SXT images.  If required but not supplied, user is prompted
		for input.
	ARCSEC	If set vector length vlues are in arcseconds.
	DATA	If passed, a new window is created and DATA is displayed
		there.  Otherwise, the image is assumed to be displayed
		in the current window.
	THICK	Thickness of drawn vector (default is 2).
	COL	Color of drawn vector (default is !d.n_colors-1)
 OUTPUTS:	None
 CALLS: ***
	WDEF [1], WDEF [2], get_rb0p [1], get_rb0p [2], gt_pix_size, gt_res
 RESTRICTIONS: None
 PROCEDURE:
 MODIFICATION HISTORY:
	13-Oct-94 - Written by GLS, based upon Dave Pike's RUBBER_BAND


run_dsnfil $SSW/yohkoh/gen/idl/orbit/run_dsnfil.pro
[Previous] [Next]
  Name:
    run_dsnfil
  Purpose:
    Driver to run the fortran routine DSNFIL. 

  Calling Example:
    run_dsnfil,'92 1 4 0 0 0 60 1000',file_out=file_out,path='/ydb'

  Inputs:
    starttime	= Starting time in the AOSLOS format.  This can be a
		  string or a 8 element vector.  
                 YY MM DD HH MM SS Interval Number
                 Interval is in integer seconds.
		  Number is the number of steps.
		  YY can be 19xx or just xx (e.g., 1992 or 92).

  Optional Input Keywords:
   orbit_file	= The file name containing the orbital state vector.
		  If not supplied, run_dsnfil will choose the file
		  which is closest to the mid-time in the requested
		  calculation.
   path_out	= The output file path.  If not supplied, it will use
		  cd,current=path_out to get the current directory.
   ASCA	= If set, use the ASCA orbital solutions.

  Optional Output Keywords:
   file_out	= The output file name.
   fversion	= The version number of the FORTRAN dsnfil (AOSLOS) program.
  
 CALLS: ***
	ADDTIME [1], ADDTIME [2], CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3]
	PATH_LIB [1], PATH_LIB [2], STR2ARR [1], STR2ARR [2], concat_dir [4]
	file_list [1], file_list [2], fmt_tim [1], fmt_tim [2], gt_day [1], gt_day [2]
	int2secarr [1], int2secarr [2], tbeep [1], tbeep [2], tbeep [3]
 CALLED BY:
	GET_YOHKOH_POS, MK_ORB_WEEK, ORBIT_DN, YOHKOH_TERM_PREDICT, get_sunset, mk_aoslos
	mk_fem_aoslos [1], mk_fem_aoslos [2], mk_orbit_sum, pr_conf
  Restrictions:
    Only set up for Ultrix, OSF, and SGI systems.

    The executables (dsnfil_dec, dsnfil_alpha, and dsnfil_sgi) must reside 
    somewhere in the IDL path described by !path.

  Modification History:
    Written, 19 Feb 1992, F.-M. Chou, and J. R. Lemen
    Modified, 6 Mar 1992, J. R. Lemen, Enabled dsnfil_dec or dsnfil_sgi option
    Modified, 5 Sep 1992, JRL, Handle the case of path_out='' correctly
    Modified,15 Mar 1993, JRL, Delete output file first in case of different owner.
     7-Apr-93, JRL,  Added the ASCA keyword (reads ASCA orbital solutions)
    16-Mar-94, MDM,  Modified to use FILE_LIST instead of FINDFILE because of
		      too many files in the directory problem on the SGI.
    21-Mar-94, HSH,  Corrected error introduced 16-Mar-94 so that user can
		      specify the orbital file directly again
    12-Dec-94, JRL,  Suppressed informational messages unless /verbose
    27-Feb-95, GAL,LS  Updated fortran exec. for DSNFIL for ALPHAs.
     1-Mar-95, MDM,  Corrected syntax of 27-Feb modification
                     Turned the problem code into a case statement
    15-mar-95, JRL   Optionally return the version of DSNFIL (AOSLOS).
		      Updated some of the comments.
    20-mar-95, JRL   Minor change to a diagnostic message
     3-jan-00, JRL   Y2K fixes applied


RUN_MKBSD $SSW/yohkoh/bcs/idl/to_be_deleted/run_mkbsd.pro
[Previous] [Next]
 NAME:
	RUN_MKBSD
 PURPOSE:
	Runs the F77 Programme MKBSD
 CALLING SEQUENCE:  
	.run RUN_MKBSD
 INPUTS:
	filename	Filename of dataset to be analysed by MKBSD.
			- this should include the path.
			  Default is name of current TEST_RD file
	start_time	Start time to be used in MKBSD run 
			  Default is LH cursor from TEST_RD, option -44x
	stop_time	Stop time to be used in MKBSD run
			  Default is RH cursor from TEST_RD, option -44x
	int_tim		Integration time in seconds
			  Default is 24 seconds
	chans		Channels to be analysed
			  Default is 1,2,3,4
 OUTPUTS:
	Creates the file "yyy.cfl" on current directory
 OPTIONAL OUTPUTS:

 RESTRICTIONS:

 PROCEDURE:
	Creates a .CFL file using the supplied filename, and start and
	stop time. Spawns a command file to execute the MKBSD task.
 MODIFICATION HISTORY:
	24-Mar-92  RDB
	26-Mar-92  RDB	Coded UNIX part (not tested)
	 3-Apr-92  RDB	Corrections to VMS part (/USER stuff)
	 5-Jun-92  RDB	Corrected read of channel no's
			Option to run wthout creating CFL
			Corrected UNIX part - USED $DIR_BCS_EXE
	16-Jun-92  RDB  Only initialize ITIME array if not set