MAKE_APCAL $SSW/radio/ovsa/idl/util/make_apcal.pro
[Previous] [Next]
 NAME:
     MAKE_APCAL
 PURPOSE:
     Interim routine to generate the AMPCAL and PHZCAL segment records from AMPHIT data
     obtained from Reference amplitude and phase calibration observations.  The segment
     records are written into each scan by ARCHIVE.
 CATEGORY:
     OVRO APC DATA CALIBRATION
 CALLING SEQUENCE:
     make_apcal[,/s273]
 INPUTS:
 OPTIONAL (KEYWORD) INPUT PARAMETERS:
     S273      If set, the calibrator is assumed to be 3C273 and the 3C273 fluxes are
                 applied.  Otherwise the calibrator is assumed to be 3C84.
 ROUTINES CALLED:
     getparms, tlsnow, get_tl_struct, tl_encode, dayofyr
 OUTPUTS:
 COMMENTS:
     The values written to the file are in scaled, 2-byte integer form.  To convert
     the amplitude values back to units/SFU, read the integer value, multiply by 0.01,
     and apply to baseline data by multiplying the factors for BOTH antennas involved.
     To convert the phase values to degrees, read the integer value and multiply by 0.01.
     To apply to baseline data, use the phase difference for the two antennas.
 CALLS: ***
	GET_TL_STRUCT, HMS2SEC, NINT [1], NINT [2], PHZFIT, TLSNOW, TL_ENCODE
 SIDE EFFECTS:
     Data are written to the files !DEFAULTS.EPHEMDIR+'AMPCAL.REC' and
     !DEFAULTS.EPHEMDIR+'PHZCAL.REC'.
 RESTRICTIONS:
     Provision is made for 2-m calibration factors, but the actual 2-m calibration is not
     yet set, so this routine just leaves the space for these values blank.
 MODIFICATION HISTORY:
     Written 23-Jul-1999 by Dale E. Gary
     24-Jul-1999  DG
       Made several significant changes to the scaling of the output.  All values are now
       scaled by a factor of 100.  The amplitudes and errors
     26-Nov-1999  DG
       Slight change to reflect the new form of GNP structure (introduced due
       to creation of GAINPARM segment).
     11-Jan-2000  DG
       Eliminated hardwired directory locations.
     06-Apr-2000  DG
       Eliminate now unneeded scaling to noise diode, since that is done in
       AMPHIT on writing the output results.  Update 3C84 spectrum, and
       generally fix problems.
     23-Jul-2000  DG
       Changed to use the function TLSNOW (no functional change).
     01-Apr-2001  DG
       Looks like including RERR in formal errors is the wrong thing to do,
       so eliminate it by setting it to zero.
     06-Apr-2001  DG
       Add /S273 switch to indicate that the calibrator source is 3C273, and
       add 3C273 flux measurements as of 4 Apr 2001.


MAKE_APCAL2 $SSW/radio/ovsa/idl/util/make_apcal2.pro
[Previous] [Next]
 NAME:
     MAKE_APCAL2
 PURPOSE:
     Interim routine to generate the AMPCAL and PHZCAL segment records from AMPHIT data
     obtained from Reference amplitude and phase calibration observations.  The segment
     records are written into each scan by ARCHIVE.
 CATEGORY:
     OVRO APC DATA CALIBRATION
 CALLING SEQUENCE:
     make_apcal2[,/S273]
 INPUTS:
 OPTIONAL (KEYWORD) INPUT PARAMETERS:
     S273      If set, the calibrator is assumed to be 3C273 and the 3C273 fluxes are
                 applied.  Otherwise the calibrator is assumed to be 3C84.
 ROUTINES CALLED:
     getparms, tlsnow, get_tl_struct, tl_encode, dayofyr
 OUTPUTS:
 COMMENTS:
     The values written to the file are in scaled, 2-byte integer form.  To convert
     the amplitude values back to units/SFU, read the integer value, multiply by 0.01,
     and apply to baseline data by multiplying the factors for BOTH antennas involved.
     To convert the phase values to degrees, read the integer value and multiply by 0.01.
     To apply to baseline data, use the phase difference for the two antennas.
 CALLS: ***
	GET_TL_STRUCT, HMS2SEC, LINFIT, LOBE, NINT [1], NINT [2], TLSNOW, TL_ENCODE
 SIDE EFFECTS:
     Data are written to the files !DEFAULTS.EPHEMDIR+'AMPCAL.REC' and
     !DEFAULTS.EPHEMDIR+'PHZCAL.REC'.
 RESTRICTIONS:
     Provision is made for 2-m calibration factors, but the actual 2-m calibration is not
     yet set, so this routine just leaves the space for these values blank.
 MODIFICATION HISTORY:
     Written 23-Jul-1999 by Dale E. Gary
     24-Jul-1999  DG
       Made several significant changes to the scaling of the output.  All values are now
       scaled by a factor of 100.  The amplitudes and errors
     26-Nov-1999  DG
       Slight change to reflect the new form of GNP structure (introduced due
       to creation of GAINPARM segment).
     11-Jan-2000  DG
       Eliminated hardwired directory locations.
     06-Apr-2000  DG
       Eliminate now unneeded scaling to noise diode, since that is done in
       AMPHIT on writing the output results.  Update 3C84 spectrum, and
       generally fix problems.
     23-Jul-2000  DG
       Changed to use the function TLSNOW (no functional change).
     16-Sep-2000  DG
       New name, MAKE_APCAL2, to distinguish it from 5-element routine.  This
       one is to work with 6-element calibration data.  Also reflects different
       way of taking data, so it is not just a case of changing number of ants.
     07-Oct-2000  DG
       Small adjustment to include weights in fit of 12 phase differences between
       the RLI and I files.
     01-Apr-2001  DG
       Looks like including RERR in formal errors is the wrong thing to do,
       so eliminate it by setting it to zero.
     06-Apr-2001  DG
       Add /S273 switch to indicate that the calibrator source is 3C273, and
       add 3C273 flux measurements as of 4 Apr 2001.


MAKE_APCAL3 $SSW/radio/ovsa/idl/util/make_apcal3.pro
[Previous] [Next]
 NAME:
     MAKE_APCAL3
 PURPOSE:
     Interim routine to generate the AMPCAL and PHZCAL segment records from AMPHIT data
     obtained from Reference amplitude and phase calibration observations.  The segment
     records are written into each scan by ARCHIVE.
 CATEGORY:
     OVRO APC DATA CALIBRATION
 CALLING SEQUENCE:
     make_apcal3[,/S273]
 INPUTS:
 OPTIONAL (KEYWORD) INPUT PARAMETERS:
     S273      If set, the calibrator is assumed to be 3C273 and the 3C273 fluxes are
                 applied.  Otherwise the calibrator is assumed to be 3C84.
 ROUTINES CALLED:
     getparms, tlsnow, get_tl_struct, tl_encode, dayofyr
 OUTPUTS:
 COMMENTS:
     The values written to the file are in scaled, 2-byte integer form.  To convert
     the amplitude values back to units/SFU, read the integer value, multiply by 0.01,
     and apply to baseline data by multiplying the factors for BOTH antennas involved.
     To convert the phase values to degrees, read the integer value and multiply by 0.01.
     To apply to baseline data, use the phase difference for the two antennas.
 CALLS: ***
	LINFIT, LOBE, NINT [1], NINT [2], WRITE_AMPCAL, WRITE_PHZCAL
 SIDE EFFECTS:
     Data are written to the files !DEFAULTS.EPHEMDIR+'AMPCAL.REC' and
     !DEFAULTS.EPHEMDIR+'PHZCAL.REC'.
 RESTRICTIONS:
     Provision is made for 2-m calibration factors, but the actual 2-m calibration is not
     yet set, so this routine just leaves the space for these values blank.
 MODIFICATION HISTORY:
     Written 23-Jul-1999 by Dale E. Gary
     24-Jul-1999  DG
       Made several significant changes to the scaling of the output.  All values are now
       scaled by a factor of 100.  The amplitudes and errors
     26-Nov-1999  DG
       Slight change to reflect the new form of GNP structure (introduced due
       to creation of GAINPARM segment).
     11-Jan-2000  DG
       Eliminated hardwired directory locations.
     06-Apr-2000  DG
       Eliminate now unneeded scaling to noise diode, since that is done in
       AMPHIT on writing the output results.  Update 3C84 spectrum, and
       generally fix problems.
     23-Jul-2000  DG
       Changed to use the function TLSNOW (no functional change).
     16-Sep-2000  DG
       New name, MAKE_APCAL2, to distinguish it from 5-element routine.  This
       one is to work with 6-element calibration data.  Also reflects different
       way of taking data, so it is not just a case of changing number of ants.
     07-Oct-2000  DG
       Small adjustment to include weights in fit of 12 phase differences between
       the RLI and I files.
     01-Apr-2001  DG
       Looks like including RERR in formal errors is the wrong thing to do,
       so eliminate it by setting it to zero.
     06-Apr-2001  DG
       Add /S273 switch to indicate that the calibrator source is 3C273, and
       add 3C273 flux measurements as of 4 Apr 2001.  This version is a quickie
       version to allow 5-element calibration with the new 43-frequency calibration
       sequence.


MAKE_EPHEM $SSW/radio/ovsa/idl/util/make_ephem.pro
[Previous] [Next]
 NAME:
     MAKE_EPHEM
 PURPOSE:
     Creates the EPHEMERIS segment (segment code 9) that the APC is to
     write into the data file at the start of each scan.  The EPHEMERIS
     segment contains information on solar, lunar, calibrator, and active
     region coordinates and other parameters.
 CATEGORY:
     OVRO SPAN CALIBRATION
 CALLING SEQUENCE:
     make_ephem[,/do_exit]
 INPUTS:
 OPTIONAL (KEYWORD) INPUT PARAMETERS:
     do_exit   Switch to force exit from IDL after routine finishes.
 ROUTINES CALLED:
     get_dut, get_soleph, get_luneph, get_caleph, get_regn,
     dayofyr, tl_encode, l2w, tlsnow
 OUTPUTS:
 COMMENTS:
     Several files must exist and be properly formatted in order for this
     routine to work.  They are:
         !DEFAULTS.EPHEMDIR+'DUT.USN'
         !DEFAULTS.EPHEMDIR+'SUN1994-2020.DAT'
         !DEFAULTS.EPHEMDIR+'LUNAREPH.DAT'
         !DEFAULTS.EPHEMDIR+'COORDS.FTH'
         !DEFAULTS.EPHEMDIR+'REGIONS.NOA'
         !DEFAULTS.EPHEMDIR+'J2000.CAT'
     See the individual GET_*() routines for more information.
 CALLS: ***
	GET_CALEPH, GET_DUT, GET_LUNEPH, GET_REGN, GET_SOLEPH, L2W, TLSNOW, TL_ENCODE
	WRITE_OVSA_LOG
 SIDE EFFECTS:
     Creates a file !DEFAULTS.EPHEMDIR+'EPHEM.REC' containing the properly
     formatted data record.  If the file already exists, it will be
     overwritten.
 RESTRICTIONS:
 MODIFICATION HISTORY:
     Written 30-Jan-1999 by Dale E. Gary
     05-Feb-1999  DG
       Converted for use with FK5 (J2000) precess routines from SLALIB
     25-Nov-1999  DG
       Updated to agree with new Epoch defns
     11-Jan-2000  DG
       Eliminated hardwired directory locations
     23-Jul-2000  DG
       Changed to use the function TLSNOW (no functional change).
     19-Aug-2000  DG
       Added /do_exit switch instead of EXIT command, to fix
       problem of STARTUP file exiting before running.
     23-Jul-2003  DG
       Changed WRITE_LOG to WRITE_OVSA_LOG to avoid conflict
       with routine of the same name in BATSE tree.
     18-Jan-2005  DG
       No functional change, just changed the documentation above
       to reflect the name change of the sun1994-2020.dat file.


MAKE_HOUSEKEEPING $SSW/radio/ovsa/idl/file/make_housekeeping.pro
[Previous] [Next]
 NAME:
     MAKE_HOUSEKEEPING
 PURPOSE:
     Creates a HOUSEKEEPING segment based on information in the
     WORKDIR directory and in the INFILE.
 CATEGORY:
     OVRO APC FILE
 CALLING SEQUENCE:
     make_housekeeping,filename,outfile
 INPUTS:
     filename  Name string for the input file.
     outfile   Name string for the output file (which must already
                 exist and is assumed to have only an INDEX segment).
 OPTIONAL (KEYWORD) INPUT PARAMETERS:
 ROUTINES CALLED:
 OUTPUTS:
 COMMENTS:
     The WORKDIR directory must have the following current and valid
     segments: EPHEM, TPCAL, AMPCAL, PHZCAL, GAINPARM.  A TP-UPDATE
     segment with nominal values (1.0 gain factors) is also created.
     If the GAINPARM is not for the current day, the input file is
     searched for a GCAL segment, and if found it is analyzed and a
     new GAINPARM segment is created in the WORKDIR, and added to
     the HOUSEKEEPING segment.
 CALLED BY:
	OVSA_FORMAT_NEW
 SIDE EFFECTS:
 RESTRICTIONS:
 MODIFICATION HISTORY:
     Written 04-Mar-2001 by Dale E. Gary


MAKE_SOLCALTRAJ $SSW/radio/ovsa/idl/solar/make_solcaltraj.pro
[Previous] [Next]
 NAME:
     MAKE_SOLCALTRAJ
 PURPOSE:
     Given a date and time (in one of the ANYTIM formats), generate a
     TRAJECTORY for SOLAR CALIBRATION valid for starting at that date
     and time.
 CATEGORY:
     OVRO APC SOLAR
 CALLING SEQUENCE:
     make_solcaltraj,time[,date]
 INPUTS:
     time      a string giving the start time of the TRAJECTORY, in HH:MM,
                 e.g. '20:00'.  The TRAJECTORY must be started at the
                 time given, since each subsequent line is advanced by
                 one minute.
 OPTIONAL (KEYWORD) INPUT PARAMETERS:
     date      a string giving the date for which the TRAJECTORY is
                 to be run, in one of the ANYTIM formats, e.g.
                 '2000-jun-21', or '00-06-21', etc.  If omitted, today's
                 date is assumed.
 ROUTINES CALLED:
 OUTPUTS:
 COMMENTS:
 CALLS: ***
	BDOTS, CALDAT, DAYOFYR [1], GET_SOLEPH, NINT [1], NINT [2], OVSA_LST, POLY_FIT
	anytim [1], anytim [2], anytim [3], anytim [4], anytim [5], dayofyr [2]
 SIDE EFFECTS:
     A TRAJECTORY file is generated, called SCALTRAJ.FTH.  The TRAJECTORY
     must be started at the time given, and must be sent to the CPC via
     CPCOM in advance.  The TRAJECTORY takes about 30 minutes.
 RESTRICTIONS:
     This TRAJECTORY should be run in 6-element mode.  If a new antenna is
     added, or the location of antennas is changed, this routine must also
     be changed.  If the baseline corrections are substantially changed,
     they should be updated here also.
 MODIFICATION HISTORY:
     Written 01-Jun-2000 by Dale E. Gary
     05-Jun-2000  DG
       Changed HODO to TRACK in output TRAJECTORY (duh!)


MAKE_TPCAL $SSW/radio/ovsa/idl/util/make_tpcal.pro
[Previous] [Next]
 NAME:
     MAKE_TPCAL
 PURPOSE:
     Interim routine to generate the TPCAL segment record from TPCAL data,
     for writing into each scan by ARCHIVE.
 CATEGORY:
     OVRO APC DATA CALIBRATION
 CALLING SEQUENCE:
     make_tpcal,tls,tpcal,tprms,ndavg,refcal
 INPUTS:
     tls      A Time/Label structure from the header of the REF-TPCAL scan
                that took the data.
     tpcal    An array containing the 27-m total power calibration factors,
                of size (2,2,85), where the first index is the feed (0 = RH
                position, 1 = LH position), the second is the antenna
                (0 = Ant 1, 1 = Ant 2) and the third is the frequencies
                (all harmonics except H89).  The calibration factors
                (unnormalized to the noise diode) are in units/SFU.
     tprms    An identical array to TPCAL, giving the corresponding RMS
                deviations derived from multiple measurements, in the same
                units as for TPCAL.
     ndavg    An identical array to TPCAL, giving the corrsponding noise
                diode increment, in raw units.  The final TPCAL factors
                will be scaled by a factor derived from these.
     refcal   The REFCAL structure from the data (.ARC) file containing
                the TPCAL observations.  This will have the previously
                active TPCAL calibration.
 OPTIONAL (KEYWORD) INPUT PARAMETERS:
 ROUTINES CALLED:
     get_nd_eff, tlsnow, get_tl_struct, tl_encode, dayofyr
 OUTPUTS:
 COMMENTS:
     The values written to the file are in scaled, 2-byte integer form.  To convert
     the 2-byte values back to units/SFU, read the integer value, multiply by 0.1,
     and apply to TP data by dividing by the factors.
 CALLS: ***
	GET_ND_EFF, GET_TL_STRUCT, TLSNOW, TL_ENCODE
 CALLED BY:
	TPSOLVE
 SIDE EFFECTS:
     Data are written to the file !DEFAULTS.EPHEMDIR+'TPCAL.REC'.
 RESTRICTIONS:
     Provision is made for 2-m calibration factors, but the actual 2-m
     calibration is not yet set, so this routine just leaves the space
     for these values blank (or uses values from an earlier determination).
 MODIFICATION HISTORY:
     Written 23-Jul-1999 by Dale E. Gary
     11-Sep-1999  DG
       Changed entire scheme to use 2-byte rather than byte values, so that
       digitization is not a problem for the 2-m dish data.
     14-Sep-1999  DG
       Had to scale the 27 m TPCALs by 10 rather than 100, to prevent overflow
       of 2-byte word.
     12-Nov-1999  DG
       Read existing disk file (to preserve 2m information) rather than
       create a new one from scratch.
     11-Jan-2000  DG
       Eliminated hardwired directory locations.
     23-Jul-2000  DG
       Changed to use the function TLSNOW (no functional change).
     03-Sep-2000  DG
       Added REFCAL to argument list.


MAKE_TPCAL2 $SSW/radio/ovsa/idl/util/make_tpcal2.pro
[Previous] [Next]
 NAME:
     MAKE_TPCAL2
 PURPOSE:
     Generates the TPCAL segment records from REFTPCAL data.
 CATEGORY:
     OVRO APC DATA CALIBRATION
 CALLING SEQUENCE:
     newtp = make_tpcal2(tls,tpcal,tprms,ndavg,oldtp,nd_eff)
 INPUTS:
     tls      A Time/Label structure from the header of the REFTPCAL scan
                that took the data.
     tpcal    An array containing the 27-m total power calibration factors,
                of size (2,2,85), where the first index is the feed (0 = RH
                position, 1 = LH position), the second is the antenna
                (0 = Ant 1, 1 = Ant 2) and the third is the frequencies
                (all harmonics except H89).  The calibration factors
                (unnormalized to the noise diode) are in units/SFU.
     tprms    An identical array to TPCAL, giving the corresponding RMS
                deviations derived from multiple measurements, in the same
                units as for TPCAL.
     ndavg    An identical array to TPCAL, giving the corrsponding noise
                diode increment, in raw units.  The final TPCAL factors
                will be scaled by a factor derived from these.
     oldtp    An instance of a TPCAL segment (two binary records) containing
                the "current" total power calibration at the time of the
                TPCAL observations.
 OPTIONAL (KEYWORD) INPUT PARAMETERS:
 ROUTINES CALLED:
     get_nd_eff, tlsnow, get_tl_struct, tl_encode, dayofyr
 OUTPUTS:
     newtp    The newly constructed TPCAL segment (two binary records), same
                format as OLDTP, with 27m factors overwritten, but 2m factors
                unchanged.
     nd_eff   The 4-element array containing the effective noise diode
                factors by which to divide TPCAL and TPRMS to give properly
                normalized values.  This is returned so that it can be applied
                before calling PLOT_TPCAL
 COMMENTS:
     The values written to the file are in scaled, 2-byte integer form.  To convert
     the 2-byte values back to units/SFU, read the integer value, multiply by 0.1,
     and apply to TP data by dividing by the factors.
 CALLS: ***
	GET_ND_EFF, TLSNOW, TL_ENCODE
 CALLED BY:
	TPCALCHEK2
 SIDE EFFECTS:
     Data are written to the file !DEFAULTS.EPHEMDIR+'TPCAL.REC'.
 RESTRICTIONS:
     Provision is made for 2-m calibration factors, but the actual 2-m
     calibration is not yet set, so this routine just leaves the space
     for these values blank (or uses values from an earlier determination).
 MODIFICATION HISTORY:
     Written 12-Nov-2000 by Dale E. Gary   (based on MAKE_TPCAL)
       Removed REFCAL argument, added OLDTP and NEWTP arguments.  The
       routine no longer writes the !DEFAULTS.EPHEM+TPCAL.REC file.  Instead,
       it returns NEWTP for further handling.  The routine has been changed
       from a procedure to a function.
     16-Nov-2000  DG
       Added return of ND_EFF argument.


MAKE_TPOVIEW $SSW/radio/ovsa/idl/web/make_tpoview.pro
[Previous] [Next]
 NAME:
     MAKE_TPOVIEW
 PURPOSE:
     Creates an overview plot of the standard Total Power FITS files
     produced by WRITE_OVSA_FITS (or TPANALYZE).
 CATEGORY:
     OVRO APC WEB
 CALLING SEQUENCE:
     make_tpoview,filename[,type=type]
 INPUTS:
     filename   the name of the .FTS file containing data to be plotted.
 OPTIONAL (KEYWORD) INPUT PARAMETERS:
     type       a string specifying what type of output is desired.  Can
                  be one of 'screen' (or 'scr'), 'jpeg' (or 'jpg'), or 'gif'.
                  If omitted, the default is 'screen'.  If 'jpeg' or 'gif'
                  is specified, the output filename is the same as the
                  input filename, except the extension is changed to '.jpg'
                  or 'gif' as appropriate.
 ROUTINES CALLED:
     read_ovsa_fits, write_gif, write_jpeg, break_file, utplot_io
 OUTPUTS:
 COMMENTS:
 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONGRID [1], CONGRID [2]
	CONGRID [3], LOADCT, UTPLOT_IO [1], UTPLOT_IO [2], UTPLOT_IO [3], break_file [4]
	read_ovsa_fits
 CALLED BY:
	SURVANAL, TPANALYZE
 SIDE EFFECTS:
 RESTRICTIONS:
 MODIFICATION HISTORY:
     Written 18-Apr-2000 by Dale E. Gary
     14-Nov-2003  DG
	    Used /NAN keyword in HISTOGRAM, MAX, and MIN functions to eliminate
       problems with NaN in data.
     17-Oct-2004  DG
       Fixed problem in HISTOGRAM call, where bad data with infinite flux
       at 0.5 SFU/bin was requiring infinite number of bins and running
       out of memory.  Now uses 10000 sfu as upper limit, or 20000 bins.


MAKEX [2] $SSW/radio/ethz/idl/jhuapl/makex.pro
[Previous] [Next]
 NAME:
       MAKEX
 PURPOSE:
       Make an array with specified start, end and step values.
 CATEGORY:
 CALLING SEQUENCE:
       x = makex(first, last, step)
 INPUTS:
       first, last = array start and end values.     in
       step = step size between values.              in
 KEYWORD PARAMETERS:
 OUTPUTS:
       x = resulting array.                          out
 CALLED BY:
	INRANGE [1], INRANGE [2], INRANGE [3], TIMEAXIS [1], TIMEAXIS [2], TIMEAXIS [3]
	XPRINT [1], XPRINT [3]
 COMMON BLOCKS:
 NOTES:
 MODIFICATION HISTORY:
       Ray Sterner,  7 Dec, 1984.
       Johns Hopkins University Applied Physics Laboratory.
       Added FIX 20 Dec, 1984 to avoid roundoff error.
       changed it to LONG 8 Mar, 1985 to avoid integer overflows.

 Copyright (C) 1984, 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.


MAKEX [3] $SSW/radio/ovsa/idl/mapping/makex.pro
[Previous] [Next]
 NAME:
       MAKEX
 PURPOSE:
       Make an array with specified start, end and step values.
 CATEGORY:
 CALLING SEQUENCE:
       x = makex(first, last, step)
 INPUTS:
       first, last = array start and end values.     in
       step = step size between values.              in
 KEYWORD PARAMETERS:
 OUTPUTS:
       x = resulting array.                          out
 CALLED BY:
	INRANGE [1], INRANGE [2], INRANGE [3], TIMEAXIS [1], TIMEAXIS [2], TIMEAXIS [3]
	XPRINT [1], XPRINT [3]
 COMMON BLOCKS:
 NOTES:
 MODIFICATION HISTORY:
       Ray Sterner,  7 Dec, 1984.
       Johns Hopkins University Applied Physics Laboratory.
       Added FIX 20 Dec, 1984 to avoid roundoff error.
       changed it to LONG 8 Mar, 1985 to avoid integer overflows.

 Copyright (C) 1984, 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.


MDisp Read $SSW/radio/ethz/idl/io/mdispread.pro
[Previous] [Next]
 NAME:
	MDisp Read
 PURPOSE:
	Reads mdisp-files.
 CALLING SEQUENCE:
	MDispRead, fileName, x, y [, qualifier, dx, dy]
 INPUT:
	fileName: the complete name of the file (with the extension
		".mdisp"
 OUTPUTS:
	x, y : the points of the plot
	qualifier: the qualifiers corresponding to the !psym 
		variable value
	dx, dy: the errors in x and y direction, for plotting of 
		error bars. If the error bars are symmetric,
		then the arrays are of the dimension of x and y,
		else they have 2 dimensions with the second 
		dimension = 2
 KEYWORDS:
	LINESTYLE: correspond to the values of !p.linestyle
		solid line: linestyle = 0
	THICK: line thickness. Normal line: thick = 1
	SUBTITLE, TITLE, XTITLE, YTITLE: The plot
		 description
	STATUS: "Done" if a file was read, "Not Done" else.
 CALLS: ***
	ISDIGIT, MDISPREAD, QUALIFTRANSFORM, READ_ARRAY, error
 MODIFICATION HISTORY:
	Created in May 1991 by A.Csillaghy
		Institute of Astronomy, ETH Zurich
	Modified in November 1991, A.Cs.
	Modified in Nov 92 for Wave 4 (DC_Read)
	Adapted for IDL in March 96 (ACs)


MDisp Write $SSW/radio/ethz/idl/io/mdispwrite.pro
[Previous] [Next]
 NAME:
	MDisp Write
 PURPOSE:
	Writes MDisp Files
 CALLING SEQUENCE:
	MDispWrite, [ x, ]  y [, qualif, dx, dy ]
 INPUTS
	x, y : the vectors (same length, 1D ) containing coordinates
		of the points to draw
	qualif: the points qualifiers, also a vector of the same length
		as x and y. The values correspond to the 
		values of the system variable  "!psym"
	dx, dy: the values of the error bars. They are 1D vectors for
		symmetrical error bars, 2D arrays otherwise.
 KEYWORDS:
	FILENAME: If not specified, the filename is
		 "mdisp.mdisp"
	LINESTYLE: A vector containing the linestyle for the
		points. Default: solid (see "!p.linestyle" for
		definition of the  values
	THICK: The line thickness (Default: 1).
	COLOR: the color number of the plot (Default: 255).
	SUBTITLE, TITLE, XTITLE, YTITLE: the plot descriptor
		strings. Default: the contents of the
		corresponding ssystem variables.
	USERSYM: a number of user-defined symbol
	STATUS: Reports "Done" if the file is written, "Not Done" 
		otherwise.
 	/INTERACTIVE: the filename is asked on the terminal.
 	/COLS: Only data columns are witten, no header. It is then
		compatible with the ".cols" format.
 SIDE EFFECT:
	A file is written

 CALLS: ***
	MDISPWRITE, TRANSFQUALIF, error
 MODIFICATION HISTORY:
	Written in January 1992 by A. Csillaghy,
		Inst. of Astronomy, ETH, Zurich
	Lots of modifications in March 1995, ACs


MDisp $SSW/radio/ethz/idl/gen/mdisp.pro
[Previous] [Next]
 PROJECT:
       Phoenix 2 solar radio spectrometer

 NAME:
	MDisp

 PURPOSE:
	MDisp is the top-level user interface of the 1D data analysis
	software package of the Radio and Plasma Astrophysics Group at
	ETH in Zurich. The plot system allows to analyse and display
	any kinds of  astronomical one-dimensional data, e.g. time
	series of spectra. It is primarily intended for solar radio
	data. It is bundled with RagView, which is the top-level user
	interface for the analysis of 2D data.

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

 CATEGORY:
	Radio (/ssw/radio)

 CALLING SEQUENCE:
	MDisp

 KEYWORD:
 	/RESET: Initialize the plot table and the selectioner,
		so that the plots stored in these tables are erased.

 SIDE EFFECT:
	Open windows and use the terminal window.

 RESTRICTIONS
	Works only in interactive mode;
	Currently only tested on Unix.

 CALLS: ***
	CLEAR_SCREEN [1], CLEAR_SCREEN [2], Customize_1D, DATA_DISPLAY, Display_1D
	ERASEVT, FILES_1D, GETHMS, GET_DFONT [1], GET_DFONT [2], INITSEL, INSERTPLOT
	INSERTSEL, Init_Data, MODIFY_1D, No_Data, PUTHMS, PUTTITLES, Plots_Selection
	READ_AND_STORE, RESPOND_WIDG, RWVARIABLES, VECTCMP, ethz_XCHOICE
 CALLED BY:
	Radio Astronomy Group View RAG View [1]
	Radio Astronomy Group View RAG View [2]
 SEE ALSO:
	RAGView
 MODIFICATION HISTORY:
	Created in June 1991 A.Csillaghy
       Version IDL 5.1 in October 1998, csillag@ssl.berkeley.edu
             The procedure General_Menu has been replaced by XChoice
             because WMenu does not work anymore in IDL 5.1/solaris
       Xchoice changed to ethz_xchoice ACs 12/9/98


mem [2] $SSW/radio/ovsa/idl/mapping/mem.pro
[Previous] [Next]
 NAME:
       mem
 PURPOSE:
       Implement a Maximum Entropy Algorithm within OVSA's
   Solar Microwave Imaging Software
 CATEGORY:
       OVSA APC imaging
 CALLING SEQUENCE:
       pro mem, cmap, cln, uv_ij, vis_ij, map, misc, flux=flux
 INPUTS:
       flux, cmap, cln, uv_ij, vis_ij
 OPTIONAL (KEYWORD) INPUT PARAMETERS:
 ROUTINES CALLED:
       mem_dmap.pro
       mem_grd_chi2.pro
       mem_grd_entropy.pro
       mem_maximize.pro
       mem_uvgrid.pro

 OUTPUTS:
       map, misc
 COMMENTS:
   Conjugate Gradient Method is used to find the maximum point
   of the object function.
   The concept of C.G. appears in Press et al. p. 420-425,
   but the actual algorithm is presented in Bong et al. 2001.
   Object function is in the form of:
       J = H - alpha x chi^2 - beta x F

 CALLS: ***
	MEM_MAXIMIZ, MEM_UVGRID, PLOT_3MAPS, PLOT_VIS2VIS_SIMPL, fft_xy2uv
 CALLED BY:
	imagr [1], imagr_batch
 SIDE EFFECTS:
       Requires many initial parameters (internal free parameters)
       set arbitrary, a feature inherent to MeM

 RESTRICTIONS:
       User put a good estimate of the flux
       if no input value of the flux, some nominal value is set as
   estimated from cmap.
 MODIFICATION HISTORY:
       Written 05-JAN-2001 by SB


mem_grd_chi2 $SSW/radio/ovsa/idl/mapping/mem_grd_chi2.pro
[Previous] [Next]
 Modification History
    15-Dec-2002  DG
      Changed direction of FFT from +1 to -1, which is the
      correct direction for getting visibility from map.
      Note that the second FFT was +1, which is correct, so
      the original code should not have worked.


MENUBCKGRD $SSW/radio/nrh/idl/1dnrh/menu/menubckgrd.pro
[Previous] [Next]
 NAME:
	MENUBCKGRD

 PURPOSE:
	Cette procedure contient les WIDGETS pour le calcul de soustraction 
	d'une image BACKGROUND sur des images 1 dimension
	"Button" BACKGROUND du menu principal

 CATEGORY:
	NRH1 Menu

 CALLING SEQUENCE:
	MENUBCKGRD

 INPUTS:
	Non

 KEYWORD PARAMETERS:
	Non

 OUTPUTS:
	Non

 CALLS: ***
	CW_BGROUP, CW_FIELD, CW_PICKFILE_NRH, CX_HEURES, ECRDESCD, GET_WINDOW, HMS, LECDESCR
	LOADCT, MENUBCKGRD_EVENT, MSH, NEWLEC1D, NEWLITENTETE, RSTRPOS, SBTRBCKGRD, STR_SEP
	VERIF_HEURES, XMANAGER
 COMMON BLOCKS:
	NRH1_GLOBAL
	NRH1_HELIO

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


MENUCALCFLUX1D $SSW/radio/nrh/idl/1dnrh/menu/menucalcflux1d.pro
[Previous] [Next]
 NAME:
	MENUCALCFLUX1D

 PURPOSE:
	Cette procedure contient les WIDGETS pour le calculde flux sur les
	fichiers images 1 dimension du NRH
	"Button" 1D FLUX du menu principal

 CATEGORY:
	NRH1 Menu

 CALLING SEQUENCE:
	MENUCALCFLUX1D

 INPUTS:
	Non

 KEYWORD PARAMETERS:
	Non

 OUTPUTS:
	Non

 CALLS: ***
	C2IDATE, CALCFLUX, CW_BGROUP, CW_PICKFILE_NRH, CX_CANAUX, CX_HEURES, ECRPOS
	FUSIONPOS1D, MENUCALCFLUX_EVENT, MOTCLE, MSH, NEWLEC1D, NEWLITENTETE, RSTRPOS, STR_SEP
	XMANAGER
 COMMON BLOCKS:
	NRH1_GLOBAL
	NRH1_HELIO

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


MENUCALCPOS2D $SSW/radio/nrh/idl/1dnrh/menu/menucalcpos2d.pro
[Previous] [Next]
 NAME:
	MENUCALCPOS2D

 PURPOSE:
	Cette procedure contient les WIDGETS pour letrace des cartes a 2
	dimensions
	"Button" 2D POS du menu principal

 CATEGORY:
	NRH1 Menu

 CALLING SEQUENCE:
	MENUCALCPOS2D

 INPUTS:
	Non

 KEYWORD PARAMETERS:
	Non

 OUTPUTS:
	Non

 CALLS: ***
	AIDE, C2IDATE, CALCPOS2D, CW_BGROUP, CW_FIELD, CW_PICKFILE_NRH, CX_HEURES, ECRPOS, HMS
	MENUCALCPOS2D_EVENT, MOTCLE, MSH, NEWLECP1D, NEWLITENTETE, STR_SEP, XMANAGER
 COMMON BLOCKS:
	NRH1_GLOBAL
	NRH1_HELIO

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

 menucalcpos2d   modif 9-oct-1996
 appel sous programme IDL calcpos2d 

 Modif 13/11/97: Lecture heures de debut, fin de l'association depuis le
                 widget state.heures
                 Abandon de la possibilite d'editer les widgets texte
                 donnant les heures de debut et fin des positions
                 individuelles (widgets hrpew_d etc.); a quoi sert
                 la possibilite d'intervenir sur ces widgets (hormis le
                 choix de la position) ???
                 Nouvelle gestion d'erreurs: ON_ERROR, 2 remplace par CATCH
                 Ajout d'une option HELP
 Modif 3/2/98:	Trace de controle apres calcul des positions 2D: j'ai
		remplace l'appel a la routine TRACECARTE, faite expres pour
		ce test, par PLOTPHOT et PLOTPOS2D qui servent aussi dans
		l'option MAP. KLK


MENULISTPOS $SSW/radio/nrh/idl/1dnrh/menu/menulistpos.pro
[Previous] [Next]
 NAME:
	MENULISTPOS

 PURPOSE:
	Cette procedure contient les WIDGETS pour le listing du contenu
	d'un fichier de flux ou de position
	"Button"Listing: F(TIME) du menu principal

 CATEGORY:
	NRH1 Menu

 CALLING SEQUENCE:
	MENULISTPOS

 INPUTS:
	Non

 KEYWORD PARAMETERS:
	Non

 OUTPUTS:
	Non

 CALLS: ***
	CW_BGROUP, CW_PICKFILE_NRH, CX_HEURES, HMS, LISTPOS, MENULISTPOS_EVENT, MOTCLE, MSH
	NEWLECP1D, NEWLECP2D, NEWLITENTETE, XMANAGER
 COMMON BLOCKS:
	NRH1_GLOBAL
	NRH1_HELIO

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


MENUSHIFTRH1D $SSW/radio/nrh/idl/1dnrh/menu/menushiftrh1d.pro
[Previous] [Next]
 NAME:
	MENUSHIFTRH1D

 PURPOSE:
	Cette procedure contient les WIDGETS pour le decallage du centre de 
	l'image
	"Button" SHIFT IM du menu principal

 CATEGORY:
	NRH1 Menu

 CALLING SEQUENCE:
	MENUSHIFTRH1D

 INPUTS:
	Non

 KEYWORD PARAMETERS:
	Non

 OUTPUTS:
	Non

 CALLS: ***
	CW_BGROUP, CW_FIELD, CW_PICKFILE_NRH, MENUSHIFTRH1D_EVENT, NEWLITENTETE, RSTRPOS
	SHIFTRH1D, STR_SEP, XMANAGER
 COMMON BLOCKS:
	NRH1_GLOBAL
	NRH1_HELIO

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


MENUTRACEISOPH $SSW/radio/nrh/idl/1dnrh/menu/menutraceisoph.pro
[Previous] [Next]
 NAME:
	MENUTRACEISOPH

 PURPOSE:
	Cette procedure contient les WIDGETS pour le trace de contours
	des fichiers 1 dimension NRH, et calcul de positions de centroids 
	"Button" CONTOURS du menu principal

 CATEGORY:
	NRH1 Menu

 CALLING SEQUENCE:
	MENUTRACEISOPH

 INPUTS:
	Non

 KEYWORD PARAMETERS:
	Non

 OUTPUTS:
	Non

 CALLS: ***
	AIDE, C2IDATE, CALCFLUX, CW_BGROUP, CW_FIELD, CW_GRID, CW_PICKFILE_NRH, CW_SWITCH
	CX_CANAUX, CX_HEURES, ECRPOS, FOLLOWPOS1D, FUSIONPOS1D, GET_OLDWINDOW, GET_WINDOW, HMS
	LOADCT, MENUTRACEISOPH_EVENT, MOTCLE, MSH, NEWLEC1D, NEWLECP1D, NEWLITENTETE
	NRH1_GETZONE, NRH1_POSTSCRIPT, PROF1D, PROVTRACEPOS, RSTRPOS, STR_SEP, TRACE1D
	TRACEISOPH, TRACEPOSISO, XMANAGER
 COMMON BLOCKS:
	NRH1_GLOBAL
	NRH1_HELIO

 MODIFICATION HISTORY: (bonmartin@obspm.fr)
	16/11/98 adapte du logiciel XHELIO
 Modifications:
		24/11/97 Cadrage du trace pour obtenir un remplissage maximum
				de la page

		10/02/98 Trace des profils avec curseur glissant
		02/04/99 Correction de la fenetre du trace des positions
                        pour la sortie POSTSCRIPT
               11/2006  trace des isoph en coordonnees heliographiques 


MENUTRACEPOS $SSW/radio/nrh/idl/1dnrh/menu/menutracepos.pro
[Previous] [Next]
 NAME:
	MENUTRACEPOS

 PURPOSE:
	Cette procedure contient les WIDGETS pour le trace des resultats
	de calculs (Flux, Positions) sur les fichiers 1D du NRH
	"Button" F(TIME) du menu principal

 CATEGORY:
	NRH1 Menu

 CALLING SEQUENCE:
	MENUTRACEPOS

 INPUTS:
	Non

 KEYWORD PARAMETERS:
	Non

 OUTPUTS:
	Non

 CALLS: ***
	CW_BGROUP, CW_PICKFILE_NRH, CW_SWITCH, CX_CANAUX, CX_HEURES, GET_WINDOW, HMS
	MENUTRACEPOS_EVENT, MOTCLE, MSH, NEWLECP1D, NEWLECP2D, NEWLITENTETE, NRH1_GETZONE
	NRH1_POSTSCRIPT, TRACEPOS, XMANAGER
 COMMON BLOCKS:
	NRH1_GLOBAL
	NRH1_HELIO

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


MENUTRACEPROF $SSW/radio/nrh/idl/1dnrh/menu/menutraceprof.pro
[Previous] [Next]
 NAME:
	MENUTRACEPROF

 PURPOSE:
	Cette procedure contient les WIDGETS pour le trace des images
	1 dimension
	"Button" SCAN du menu principal

 CATEGORY:
	NRH1 Menu

 CALLING SEQUENCE:
	MENUTRACEPROF

 INPUTS:
	Non

 KEYWORD PARAMETERS:
	Non

 OUTPUTS:
	Non

 CALLS: ***
	ANIMPROF, CW_BGROUP, CW_FIELD, CW_PICKFILE_NRH, CW_SWITCH, CX_CANAUX, CX_HEURES, HMS
	INDICE, MENUTRACEPROF_EVENT, MSH, NEWLEC1D, NEWLITENTETE, NRH1_GETZONE
	NRH1_POSTSCRIPT, PROF1D, PROFDECOMP1D, STR_SEP, TRACESERIEPROF, XMANAGER
 COMMON BLOCKS:
	NRH1_GLOBAL
	NRH1_HELIO

 MODIFICATION HISTORY: (bonmartin@obspm.fr)
	16/11/98 adapte du logiciel XHELIO
	09/04/99 ajout message a la sortie de PROFDECOMP1D (liste positions)
       31/08/00 ajout possibilite d'ecrire resultats de la decomposition
                en sources elementaires dans fichier ASCII
       09/12/02 ajout !p.position=0 avant appel des programmes de trace
                pour assurer separation trace - texte dans PROF+DECOMP


MENUVERIF $SSW/radio/nrh/idl/1dnrh/menu/menuverif.pro
[Previous] [Next]
 NAME:
	MENUVERIF

 PURPOSE:
	Cette procedure contient les WIDGETS pour la verification des headers
	des fichiers NRH1 au format HELIO ou FITS (extension '.fts').
	Elle appelle NRH_VERIF pour les fichiers HELIO
		     CW_HEADER pour les fichiers FITS

 CATEGORY:
	NRH1 Menu

 CALLING SEQUENCE:
	MENUVERIF

 INPUTS:
	Non

 KEYWORD PARAMETERS:
	Non

 OUTPUTS:
	Non

 CALLS: ***
	CW_HEADER, CW_PICKFILE_NRH, MENUVERIF_EVENT, NEWLITENTETE, NRH_VERIF, STR_SEP
	XMANAGER
 COMMON BLOCKS:
	NRH1_GLOBAL

	NRH1_HELIO

 MODIFICATION HISTORY: (bonmartin@obspm.fr)
	13/11/92 adapte du logiciel XHELIO (JB)


mil_time $SSW/radio/nrh/idl/gen/mil_time.pro
[Previous] [Next]
 NAME:
        mil_time
 PURPOSE:
	 calculates civil time in hours, minutes, seconds, and
	 milliseconds from time in milliseconds
 CATEGORY:
        ???
 CALLING SEQUENCE:
        result = mil_time(msecs) 
 INPUTS:
	 msecs = any type except string and complex; contains time in
	 milliseconds of day.
 OPTIONAL (KEYWORD) INPUT PARAMETERS:
	 None.
 OUTPUTS:
        Function result = intarr(4) containing hours, minutes, seconds,
	 milliseconds.
 CALLED BY:
	ELLIPSE_MAILLE, milsec__axis
 COMMON BLOCKS:
        None.
 SIDE EFFECTS:
	 None.
 RESTRICTIONS:
	 None.
 MODIFICATION HISTORY:
	Created from mil_civtime below, J Bonmartin 12/08/98 (obspm.fr)
        AM, Sep, 1990.


milsec__axis $SSW/radio/nrh/idl/gen/milsec_axis.pro
[Previous] [Next]
 NAME:
        milsec__axis
 PURPOSE:
	 gives necessary information for plotting a time axis 
	 labeled with civil time.
 CATEGORY:
        plot utility
 CALLING SEQUENCE:
        milsec__axis, milsecs, tickv, tickl, ticks
 INPUTS:
	 milsecs = 1 dim array of any type except string and complex; 
 	 contains the times in milliseconds.
 OPTIONAL (KEYWORD) INPUT PARAMETERS:
	 None.
 OUTPUTS:
        tickv = dblarr containing the values of the major ticks.
	 tickl = string array containing labels for major ticks.
	 ticks = lonarr(2) containing number of major and minor ticks.
 CALLS: ***
	MILSEC_AXIS, mil_time
 COMMON BLOCKS:
        None.
 SIDE EFFECTS:
	 None.
 RESTRICTIONS:
	 None.
 MODIFICATION HISTORY:
	Created from mil_time_axis below J Bonmartin 13/08/98 (obspm.fr) 
        AM, Sep, 1990. Modified by MG, Feb, 1991, KLK, Nov, 1995


minenvback $SSW/radio/ethz/idl/ragview/modify/minenvback.pro
[Previous] [Next]
 PURPOSE:
	Looks for a minimum in EACH x-profile and returns
	a vector of dimension N_Elements(ny)
 CALLS:
 CALLED BY
	ETHZ_Background, Minimum Envelope Background Subtraction


Minimum Envelope Background Subtraction $SSW/radio/ethz/idl/ragview/modify/minenvback.pro
[Previous] [Next]
 NAME: 
	Minimum Envelope Background Subtraction
 PURPOSE:
	given a window of length n, a minimum envelope 
	(in x- or y-direction) is calculated by centering the 
	window around each scan (channel) to find the minimum
	value inside the window. This minimum function  is
	smoothed by an 1/dist-window of the same length n, 
	where dist is the distance from the center of the window.
	This smoothed minimum envelope is interpreted as
	a background and is subtracted from the input data.
 CALLING SEQUENCE:
	result = MinEnvBack( image, windowLen, direction )
 INPUTS:
	image: a 2D real array
 	windowLen: the length of the minimum envelope window
	direction: 'X' or 'Y'
 RESULT:
	the image with the minimum envelope background 
	subtracted, of real type.
 KEYWORDS:
	BACKGROUND: the minimum envelope backgound,
		an array of same size as "image". This
		is an output parameter.
 CALLS: ***
	MINVECT, minenvback
 PROCEDURE:
	For each profile, the minimum inside a given window
	is stored and forms the first background. A weighted 
	averaging of it is done before it is subtracted from the
	original image.


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

 PURPOSE:
	Cree un fichier texte contenant une description des positions

 CATEGORY:
	RH_2D, recherche de positions

 CALLING SEQUENCE:
	MK_RESUME, Fichpos, Struct

 INPUTS:
	Fichpos:	fichier contenant les positions
	Struct:		structure contenant les infos 2d

 OUTPUTS:
	un fichier texte 'resume.txt'

 CALLS: ***
	FXPAR [1], FXPAR [2], HEADFITS [1], HEADFITS [2], HEADFITS [3], IND_RS, MSH, RDFILEPOS
 CALLED BY:
	CW_POS
 MODIFICATION HISTORY:
 	Written by:	C. Renié 10/03/1998


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

 PURPOSE:
	Cree un fichier de positions a partir d'un fichier de sources trie

 CATEGORY:
	RH_2D, Recherche de position

 CALLING SEQUENCE:
	Fich = MKFILEPOS, Fich1, Fich2, Hdeb

 OPTIONAL INPUTS:
	Fich1:	nom du fichier fits temporaire contenant les dernieres positions
	Fich2:	nom du fichier images associe
	Hdeb:	heure de la premiere image (chaine de caracteres)

 OUTPUTS:
	Fich:	nom du fichier fits de positions cree

 CALLS: ***
	CREATE_NRH_PFILE, FXPAR [1], FXPAR [2], HEADFITS [1], HEADFITS [2], HEADFITS [3]
	MOD_NRHFILE, RDFILEPOS, WRITE_POSINRH
 CALLED BY:
	CW_POS
 EXAMPLE:
	f = MKFILEPOS( 'positions.fits', 'nrh2_1640_h61_19970923_110031:07_c.fts', $
			'11:00:31:070')

 MODIFICATION HISTORY:
	Ecrit par: C. Renié 07/1998
	04/1999: transformation en fonction pour retour du nom de fichier


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

 PURPOSE:
	Cette fonction modifie le nom du fichier suivant le KEYWORD specifie

 CATEGORY:
	Fichiers NRH

 CALLING SEQUENCE:
	Newfile = MOD_NRHFILE( File )

 INPUTS:
	FILE	Nom du fichier a modifier.
	
 KEYWORD PARAMETERS:
		Voir CW_NRHFILE pour la definition des codes
	RESEAU	Nouveau code reseau

	FREQ	Nouveau code frequence, unite 0.1MHz

	HEURE	Nouvelle heure sous forme hh:mm:ss:ccc 
				(telle que fournie par MSH)
	INTERP	Nouveau code d'interpolation

	DIVERS	Code du champ libre

	CONTENT Nouveau code du type (images, harmoniques , flux,, etc...)

	 ETAT	Nouveau code ETAT (acquisition, comprime

	EXTEN   Extension du nom de fichier( *.fts, *.png)

	DIRECTORY Modification du chemin

 OUTPUTS:
	Nom de fichier modifie

 CALLED BY:
	INTGCOMP_NRH2, MKFILEPOS
 PROCEDURE:
	You can describe the foobar superfloatation method being used here.
	You might not need this section for your routine.

 CALLS: ***
	HMS, MSH, STR_SEP
 EXAMPLE:
	Newfile = MOD_NRHFILE ( file, CONTENT = 'f')
	Modifie le code pour indiquer que le nouveau fichier est un fichier
	de flux

 MODIFICATION HISTORY:
	Ecrit par: J BONMARTIN le 13/02/98 (bonmartin@obspm.fr)
		rajoute le KEYWORD EXTEN le 25/06/98
	Le 02/04/99	Complete la chaine d'heure
	Le 27/09/00 compatibilte Windows
		change le separateur de centiemmes dans les noms : -> c
		separateurs repertoires / ou \


Modif_Axis $SSW/radio/ethz/idl/ragview/custom/modif_axis.pro
[Previous] [Next]
 NAME: 
 	Modif_Axis
 PURPOSE:
	Change the maximum, minimum and/or step of a vector
	interactively and dependently: e.g  if the minimum is
	changed, the maximum is reset in dependancy of the step.
 CATEGORY:
	User Interface
 CALLING SEQUENCE:
	Modif_Axis, vector
 INPUT ARGUMENT:
	vector: the vector to be changed
 OUTPUT ARGUMENT:
 	vector: the vector changed
 SIDE EFFECTS
	On x-windows terminals, menus are called. On other
	terminals, the display is erased. The terminal window
	is used to read values.
 CALLS:


Modif_PS $SSW/radio/ethz/idl/ragview/custom/modif_ps.pro
[Previous] [Next]
 NAME:
	Modif_PS
 PURPOSE:
	User Interface to modify the PostScript page format
	parameters: width, height, origin (in centimeters)
	encapsulation, landscape mode, reverse mode,
	display of page titles.
 CATEGORY
	User Interface
 COMMON BLOCK:
	PSDriver: contains the parameters cited above.
 CALLS: ***
	CLEAR_SCREEN [1], CLEAR_SCREEN [2], General_Menu [1], General_Menu [2]
 SIDE EFFECTS:
	Modify the values of the common block.
	Menu windows are opened on x-windows terminals,
	on the others, the display is erased.


Modification of 1D Plots $SSW/radio/ethz/idl/ragview/modify/modify_1d.pro
[Previous] [Next]
 NAME:
	Modification of 1D Plots
 PURPOSE:
	As a part of mdisp, it is the analyser. It is done to
	allow the user to effectuate interactively mathematic
	operations on the plots selected.
 CATEGORY
	1D
 CALLING SEQUENCE
	Modify_1D
 CALLS: ***
	CLICKLIMITS, DATA_DISPLAY, DERIV, EDIT_1D, EXTEND_SHRINK, Fitting, General_Menu [1]
	General_Menu [2], INITSEL, INSERTPLOT, INSERTSEL, LOADSELECTION, MATHSFGEN1D
	MATHSFUNC1D, MODIFY_1D, N_SELECTED, READCOEFFS, READFACTOR, Read_Test, SHIFT_PLOT
	autocorr, error
 SIDE EFFECTS:
	The selectioner of mdisp is used. New plots are generated
	and replace the other plots in the selection (but not
	in the memory).

 MODIFICATION HISTORY:
	Created in June 1991 by A. Csillaghy
	Minor modifs in March 1995 ACs
	In July 1995: Autocorrelation parameter input procedure modified ACs
	Oct 95: modification by "keep only a part of the plot" ACs


Modify Image Pixels $SSW/radio/ethz/idl/ragview/modify/modify.pro
[Previous] [Next]
 NAME:
	Modify Image Pixels
 PURPOSE:
	User interface to modify image pixels. It allows
	to choose interactively the operation to be performed.
 CATEGORY:
	Image Processing
 CALLING SEQUENCE
	Modify, image [, xAxis, yAxis, $
		[ xMin, xmax, yMin, yMax, [ name ]]]
 INPUT PARAMETERS:
	image:  a two-dimensionnal real array
	xAxis, yAxis: the image (real) axes values. When not 
		present, they are considered to be equal to the
		pixel indices.
	xMin, xMax, yMin, yMax: the index boundaries of the
		image. They are important e.g. in Fourier
		transformation or cleaning processes when
		operations are not performed on the whole
		image. However, mathematical operations,
		e.g. exponentiation, logarithmization
		are done on the whole image, independently
		of these parameters. When not present,
		default are set to the lowest and highest pixels
		in x- and y-direction.
	name: the name of the image
 OUTPUT PARAMETERS:
 	image: the modified two-dimensionnal array.
	xAxis, yAxis: the axes modified by some of the options. 
 CALLS: ***
	ARITHMETICS, CORREL_IMAGES, Change_Selection, Congrid1d, DERIV, DIGITAL_FILTER
	ETHZ_Background, FILTSMINT, FOURIER, FOURIERTRANSF, GETWNR, General_Menu [1]
	General_Menu [2], Image_Info, Integrate_2D, MATHFUNGEN, MATHFUNTRA, MERGE, MODIFY
	PUTHMS, PUT_SELECTION, RAGEXP, RAGLOG, Read_Test, SHOW_IMAGE, SPLINEIMAGE, TWOIMS, WMESG
	autocorr, callisto_spg_recalibrate, constbacksub [1], constbacksub [2], correl1d
	edit [1], edit [2], error, phoenix_spg_recalibrate
 SIDE EFFECTS:
	Use the terminal window to read values.
 RESTICTIONS: User Interface: works only interactively.

 MODIFICATION HISTORY:
 	Created: May 1991, A. Csillaghy
	Options added in December, 1991 A.Cs
	Cross Correlation in Oct 92, A.Cs
	1d Crosscorrelation in March 93, AC/SK
	Wiener filter in March 93, AC
       Background renamed to ETHZ_background for ssw May 98 ACs
	PSH, 2004/04/16: added "Phoenix recalibrate" and "Callisto recalibrate" buttons.


Modify Titles $SSW/radio/ethz/idl/ragview/custom/modif_titles.pro
[Previous] [Next]
 NAME:
	Modify Titles
 PURPOSE:
	Changes title definitions, tick mark names, inteval
	between ticks, number of tickmarks, style and
	type of plot and plotting symbol.
 CATEGORY:
	User interface
 CALLING SEQUENCE:
	Modif_Titles
 SIDE EFFECTS
	The value of some system variables are changed, dependent
	on the option chosen.
 	Menus are used. On vt300 terminals, the
	display is erased
 CALLS:


MONTHNAMES [2] $SSW/radio/ovsa/idl/mapping/monthnames.pro
[Previous] [Next]
 NAME:
       MONTHNAMES
 PURPOSE:
       Returns a string array of month names.
 CATEGORY:
 CALLING SEQUENCE:
       mnam = monthnames()
 INPUTS:
 KEYWORD PARAMETERS:
 OUTPUTS:
       mnam = string array of 13 items:     out
         ['Error','January',...'December']
 CALLED BY:
	DT_TM_MAK [1], DT_TM_MAK [2], DT_TM_MAK [3], SUN [1], SUN [2]
 COMMON BLOCKS:
 NOTES:
 MODIFICATION HISTORY:
       R. Sterner, 18 Sep, 1989

 Copyright (C) 1989, 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.


MOTCLE $SSW/radio/nrh/idl/1dnrh/gen/motcle.pro
[Previous] [Next]
 NAME:
	MOTCLE

 PURPOSE:
	Cette fonction lit la valeur associee a un motcle

 CATEGORY:
	NRH1 general

 CALLING SEQUENCE:
	Result = MOTCLE( Unit, 'Cle')

 INPUTS:
	UNIT	Unite de lecture associee au fichier

	CLE	Nom du mot cle

 KEYWORD PARAMETERS:
	Non

 OUTPUTS:
	RESULT  contenu d'un motcle dans le descripteur de donnees de 
		type HELIO
		-1 en cas d'erreur

 CALLED BY:
	ANIMPROF, FUSIONPOS1D, LEC_NRH1D, MENUCALCFLUX1D, MENUCALCPOS2D, MENULISTPOS
	MENUTRACEISOPH, MENUTRACEPOS, NEWLECP1D, NEWLECP2D, PROFDECOMP1D, TRACEPOS
 COMMON BLOCKS:
	NRH1_GLOBAL

 RESTRICTIONS:
	FICHINFO(Unit).nomfich doit contenir le nom du fichier

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


MOUNTCAL $SSW/radio/ovsa/idl/util/mountcal.pro
[Previous] [Next]
 NAME:
     MOUNTCAL
 PURPOSE:
     Recreation of FORTRAN routine of the same name, just to verify that
     the translation to IDL was done correctly.  This will become the
     basis for a more complete routine.
 CATEGORY:
     OVRO APC CALIBRATION
 CALLING SEQUENCE:
     mountcal[,filename][,/stepsize]
 INPUTS:
     filename  Optional name of file to read.  If omitted, then the filename
                 !DEFAULTS.DBDIR+'BORESITE.PNT' is used.
 OPTIONAL (KEYWORD) INPUT PARAMETERS:
     stepsize  Switch to allow fitting of antenna stepsize.  This should not
                 normally be necessary once the stepsize is determined
                 well.  However, if there is a significant slope in the
                 HA offsets that cannot be fitted by MOUNTCAL, set this
                 switch to see how the fit looks if the stepsize is
                 adjusted.  Default is not to fit for antenna stepsize.
 ROUTINES CALLED:
 OUTPUTS:
 COMMENTS:
     Reads !DEFAULTS.DBDIR+'BORESITE.FTH', which must already exist

     Algorithm is based on the following geometrical formulae:

     HO =     P2 cos(D) + P3 cos(H)sin(D) + P4 sin(H)sin(D) + P5 H
     DO = P1            - P3 sin(H)       + P4 cos(H)

     where HO,DO are small pointing offsets in hour angle and declination on
     the sky at hour angle, H, and declination, D.

     Note that DO is independent of D; and that for D=0, HO is fixed.

     P1 = declination offset (+ve if pointing too far south)
     Q  = +P3 cos(lat) - P2 sin(lat) = az error (+ve if antenna rotated E from N)
     R  = -P3 sin(lat) - P2 cos(lat) = level error (+ve if high in east)
     P4 = level error (+ve if antenna is high in north)
     P5 = hour angle step size error (+ve if too small)

     The input data is a set of measured values of HO or DO at different (H,D).
     The task is to find the best fit values of P1,P2,P3,P4,P5.
     This is equivalent to solving a set of 4 linear equations in 4 unknowns.

     Let the i'th of NPT data points be:

       Y(i)    =               HO              or              DO

     Define:

       X(1,i)  =               0               or              1
       X(2,i)  =               cos(D)          or              0
       X(3,i)  =               cos(H)sin(D)    or              -sin(H)
       X(4,i)  =               sin(H)sin(D)    or              cos(H)
       X(5,i)  =               H               or              0

     Then define the sums, A(j,k) = SUM over i  ( X(j,i)*X(k,i) )
                       B(k)   = SUM over i  ( Y(i)  *X(k,i) )

     Then the set of equations to be solved are:

               SUM over j ( A(k,j) * Pj ) = B(k)               k = 1,2,3,4,5

 CALLS: ***
	DECODE, FINDSEG, GETDATA, OPENARC, OVSA_GET_INDEX
 CALLED BY:
	WACAL, WPOINT
 SIDE EFFECTS:
     Writes results to the screen--not too useful
 RESTRICTIONS:
 MODIFICATION HISTORY:
     Written 10-Jun-1999 by Dale E. Gary
     15-Mar-2000  DG
       Added simple plot of offsets and fits.
     07-Oct-2001  DG
       Added fifth parameter for HA stepsize adjustment, and added
       reading of current pointing parameters from CONFIG segment
       of first scan of file, so that updated parameters are now
       printed.
     24-Nov-2001  DG
       Fixed error in antenna indexing, which unfortunately caused
       incorrect pointing on Ants 4 and 5 from 7 Oct to 24 Nov 2001.
     04-Dec-2001  DG
       Made fitting the HA stepsize optional through the use of the
       /STEPSIZE switch.  Default is not to fit the HA stepsize.
     16-Mar-2002  DG
       Now prints out the RMS residual of the original measurements,
       so that it gives some indication of the level of improvement.
     22-Jun-2002  DG
       Added optional input filename argument.
     24-Jul-2005  DG
       Added handling for SATOBS scan


Move_Image $SSW/radio/ethz/idl/ragview/display/move_image.pro
[Previous] [Next]
 PROJECT:
       Phoenix 2 solar radio spectrometer

 NAME:
	Move_Image

 PURPOSE:
	Switches the part of an image displayed with its
       neighbour either on the right, left,
	up,down, up/right, up/left, down/right or down/left,
	using a fixed scale factor (i.e. a give number of pixels to
	display).

 CALLING SEQUENCE
	Move_Image, image, xAxis, yAxis 
		,xMin, xMax, yMin, yMax

 CATEGORY:
	User Interface.

 INPUT ARGUMENTS:
	image: the image in which one wants to move, a 2D 
		real array;
	xAxis, yAxis: the axes of the image;
	xMin, xMax, yMin, yMax: the boundaries of the image
		part actually displayed, in array indices. 

 OUTPUTS:
	xMin, xMax, yMin, yMax: the boundaries of the new
		part that will be displayed with Show_Image

 KEYWORDS:
	TITLE: The title of the window
	WINCHANGE: If set, the moves are displayed in a new
		window.

 SIDE EFFECT:
	The image moves are displayed.

 RESTRICTION
	Works only with a display produced with "Show_Image".
 	otherwise, the display will be adapted to the layout of
	"Show_Image".

 CALLS: ***
	GETWNR, GET_DFONT [1], GET_DFONT [2], Image_Info, SHOW_IMAGE, XMESSAGE, error
	ethz_XCHOICE
 CALLED BY:
	Display 2D Image
 MODIFICATION HISTORY:
	Created 4/91, A.Csillaghy
       Adapted for use in IDL 5.1 w/ xchoice,
           csillag@ssl.berkeley.edu, November 1998 


MSEC2STR $SSW/radio/ovsa/idl/time/msec2str.pro
[Previous] [Next]
 NAME:
     MSEC2STR
 PURPOSE:
     Converts a time (or RA) in msec to a string of the form HH:MM:SS.SSS
     (Can also convert Declination in masec, maintaining negative sign)
 CATEGORY:
     OVRO SPAN CONVERSION
 CALLING SEQUENCE:
     tstring = msec2str(msec)
 INPUTS:
     msec	the time (or RA) in msec (should not exceed 99 hours)
                         or DEC in masec (should not exceed 99 degrees)
 OPTIONAL (KEYWORD) INPUT PARAMETERS:
 ROUTINES CALLED:
     sec2hms
 OUTPUTS:
     tstring	the time of day as a string of the form HH:MM:SS.SSS
 COMMENTS:
 CALLS: ***
	SEC2HMS
 CALLED BY:
	ACALCHEK, DAILY, DUMPREC, FLAREMETER, OVSA_EXPLORER formerly OVSA_PRESUB
	OVSA_PRESUB, PNTCHEK, Read_DriftData, SATCALCHEK, SOL2TXT, SOLAID, SRSP_TL_DECODE
	SURVANAL, TL_DECODE, TOP20, TPANALYZE, UPTIME, WACAL, WANALYZE, WPOINT, WRITE_DAILY
	check_cals, fit12phz, imagr_vsel [1]
 SIDE EFFECTS:
 RESTRICTIONS:
     msec cannot be an array--must be a scalar
 MODIFICATION HISTORY:
     Written 31-Jan-1997 by Dale Gary
     24-Aug-1998  DG
       Division by 1000. changed to 1000.D to keep needed precision.


MSH $SSW/radio/nrh/idl/gen/msh.pro
[Previous] [Next]
 NAME:
	MSH

 PURPOSE:
	Cette fonction fait le codage de l'heure en MS en chaine ascii
	HH:MN:SS:milsec . Le delimiteur est ':' .
	Entre les secondes et les decimales de secondes on peut choisir 
	un autre delimiteur ( '.' par ex) grace au keyword DELIM.
 CATEGORY:
	CONVERSION

 CALLING SEQUENCE:
	SH = msh (temps, DELIM = '.')

 INPUTS:
	TEMPS	array temps en millisecondes.

 KEYWORD PARAMETERS:
	DELIM: delimiteur entre secondes et decimales de secondes
	par defaut ':'

 OUTPUTS:
	SH	chaine contenant l'heure : HH:MN:SS:milsec

 CALLED BY:
	ANIMPROF, CENTER_NRH2, CW_POS, FLUX_NRH2, INTGCOMP_NRH2, LEC1D, MENUBCKGRD
	MENUCALCFLUX1D, MENUCALCPOS2D, MENULISTPOS, MENUTRACEISOPH, MENUTRACEPOS
	MENUTRACEPROF, MK_RESUME, MOD_NRHFILE, NRH1_EXTRACT, NRHR, NRHRCAL, NRHR_CAL
	NRH_FLUXASCI, NRH_SOURCEASCI, NRH_VERIF, PLOT_HG_MAN, PLOT_MAXPOS, PROFDECOMP1D
	RD_NRH2I, READ_CENTER_POINT [2], READ_NRH, RH_GET_HEADER, RH_HDR_TIME
	RH_MOD_HEADER, SUN_IMAGE, TIME_IND_NRH, TRACEPOS, WRITE_POSINRH
 EXAMPLE:
	PRINT, MSH(380200)
 imprime l'heure

 MODIFICATION HISTORY:
	Ecrit par:J Bonmartin
 a partir MSH$, seul changement de l'appel
       modif A. Bouteille mai 1998 :
	ajout du mot cle DELIM
	accepte un tableau en entree avril 2001