Radio Astronomy Group Fits Read $SSW/radio/ethz/idl/io/ragfitsread.pro
[Previous] [Next]
 NAME:
	Radio Astronomy Group Fits Read  
 PURPOSE:
	Reads RAG spectrograms from FITS files 
	including non-regular axes. 
	The procedure reads also with gzip compressed files
	  if they end with the extention ".gz"
 CALLING SEQUENCE:
	RAGFitsRead, filename[ , image, xAxis, yAxis ]
 INPUT:
	filename: string containing name of the file with extension
 OUTPUTS:
	image: 2D array containing the array read.
	xAxis, yAxis: 1D arrays containing the axes.
 KEYWORDS:
	used for getting header informations. See "RAGFitsWrite"
	for default information written.
	ORIGIN, TELESCOPE, INSTRUMENT,
	OBJECT: name of observed object
	DATEOBS: observation date in form dd/mm/yy
	TIMEOBS:	start time of observation ( hh:mm:ss.ddd )
		or "No Time"
	DATEEND, TIMEEND: as DATEOBS and TIMEOBS,
		but for the end of the observation.
	BZERO, BSCALE: If they are not 0 and 1, respectively, 
		the data is reconstructed with the formula
		with image = BZERO + BSCALE*data
	BUNIT: string containing the units of the image pixels.
	CTYPE1, CTYPE2: string containing the FITS type of
		physical coordinates.
	COMMENT, HISTORY: strings for description
		of the image
	NOSCALE: if set, the reconstruction with BZERO and
		BSCALE is not done.
	SILENT: if set, the FITS header is not printed on screen
	DATAMIN, DATAMAX: Max and min of the data.
	RELATIVETIME: If set, the decimal value of TIMEOBS
		 is NOT added to the axis values. 
 SIDE EFFECT:
	A fits file is opened.
 MODIFICATION HISTORY
	Created: A. Csillaghy, ETHZ, October 1992
	For IDL Sun in May 1993, A.Cs.
	SILENT in june, 93, A.Cs
	DATAMIN, DATAMAX; When only filename provided, the header
		is read but not the array. Oct. 93, A.Cs
	RELATIVETIME in august 1995, ACs
	Read also compressed file in November 95, ACs
       Adaptation for IDL5/SSW/Ragview in March 98 -- ACs
 CALLS:


Radio Astronomy Group Fits Write $SSW/radio/ethz/idl/io/ragfitswrite.pro
[Previous] [Next]
 NAME:
	Radio Astronomy Group Fits Write  
 PURPOSE:
	Writes RAG spectrograms in FITS files 
	including non-regular axes.
 CALLING SEQUENCE:
	RAGFitsWrite, image [, xAxis, yAxis ]
 INPUTS:
	image: 2D or 3D array of any type except string and complex.
	xAxis, yAxis: 1D arrays of any type but string and complex.
		They must have the same dimensions as their
		corresponding dimension in  "image". 
	 The third dimension of the image  must have  2 elements:
		(0) the flux and (1) the polarization
 KEYWORDS:
	FILENAME: string containing name of the file with 
		extension
	CONTENT: 	default: 'SPECTROGRAM'
	ORIGIN: 		default; 'RAG / ETH Zurich'
	TELESCOPE:	default: 'Bleien Radio'
	INSTRUMENT:	default: 'PHOENIX'
	OBJECT:		default: 'SUN'
	DATEOBS:observation date in form dd/mm/yy,
		default: empty string.
	TIMEOBS:start time of observation ( hh:mm:ss.ddd )
		default: the first element of the x-axis
		This keyword should generally not be used, 
		since the time start is generally contained in 
		first element of the x-axis. If timeobs is used,
		its quantity will be added to the x(0)-element
		when the file is read by RagFitsRead.
	DATEEND, TIMEEND: as DATEOBS and TIMEOBS,
		but for the end of the observation.
		default: TIMEEND = TIMEOBS;
		TIMEEND = empty string.
	BZERO, BSCALE: to set if the data has to be reconstructed
		with data = BZERO + BSCALE*image
		Default: BZERO = 0; BSCALE = 1 (see 
		the keyword SCALING.
	XZERO, YZERO: as BZERO but for x, resp, y axes.
	YSCALE, YSCALE: as BSCALE but for x, resp. y axes.
		These 4 keywords are only used in case of non-
		regular axes.
	SCALING: If present, the procedure scales automatically
		the data and writes in the fits header
		the computed BSCALE AND BZERO values.
		If not present, the current type of the array is
		stored.
		"Byte": the data is written in 8-bit format.
		"Integer": the data is written in 16-bit format.
		"LongInt": the data is written in 32-bit format.
	BUNIT: string containing the units of the image pixels.
		default: '45*LOG(SFU+10)'
	CTYPE1, CTYPE2: string containing the FITS type of
		physical coordinates. Defaults: 
		CTYPE1 = 'TIME' and CTYPE2 = 'FREQ'
	COMMENT, HISTORY: strings for description
		of the image
	INTERACTIVE: if set, the filename is asked interactively
	BYTE: If SCALED is not used, BYTE allows to write
		real data in byte format (symply transforming
		the data without byte scaling )
	NOROUND : if set, the axis is NOT rounded to two significant 
		digits, (default for RAG fits )
 SIDE EFFECT:
	A fits file is created.
 MODIFICATION HISTORY
	Created: A. Csillaghy, ETHZ, October 1992
	BYTE keyword added in May 93, A.Cs.
	NOROUND in Nov 93, A.Cs
 CALLS:


Radio Astronomy Group View RAG View [1] $SSW/radio/ethz/idl/atest/ragview.pro
[Previous] [Next]
 PROGECT:
       Phoenix 2 solar radio spectrometer

 NAME:
	Radio Astronomy Group View (RAG View)

 PURPOSE:
	Ragview is the top level menu interface to the data
	analysis software package of the Radio and Plasma Astrophysics
	Group at ETH in Zurich. It is designed for, but not limited to,
	the analysis of solar radio spectrograms.

       More information is available at
       http://www.astro.phys.ethz.ch/rag/software/ragview-manual.ps

 CATEGORY
       Radio (/ssw/radio)
 CALLING SEQUENCE:
	RagView

 KEYWORDS:
       FILENAME: the name of the file to read in. Allows to avoid the
                 file menu interface when the filename is known.
       
 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], Custom_2D, DISPLAY_2D
	Files_Handling [1], Files_Handling [2], GETHMS, GETWNR, GET_DFONT [1]
	GET_DFONT [2], INIT_SELECTION, Image_Info, Init_Display, LOADCT, MDisp, MODIFY, PUTHMS
	PUT_SELECTION, RAGVIEW, RESPOND_WIDG, Ragview_MDisp_Int, SEL_DEL, SHOW_IMAGE
	Settings, WINDOW_MANAGEMENT, break_file [4], ethz_XCHOICE
 COMMON BLOCKS:
	ImageReal, image, xAxis, yAxis, fName: 
		image: contains the 2D image array in byte, int or
                      real types
		x-axis, y-axis: contain 1D arrays determining the
                               time (x) and frequency (y) values of
                               the image pixels.
               filename: a string with the file name of the current image
	Boundaries, xMin, xMax, yMin, yMax: these four
		parameters are used to determine which part of the
		image is actually displayed. 

	These common blocks are only used in the top-level user interface..
	The procedures called by RagView do not use them. They are
	used to access RagView data outside of the RagView program

 SIDE EFFECTS:
	RagView opens a lot of windows and creates files, dependent
	of the user's choices.

 RESTRICTIONS:
       THIS SOFTWARE WORKS ONLY IN THE SSW ENVIRONMENT. 
           You must install it using instructions related to the ssw.
           See the documntation in http://www.lmsal.com/solarsoft/
       RagView requires IDL version 5.1 
	Works only in interactive mode.
       Works only on X-Windows systems
       Currently only tested on Unix systems

 MODIFICATION HISTORY:
	Created: (4/91)  (under the name of enrad) A.Csillaghy 
		       Institute for Astronomy, ETH Zurich
	Window+Selection Management added in August 1991, Cs.
	NOERASE keyword in June, 93
	titles kept even outside the session, Nov 93, A.cs
	IDL transformations Jan 95 ACs
 	SSW adaptation, renamed from enrad to ragview,
       IDL 5 version March 1998 ACs
       IDL 5.1 version in October 1998, csillag@ssl.berkeley.edu
               The procedure General_Menu was replaced by XChoice
               since WMenu (used in general_menu) crashes on
               solaris/idl 5.1
       xchoice changed to ethz_xchoice 12/9/98 ACs
       Parameters in call to FILE_BREAK adapted to avoid setting
               fName to an empty string. Oliver Trachsel,
               oliver.trachsel@email.ch, 2002/01/30
       2004-08-25- csillag@fh-aargau.ch, changed default color table
                   from 39 to 5
               


Radio Astronomy Group View RAG View [2] $SSW/radio/ethz/idl/ragview/ragview.pro
[Previous] [Next]
 PROGECT:
       Phoenix 2 solar radio spectrometer

 NAME:
	Radio Astronomy Group View (RAG View)

 PURPOSE:
	Ragview is the top level menu interface to the data
	analysis software package of the Radio and Plasma Astrophysics
	Group at ETH in Zurich. It is designed for, but not limited to,
	the analysis of solar radio spectrograms.

       More information is available at
       http://www.astro.phys.ethz.ch/rag/software/ragview-manual.ps

 CATEGORY
       Radio (/ssw/radio)
 CALLING SEQUENCE:
	RagView

 KEYWORDS:
       FILENAME: the name of the file to read in. Allows to avoid the
                 file menu interface when the filename is known.
       
 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], Custom_2D, DISPLAY_2D
	Files_Handling [1], Files_Handling [2], GETHMS, GETWNR, GET_DFONT [1]
	GET_DFONT [2], INIT_SELECTION, Image_Info, Init_Display, LOADCT, MDisp, MODIFY, PUTHMS
	PUT_SELECTION, RAGVIEW, RESPOND_WIDG, Ragview_MDisp_Int, SEL_DEL, SHOW_IMAGE
	Settings, WINDOW_MANAGEMENT, break_file [4], ethz_XCHOICE
 COMMON BLOCKS:
	ImageReal, image, xAxis, yAxis, fName: 
		image: contains the 2D image array in byte, int or
                      real types
		x-axis, y-axis: contain 1D arrays determining the
                               time (x) and frequency (y) values of
                               the image pixels.
               filename: a string with the file name of the current image
	Boundaries, xMin, xMax, yMin, yMax: these four
		parameters are used to determine which part of the
		image is actually displayed. 

	These common blocks are only used in the top-level user interface..
	The procedures called by RagView do not use them. They are
	used to access RagView data outside of the RagView program

 SIDE EFFECTS:
	RagView opens a lot of windows and creates files, dependent
	of the user's choices.

 RESTRICTIONS:
       THIS SOFTWARE WORKS ONLY IN THE SSW ENVIRONMENT. 
           You must install it using instructions related to the ssw.
           See the documntation in http://www.lmsal.com/solarsoft/
       RagView requires IDL version 5.1 
	Works only in interactive mode.
       Works only on X-Windows systems
       Currently only tested on Unix systems

 MODIFICATION HISTORY:
	Created: (4/91)  (under the name of enrad) A.Csillaghy 
		       Institute for Astronomy, ETH Zurich
	Window+Selection Management added in August 1991, Cs.
	NOERASE keyword in June, 93
	titles kept even outside the session, Nov 93, A.cs
	IDL transformations Jan 95 ACs
 	SSW adaptation, renamed from enrad to ragview,
       IDL 5 version March 1998 ACs
       IDL 5.1 version in October 1998, csillag@ssl.berkeley.edu
               The procedure General_Menu was replaced by XChoice
               since WMenu (used in general_menu) crashes on
               solaris/idl 5.1
       xchoice changed to ethz_xchoice 12/9/98 ACs
       Parameters in call to FILE_BREAK adapted to avoid setting
               fName to an empty string. Oliver Trachsel,
               oliver.trachsel@email.ch, 2002/01/30
               


Radio Spectrogram FITS File reader $SSW/radio/ethz/idl/atest/radio_spectro_fits_read.pro
[Previous] [Next]
 NAME:
       Radio Spectrogram FITS File reader

 PURPOSE:
       Reads (solar) radio spectrograms from FITS files,
       including non-regular axes. Tested for ETHZ data as well as
       for Potsdam data

 CALLING SEQUENCE:
       Radio_Spectro_FITS_Read, filename, spectrogram [, time_axis,
       frequency_axis ]

 INPUT:
       filename: string containing the name of the file with extension
 OUTPUTS:
       image: 2D array containing the spectrogram.
       frequency_axis: 1D array containing the frequency axis, in MHz
       time_axis: 1D array containing the time in seconds from 1 Jan
                  1979 (can be converted in any other time formats
                  with Anytim). Can be set relative with the
                  RELATIVE_TIME keyword. Uses DATE_OBS to set the
                  correct time.
 KEYWORDS:
       AXIS_HEADER: returns a structure containing the axis binary
                    table header information
       MAIN_HEADER: returns a structure containing the main header
                    information 
       NO_FSCALE: if set, the primary data are returned in bytes, i.e. the
                 scaling is not applied (note: the axes are always scaled)
       STRUCTURE: if set, the reader returns a spectrogram structure: 
                  {spectrogram: fltarr(nx,ny), x:fltarr(nx), y:fltarr(ny)}
       VERBOSE: tells what it's doing while proceeding

 MODIFICATION HISTORY
       2004-04-15:  protection against date_d$end missing from file
       2003-10-29:  added scaling of the result + no_fscale keyword
       2003-04:     stuff with loc_file added for idl < 5.6 on 5.6 we
                    will use file_search acs
       2003-02:     csillag@ssl.berkeley.edu Now reading the binary table
                    containing the axes with mrdfits instead of fxbread,
                    which does work right when the files are compressed
       2000-03:      Light version for Unix and PC in Jan/March 2000, 
                    csillag@ssl.berkeley.edu
       1999-11:     Changed name from ragfitsread to radio_spectro_fits_read, 
                     adapted for ssw Nov 1999, csillag@ssl.berkeley.edu
       1998-12:     Extended to read "transposed" fits data and extensions with
                    only time or frequency axis; Dec. 98, P.Hackenberg,
                    AIP Potsdam
       1998-12:     Adaptation for DATE-OBS keyword with time; Dec. 98, P.Hackenberg
       1998-03:     Adaptation for IDL5/SSW/Ragview in March 98 -- ACs
       1995-11      Read also compressed file in November 95, ACs
       1995-08      RELATIVETIME in august 1995, ACs
       1993-10      DATAMIN, DATAMAX; When only filename provided, the header
                    is read but not the array. Oct. 93, A.Cs
       1993-06      SILENT in june, 93, A.Cs
       1993-05      For IDL Sun in May 1993, 
                    A.Cs. (originally it was a pv-wave program)
       1992-10:     Created: A. Csillaghy, ETHZ, October 1992
 CALLS:


RADIOFLUX $SSW/radio/ovsa/idl/misc/radioflux.pro
[Previous] [Next]
 NAME:
     RADIOFLUX
 PURPOSE:
     Appends the latest complete radio flux file PREVFLUX.NOA to the
     long term database file RADIOFLUX.NOA.
 CATEGORY:
     OVRO APC CALIBRATION
 CALLING SEQUENCE:
     radioflux
 INPUTS:
 OPTIONAL (KEYWORD) INPUT PARAMETERS:
 ROUTINES CALLED:
 OUTPUTS:
 COMMENTS:
 CALLS: ***
	DAYOFYR [1], dayofyr [2]
 SIDE EFFECTS:
     The !DEFAULTS.EPHEMDIR+'RADIOFLUX.NOA' file is extended.
 RESTRICTIONS:
 MODIFICATION HISTORY:
     Written 04-Jan-2001 by Dale E. Gary


Radiospectrogram FITS File reader [2] $SSW/radio/ethz/idl/io/radio_spectro_fits_read.pro
[Previous] [Next]
 NAME:
       Radiospectrogram FITS File reader

 PURPOSE:
       Reads (solar) radio spectrograms from RAG-FITS files,
       including non-regular axes. Tested for ETHZ data as well as
       for Potsdam data

 CALLING SEQUENCE:
       Radio_Spectro_FITS_Read, filename, spectrogram [, time_axis,
       frequency_axis ]

 INPUT:
       filename: string containing the name of the file with extension
 OUTPUTS:
       image: 2D array containing the spectrogram.
       frequency_axis: 1D array containing the frequency axis, in MHz
       time_axis: 1D array containing the time in seconds from 1 Jan
                  1979 (can be converted in any other time formats
                  with Anytim). Can be set relative with the
                  RELATIVE_TIME keyword. Uses DATE_OBS to set the
                  correct time.
 KEYWORDS:
       AXIS_HEADER: returns a structure containing the axis binary
                    table header information
       MAIN_HEADER: returns a structure containing the main header
                    information 
       RELATIVE_TIME: If set, the time axis starts with zero instead
                      of starting with the value of DATE_OBS
       STRUCTURE: returns a tplot-like structure with the data
                  instead of three variables (note: with anytim time values)
       VERBOSE: tells what it's doing while proceeding
       NO_FSCALE: if set, the primary data are returned in bytes, i.e. the
                 scaling is not applied (note: the axes are always scaled)
       STRUCTURE: if set, the reader returns a spectrogram structure: 
                  {spectrogram: fltarr(nx,ny), x:fltarr(nx), y:fltarr(ny)}

 MODIFICATION HISTORY
       2003-10-29:  added scaling of the result + no_fscale keyword
       2003-04: stuff with loc_file added for idl < 5.6 on 5.6 we
                will use file_search acs
       2003-02: csillag@ssl.berkeley.edu Now reading the binary table
                containing the axes with mrdfits instead of fxbread,
                which does nork right when the files are compressed
       Light version for Unix and PC in Jan/March 2000, csillag@ssl.berkeley.edu
       Changed name from ragfitsread to radio_spectro_fits_read, 
               adapted for ssw Nov 1999, csillag@ssl.berkeley.edu
       Extended to read "transposed" fits data and extensions with
               only time or frequency axis; Dec. 98, P.Hackenberg,
               AIP Potsdam
       Adaptation for DATE-OBS keyword with time; Dec. 98, P.Hackenberg
       Adaptation for IDL5/SSW/Ragview in March 98 -- ACs
       Read also compressed file in November 95, ACs
       RELATIVETIME in august 1995, ACs
       DATAMIN, DATAMAX; When only filename provided, the header
               is read but not the array. Oct. 93, A.Cs
       SILENT in june, 93, A.Cs
       For IDL Sun in May 1993, A.Cs. (originally it was a pv-wave program)
       Created: A. Csillaghy, ETHZ, October 1992
 CALLS:


RAG Exponentiation $SSW/radio/ethz/idl/ragview/modify/modify.pro
[Previous] [Next]
 NAME:
	RAG Exponentiation
 PURPOSE:
	exponentiates the image with parameters asked
	interactively. If no values are entered, the defaults
	values for SFU decompression are used.
 CALLING SEQUENCE:
	result = RAGExp( array )
 INPUT: 
	array: any parameter but a string ( normally 2D image )
 RESULT:
	result = a exp( b * input + c + d )
 RESTRICTION
	works only after compilation of modify.pro
 CALLS:


RAG Log $SSW/radio/ethz/idl/ragview/modify/modify.pro
[Previous] [Next]
 NAME:
	RAG Log
 PURPOSE:
	compacts the image with parameters asked
	interactively. If no values are entered, the defaults
	values for SFU compression are used. Negative values
	are replaced by a constant ( 1e-7).
 CALLING SEQUENCE:
	result = RAGLog( array )
 INPUT: 
	array: any parameter but a string ( normally 2D image )
 RESULT:
	result = a log( b * input + c + d ) (log basis e)
 RESTRICTION:
	works only after compilation of modify.pro
 CALLS:


RAG_ADJCT $SSW/radio/ethz/idl/ragview/display/rag_adjct.pro
[Previous] [Next]
 PROJECT: 
       Phoenix II

 NAME:
	RAG_ADJCT

 PURPOSE:
	Interactively adjusts color tables using mouse input.

 CATEGORY:
	Image display.

 CALLING SEQUENCE:
	RAG_ADJCT

 INPUTS:
	No explicit inputs.

 OUTPUTS:
	No explicit outputs.
 CALLS: ***
	FINDINDEX, MENUS
 CALLED BY:
	CT_Handling, Display 2D Image
 COMMON BLOCKS:
	Colors - color table common block.
 SIDE EFFECTS:
	Color tables are modified.
 RESTRICTIONS:
	None.
 PROCEDURE:
	A new window is created and a graph of the color output value
	versus pixel value is created.  The user can adjust this function
	a number of ways using the mouse.
 MODIFICATION HISTORY:
	DMS, March, 1988, written.
	DMS, April, 1989, modified cursor handling to use less CPU
	A.Csillaghy, Inst. of Astronomy, ETH Zurich, August 1991
       Modified for IDL5/SSW/Ragview (renamed to rag_adjct)
                in March 1998 -- ACs
       New position of window, Dec 98 csillag@ssl.berkeley.edu
	PSH 2003/02/26: removed call to set_xy.pro, which later made
		utplot freak out and the time array to be lost.


Ragview_MDisp_Int $SSW/radio/ethz/idl/ragview/datatype/ragview_mdisp_int.pro
[Previous] [Next]
 NAME: 
	Ragview_MDisp_Int
 PURPOSE:
 	Interface used to transfer data from the two dimensional
       image analysis software RagView to its one-dimensional 
       subsystem mdisp. The vectors of the transfered image will be \
       stored in a plot table.
 CATEGORY:
	Data Management
 CALLING SEQUENCE:
	RagView_MDisp_Int, image [, xAxis, yAxis ]
 INPUTS
	image: the array to transfer.
	xAxis, yAxis: the x and y axes of the image
 KEYWORDS:
	/YDIR: if present, the image is decomposed in y-plots
              if not present x-plots are created.
	/RESET: if present, the former plot table will be erased.
	TITLE: The name of the plot. Deafult: "!p.title".
 CALLS: ***
	GETHMS, HMSCONVERT, INSERTPLOT, INSERTSEL, Init_Data, PUTTITLES, error
 CALLED BY:
	Radio Astronomy Group View RAG View [1]
	Radio Astronomy Group View RAG View [2]
 MODIFICATION HISTORY:
 	Created in June 1991 by A.Csillaghy 
       Few modifications for Ragview/ssw/IDL5 in March 1998, ACs.


ramaty_gysy $SSW/radio/norh/idl/official/ramaty_gysy.pro
[Previous] [Next]
 NAME:
       ramaty_gysy

 PURPOSE:
       Derive gyrosyncrotron radiation from power-law electrons.
        (c.f. Ramaty 1969, ApJ, 158, 753)

 CALLING SEQUENCE:
       ramaty_gysy,delta,bb,theta,nv,freq,fi,rc
       ramaty_gysy,delta,bb,theta,nv,freq,fi,rc,omega,tau

 INPUTS:
       delta   : power-law index of non-thermal e- distribution
       bb      : magnetic field strength [G]
       theta   : angle [degree] between Line-of-sight and magnetic vector
       nv      : [particles] total number (E>10keV) of non-thermal e-
       omega   : source size in surface angle [steradian]

 OUTPUTS:
       freq    ; [GHz] frequency
       fi      ; [SFU] flux density  (need 'nv' input)
       rc      : polarization degree
       tau     ; optical thickness

 OPTIONAL OUTPUTS:
       errflag ; 
           the number of omitted Bessel functions which should
           be added to the results. The larger, the greater the error is.

 CALLS: ***
	RAMATY_GYSY_CORE
 HISTORY:
       Writtern 2000-05-03 T. Yokoyama
       Revised  2000-10-18 T. Yokoyama nv,omega,tau
       Revised  2001-08-28 T. Yokoyama 
           Option 'errflag' is added since new versions of IDL
           does NOT support the Bessel function which has
           an order higher than 20. Array 'errflag' returns
           the number of omitted Bessel functions which should
           be added to the results.


RAMATY_GYSY_CORE $SSW/radio/norh/idl/official/ramaty_gysy_core.pro
[Previous] [Next]
 NAME:
       RAMATY_GYSY_CORE

 PURPOSE:
       This procedure calculates Gyrosynchrotoron Microwave Radiation
       "Ramaty's code"
   
 CALLING SEQUENCE:
       ramaty_gysy_core,ex,anor,bmag,cs,theta,j1,j2,kf $
            ,ffbd,phi1,phi2,e1d,e2d,a1d,a2d,rccd,rcd $
   
 INPUTS:
       ex, anor:  electron spectrum N(E) = anor * E^(-ex)  (MeV^-1)

       bmag: the magnetic field in Gauss assumed uniform

       cs: the cosine of the angle between B and the line of sight (0<cs<1)
           it appears that the routine works well for 0.1<cs<0.95.

       theta: angular size of source in arc sec; source assumed spherical

 OUTPUTS:
       ffbd: frequency over gyrofrequency

       phi1,phi2: ord/xord mode flux densities at Earth in
           erg s^-1 Hz^-1 cm^-2 normalized to the total electron number
           N(E) = anor E^(-ex)  (MeV^-1)

 OPTIONAL INPUTS:
       j1, j2: determine the range of electron energies 
           used in the integration
           10^(0.1*j1-2) MeV - 10^(0.1*j2-2) MeV.  
           For example
             j1=1 and j2=40 corresponds to 0.01 - 100 MeV
             j1=1 and j2=30 corresponds to 0.01 - 10 MeV

       kf: determin the highest frequency fmax (in units of gyrofrequency)
           if (kf <  100) then  fmax = 10^(0.01*kf)
           if (kf >= 100) then  fmax = 10^(0.1*(kf-91))
           For example,
             kf=101 corresponds to ffb=10
             kf=111 corresponds to ffb=100
             kf=121 corresponds to ffb=1000

       etr: is an assumed transition energy (in MeV).
           Below etr the full gyrosynchrotron formalism is used; above etr
           the program uses the ultrarelativistic (Ginzburg and Syrovatskii)
           formula; to calculate the total emissions it is sufficient
           to take etr about 3 MeV, except for cs close to 1 when etr should
           be larger

       alpha: Razin parameter 
           = 1.5 * (gyro frequency)/(plasma frequency)

 OPTIONAL OUTPUTS:
       e1d, e2d ord/xord mode emissivities in erg s^-1 sr^-1 Hz^-1 cm^-3

       a1d, a2d:ord/xord mode absorption coefficients in cm^-1
           both the emissivities and absorption coefficients are  
           normalized to an electron number density, E^(-ex) (MeV^-1 cm^-3).

       rccd : degrees of polarization calculated from the emissivities 

       rcd: degrees of polarization calculated from the flux densities

 CALLS: ***
	BESPR, GSY, REFR, SEAR, SSY
 CALLED BY:
	ramaty_gysy
 HISTORY:
       Written 199? by Ramaty as a Fortran Code
       Ported 1998-09-04 TY
     


RANGE_DETECTOR $SSW/radio/ovsa/idl/support/range_detector.pro
[Previous] [Next]
 NAME:
     RANGE_DETECTOR
 PURPOSE:
     Routine meant to automatically inspect spectrum data and divide
     the frequency range in subranges obeying the same trend.
     The algorithm computes an intrinsic fluctuation level and cut the data range in
     subranges in wich data points change below the fluctuation level
 CATEGORY:
     OVSA APC CALIBRATION ANALYSIS
 CALLING SEQUENCE:
     range_detector,freq,flux [,lf=lf,uf=uf,pf=pf,pd=pd,$
                  width=width,range=range,i_lf=i_lf,i_max=i_max,i_uf=i_uf,nosmooth=nosmooth,$
                  goright=goright,goleft=goleft,first=first]
 INPUTS:freq, flux
 OUTPUTS: lf:low frequency array
          uf:high frequency array
          pf:peak frequency array
          pd: peak flux array
          each index correspond to a data subrange
 OPTIONAL (KEYWORD) INPUT PARAMETERS:
          width: minimum number of points in a data subrange
          the rest of the parameters are meant to be used internally

 ROUTINES CALLED:

 OUTPUTS:
 COMMENTS:
 CALLED BY:
	TP_FIT
 SIDE EFFECTS:
 RESTRICTIONS:
 MODIFICATION HISTORY:
     Written 14-Aug-2002 by Gelu M. Nita (gn2@njit.edu)
     04-Jun-2006  DG
       IUF was always one less than maximum range due to FOR loop
       only going to IEND-1.  Changed to go to IEND.


rapp_get_spectrogram $SSW/radio/ethz/idl/io/rapp_get_spectrogram.pro
[Previous] [Next]
NAME:
 	rapp_get_spectrogram.pro
PROJECT:
 	ETHZ Radio Astronomy
CATEGORY:
 	Utility
PURPOSE:
 This routine, given a time interval (anytim format) and a frequency interval (optional),
 returns the associated Phoenix data array, or a string if a problem occured (such as
 no data available). The intensity data is returned as SFU values, unless
 the /POL keyword is used, in which case the values are in % polarization 
 (negative=left).


CALLING SEQUENCE:
 rapp_get_spectrogram,time_interval,freq_interval,ELIM=ELIM,BACK=BACK,POL=POL, $
			xaxis=xaxis,yaxis=yaxis,avgback=avgback

INPUT:
 time_interval : a 2-element array,in a format accepted by ANYTIM

OPTIONAL INPUT:
 freq_interval : a 2-element int array (MHz). If not specified, the whole 
				frequency range is returned.

KEYWORD INPUT:
	/NODECOMPRESS: if set, will NOT linearize the data. Normally, no point in using that keyword simultaneously with /LOG...
			Also, when this keyword is used, the data type ("bunit") is not checked.
	/LOG  : if set, will output 45*alog( (data > (-9.)) +10.) . Normally, no point in using that keyword simultaneously with /NODECOMPRESS...
	/ELIM: if set, will automatically remove bad channels
	/POL : if set, will look for polarization data instead of intensity/L1/L2	
	/DESPIKE : if set, will use tracedespike.pro (from the TRACE part of the SSW) on the spectrogram. CAUTION: radio 'spikes' would surely be removed...
	/FAST: if set, will not check each file for time interval (and assumes they are all 15 min. long -- works 99% of the time...)
	BACK: if set, will automatically remove background 
			if set to 1 (/BACK): will take the least 3% of the data as background
			if set to a single number (ex: 0.05): is the least fraction of the data to be considered as background (/BACK or BACK=0.03 does the same)
			if set to a 2-element array, assumes those are ANYTIM time intervals to be taken as background
	/ANYTIME: if set, xaxis will return times in anytim format, instead of seconds since midnight...
	REMOVED!!!: /CALLISTO: if set, will look for data in /ftp/pub/rag/callisto/observations/
	valid_file_identifiers:
	archivedir: ex: /ftp/pub/rag/callisto/observations/

OUTPUT:
 a Phoenix-2 spectrogram image, in LINEAR SFU scale (for intensities) or % circular polarization (negative = left)

KEYWORD OUTPUT:
	xaxis : returns the xaxis, as per RagFitsRead.pro
	yaxis : returns the yaxis, as per RagFitsRead.pro
	avgback: array of averaged background values for each frequencies. Useful only if the BACK keyword has also been used!

CALLS
	has_overlap.pro
	int2str.pro
	eventually (keyword /DESPIKE): phoenix_despike.pro

 CALLS: ***
	AVG [1], AVG [2], Congrid1d, DATATYPE [1], DATATYPE [2], DATATYPE [3]
	ELIMWRONGCHANNELS, EXIST, RAGFITSREAD, RAPP_ELIMWRONG, RAPP_GET_FILE_LIST
	RAPP_MERGE, RAPP_RETURN_FILE_INTERVAL, anytim [1], anytim [2], anytim [3]
	anytim [4], anytim [5], constbacksub_v21, get_logenv [1], get_logenv [2]
	has_overlap [1], has_overlap [2], int2str, phoenix_despike
 CALLED BY:
	Automatic polarization determination with background subtraction
RESTRICTIONS:
	For now, only works inside ETH (because of file locations)

EXAMPLES:
	time_intv='2001/09/01 '+['11:50:00','11:55:00']
	data=rapp_get_spectrogram(time_intv,xaxis=xaxis,yaxis=yaxis,/ELIM,/BACK)
	data=rapp_get_spectrogram(time_intv,xaxis=xaxis,yaxis=yaxis,/ELIM,BACK=0.05)
	data=rapp_get_spectrogram(time_intv,xaxis=xaxis,yaxis=yaxis,/ELIM,BACK='2001/09/01 '+['11:45:00','11:46:00'])

	time_intv='2001/09/20 '+['11:35:00','11:36:00']
	data=rapp_get_spectrogram(time_intv,xaxis=xaxis,yaxis=yaxis,/POL)


HISTORY:
	Pascal Saint-Hilaire, 2001/11/16 created
		shilaire@astro.phys.ethz.ch
	PSH 2002/01/21: corrected a bug where a break error occured if no data files were found.
			Now, simply returns -1 if a problem occured

	PSH 2002/01/28: returns a STRING if something went wrong, instead of -1. This string 
					usually contains an error message.

	PSH 2002/01/28: major changes, renamed from rapp_get_array to rapp_get_spectrogram
		and included most of the called subroutines (some of them heavily inspired by 
		previous work from A. Csillaghy and/or P. Messmer)
	
	PSH 2002/05/03: Phoenix file duration is no longer always assumed to be 15 min...
	PSH 2002/05/04: Added /DESPIKE keyword
			Added /LOG keyword
	PSH 2002/05/29: modified background subtraction (accepts a number, or an anytim time array)
	PSH 2002/07/23: added an environmental variable: RAG_ARCHIVE
	PSH 2002/07/24: replaced .gz by * for valid_file_identifiers (as some of the files aren't gzipped, for some reason...)
	PSH 2002/08/05: added the /FAST keyword
	PSH 2002/09/05: added the avgback keyword output
	PSH 2002/10/09: corrected a bug where a freq_intv bigger than physical limits would crash the routine.
	PSH 2002/11/18: corrected a bug where a low limit for the freq interval did not function properly.
	PSH 2003/10/06: added keyword /ANYTIME
	PSH 2004/04/26: added keyword /CALLISTO
	PSH 2004/05/13: -further mods, so that the use of the keyword /CALLISTO also works for background-subtraction.
			-added KEYWORD /NODECOMPRESS
	PSH 2004/09/17: added keyword 'valid_file_identifiers' and 'archivedir', for greater flexibility.
			Removed keyword /CALLISTO.
			Uses phoenix_despike instead of tracedespike
	PSH 2006/08/10: added recognition of the "quasi % " format.


RD_FICPOINT $SSW/radio/nrh/idl/2dnrh/ficpoint/rd_ficpoint.pro
[Previous] [Next]
 NAME:
	RD_FICPOINT

 PURPOSE:
	Cette procedure lit le contenu d'un fichier de points de mesure

 CATEGORY:
	Fichier de points.

 CALLING SEQUENCE:
	RD_FICPOINT, FILE, TAB

 INPUTS:
	FILE	Nom du fichier contenant les poins de mesure

 KEYWORD PARAMETERS:
	Non

 OUTPUTS:
	TAB	Tableau de chaine resultant de la lecture du fichier

 CALLS: ***
	DCD_FICPOINT, SEL_FICPOINT, SEL_FICPOINT_EVENT, XMANAGER
 CALLED BY:
	DCD_FICPOINT, SEL_FICPOINT, SUN_IMAGE
 COMMON BLOCKS:
	Non

 PROCEDURE:
	Cette procedure transfere le contenu du fichier dans un tableau 
	de chaines

 EXAMPLE:
	Please provide a simple example here

 MODIFICATION HISTORY:
	Ecrit par: J Bonmartin ( obspm.fr) le 04/09/98


RD_NRH2I $SSW/radio/nrh/idl/2dnrh/fichier/rd_nrh2i.pro
[Previous] [Next]
 NAME:
	RD_NRH2I

 PURPOSE:
	Lecture d'une image dans un fichier NRH2, l'image est selectionnee
	par l'heure

 CATEGORY:
	Fichiers

 CALLING SEQUENCE:
	RD_NRH2I, FILE, HEURE, STRINF, DATA, STR	

 INPUTS:
	FILE	nom du fichier
	HEURE	Chaine ASCII: hh:mn:ss:xxx, l'heure est prise en compte si
		le keyword INDIC n'est pas present
	STRINF	Structure resultant de NRH_FOPEN

 KEYWORD PARAMETERS:
	STOKES	Image STOKESV si = 1, STOKESI si = 0 ou abscent

	INDIC	Indice de l'image dans le fichier

 OUTPUTS:
	DATA	Tableau d'image
	STR	Structure decrivant l'image (NRH_STR_IMAGE)

 CALLS: ***
	FXBCOLNUM [1], FXBCOLNUM [2], FXBREAD [1], FXBREAD [2], FXBREAD [3], MSH
	TIME_IND_NRH
 CALLED BY:
	CPT_FLUX_NRH2, NRH2_PROJECT2D, READ_NRHIM
 EXAMPLE:
	Please provide a simple example here

 MODIFICATION HISTORY:
	Ecrit par: J Bonmartin (obspm.fr) le 29/05/98


RD_NRHGIF $SSW/radio/nrh/idl/2dnrh/fichier/rd_nrhgif.pro
[Previous] [Next]
 NAME:
	RD_NRHGIF

 PURPOSE:
	Lecture des donnees SOHO EIT au format FITS

 CATEGORY:
	Input, Output

 CALLING SEQUENCE:
	 RD_NRHGIF, File, Str_fic, Image, Str_im


 INPUTS:
	File	chemin et nom du fichier a lire
	Str_fic	Structure d'information de fichiers (NRH_STR_INFIC)

 KEYWORD PARAMETERS:

 OUTPUTS:
	Image	tableau d'image
	Str_im	Structure d'image (NRH_STR_IMAGE)

 CALLED BY:
	READ_NRHIM
 PROCEDURE:
	Cette procedure lit l'image contenue dans un fichier GIF,
	cree et remplit la structure STR_IM
	La structure STR_FIC doit avoit ete correctement remplie par un appel
	a FOPEN_GIF

 CALLS: ***
	READ_GIF
 EXAMPLE:

 MODIFICATION HISTORY:
	Ecrit par: J Bonmartin (obspm.fr)le 09/09/98
		Chargement des tables de couleurs GIF (JB Le 15/05/00)


RD_NRHPNG $SSW/radio/nrh/idl/2dnrh/fichier/rd_nrhpng.pro
[Previous] [Next]
 NAME:
	RD_NRHPNG

 PURPOSE:
	Lecture des donnees SOHO EIT au format FITS

 CATEGORY:
	Input, Output

 CALLING SEQUENCE:
	 RD_NRHPNG, File, Str_fic, Image, Str_im


 INPUTS:
	File	chemin et nom du fichier a lire
	Str_fic	Structure d'information de fichiers (NRH_STR_INFIC)

 KEYWORD PARAMETERS:

 OUTPUTS:
	Image	tableau d'image
	Str_im	Structure d'image (NRH_STR_IMAGE)

 CALLED BY:
	READ_NRHIM
 PROCEDURE:
	Cette procedure lit l'image contenue dans un fichier PNG,
	cree et remplit la structure STR_IM
	La structure STR_FIC doit avoit ete correctement remplie par un appel
	a FOPEN_PNG

 CALLS: ***
	LOADCT, READ_PNG
 EXAMPLE:

 MODIFICATION HISTORY:
	Ecrit par: J Bonmartin (obspm.fr)le 09/09/98
		Chargement des tables de couleurs PNG (JB Le 15/05/00)
       24/03/2005 : traitement des images .png en 24 bits


RD_STDFITS $SSW/radio/nrh/idl/2dnrh/fichier/rd_stdfits.pro
[Previous] [Next]
 NAME:
	RD_STDFITS

 PURPOSE:
	Lecture d'image au format FITS dans unfichier contenant une image

 CATEGORY:
	Fichiers NRH

 CALLING SEQUENCE:
	 RD_STDFITS, File, Str_fic, Image, Str_im

 INPUTS:
	File	chemin et nom du fichier a lire
	Str_fic	Structure d'information de fichiers (NRH_STR_INFIC)

 KEYWORD PARAMETERS:

 OUTPUTS:
	Image	tableau d'image
	Str_im	Structure d'image (NRH_STR_IMAGE)

 CALLED BY:
	READ_NRHIM
 PROCEDURE:
	Cette procedure lit l'image contenue dans un fichier FITS ,
	cree et remplit la structure STR_IM
	La structure STR_FIC doit avoit ete correctement remplie par un appel
	a NRH_FOPEN correspondant a l'instrument choisi

 CALLS: ***
	MRDFITS [1], MRDFITS [2]
 EXAMPLE:

 MODIFICATION HISTORY:
	Ecrit par: J Bonmartin le 14/09/98 (bonmartin@obspm.fr)


RDFILEPOS $SSW/radio/nrh/idl/2dnrh/position/rdfilepos.pro
[Previous] [Next]
 NAME:
	RDFILEPOS

 PURPOSE:
	lit une colonne d'un fichier de positions
	RH_2D

 CATEGORY:
	RH_2D, recherche de positions

 CALLING SEQUENCE:
	Tab = RDFILEPOS(Fich, Col, Exte)
	
 INPUTS:
	Fich:	Nom du fichier rh2d de positions
	Col:	Colonne a lire (numero ou intule)
	Exte:	Numero de l'extension

 OUTPUTS:
	Tab:	Colonne lue

 CALLS: ***
	FXBCLOSE [1], FXBCLOSE [2], FXBOPEN [1], FXBOPEN [2], FXBOPEN [3], FXBREAD [1]
	FXBREAD [2], FXBREAD [3]
 CALLED BY:
	MKFILEPOS, MK_RESUME, PLOT_MAXPOS, PLOT_SOURCES, RDLINE_FPOS, READ_NRHPOS
 EXAMPLE:
	time = RDFILEPOS('position.fts', 'TIME', 1)

 MODIFICATION HISTORY:

 	Written by:	C. Renié, 09/1998


RDLINE_FPOS $SSW/radio/nrh/idl/2dnrh/position/rdline_fpos.pro
[Previous] [Next]
 NAME:
	RDLINE_FPOS

 PURPOSE:
	Cette procedure lit une source d'une position et la renvoie sous forme 
	d'une structure de type GAUSS (max, xamx, ymax, gra, grb, tet)

 CATEGORY:
	RH_2D, recherche de positions

 CALLING SEQUENCE:
	RDLINE_FPOS, Fichpos, NumPos, NumLigne, Gauss

 INPUTS:
	Fichpos:	Fichier fits contenant les positions
	NumPos:		Numero de la position
	NumLigne:	Numero de la ligne

 OUTPUTS:
	Gauss:		structure de type gauss 

 CALLS: ***
	RDFILEPOS
 CALLED BY:
	PLOT_MAXPOS
 MODIFICATION HISTORY:
	Ecrit par: 	C Renie aout 1998


Read Data Byte $SSW/radio/ethz/idl/io/read_data_byte.pro
[Previous] [Next]
 NAME:
	Read Data Byte
 PURPOSE: 
	Reads a data byte in VMS format 
 CALLING SEQUENCE:
	Read_Data_Byte, unit, data
 INPUT PARAMETERS:
	unit: The logical number of the opened file
 OUTPUT PARAMETERS:
	data: the byte array read.
 CALLS:


Read VMS Record $SSW/radio/ethz/idl/io/readvmsrec.pro
[Previous] [Next]
 NAME:
	Read VMS Record
 PURPOSE: 
	Reads a VMS-format variable-length
	record on the Unix system.
 CALLING SEQUENCE:
	ReadVMSRec, unit, record
 INPUT PARAMETERS:
	unit: The logical unit number of the (already opened) 
		VMS-format file
 OUTPUT PARAMETERS:
	record: The record read, an array of bytes.
 RESTRICTIONS
	This procedure cannot be used for Unix files.
 CALLS: ***
	ODD, READVMSREC
 MODIFICATION HISTORY:
	Created by A.Csillaghy in September 1991
		Inst. of Astronomy, ETH Zurich


READ_ARRAY $SSW/radio/ethz/idl/obsolete/read_array.pro
[Previous] [Next]
 NAME:
	READ_ARRAY

 PURPOSE:
       Reads a file into an array variable.  The file is assumed to
       consist of lines of numbers, separated by tabs or spaces,
       with the same number of values on each line.  The file length
       is arbitrary.

 CATEGORY:
       PROG

 CALLING SEQUENCE:
       READ_ARRAY, filename, array

 INPUTS:
       filename: The name of the file to be read.
       array:    The variable to hold the data.

 KEYWORD PARAMETERS:
	SKIP:    The number of lines of "header" information in the
	         file to skip.

	INTEGER: If the data in the file is integer.  The default is
	         floating point.

       ROWS:    Returns the number of rows

       COLUMNS: Returns the number of columns

       SILENT: If set, do not output to the screen

 OUTPUTS:
       Returns a two-dimensional array whose first index is the
       number of elements per line, and second index is the number of
       lines in the file.  Also outputs these numbers to the screen.

 CALLED BY:
	MDisp Read
 RESTRICTIONS:
       Not tested all that much.  Does not read double precision data.

 EXAMPLE:
       READ_ARRAY, 'spectra.dat', spectrum, SKIP=3, /SILENT
       Reads the file spectra.dat, skipping the first 3 lines, creating
       the array variable spectrum.  Don't print out anything.

 MODIFICATION HISTORY:
 	Written by:	Randall Smith, 6/19/95
       Modified  :     RKS,           11/2/95


READ_CENTER_POINT [1] $SSW/radio/nrh/idl/2dnrh/cfile/nrh_read_center.pro
[Previous] [Next]
 NAME:
	READ_CENTER_POINT

 PURPOSE:
	Cette procedure lit les valeurs associee a une source d'un fichier
	de CENTRES ACTIFS (Sources)

 CATEGORY:
	Cfile

 CALLING SEQUENCE:
	NRH_READ_CENTER, File, Extd, Str

 INPUTS:
	FILE	Nom du fichier

	EXTD	Numero de l'extension dans le fichier CENTRES 


 KEYWORD PARAMETERS:
	HBEG	Heure de debut selectionnee (HH:MN:SS:MMM)

	HEND	Heure de fin selectionnee
	
 OUTPUTS:
	STR	structure contenant les valeurs associee a la source
		Cette structure est cree dans la procedure
			STR.Time	Heure
			STR.Flux	Flux
			STR.EWPOS	Position est-ouest
			STR.NSPOS	Position nord_sud

 CALLS: ***
	FXBCLOSE [1], FXBCLOSE [2], FXBOPEN [1], FXBOPEN [2], FXBOPEN [3], FXBREAD [1]
	FXBREAD [2], FXBREAD [3], FXPAR [1], FXPAR [2], HMS, IND_RS, NRH_READ_CENTER, TIME_IND
 CALLED BY:
	SUN_IMAGE
 COMMON BLOCKS:
	Non

 RESTRICTIONS:
	Seuls les fichiers CENTRE ACTIF calcules dans NRH peuvent etre traites

 PROCEDURE:
	Le numero de l'extension du fichier FITS peut etre determinee en
	appelant CW_XTD_NRHF

 EXAMPLE:
	Please provide a simple example here

 MODIFICATION HISTORY:
	Ecrit par:J Bonmartin (bonmartin@obspm.fr) le 12/10/98


READ_CENTER_POINT [2] $SSW/radio/nrh/idl/2dnrh/cfile/read_center_point.pro
[Previous] [Next]
 NAME:
	READ_CENTER_POINT

 PURPOSE:
	Cette procedure lit les valeurs associee a un point d'un fichier
	de CENTRES ACTIFS

 CATEGORY:
	Cfile

 CALLING SEQUENCE:
	READ_CENTER_POINT, File, Extd, Heure, Str

 INPUTS:
	FILE	Nom du fichier

	EXTD	Numero de l'extension dans le fichier CENTRES 

	HEURE	Heure selectionnee (HH:MN:SS:MMM)
	
 KEYWORD PARAMETERS:
	Non

 OUTPUTS:
	STR	structure contenant les valeurs associee au point
			type (NRH_STR_COORD)
		Cette structure est cree dans laprocedure

 CALLS: ***
	FXBCLOSE [1], FXBCLOSE [2], FXBOPEN [1], FXBOPEN [2], FXBOPEN [3], FXBREAD [1]
	FXBREAD [2], FXBREAD [3], FXPAR [1], FXPAR [2], HMS, IND_RS, MSH, TIME_IND
 CALLED BY:
	SUN_IMAGE
 COMMON BLOCKS:
	Non

 RESTRICTIONS:
	Seuls les fichiers CENTRE ACTIF calcules dans NRH peuvent etre traites

 PROCEDURE:
	Le numero de l'extension du fichier FITS peut etre determinee en
	appelant CW_XTD_NRHF

 EXAMPLE:
	Please provide a simple example here

 MODIFICATION HISTORY:
	Ecrit par:J Bonmartin (bonmartin@obspm.fr) le 12/10/98


Read_DriftData $SSW/radio/ovsa/idl/misc/read_driftdata.pro
[Previous] [Next]
 NAME:
   Read_DriftData
 PURPOSE:



 CATEGORY:

 CALLING SEQUENCE:

 INPUTS:

 OPTIONAL (KEYWORD) INPUT PARAMETERS:

 ROUTINES CALLED:
  openarc,newscan,getcycle,gaincor
 OUTPUTS:
 COMMENTS:
 CALLS: ***
	FREESCAN, GAINCOR, GET_CYCLE, JULDAY, MSEC2STR, NEWSCAN, OPENARC, OVSA_LST
 CALLED BY:
	READ_DRIFTSCAN
 SIDE EFFECTS:
 RESTRICTIONS:
 MODIFICATION HISTORY:


READ_DRIFTSCAN $SSW/radio/ovsa/idl/misc/read_driftscan.pro
[Previous] [Next]
 NAME:
     READ_DRIFTSCAN
 PURPOSE:
     Reads DRIFTSCAN observation data, for the two 27 m antennas, to
     determine relative pointing shifts.
 CATEGORY:
     OVRO APC DATA CALIBRATION
 CALLING SEQUENCE:
     read_driftscan
 INPUTS:
 OPTIONAL (KEYWORD) INPUT PARAMETERS:
 ROUTINES CALLED:
 OUTPUTS:
 COMMENTS:
     Use PLOT_DRIFTSCAN to read from the save file, DRIFTSCAN.SAV
     and plot the results.
 CALLS: ***
	OPENARC, OVSA_GET_INDEX, Read_DriftData
 SIDE EFFECTS:
     A SAVE file is created for plotting with PLOT_DRIFTSCAN
 RESTRICTIONS:
 MODIFICATION HISTORY:
     Written 08-Apr-2002 by Dale E. Gary


READ_FCHIST $SSW/radio/ovsa/idl/support/read_fchist.pro
[Previous] [Next]
 NAME:
     READ_FCHIST
 PURPOSE:
     Reads history files of frequency calibration parameters
     determined during analysis of FCAL segments
 CATEGORY:
     OVRO APC ANALYSIS FCAL
 CALLING SEQUENCE:
     result = read_fchist(ant,timstr,fc,tc,tim)
 INPUTS:
     ant        the antenna number, e.g. 1,2,4, etc., for which info
                  is desired
     timstr     the TIMSTR structure element from the current TLS
                  structure, for which to find the closest entry in time
 OPTIONAL (KEYWORD) INPUT PARAMETERS:
 ROUTINES CALLED:
 OUTPUTS:
     result   gives an indication of the success of the attempt to
                write the updates to the file.  If -1, the attempt
                failed, 0 otherwise.
     fc       the table of frequencies, of size FC(9), three for each
                oscillator.
     tc       the corresponding table of tuning currents.
     tim      the day and time of the actual entry selected, as DDDHHMM.
 COMMENTS:
 CALLS: ***
	CVDOY
 SIDE EFFECTS:
 RESTRICTIONS:
 MODIFICATION HISTORY:
     Written 28-Nov-2000 by Dale E. Gary


READ_FLUX $SSW/radio/nrh/idl/2dnrh/flux/read_flux.pro
[Previous] [Next]
 NAME:
	READ_FLUX

 PURPOSE:
	Cette procedure traite les fichiers de FLUX ou assimiles du NRH
	Elle permet de selecter un fichier de flux et dans le fichier
	une ligne de FLUX.

 CATEGORY:
	Fichiers NRH

 CALLING SEQUENCE:
	READ_FLUX, Flux, Time, [Header]

 INPUTS:
	Non
	
 KEYWORD PARAMETERS:
	Non

 OUTPUTS:
	FLUX	Tableau du flux lu

	TIME	Tableau de temps correspondant en ms

 OPTIONAL OUTPUTS:
	HEADER	Header correspondant au flux lu

 COMMON BLOCKS;
	Non

 PROCEDURE:
	Cette procedure utilise DIALOG_PICKFILE pour selectionner le fichier
	et CW_XTD_NRH pour selectionner la ligne

 CALLS: ***
	CW_XTD_NRHF, MRDFITS [1], MRDFITS [2]
 EXAMPLE:
	READ_FLUX, Flux,Time

 MODIFICATION HISTORY:
	Ecrit par: J Bonmartin (obspm.fr) le 11/09/98


READ_MAP_GIF $SSW/radio/nrh/idl/2dnrh/gen/read_map_gif.pro
[Previous] [Next]
 NAME:
	READ_MAP_GIF

 PURPOSE:
	This procedure read a gif file to plot the image with the MAPPING
	software (D Zarro)
	It is necessary to be able to define the optical sun by 3 points
	or by the center coodinates and the radius in pixels

 CATEGORY:
	NRH2D gen

 CALLING SEQUENCE:
	READ_MAP_GIF, File, Index, Data, [R], [G], [B]

 INPUTS:
	FILE	GIF file
	
 KEYWORD PARAMETERS:
	DIR	GIF file Directory (default current directory)

 OUTPUTS:
	INDEX	Index to map
	DATA	Data to map
	R,B,B	Color table

 CALLS: ***
	OPTIC_CIRC, READ_GIF
 COMMON BLOCKS:
	No

 SIDE EFFECTS:

 RESTRICTIONS:
	
 PROCEDURE:
	The procedure generate a widget window to define the optical sun

 EXAMPLE:
	READ_MAP_GIF, 'image.gif', Index, Data, r, g, b
	INDEX2MAP, Index, Data, Image
	TVLCT,r,g,b
	TVLCT,r,g,b,/get
	nc = N_ELEMENTS(r)
	PLOT_MAP, Image, NCOLORS=Nc

 MODIFICATION HISTORY:
	Ecrit par: Jen Bonmartin (jean;bonmartin@obspm.fr) le 25/04/01
		18/05/01 Add colors table (JB)


READ_MAP_PNG $SSW/radio/nrh/idl/2dnrh/gen/read_map_png.pro
[Previous] [Next]
 NAME:
	READ_MAP_PNG

 PURPOSE:
	This procedure read a gif file to plot the image with the MAPPING
	software (D Zarro)
	It is necessary to be able to define the optical sun by 3 points
	or by the center coodinates and the radius in pixels

 CATEGORY:
	NRH2D gen

 CALLING SEQUENCE:
	READ_MAP_PNG, File, Index, Data, [R], [G], [B]

 INPUTS:
	FILE	PNG file
	
 KEYWORD PARAMETERS:
	DIR	PNG file Directory (default current directory)

 OUTPUTS:
	INDEX	Index to map
	DATA	Data to map
	R,B,B	Color table

 CALLS: ***
	OPTIC_CIRC, READ_PNG
 COMMON BLOCKS:
	No

 SIDE EFFECTS:

 RESTRICTIONS:
	
 PROCEDURE:
	The procedure generate a widget window to define the optical sun

 EXAMPLE:
	READ_MAP_PNG, 'image.png', Index, Data, r, g, b
	INDEX2MAP, Index, Data, Image
	TVLCT,r,g,b
	TVLCT,r,g,b,/get
	nc = N_ELEMENTS(r)
	PLOT_MAP, Image, NCOLORS=Nc

 MODIFICATION HISTORY:
	Ecrit par: Jen Bonmartin (jean;bonmartin@obspm.fr) le 25/04/01
		18/05/01 Add colors table (JB)


READ_MONITOR_SEG $SSW/radio/ovsa/idl/support/read_monitor_seg.pro
[Previous] [Next]
 NAME:
     READ_MONITOR_SEG
 PURPOSE:
     Reads frequency calibration parameters from a monitor segment
 CATEGORY:
     OVRO APC ANALYSIS FCAL
 CALLING SEQUENCE:
     result = read_monitor_seg(srec,ant,tc_coef,time)
 INPUTS:
     srec       the record number of the segment to read
     ant        the antenna index, e.g. 0,1,2, etc., for which info
                  is desired
 OPTIONAL (KEYWORD) INPUT PARAMETERS:
 ROUTINES CALLED:
 OUTPUTS:
     result   gives an indication of the success of the attempt to
                write the updates to the file.  If -1, the attempt
                failed, 0 otherwise.
     tc_coef  the table (5,3) of tuning current coefficients for the 3 osc.
     time     the day and time of the actual entry selected, as DDDHHMM.

 COMMENTS:
 CALLS: ***
	TL_DECODE, W2L
 CALLED BY:
	WFSURVEY
 SIDE EFFECTS:
 RESTRICTIONS:
 MODIFICATION HISTORY:
     Written 15-Feb-2002 by Dale E. Gary


READ_NRH $SSW/radio/nrh/idl/2dnrh/gen/read_nrh.pro
[Previous] [Next]
 NAME:
	READ_NRH

 PURPOSE:
	This procedure read 2 dimensions images array from
		NRH files, (result of VISIBILITY to IMAGE conversion NRH widget)
			or
		VISIBILITY files from BASS2000 data base (http://mesola.obspm.fr )
	and interface it with the D Zarro MAPPING SOFTWARE

 CATEGORY:
	NRH Gen

 CALLING SEQUENCE:
	READ_NRH, File, Index, Data 

 INPUTS:
	FILE	NRH file name (NRH file or VISIBILITY file

 KEYWORD PARAMETERS:
	HBEG	Time (hh:mm:ss:cc) of the first image to read,
			Default: begin of the file
	HEND	Time of the last image to read
			Default same value than HBEG
	STOKES	Stokes V parameter instead of I parameter

	FREQ	Frequency number for VISIBILITY files [0 to 4]

	DIR	Directory from where to read data

 OUTPUTS:
	INDEX	Structure to map
	DATA	Data array

 CALLS: ***
	ADD_TAG [1], ADD_TAG [2], FXPAR [1], FXPAR [2], MRDFITS [1], MRDFITS [2], MSH
	NRH_CTRLREP, NRH_PIXARCSEC, RH_RDIMCUBE, TIME_IND_NRH, fits_interp
 COMMON BLOCKS:
	No


 EXAMPLE:
	READ_NRH, File name, Index, Data
		Read the first imade of the file
	Idex2map, Index, Data, Map
		Map the image
	READ_NRH, File name, Index, Data, HBEG='10:00', HEND='10:10:30'
		Read images cube

 MODIFICATION HISTORY:
	Ecrit par: Jean Bonmartin (bonmartin@obspm.fr) 14/09/00
		-ISHORT dans l'appel a FITS_INTERP pour avoir NAXISn en INT
		plutot qu'en BYTE le 18/12/00 (JB)
		le 04/04/01 Adapte pour les visibilites (JB)


READ_NRHIM $SSW/radio/nrh/idl/2dnrh/fichier/read_nrhim.pro
[Previous] [Next]
 NAME:
	READ_NRHIM

 PURPOSE:
	Cette procedure lit une image dans un fichier FITS

 CATEGORY:
	Fichier

 CALLING SEQUENCE:
	READ_NRHIM, File, Heure, Str_inf, Donnee, Str_im

 INPUTS:
	FILE	Nom du fichier

	HEURE	Chaine contenant l'heure (hh:mn:ss:ccc), l'heure est prise
		en compte si le keyword INDIC n'est pas present et si le
		fichier contient plusieurs images

	STR_INF	Structure d'information du fichier resultant NRH_FOPEN
	
 KEYWORD PARAMETERS:
	STOKES	Parametre de Stokes pour NRH: STOKESV si =1, sinon
			STOKESI
	INDIC	Indice de l'image dans le fichier

 OUTPUTS:
	DATA	Tableau contenant l'image

	STR_IM	Structure d'information liee a l'image (NRH_STR_IMAGE)

 CALLS: ***
	RD_NRH2I, RD_NRHGIF, RD_NRHPNG, RD_STDFITS
 CALLED BY:
	CW_POS, CW_SCANSOURCE, FLUX_NRH2, GR_IMAGES, NRH2_PROJECTION, NRH_ANIM, NRH_VISU_2D
	PLOT_MAXPOS, SUN_IMAGE
 COMMON BLOCKS:
	Non.

 PROCEDURE:
	Cette procedure utile STR_INF.INSTRUME pour selectionner
	la procedure de lecture associee a l'instrument
	Instuments reconnus:
		NRH
		EIT SOHO
		YOHKOH
		PNG

 EXAMPLE:
	Please provide a simple example here

 MODIFICATION HISTORY:
	Ecrit par:J Bonmartin (obspm.fr) le 24/08/98


READ_NRHPOS $SSW/radio/nrh/idl/2dnrh/position/read_nrhpos.pro
[Previous] [Next]
 NAME:
	READ_NRHPOS

 PURPOSE:
	Cette procedure lit une position dans un fichier de positions NRH  

 CATEGORY:
	RH_2D, recherche de positions

 CALLING SEQUENCE:
	READ_NRHPOS, Fichpos, NumPos, Strpos, Hext

 INPUTS:
	Fichpos:	Fichier fits contenant les positions
	NumPos:		Numero de la position

 OUTPUTS:
	Strpos:		structure de 8 tableaux
	Hext:		header de l'extension

 CALLS: ***
	FXPAR [1], FXPAR [2], HEADFITS [1], HEADFITS [2], HEADFITS [3], RDFILEPOS
 CALLED BY:
	CENTER_NRH2
 MODIFICATION HISTORY:
	Ecrit par: 	C Renie octobre 1998


read_ovsa_fits $SSW/radio/ovsa/idl/objects/read_ovsa_fits.pro
[Previous] [Next]
 Project     : ovsa

 Name        : read_ovsa_fits

 Purpose     : read an ovsa quicklook data file and write header and
               data to a structure.

 Category    : OVSA quicklook analysis

 Explanation : 

 Syntax      : read_ovsa_fits, filename, data

 CALLS: ***
	FXBCLOSE [1], FXBCLOSE [2], FXBOPEN [1], FXBOPEN [2], FXBOPEN [3], FXBREAD [1]
	FXBREAD [2], FXBREAD [3], HEADFITS [1], HEADFITS [2], HEADFITS [3]
 CALLED BY:
	MAKE_TPOVIEW, OVSA__DEFINE
 Examples    : 

 Inputs      : filename = ovsa ql fits file
              
 Outputs     : data = Structure containing the data and header

 Keywords    : None
                   
 History     : Written 09 December 1999, P. T. Gallagher, NJIT

 Contact     : ptg@penumbra.njit.edu


READ_RSTN_FLUX $SSW/radio/ovsa/idl/support/read_rstn_flux.pro
[Previous] [Next]
 NAME:
     READ_RSTN_FLUX
 PURPOSE:
     Reads the daily NOAA solar flux values (primarily from RSTN and
     Penticton), for comparison with the daily CTRCAL calibration.
 CATEGORY:
     OVRO APC CALIBRATION
 CALLING SEQUENCE:
     read_rstn_flux,f,s,tls
 INPUTS:
     tls    the TIME/LABEL structure of the CTRCAL scan header
 OPTIONAL (KEYWORD) INPUT PARAMETERS:
 ROUTINES CALLED:
 OUTPUTS:
     f      the frequencies [GHz] for which fluxes are available in the
              daily NOAA file.  A value of -1 is returned if the
              routine fails.
     S      the corresponding fluxes, in SFU.  These are a simple
              average of the data in the file.  A value of -1 is
              returned if the routine fails.
 COMMENTS:
 CALLS: ***
	DAYOFYR [1], dayofyr [2]
 CALLED BY:
	WTPCAL
 SIDE EFFECTS:
 RESTRICTIONS:
 MODIFICATION HISTORY:
     Written 11-Nov-2000 by Dale E. Gary
     04-Jan-2001  DG
       Fixed to work with new RADIOFLUX archive file.  This routine
       is actually useful now, since it works for older data as well
       as current data.
     15-May-2002 GN
       added keyword auto to generate an error message ctrlcalcheck is
       called with this keyword set
     09-Mar-2004  DG
       Error messages were printed as READ_DAILY_FLUX, now changed to
       the correct READ_RSTN_FLUX.


READ_SRBL $SSW/radio/ovsa/idl/support/read_srbl.pro
[Previous] [Next]
 NAME:
     READ_SRBL
 PURPOSE:
     Read a SRBL lightcurve file and return the frequency, time, and
     dynamic spectrum data for a given time range
 CATEGORY:
     OVRO APC DATA CALIBRATION
 CALLING SEQUENCE:
     read_srbl,filename,tstart,tend,freq,time,data
 INPUTS:
     filename   the name of the SRBL plot file
     tstart     the start time of the desired data, in seconds since 0 UT
     tend       the end time of the desired data, in seconds since 0 UT
 OPTIONAL (KEYWORD) INPUT PARAMETERS:
 ROUTINES CALLED:
 OUTPUTS:
     freq       an array of frequencies, in GHz, of size NF
     time       an array of times, in seconds, of size NTIMES
     data       the array of data, of size (NF,NTIMES), in SFU.  Note that
                  the OVRO SRBL takes only RCP data.
 COMMENTS:
 CALLED BY:
	SRBL_2M_CAL
 SIDE EFFECTS:
 RESTRICTIONS:
 MODIFICATION HISTORY:
     Written 22-Aug-1999 by Dale Gary
     07-Nov-2000  DG
       Added FILENAME argument to make routine more general.
     29-Apr-2001  DG
       Added code to allow reading of original (BST) and new versions (PTLF)
       of SRBL data.


Read_Test $SSW/radio/ethz/idl/gen/read_test.pro
[Previous] [Next]
 NAME:
	Read_Test
 PURPOSE:
	Reads a value on the terminal and sets a default 
	if the return key has been pressed directly. 
 CATEGORY:
	I/O
 CALLING SEQUENCE:
 	Read_Test, text, default, value
 INPUTS:
	text: a message to print before the reading action
	default: the value to set to the variable if it has not
		been entered
 OUTPUT:
	value: the variable where the number read is stored.
 KEYWORDS: 
	MINIMUM: the minimum set if the number is too low
	MAXIMUM: the maximum set if the number is too high
	HMS: The in/output format is of type hh:mm:ss.sss
 RESTRICTION:
	The type of the variable is REAL

 CALLS: ***
	HMSCONVERT, decconvert
 CALLED BY:
	ASCII_Read, Change_Selection, Columns_Read, Cont_Surf, Customize_1D
	Determine Drift Rate, ETHZ_Background, Fitting, Histogram Facility
	Initialize Selection [2], Integrate_2D, Integration, Modif_Axis
	Modification of 1D Plots, Modify Image Pixels, Modify Titles, Overplot Texts
	RAG Exponentiation, RAG Log, Selection delete, Texts_2D, Tv_Zoom, Zoom_1D, edit [1]
	edit [2], put selection
 MODIFICATION HISTORY:
	Creadted by A.Csillaghy in June 1991
	Max and min added in November 91


READ_TPFAC $SSW/radio/ovsa/idl/support/read_tpfac.pro
[Previous] [Next]
 NAME:
     READ_TPFAC
 PURPOSE:
     Reads a total power calibration file (requests selection by the user)
     and returns the total power factors (units/SFU) corresponding to the
     frequencies specified on input.
 CATEGORY:
     OVRO APC DATA CALIBRATION
 CALLING SEQUENCE:
     tpfac = read_tpfac(frqlist)
 INPUTS:
     frqlist    an array of frequencies [GHz] for which to return the
                  factors
 OPTIONAL (KEYWORD) INPUT PARAMETERS:
 ROUTINES CALLED:
 OUTPUTS:
     tpfac      an array of size FLTARR(4,n_elements(frqlist)) containing
                  the factors, one each for the four 27-m feeds.  The
                  order of feeds is I1, L1, R2, I2
 COMMENTS:
 CALLS: ***
	PICKFILE
 SIDE EFFECTS:
 RESTRICTIONS:
 MODIFICATION HISTORY:
     Written 07-Feb-1999 by Dale E. Gary


Read_Values $SSW/radio/ethz/idl/ragview/display/read_values.pro
[Previous] [Next]
 NAME:
	Read_Values
 PURPOSE:
	Reads interactively a point on the screen
 CATEGORY:
	User Interface
 CALLING SEQUENCE:
	Read_Values [,x, y]
 OUTPUTS:
	x,y: scalars, contains the x- and y-coordinate in data
		units where the user clicked.
 KEYWORD:
	/NODISPLAY: if present, the result is not shown on
		the screen, but stored in the x,y variables.
 SIDE EFFECT:
	On X terminals, uses windows.

 CALLS: ***
	CURSORVT, GETHMS, HMSCONVERT, PTO, WMESG
 CALLED BY:
	Display_1D
 MODIFICATION HISTORY:
	Created in June 1991 by A.Csillaghy


readamf $SSW/radio/ovsa/idl/support/readamf.pro
[Previous] [Next]
  Modification History
    11-Jan-2003  DG
      Slight change to read non-zero phi_ab from 12rli files.
 CALLED BY
	APCAL_ADD_27MANT [1], APCAL_ADD_2MANT, APCAL_ADD_2M_RL, CHECK_12AP, FLUX_3C84


REFINE_OFF $SSW/radio/ovsa/idl/support/refine_off.pro
[Previous] [Next]
 NAME:
     REFINE_OFF
 PURPOSE:
     Routine containing much of the code of GCFIT, to refine the
     channel offset values for a given model of nonlinearity.
 CATEGORY:
     OVRO APC DATA ANALYSIS
 CALLING SEQUENCE:
     newoff = refine_off(gcdata,gcflag,nlparm,oldoff)
 INPUTS:
     gcdata   the GCAL data array, of size (2,7,5,86), where
                the first index is ND off/on, second index is the
                attenuation state (0,5,10,15,20,35,20*DB), the
                third index is the total power channel, and the
                last index is the frequency
     gcflag   a corresponding array containing 0 where the data are
                bad and 1 where the data are good.
     nlparm   a 5-element array of nonlinearity parameters, one for
                each data channel.
     oldoff   a 5-element array of offsets, one for each channel
 OPTIONAL (KEYWORD) INPUT PARAMETERS:
 ROUTINES CALLED:
 OUTPUTS:
     gcparm   a 5-element array of revised offsets
 COMMENTS:
 CALLS: ***
	FLAGPAIR
 SIDE EFFECTS:
 RESTRICTIONS:
 MODIFICATION HISTORY:
     Written 23-Jan-1998 by Dale E. Gary


reformat_data $SSW/radio/ovsa/idl/misc/reformat_data.pro
[Previous] [Next]
 Just a quick (1-time) program to reformat the RSTN and Penticton fluxes
 from the format they have on the NGDC on-line archive to the format used
 by the daily announcements of fluxes.  This goes from 01/01/1999 to
 11/30/2000.  The daily flux files will handle newer data.  This routine
 should be kept around, since we may want to go back further into the past
 at some point.

 MODIFICATION HISTORY
   Written 04-Jan-2001 by Dale E. Gary
 CALLS:


REGION_EVENT $SSW/radio/nrh/idl/2dnrh/gen/cw_region.pro
[Previous] [Next]
 NAME:
	REGION_EVENT

 PURPOSE:
	Gestion des evenements de CW_REGION

 CATEGORY:
	WIDGET

 CALLING SEQUENCE:
	Result = REION_EVENT, event

 OUTPUTS:
	Au retour la fonction fournit la structure
		result:{id:parent, Top:event.top, Handler:0L,$
			 XD:xd, XF:xf, YD:yd, YF:yf}
	X, Y coordonnees de la region selectionnee

	UVALUE = 'REGION'

 CALLS: ***
	BOX_CURSOR2, CW_FIELD, CW_REGION, IND_RS, RS_IND, STR_SEP, UVALUE_REGION
 CALLED BY:
	CW_REGION, UVALUE_REGION
 COMMON BLOCKS:
	IDENT_REG: 
		cursor	identification du widget 'CURSOR'
		reset	identification du widget 'RESET'
		textx	identification du widget X:...
		texty	identification du widget Y:
		state	structure

 MODIFICATION HISTORY:


RELPHZ $SSW/radio/ovsa/idl/mapping/relphz.pro
[Previous] [Next]
 NAME:
   RELPHZ
 PURPOSE:
   Given a time index during a scan, uses the phases at that time
   as the phase calibration and applies those phases to all other
   times.  This has the effect of making the image at the given time
   a point source at the map center, while images at other times show
   the source structure and position relative to that at the
   fiducial time.
 CATEGORY:
   OVSA APC Calibration
 CALLING SEQUENCE:
       out2 = relphz(out,calindex)
 INPUTS:
   out		  An array containing calibrated data (the result of acting
               on AVG array with APPLY_CAL_ALL() routine).
   calindex  An integer value representing the time index into the OUT
               array to use as the fiducial time (phases at that time
               will become the phase calibration.
 OPTIONAL (KEYWORD) INPUT PARAMETERS:
       None
 ROUTINES CALLED:
 OUTPUTS:
   out2	  A array of the same data as in OUT, except that the
               phases are modified by using the time indicated by
               CALINDEX as the phase calibration.
 COMMENTS:
   This routine can be handy when the data for an event are not well
   calibrated by standard techniques and data exist at another time
   for which there is some reason to think that the source structure
   is simple.  The result can be used only as an indication of change
   in source position and/or structure.  If the fiducial time chosen
   is not simple, the results will be garbage.
 SIDE EFFECTS: -
 RESTRICTIONS:
 MODIFICATION HISTORY:
     Written 31-Jan-2004 by Dale E. Gary


RELVIS $SSW/radio/ovsa/idl/util/relvis.pro
[Previous] [Next]
 NAME:
     RELVIS
 PURPOSE:
     Determines relative visibility, V(S)/V(0), where V(s) is the visibility
     as a function of fringe spacing s, and V(0) is the visibility at zero
     fringe spacing, i.e. total power.  The relative visibility is independent
     of calibration, and will be unity for a point (unresolved) source but
     will decrease with increasing s for a resolved one.
 CATEGORY:
     OVRO APC ANALYSIS
 CALLING SEQUENCE:
     rv = relvis(filename[,tp][,tpmin=tpmin])
 INPUTS:
     filename  the name of the file containing output data from ANALYZE
                 *after* preflare subtraction.  If preflare subtraction
                 has not been done, the results will be invalid.
 OPTIONAL (KEYWORD) INPUT PARAMETERS:
     tpmin     if set, gives the minimum total power value for which to
                 determine the relative visibility.  If omitted, 5 sfu is
                 the minimum value.
 ROUTINES CALLED:
 OUTPUTS:
     rv        the relative visibility of size (NBL,NF,NTIMES) for each
                 baseline.  It will contain NaN where the total power is
                 less than TPMIN.
     tp        optional output containing the calibrated total power
                 used in determining RV, of size (NANT,NF,NTIMES).
 COMMENTS:
     Because of the strange way that OVSA measures polarization, the
     strict relative visibility for circular polarization involves a
     fudge factor ranging from 0 to 1, depending on the polarization
     of the source.  Write polarization measurements on baselines as Rij
     and Lij, and linear polarization measurements as Iij, where ij are
     antenna numbers.  Write measurements in total power as Ai, where Ai
     are in general (Ri + Li), but for some antennas R and/or L are not
     measured at all.  Thus, what is actually measured in total power is:
      Antenna      RCP position        LCP position
       A1          I1 = (R1 + L1)      L1
       A2          R2                  I2 = (R2 + L2)
       An>2        In = (Rn + Ln)      In = (Rn + Ln)
     The corresponding baseline correlated amplitudes are
      Baseline     RCP position        LCP position
       A12         sqrt(R1*R2)         sqrt(L1*L2)
       A1n         sqrt(I1*In)         sqrt(L1*Ln)
       A2n         sqrt(R2*Rn)         sqrt(I2*In)
       others      sqrt(Im*In)         sqrt(Im*In)
     The fudge factors for the relative visibilities will then be
     (from, e.g. RV = Aij/sqrt(Ai*Aj))
      Baseline     RCP position        LCP position
       A12         1/sqrt(1+L1/R1)     1/sqrt(R2/L2+1)
       A1n         1                   1/sqrt(Rn/Ln+1)
       A2n         1/sqrt(1+Ln/Rn)     1
       others      1                   1
     These fudge factors range from 0 to 1, depending on the polarization
     of the source, as follows:
             __Unpol'd__     _100% RCP_     _100% LCP_
      BL      RCP   LCP       RCP   LCP      RCP   LCP
      A12    0.707 0.707       1     0        0     1
      A1n      1   0.707       1     0        1     1
      A2n    0.707   1         1     1        0     1
      oth      1     1         1     1        1     1

     The relative visibility of a point source would then have these values,
     and in order to convert this to unity, as required for a point source,
     the RV will be divided by these values.  Note that RV is only useful for
     simple sources, so we will make the approximation that the total power
     polarization is the true source polarization.
 CALLS: ***
	APPLY_CAL_ALL
 SIDE EFFECTS:
 RESTRICTIONS:
 MODIFICATION HISTORY:
     Written 04-Aug-2001 by Dale E. Gary
     21-Nov-2001  DG
       Fixed a couple of errors.
     27-Dec-2001  DG
       Removed subtraction of preflare, since it can be done much better
       in OVSA_PRESUB.


Remove from the Selection $SSW/radio/ethz/idl/ragview/datatype/init_data.pro
[Previous] [Next]
 NAME: Remove from the Selection
 PURPOSE: Removes a plot from the selection list.
 CALLING SEQUENCE:
	RemoveSel, name
 CALLS:


Remove_Sel $SSW/radio/ethz/idl/ragview/datatype/remove_sel.pro
[Previous] [Next]
 NAME:
	Remove_Sel
 PURPOSE:
 	Remove a plot from the selection
 CATEGORY:
	Data Management
 CALLING SEQUENCE:
	Remove_Sel, name
 INPUT:
 	name: the name of the plot to be removed
 COMMON BLOCK:
	SelectionRetrieval, opaque, where the selection list is
		stored.
 SIDE EFFECT:
	The selection list is changed


REPCHR [3] $SSW/radio/ovsa/idl/mapping/repchr.pro
[Previous] [Next]
 NAME:
       REPCHR
 PURPOSE:
       Replace all occurrences of one character with another in a text string.
 CATEGORY:
 CALLING SEQUENCE:
       new = repchr(old, c1, [c2])
 INPUTS:
       old = original text string.          in
       c1 = character to replace.           in
       c2 = character to replace it with.   in
            default is space.
 KEYWORD PARAMETERS:
 OUTPUTS:
       new = edited string.                 out
 CALLED BY:
	ADXY, CREATE_STRUCT [1], CREATE_STRUCT [2], CURVAL, Change_Selection
	DT_TM_MAK [1], DT_TM_MAK [2], DT_TM_MAK [3], HESSI SOHDATA CLASS DEFINITION
	Initialize Selection [2], NORH_CREATE_STRUCT [1], NORH_CREATE_STRUCT [2]
	NORH_FITS_INTERP [1], NORH_FITS_INTERP [2], READCOL [3], Selection delete
	fits_interp, put selection
 COMMON BLOCKS:
 NOTES:
 MODIFICATION HISTORY:
       R. Sterner.  28 Oct, 1986.
       Johns Hopkins Applied Physics Lab.
       RES 1 Sep, 1989 --- converted to SUN.

 Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
 This software may be used, copied, or redistributed as long as it is not
 sold and this copyright notice is reproduced on each copy made.  This
 routine is provided as is without any express or implied warranties
 whatsoever.  Other limitations apply as described in the file disclaimer.txt.


Replace by Linear Interpolation $SSW/radio/ethz/idl/ragview/modify/repllinint.pro
[Previous] [Next]
 NAME:
	Replace by Linear Interpolation
 PURPOSE:
	Replaces the values between the first and the last element
	of "array" by the linear interpolation of
	the values in array(minimum) and array(maximum).
 CALLING SEQUENCE:
	result = ArrayInterp( array )
 INPUT: 
	array: 1D vector to change
 RESULT:
	the interpolated array.
 CALLS: ***
	REPLLININT, error
 PROCEDURE:
	1. computes slope and least value
	2. replaces values in "array" by slope*i + leastValue


RH_CALCPOS $SSW/radio/nrh/idl/dp_soft_rh/image_2d/rh_calcpos.pro
[Previous] [Next]
 NAME:
	RH_CALCPOS

 PURPOSE: equivalent de CALCPOS  (a effacer)

 CATEGORY:
	NRH general


RH_CLOSE_HEADER $SSW/radio/nrh/idl/dp_soft_rh/dpatch/rh_close_header.pro
[Previous] [Next]
 NAME:
	RH_CLOSE_HEADER
 PURPOSE:
	Cette procedure ferme les fichiers FITS d'images 2D 
	 et met a jour les headers. 
 CATEGORY:
	Traitement de fichiers NRH
 CALLING SEQUENCE: 
	RH_CLOSE_HEADER,iunit, dirdsmf, nbfreq, ch,	$
		     itd, itf, numrec, npew, 		$
		     date, imstd, imstf, mmin, mmax

 INPUTS:

	nbfreq : nb de frequences 
	date      : date 
	Npew    : nb de points en EW et en NS
	Imstd    : heure de debut  (ms)
	Imstf    : heure de fin    (ms)
	CH	: pour la selection des frequences 
		  = ch(10) 'Y' ou 'N'

 OUTPUTS:
	IUNIT	: tableau des numeros d'unite d'ecriture
	DIRDSMF : tableau des noms precedes du chemin des fichiers FITS
 CALLS: ***
	FXBFINISH [1], FXBFINISH [2], RH_MOD_HEADER
 MODIFICATION HISTORY:
	Ecrit par A. Bouteille


rh_couple_correl $SSW/radio/nrh/idl/dp_soft_rh/util_rh/rh_couple_correl.pro
[Previous] [Next]
 Cette fonction renvoie les noms du couple d'antennes correspondant a
  une correlation donnee;
 A Bouteille 21 oct 2003
  EX : print,rh_couple_correl(549)
       ns08 ns09
 CALLS:


RH_CR_HEADER_BT $SSW/radio/nrh/idl/dp_soft_rh/fits_rh/rh_cr_header_bt.pro
[Previous] [Next]
 NAME:
	RH_CR_HEADER_BT
 PURPOSE:
	Cette procedure cree un HEADER FITS PRIMAIRE MODELE pour les fichiers
	2D FITS type BINARY TABLE
	fichier contenant des IMAGES 2D Nancay .
	Ce header modele est mis a jour par le programme DPATCHFITS  
 CATEGORY: 
	Traitement de fichiers NRH
 CALLING SEQUENCE:
	RH_CR_HEADER_BT, header
 OUTPUTS:
	Header:	header
 CALLED BY:
	RH_GET_HEADER
 MODIFICATION HISTORY:
	Ecrit par: A. Bouteille


RH_CR_HEADER_PR $SSW/radio/nrh/idl/dp_soft_rh/fits_rh/rh_cr_header_pr.pro
[Previous] [Next]
 NAME:
	RH_CR_HEADER_PR
 PURPOSE:
	Cette procedure cree un header fits primaire modele pour les fichiers
	2D FITS type binary table, fichier de lignes contenant des images 
	ou des harmoniques des donnees 2D Nancay .
	Ce header modele est ensuite mis a jour par les programmes dpatchfits 
	et de conversion harmoniques-images 
 CATEGORY: 
	Traitement de fichiers NRH
 CALLING SEQUENCE:
	RH_CR_HEADER_PR, header
 OUTPUTS:
	Header:	header
 CALLED BY:
	RH_GET_HEADER
 MODIFICATION HISTORY:
	Ecrit par: A. Bouteille


RH_CW_TIME $SSW/radio/nrh/idl/dp_soft_rh/util_rh/rh_cw_time.pro
[Previous] [Next]
 NAME:
       RH_CW_TIME

 PURPOSE:
       Permet de selectionner rapidemment une heure a l'aide d'un
       slider ou plus precisement manuellement.

 CALLING SEQUENCE:
       widget = RH_CW_TIME(Parent)

 INPUTS:
       Parent: ID du widget pere.

 KEYWORD PARAMETERS:
       TITLE:          titre du widget, pas de titre par defaut.
       FRAME:          bordure autour du widget, pas de bordure par defaut.
       MINIMUM:        valeur minimum du slider, [0,0,0,0] par defaut.
       MAXIMUM:        valeur maximum du slider, [23,59,59,99] par defaut. 
	XOFFSET         offset en x, 0 par defaut.
	YOFFSET:	offset en y, 0 par defaut.
       VALUE:          valeur initiale du slider.
       UVALUE:         user value du widget.

 OUTPUTS:
       ID du widget cree.

 CALLS: ***
	RH_FTIME_GET_VALUE, RH_FTIME_SET_VALUE, RH_FTSLIDE_EVENT, RH_REALTOTIME
	RH_STRTOTIME, RH_TIMETOREAL
 PROCEDURE:
             Pour changer la valeur courante
                  WIDGET_CONTROL, id, SET_VALUE=value 
             Pour obtenir la valeur courante.
                  WIDGET_CONTROL, id, GET_VALUE=var 

 MODIFICATION HISTORY:
       28 Fevrier 1995 value represente une heure
                       tvalue est un tableau de 4 entiers


rh_date100 [1] $SSW/radio/nrh/idl/dp_soft_rh/fits_rh/rh_date100.pro
[Previous] [Next]
 RH_DATE100
	Return a "mod 100" year in the range 50 to 150

 Usage:
	y100 = rh_date100(year[, /print])

 Return:
	y100	<input>	The fixed year value

 Argument:
	year	any	input	The year to be normalized

 Keywords:
	print	???	input	If set, then return a true mod 100
				value suitable for printing.
	Full	???	input	If set, then convert to a full year
				with century

 CALLED BY:
	CALCPOS, I2CDATE, INIT_MALAX, RH_HDR_TIME, RH_IMCUBE, RH_NAME_FITS
 History:
	Original: 1/12/95; SJT


rh_date100 [2] $SSW/radio/nrh/idl/gen/rh_date100.pro
[Previous] [Next]
 RH_DATE100
	Return a "mod 100" year in the range 50 to 150

 Usage:
	y100 = rh_date100(year[, /print])

 Return:
	y100	<input>	The fixed year value

 Argument:
	year	any	input	The year to be normalized

 Keywords:
	print	???	input	If set, then return a true mod 100
				value suitable for printing.
	Full	???	input	If set, then convert to a full year
				with century

 CALLED BY:
	CALCPOS, I2CDATE, INIT_MALAX, RH_HDR_TIME, RH_IMCUBE, RH_NAME_FITS
 History:
	Original: 1/12/95; SJT


rh_dp_aide $SSW/radio/nrh/idl/dp_soft_rh/dpatch/rh_dp_aide.pro
[Previous] [Next]
 Aide en ligne du logiciel DPATCH


RH_DP_INFO $SSW/radio/nrh/idl/dp_soft_rh/dpatch/rh_dp_info.pro
[Previous] [Next]
 NAME:
	RH_DP_INFO
 PURPOSE:
	Cette procedure rassemble les informations pour le calcul des fichiers 
	FITS Nrh 2D de sortie :
	  - nom des fichiers, - nombre d'images attendu dans chaque frequence
	    entre les heures hd et hf,
	  - taille em megaoctets.
 CATEGORY:
	Traitement de fichiers RH
 CALLING SEQUENCE:
	RH_DP_INFO, nomfich, ch, hd, hf, ipol, npew,  $  
	dsmf, numcnt, taille_mega	
 INPUTS:
	nomfich	: nom du fichier RH d'entree
	ch	: 
	hd,hf	: heures de debut et de fin
	ipol	: =0 NP seul , =1 NP+P
	npew	: nb de points de l'image en EW et NS
 OUTPUTS: 
	dsmf(entfi.nf)	: nom des fichiers FITS
	numcnt(entfi.nf): nb d'images entre hd et hf
	taille_mega(entfi.nf)	: taille de chaque fichier FITS
 CALLS: ***
	RH_FRQCNT, RH_NAME_FITS, RH_OPEN, RH_READCH, rh_fich_ctr, rh_lecdeb
 CALLED BY:
	RH_RDCMP, RH_RDCUBE, RH_RDINT
 COMMON BLOCKS:
	RH	: communique avec les routines de lecture des donnees
		  brutes RH	
 MODIFICATION HISTORY:
	Ecrit par A. Bouteille


RH_ECRHEAD_FITS $SSW/radio/nrh/idl/dp_soft_rh/fits_rh/rh_ecrhead_fits.pro
[Previous] [Next]
 NAME:
	RH_ECRHEAD_FITS
 PURPOSE:
	ecriture du header FITS donnees 2D RH 
	Les enregistrements sont de longueur 2880 octets
	un mot-cle fits occupe une ligne de 80 octets
       dans un record de 2880 octets on met 36 lignes de 80 octets 
 CALLING SEQUENCE:
	ecrhead_fits,uic,tab

 INPUTS:
	uic	: numero d'unite pour ecrire	INT
	tab	: header		        STRARR(*)
	nrec	: nb de records du header
 OUTPUTS:

 CALLS:
 MODIFICATION HISTORY:
	ecrit par A.Bouteille (mars 1997)


RH_ELLIPSE_MAILLE $SSW/radio/nrh/idl/dp_soft_rh/image_2d/rh_ellipse_maille.pro
[Previous] [Next]
NAME:
	RH_ELLIPSE_MAILLE()
 PURPOSE:
	Cette fonction calcule les parametres de l'ellipse qui approche la
	  section du lobe a mi-puissance. Pour determiner cette ellipse on 
	  utilise la maille elementaire calculee dans RH_MAILLE_3.
       La maille elementaire est calculee dans cette fonction
        ou bien est fournie en entree par le KEYWORD MAILLE.(dans le cas
        ou elle est calculee en amont dans le programme appelant)
	Attention il faut d'abord avoir appele INIT_MALAX qui initialise
	  le common malax.

 CATEGORY:
	Traitement de fichiers NRH
 CALLING SEQUENCE:
 OUTPUTS: 
    ELLIPSE    tableau contenant :
	        major axis,  minor axis (in solar_radii),  and angle in
	        degrees of the major axis with Ox axis.

 OPTIONAL INPUTS:
   (si non founis, le keyword MAILLE doit etre present.)
    FREQ    frequence (MHz)
    HMSC    heure (heures, minutes, secondes, centiemes)

 CALLS: ***
	RH_MAILLE_3
 OPTIONAL KEYWORD INPUT:
    MAILLE  tableau contenant la maille elementaire quand il a ete
              calcule en amont dans le programme appelant.        
 COMMON BLOCKS:
	RH	: communique avec les routines de lecture des donnees
		  brutes RH
	
 EXAMPLE:


 MODIFICATION HISTORY:


rh_fich_ctr $SSW/radio/nrh/idl/dp_soft_rh/util_rh/rh_fich_ctr.pro
[Previous] [Next]
                     Type de fichier
 --------------------------------------------------------------------
 rh_fich_ctr, fich, path, typ1, typ2
	fich:		nom du fichier
 	path: 		directory du fichier
	typ1:		ier caractere du nom du fichier
	typ2:		2eme caractere du nom du fichier
 CALLS:
 CALLED BY
	RH_DP_INFO, RH_INIT_HEADER, rh_sel_fich


RH_FRQCNT $SSW/radio/nrh/idl/dp_soft_rh/routine_rh/rh_frqcnt.pro
[Previous] [Next]
 NAME:
	RH_FRQCNT
 PURPOSE:
	Cette procedure compte le nombre d'acq par frequence entre kdeb et 
	kfin
	il faut 8 minutes pour parcourir 5 * 10 000 acq ( un fichier 
	comprime d'une journee a 2i/sec). Donc environ 10 sec pour 1000 images
 CATEGORY:
	Traitement de fichiers RH
 INPUTS:
	kdeb	: n0 d'acq de depart
	kfin	: n0 d'acq de fin
 OUTPUTS
	numcnt	: nb d'acq a chq frequence	LONARR(entfi.nf)
		:  (NP + P) compte pour une seule acq
 CALLS: ***
	RH_READF
 CALLED BY:
	RH_DP_INFO, RH_INIT_HEADER
 MODIFICATION HISTORY:
	Ecrit par A. Bouteille


RH_GET_HEADER $SSW/radio/nrh/idl/dp_soft_rh/fits_rh/rh_get_header.pro
[Previous] [Next]
 NAME:
	RH_GET_HEADER
 PURPOSE:
	Cette procedure remplit les header fits primaire et d'extension.
 CATEGORY:
	Traitement de fichiers NRH
 CALLING SEQUENCE:
   RH_GET_HEADER, $
     entree
	num_freq,   dsmf,   ipolar,   npew,    npns,	$
	imstd,      imstf,				$
	champ_Rs,   tb,     nbre_enrgt,   		$
	mmax,       mmin,				$
     sortie
	hdr0,     hdr1,					$
     entree optionnelle                             	$
	str_dp,   temps_integ = temps_integ

 INPUTS :
	num_freq	numero de la frequence ( de 0 a entfi.nf -1 )
	dsmf		tableau nom du fichier a ecrire
	ipolar		0 sans polar,=1 avec polar
	npew, npns	nb de points de l'image 2D en EW et NS
	imstd, imstf	heure de debut et de fin (msec)
	champ_Rs	largeur du champ de l'image (Rs)
	tb		1 unites des images temperature de brillance
	nbre_enrgt	nbre d'enregistrements, ie d'images dans le fichier 
			    fits de sortie.
	mmax,mmin	max et min des fichiers.
 OUTPUTS : 
	hdr0		tableau du header primaire
	hdr1		tableau du header d'extension
 KEYWORDS :
       temps_integ    reserve au traitement des images composites RH + GMRT
                             pour les parametres "exptime", "timestep"
                             et tdelt1. Ecrase entfi.itg .
 OPTIONNEL  INPUT :
       str_dp    : structure des parametres de calcul de l'image
                      figurant dans le header fits ( parametre
                      pouvant etre absent dans les versions anciennes.)
                                
                     
 CALLS: ***
	BIN_DATE, MSH, RH_CR_HEADER_BT, RH_CR_HEADER_PR, RH_HDR_TIME, SXADDPAR [1]
	SXADDPAR [2], SXADDPAR [3], SXDELPAR [1], SXDELPAR [2], SXDELPAR [3]
 CALLED BY:
	RH_INIT_HEADER, RH_RDIMCUBE
 COMMON BLOCKS :
	RH	: communique avec les routines de lecture des donnees
		  brutes RH
	
 MODIFICATION HISTORY :
 01 mar   	creation par A. Bouteille a partir de D2D_FITS.PRO . Ne traite
		  qu'une frequence a la fois. Renvoie les header en sortie
 04 jun 30	ajout du mot-cle  temps_integ  pour pouvoir produire des
		  headers de fichiers fits d'images composite RH + GMRT.
		  Dans ce cas les donnees RH a haute cadence sont integrees
		  sur le temps d'integration du GMRT (~2 sec), et la cadence
		  de sortie (variables "exptime" et "timestep") est evidemment
		  celle du GMRT et ne peut etre deduite des headers du fichier
		  de donnees RH.
		amelioration presentation.


rh_hcent $SSW/radio/nrh/idl/dp_soft_rh/routine_rh/rh_hcent.pro
[Previous] [Next]
 convertit l'heure [h,m,s,s/100] en centièmes de seconde
 Le total est fait en LONG, donc pas de pb de precision.(juin 2002)


RH_HDR_TIME $SSW/radio/nrh/idl/dp_soft_rh/fits_rh/rh_hdr_time.pro
[Previous] [Next]
 NAME:
	RH_HDR_TIME
 PURPOSE:
	Cette fonction effectue le codage date [et heure si le parametre ihms
	est present] pour les mots-cles 
	DATE_OBS, DATE_END , DATE et DATE-OBS du header FITS
	format standard : CCYY-MM-DDThh:mm:ss[.sss...]Z
 CATEGORY:
	Traitement de fichiers NRH	
 CALLING SEQUENCE:
	chtime = HDR_TIME(idat,ihms)
 INPUTS:
	date : jour,mois,an
 OPTIONAL INPUTS:
	ihms : heure en millisec
 OUTPUTS:
	Chtime : heure au format standard FITS
 CALLS: ***
	MSH, rh_date100 [1], rh_date100 [2]
 CALLED BY:
	RH_GET_HEADER, RH_MOD_HEADER
 MODIFICATION HISTORY:
	Ecrit par: A. Bouteille
	modif mai 98 : appel a la routine rh_date100 pour avoir une date 
	      avec siecle quelque soit la date rentree sous forme j,m,a


RH_IMCUBE $SSW/radio/nrh/idl/dp_soft_rh/image_2d/rh_imcube.pro
[Previous] [Next]
 NAME:
	RH_IMCUBE
 PURPOSE:
	Cette fonction calcule un cube d'images 2D
	a partir d'un cube d'harmoniques 2D 
 CATEGORY:
	Traitement de fichiers NRH
 CALLING SEQUENCE:
	RH_IMCUBE, Tab_Harm, Tab_Image, SIZE= size, N_SOLAR_RADIUS= n_sol_rd
 INPUTS:  
 tab_harm structure, cube d'harmoniques
                (structure remplie par RH_RDCUBE)
 OUTPUTS:
 tab_image structure, cube d'images
                (structure definie ici)
 KEYWORDS:
 SIZE	: taille en X et en Y de l'image  (128, 256 ou 512)
    par defaut 128 
 N_SOLAR_RADIUS : largeur du soleil en rayons solaires ( 4 ou 6)
    par defaut 4
 TB	: tb=0 amplitude en sfu    
	  tb=1 amplitude temperature de brillance
 NO_ROND : =1 image calculee en coord. interferometriques
           =0 image calculee en coord heliographiques
     par defaut image "ronde" donc en coord. heliographiques
 CALLS: ***
	INIT_MALAX, JULDAY, RH_BR_MALC_IM_2D, RH_COREC_PHASE, RH_MALCROND_IM_2D
	RH_TAB_CORREL, rh_date100 [1], rh_date100 [2]
 CALLED BY:
	RH_RDIMCUBE
 EXAMPLE:
IDL>	rh_imcube,tab_harm,tab_image
IDL>	help,tab_image
        TAB_IMAGE       STRUCT    = -> IMAGNP Array[11]
IDL>	help,tab_image,/struc
       ** Structure IMAGNP, 4 tags, length=65548:
	   TIME            LONG          31293050
	   NSCAN           LONG                 0
	   FREQ            FLOAT           236.600
	   STOKESI         FLOAT     Array[128, 128]

 MODIFICATION HISTORY:
	-Ecrit par: A. Bouteille (aout 2000)
   04 juin 18    : ajout des antennes anti_alias : calcul des images
                   en utilisant le tableau des correlations calcule
                   par RH_TAB_CORREL


RH_INIT_HEADER $SSW/radio/nrh/idl/dp_soft_rh/dpatch/rh_init_header.pro
[Previous] [Next]
 NAME :
	RH_INIT_HEADER
 PURPOSE:
	Cette procedure cree les fichiers FITS d'images 2D avec leurs
	  headers sur le repertoire dpatch_dir
	Utilise par le soft RH seul. N'est plus utilise par le soft des images
	  composites RH + GMRT.
 CATEGORY:
	Traitement de fichiers NRH
 CALLING SEQUENCE: 
	RH_INIT_HEADER, nomfich, nbfreq, freq10, date, hdeb,		$ 
	    kdeb, kfin, fac_integ, ch, ipolar, npew , npew,	$
	    imstd, imstf, larg, tb, mmax, mmin,				$
	    dpatch_dir,							$
	; Sortie
	    dsmf,  numcnt, iunit, dirdsmf, errmsg

 INPUTS:
   Nomfich : nom du fichier a traiter
   nbfreq, freq10 : nb de frequences et valeurs*10
   date,hdeb      : date et heure de debut
   kdeb kfin      : numeros de debut et de fin des images lues dans le 
			   fichier de donnees (fichier qui peut etre comprime 
			   ou non). temps_integ = temps_integ
   fac_integ      : facteur d'integration des donnees RH pour en reduire 
			   la cadence
			   
   ipolar    : 1 fichiers Helio avec polar 
		  0                sans polar
   npew      : nb de points en EW et en NS
   larg	  : largeur de l'image en rayons solaires  4 (ou 6)
   imstd      : heure de debut  (ms)
   imstf      : heure de fin    (ms)
   dpatch_dir : repertoire d'ecriture des fichiers FITS 2D
   ch	       : str_array(10) donnant la selection des frequences 'Y' ou 'N'
   tb	       : si tb=1 images donnees en unites de temperature de brillance
		  sinon en unites de brillance 
		  par defaut unites de brillance
 OUTPUTS:
   dsmf      : nom de fichier de sortie
   iunit     : tableau des numeros d'unite d'ecriture
   dirdsmf   : tableau des noms precedes du chemin des fichiers FITS
   errmsg    : message d'erreur si dpatch_dir n'existe pas 
 CALLS: ***
	FXBCREATE [1], FXBCREATE [2], FXWRITE [1], FXWRITE [2], RH_FRQCNT, RH_GET_HEADER
	RH_NAME_FITS, RH_SEPARATOR, rh_fich_ctr
 MODIFICATION HISTORY:
	Ecrit par A. Bouteille
 05 feb  2 : ajout de fac_integ a la liste d'entree. Cela sert a ne pas defi-
		nir des fichiers de sortie inutilement trop gros d'un facteur 
		fac_integ.
	      reorganisation de la liste d'arguments.


RH_INTEGRE $SSW/radio/nrh/idl/dp_soft_rh/integration/rh_integre.pro
[Previous] [Next]
 NAME:
       RH_INTEGRE
 PURPOSE:
       Cette procedure integre les donnees sur un delta T donne.
       Elle tourne sur des fichiers Nancay natifs et cree en sortie des
 fichiers Nancay natifs. 
 CALLING SEQUENCE:
        RH_INTEGRE, ['/data/extraits/vilmer/2d020220.01B'],'./2i020220.01B',
  4.,[11,13,59,87],[11,17,47,50]

 INPUTS:
 tb_fich :	Liste des fichiers a integrer
 fichier_itg:	nom du fichier integre
 integ:	temps d'integration en secondes
 hdd:		debut d'integration demande(h,mn,sec,ct)
 hfd:		fin d'integration demande        "

 KEYWORD:
  TOUT:		integration de tout le fichier

 MODIFICATIONS:
	juin 1999 : Passage aux fichiers 8 images/sec
		    lecture acq par acq
	nov 1999  : Demarrage a la freq zero
       jan 2006  : bug recherche heure de debut corrige
                   accepte nint=1 : fait alors une extraction simple
 CALLS:


rh_lecdeb $SSW/radio/nrh/idl/dp_soft_rh/routine_rh/rh_lecdeb.pro
[Previous] [Next]
 msd	: heure de debut demandee en millisec
 msf	: heure de fin demandee en millisec
 kdeb	: numero de la 1ere image a lire
 kfin	: numero de la derniere image a lire
  22-07-1998 : nouvelles routines rh_read pour extension NS24
 CALLS:
 CALLED BY
	RH_DP_INFO, RH_RDCMP, RH_RDCUBE, RH_RDINT


RH_LISTFREQ $SSW/radio/nrh/idl/dp_soft_rh/routine_rh/rh_listfreq.pro
[Previous] [Next]
 NAME: RH_LISTFREQ

 PURPOSE:
    Cette procedure liste les frequences des manip RH du mois
    Elle cree un fichier de nom freqyymm.lis
 CATEGORY:
       Traitement de fichiers NRH.

 INPUTS:
   STR_YYMM : chaine de carac. contenant yymm definissant le mois

 KEYWORDS:
  REPENT  : repertoire des fichiers RH lus
            par defaut /data/nancay
  REPSOR  : repertoire 
            par defaut repertoire courant
 CALLS: ***
	RH_CLOSE, RH_OPEN
 MODIFICATION HISTORY:
  A. Bouteille janvier 2003


RH_MOD_HEADER $SSW/radio/nrh/idl/dp_soft_rh/dpatch/rh_mod_header.pro
[Previous] [Next]
 NAME:
	RH_MOD_HEADER
 PURPOSE:
	Cette procedure met a jour les headers FITS primaire et d'extension
	 apres ecriture des lignes.
 CATEGORY:
	Traitement de fichiers NRH
 INPUTS:
	dsmf	: nom du fichier
	date	: date
	imstd	: heure de debut
	imstf	: heure de fin
	mmin	: minimum des points
	mmax	: maximum des points
 KEYWORD:
  NBRE_ENRGT   : pour reajuster NAXIS2 nb effectif de lignes remplies
 CALLS: ***
	FXHMODIFY [1], FXHMODIFY [2], MSH, RH_HDR_TIME
 CALLED BY:
	RH_CLOSE_HEADER
 MODIFICATION HISTORY:
	Ecrit par A. Bouteille
       06-10-2004 : mot cle NBRE_ENRGT


RH_NAME_FITS $SSW/radio/nrh/idl/dp_soft_rh/fits_rh/rh_name_fits.pro
[Previous] [Next]
 NAME:
	RH_NAME_FITS

 PURPOSE: 
	Cette fonction cree le nom d'un fichier fits RH:
	nrhr_ffff_hpg_yyyymmjj_hhmnss:cc_c.fts
 CATEGORY:
	Traitement de fichiers NRH
 CALLING SEQUENCE:
	RH_NAME_FITS, Res, Freq, Type, Npew, Integ, $
	 Date, Heure, Compr
 INPUTS:	
  Res	->	r reseau ew(e) ns(n) 1d(1) ou 2d(2)	string
  Freq ->	ffff frequence en centaines de khz	integer
  Type		i ou h ou p ou f 			string
     	i = coordonnees instrumentales
     	h = coordonnees heliographiques
	a = harmoniques
     	p = fichier de type positions
     	f = fichier de type flux

  Npew->	npew=2**p
		p niveau d'interpolation de 0 a 9	integer
  Integ->	g niveau d'integration de 0 a 9		integer
  Date		date (jour, mois, an).	 		intarr(3)
  Heure(4)->	heure de debut (h,m,s,c)		intarr(3)
  Compr->	c ou d ou b	string 
		fichier comprime(c) ou decomprime(d) ou brut(b)
 OUTPUTS:
	nomfich = nom du fichier
 CALLS: ***
	rh_date100 [1], rh_date100 [2]
 CALLED BY:
	RH_DP_INFO, RH_INIT_HEADER
  EXAMPLE:
	nomfich = RH_NAME_FITS('2', 1640, 'h', npew, 0, $
			    [1996,10,21], [9,0,0,0], 'c')
MODIFICATIONS:
	Le 27/09/00 'c' en tant que separateur de centiemmes de secondes


rh_num_correl $SSW/radio/nrh/idl/dp_soft_rh/util_rh/rh_num_correl.pro
[Previous] [Next]
 Cette fonction renvoie le numero de la correlation (de 0 a entfi.nbcorel-1)
  correspondant a un couple d'antennes. 
 A Bouteille 21 oct 2003
  print, rh_num_correl(['ewE1','ew04'])
  509
 CALLS:


RH_PERIODISE $SSW/radio/nrh/idl/dp_soft_rh/image_2d/rh_periodise.pro
[Previous] [Next]
 NAME:
	RH_PERIODISE
 PURPOSE:
	Cette procedure calcule l'image periodis'ee sur  n_period  periodes.
	  On prevoit que  n_period  puisse etre 1.5, 2 ou 4, a l'exclusion 
	  d'aures valeurs.
 CATEGORY:
	
 CALLING SEQUENCE:
    RH_PERIODISE, $
      INPUTS:
	PERIOD	nombre de periodes a reproduire.
	NPI	dimension en x et en y de l'image (en pratique toujours l'image
		  interferometrique.
	IMAGE	image a periodiser.
      OUTPUTS:
	IMAGE_LARG  : image elargie
 KEYWORD PARAMETERS:
 CALLS: ***
	CONGRID [1], CONGRID [2], CONGRID [3]
 EXAMPLE:

 MODIFICATION HISTORY:
 01 jul 17	clarification des commentaires, adoption de la notation npi
		  puisque PERIODISE n'est utilise que pour l'image interfero-
		  metrique.


RH_RDCMP $SSW/radio/nrh/idl/dp_soft_rh/image_2d/rh_rdcube.pro
[Previous] [Next]
 NAME:
	RH_RDCMP.PRO 
 PURPOSE:
	-sous programme de RH_RDCUBE 
	-lecture d'un cube de donnees RH comprimees
 CATEGORY:
	Traitement de fichiers NRH
 CALLING SEQUENCE
	rh_rdcmp,fich, hd, hf, nof, ipol, tab_harm
   routines utilisees pour la lecture: RH_OPEN(..,/MONO) et RH_READCH
   routine utilisee pour la recherche d'heure RH_LECDEB
 INPUTS:
	Fich : nom du fichier a traiter
	hd    : heure de debut  (h,m,s)
	hf    : heure de fin    (h,m,s)
	Ipol  :   =0 sans polar 
		  =1 avec polar
 OUTPUTS:
	tab_harm : tableau de structures contenant le cube de donnees lues
		   time,numim,stokesi(2,nb_harm)
 avec ipol=1	   time,numim,stokesi(2,nb_harm),stokesv(2,nb_harm)
 CALLS: ***
	HMS, RH_CLOSE, RH_DP_INFO, RH_HDEB, RH_HFIN, RH_OPEN, RH_RDCUBE, RH_RDINT, RH_READCH
	RH_READSEL, rh_lecdeb
 CALLED BY:
	RH_RDCUBE, RH_RDINT
 COMMON BLOCKS:
	RH	: communique avec les routines de lecture des donnees
		  brutes RH
	
 MODIFICATION HISTORY:
	Ecrit par A. Bouteille ( 24 Aout 2000)


RH_RDCUBE $SSW/radio/nrh/idl/dp_soft_rh/image_2d/rh_rdcube.pro
[Previous] [Next]
 NAME:
	RH_RDCUBE.PRO 
 PURPOSE: 
	-lecture d'un cube de donnees RH
  Pour les donnees non comprimees ( fichiers 2d ou 2q, 2i ) appel a RH_RDINT
  Pour les donnees haute resolution comprimees ( fichiers 2c) appel a RH_RDCMP
 CATEGORY:
	Traitement de fichiers NRH
 CALLING SEQUENCE
	rh_rdcube, fich, tabharm, $
                  freq=ifreq, hdeb=ihdeb, hfin=ihfin, polar= ipolar

 INPUTS:
	Fich : nom du fichier a traiter
 KEYWORDS:
	HDEB    : heure de debut  'HH:MM:SS:MMM'
		  par defaut heure de debut du fichier
	HFIN    : heure de fin    'HH:MM:SS:MMM'
		  par defaut = HDEB ( une seule image calculee)
	POLAR   : =0 sans polar ( STOKESI seul)
		  =1 avec polar ( STOKESI + STOKESV)
		  par defaut POLAR = 0
 OUTPUTS:
	tab_harm : tableau de structures contenant le cube de donnees lues
		   time,numim,stokesi(2,nb_harm)
 avec ipolar=1	   time,numim,stokesi(2,nb_harm),stokesv(2,nb_harm)
 CALLS: ***
	HMS, RH_CLOSE, RH_DP_INFO, RH_HDEB, RH_HFIN, RH_OPEN, RH_RDCMP, RH_RDINT, RH_READCH
	RH_READSEL, rh_lecdeb
 CALLED BY:
	RH_RDCMP, RH_RDIMCUBE, RH_RDINT
 COMMON BLOCKS:
	RH	: communique avec les routines de lecture des donnees
		  brutes RH
 EXAMPLE:
IDL>	rh_rdcube,'/juke/128sec/2Q2000_3/2q000807.01',tabharm, $
                  freq=1,hdeb='8:43',hfin='9:0'
IDL>	help,tab_harm
	TAB_HARM        STRUCT    = -> HARMNP Array[11]
IDL>	help,tab_harm,/struct
** Structure HARMNP, 4 tags, length=5204:
   DATE            INTARR(3)
   TIME            LONG          31293050
   NSCAN           LONG                 0
   FREQ            FLOAT           236.600
   STOKESI         FLOAT     Array[2, nb_harm]
	
 MODIFICATION HISTORY:
	Ecrit par A. Bouteille ( 24 Aout 2000)


RH_RDIMCUBE $SSW/radio/nrh/idl/dp_soft_rh/image_2d/rh_rdimcube.pro
[Previous] [Next]
 NAME:
	RH_RDIMCUBE.PRO 
 PURPOSE: 
	-lecture et calcul d'un cube de donnees RH

 CATEGORY:
	Traitement de fichiers NRH
 CALLING SEQUENCE
	rh_rdimcube, fich, tab_image, hdr0, hdr1, $
		     FREQ=ifreq, HDEB=ihdeb, HFIN=ihfin, POLAR= ipolar, $
                    SIZE= size, N_SOLAR_RADIUS= n_sol_rd, TB= tb

 INPUTS:
	Fich : nom du fichier a traiter
 KEYWORDS:
	HDEB    : heure de debut  'HH:MM:SS:MMM'
		  par defaut heure de debut du fichier
	HFIN    : heure de fin    'HH:MM:SS:MMM'
		  par defaut = HDEB ( une seule image calculee)
	POLAR   : =0 sans polar ( STOKESI seul)
		  =1 avec polar ( STOKESI + STOKESV)
		  par defaut POLAR = 0
       SIZE	: taille en X et en Y de l'image  (128, 256 ou 512)
                 par defaut 128 
       N_SOLAR_RADIUS : largeur du soleil en rayons solaires ( 4 ou 6)
                 par defaut 4
	TB	: tb=0 amplitude en sfu    
		  tb=1 amplitude en temperature de brillance
		  par defaut 1
 OUTPUTS:
	TAB_IMAGE : tableau de structures contenant le cube d'images
         si ipolar=0      time,numim,stokesi(128,128)
         si ipolar=1	   time,numim,stokesi(128,128),stokesv(128,128)
	HDR0	: header fits primaire
	HDR1	: header d'extension #1
 CALLS: ***
	RH_CLOSE, RH_GET_HEADER, RH_IMCUBE, RH_OPEN, RH_RDCUBE, SXADDPAR [1], SXADDPAR [2]
	SXADDPAR [3]
 CALLED BY:
	READ_NRH
 COMMON BLOCKS:
	RH	: communique avec les routines de lecture des donnees
		  brutes RH
 EXAMPLE:
IDL> rh_rdimcube,'/data/nancay/2q000807.01',tab_image, hdr0,hdr1,	$
                  freq=1,hdeb='08:43:00',hfin='09:30:00'
IDL>	help,tab_image
IDL>      TAB_IMAGE       STRUCT    = -> IMAGNP Array[11]
IDL>	help,tab_image,/struc
       ** Structure IMAGNP, 4 tags, length=65548:
	   TIME            LONG          31293050
	   NSCAN           LONG                 0
	   FREQ            FLOAT           236.600
	   STOKESI         FLOAT     Array[128, 128]
 Utilisation :
 read_nrh,'2q040412.01',index,tab_image
 index2map, index,tab_image,map
 plot_map,map	
 MODIFICATION HISTORY:
	Ecrit par A. Bouteille ( 24 Aout 2000)


RH_RDINT $SSW/radio/nrh/idl/dp_soft_rh/image_2d/rh_rdcube.pro
[Previous] [Next]
 NAME:
	RH_RDINT.PRO 
 PURPOSE: 
	-sous programme de RH_RDCUBE
	-lecture d'un cube de donnees RH non comprimees
   routines utilisees : RH_OPEN(..,/SEL) et RH_READSEL
   routines utilisees pour la recherche d'heure RH_HDEB et RH_HFIN
 CATEGORY:
	Traitement de fichiers NRH
 CALLING SEQUENCE
	rh_rdint, fich, hd, hf, nof, ipol, tab_harm

 INPUTS:
	Fich  : nom du fichier a traiter
	hd    : heure de debut  (h,m,s)
	hf    : heure de fin    (h,m,s)
	Ipol  : =0 sans polar 
		  =1 avec polar
 OUTPUTS:
	tab_harm : tableau de structures contenant le cube de donnees lues
	   time,numim,stokesi(2,nb_harm)			si ipol=0
          time,numim,stokesi(2,nb_harm),stokesv(2,nb_harm)	si ipol=1
 CALLS: ***
	HMS, RH_CLOSE, RH_DP_INFO, RH_HDEB, RH_HFIN, RH_OPEN, RH_RDCMP, RH_RDCUBE, RH_READCH
	RH_READSEL, rh_lecdeb
 CALLED BY:
	RH_RDCMP, RH_RDCUBE
 COMMON BLOCKS:
	RH	: communique avec les routines de lecture des donnees
		  brutes RH
 MODIFICATION HISTORY:
	Ecrit par A. Bouteille ( 24 Aout 2000)
       Ajout antennes Anti Alias nb_harm : 576--> 648 harmoniques


RH_RONDCUBE $SSW/radio/nrh/idl/dp_soft_rh/image_2d/rh_rondcube.pro
[Previous] [Next]
 NAME:
	RH_RONDCUBE
 PURPOSE:
        Cette procedure calcule l'image heliographique finale (soleil rond) 
	 par interpolation de l'image interferometrique,
 CATEGORY:
	Traitement de fichiers NRH
 CALLING SEQUENCE:
	RH_RONDCUBE, Tab_Image, tab_image_helio, SIZE= size,
                (structure remplie par RH_RDCUBE)
 INPUTS:
 tab_image : structure, cube d'images interfero.

 OUTPUTS:
 tab_image_helio : structure, cube d'images heliog.
                (structure definie ici); 
 KEYWORDS:
 SIZE	: taille en X et en Y de l'image  (128, 256 ou 512)
    par defaut 128 
 N_SOLAR_RADIUS : largeur de l'image en rayons solaires ( 4 6 8 or 10)
    par defaut 4
 TB	: tb=0 amplitude en sfu    
	  tb=1 amplitude temperature de brillance
         par defaut tb=1
 CALLS: ***
	INIT_MALAX, RH_GRILLE, RH_MAILLE_3, RH_NORM_IM
 EXAMPLE:
IDL>	rh_rondcube,tab_image, tab_image_helio, SIZE = 256,   $
                        N_SOLAR_RADIUS = 6, TB = 1
IDL>	help,tab_image
        TAB_IMAGE       STRUCT    = -> IMAGNP Array[11]
IDL>	help,tab_image,/struc
       ** Structure IMAGNP, 4 tags, length=65548:
	   TIME            LONG          31293050
	   NSCAN           LONG                 0
	   FREQ            FLOAT           236.600
	   STOKESI         FLOAT     Array[128, 128]

 MODIFICATION HISTORY:
 2004 juillet	-Ecrit par: A. Bouteille 


rh_sel_fich $SSW/radio/nrh/idl/dp_soft_rh/util_rh/rh_sel_fich.pro
[Previous] [Next]
                     Selection d'un fichier
 --------------------------------------------------------------------
 rh_sel_fich, fpath, , filter, fich, typ1, typ2
 	fpath : 	directory par defaut
	separator : 	separateur
	filter:		filtre
	fich		nom du fichier
			='' si pas de fichier selectionne
	typ1		ier caractere du nom du fichier
	typ2		2eme caractere du nom du fichier
 CALLS:


RH_SEL_FREQ $SSW/radio/nrh/idl/dp_soft_rh/routine_rh/rh_sel_freq.pro
[Previous] [Next]
 NAME: RH_SEL_FREQ

 PURPOSE:
      calcule les indices des frequences a traiter 
 
 CATEGORY:
       Traitement de fichiers NRH.

 INPUTS:
  NOMFICH  : nom du fichier
  FREQ     : tableau des frequences a traiter

 OUTPUTS:
  IND_FRQ  : intarr() indices des frequences 
             ind_frq(k) = -1 quand la frequence n'existe pas
 CALLS: ***
	RH_CLOSE, RH_OPEN
 MODIFICATION HISTORY:
 version janvier 2003 : choix des frequences 
  calcule les indices des frequences a traiter 


RS_IND $SSW/radio/nrh/idl/2dnrh/gen/rs_ind.pro
[Previous] [Next]
 NAME:
	RS_IND

 PURPOSE:
	Cette fonction donne  l'indice d'un pixel dans untableau
 a partir de la position en rayon solaire, l'indice du centre le l'image, 
 la dimension du rayon solaire en pixels

 CATEGORY:
	RADIO

 CALLING SEQUENCE:
	IND=IND_RS(RS, pcentre, rayon)

 INPUTS:
	RS	Position du pixel en rayon solaire
	Pcentre Indice du centre de l'image
	Rayon	Nombre de pixels representant le rayon solaire

 OUTPUTS:
	IND	Coordonnee en pixel

 CALLED BY:
	CW_REGION, NRH2_PROJECTION, NRH_COORDPIX, REGION_EVENT, SUN_IMAGE, UVALUE_REGION
 EXAMPLE:
	IND = RS_IND(-1, 32, 16)
IND indice du pixel situe a -1 rayon solaire

 MODIFICATION HISTORY:
	Ecrit par: J Bonmartin le 21/10/97 (bonmartin@obspm.fr)
		Le 29/03/99	FIX remplace par ROUND


RSTN2ANT $SSW/radio/ovsa/idl/support/rstn2ant.pro
[Previous] [Next]
 NAME:
     RSTN2ANT
 PURPOSE:
     Returns the flux spectrum expected to be measured by 27m or 2m
     antennas, based on a quadratic fit to the flux spectrum reported
     by RSTN/Penticton and modified by the primary beam size.
 CATEGORY:
     OVRO APC SUPPORT
 CALLING SEQUENCE:
     s = rstn2ant,f,s_in,frq[,/twometer]
 INPUTS:
     f      the frequencies [GHz] measured by the RSTN network.  If
              F[0] = -1, which is the error return from READ_RSTN_FLUX
              routine, then this routine returns 0.
     s_in   the corresponding fluxes, in SFU.
     frq    the frequencies at which to evaluate a quadratic fit to
              f and s_in.
 OPTIONAL (KEYWORD) INPUT PARAMETERS:
     twometer  A switch that indicates that a result for the 2m dishes
                 should be returned.  The default is to return a result
                 valid for the 27m dishes.
 ROUTINES CALLED:
 OUTPUTS:
     S      The expected flux spectrum, in SFU, as measured by either
              the 27m antennas (default) or 2m (if /TWOMETER switch is
              set).  The fluxes are evaluated at the frequencies given
              in the FRQ input array.  A value of 0 is returned if the
              routine fails.
 COMMENTS:
 CALLS: ***
	PANDB, POLY_FIT
 CALLED BY:
	WTPCAL
 SIDE EFFECTS:
 RESTRICTIONS:
 MODIFICATION HISTORY:
     Written 11-Nov-2000 by Dale E. Gary


RUNMN_RH $SSW/radio/nrh/idl/1dnrh/profils/runmn_rh.pro
[Previous] [Next]
 NAME:
	RUNMN_RH

 PURPOSE:
	This procedure computes a running mean of a 1D RH-scan
	At the border of the field of view use is made of the periodicity
       of the scans.	

 CATEGORY:
	NRH1 Positions

 CALLING SEQUENCE:
	RUNMN_RH, scan, width, mscan, sdev

 INPUTS:
	SCAN	original 1D scan 
	WIDTH	number of points used for the computation of the mean	
	
 KEYWORD PARAMETERS:
	Non

 OUTPUTS:
	MSCAN	array of running mean values (output)
	SDEV	standard deviation of the fit (output)

 CALLED BY:
	SIGRMN
 COMMON BLOCKS:
	Non

 MODIFICATION HISTORY: (bonmartin@obspm.fr)
	17/11/98	adapte du logiciel XHELIO


RVAV $SSW/radio/ovsa/idl/support/rvav.pro
[Previous] [Next]
 NAME:
     RVAV
 PURPOSE:
     Determines the best estimates of phase drift (PDOT) and amplitude
     and phase at the reference time supplied. (For use by AMPHIT)
 CATEGORY:
     OVRO APC DATA CALIBRATION
 CALLING SEQUENCE:
     errflg = rvav(x,y,t,tref,aref,pref,pdot,siga,sigp)
 INPUTS:
     x      Array of cosine channel values, of size X(NTIMES)
     y      Corresponding array of sine channel values
     t      Array of times corresponding to the data (times in min)
     tref   The reference time [min] at which PDOT, AREF and PREF should
              be given.
 OPTIONAL (KEYWORD) INPUT PARAMETERS:
 ROUTINES CALLED:
     ovsa_lfit
 OUTPUTS:
     aref   The amplitude estimate at time TREF.
     pref   The phase estimate (degrees) at time TREF.
     pdot   The phase drift (degrees/hr) over the entire range of data.
     siga   The standard deviation of amplitudes about the mean.
     sigp   The standard deviation of the phases about the mean.
 COMMENTS:
     For now, this routine works only on a single frequency at a time.
     It can (should?) be expanded to work with all frequencies at once.
 CALLS: ***
	OVSA_LFIT
 CALLED BY:
	AMPHIT
 SIDE EFFECTS:
 RESTRICTIONS:
 MODIFICATION HISTORY:
     Written 02-Dec-1998 by Dale E. Gary
     04-Dec-1998  DG
       Earlier version tried to use IDL LINFIT routine, but this one
       implements the original LINFIT (now called LFIT to distinguish
       from IDL routine) from AMPHIT.
     23-Jul-2003  DG
       Changed generic LFIT to OVSA_LFIT to distinguish from McTiernan
       routine of the same name.