[Previous]
[Next]
NAME:
C2IDATE
PURPOSE:
Cette procedure convertit la date chaine de caracteres, en binaire
CATEGORY:
NRH1 General
CALLING SEQUENCE:
C2IDATE, Chdate, Idate
INPUTS:
CHDATE Chaine de caracteres contenant DD-MMM-yyYY
KEYWORD PARAMETERS:
Non
OUTPUTS:
IDATE Tableau de 3 valeurs IDATE[0] = Jour
IDATE[1] = Mois
IDATE[2] = An
CALLED BY:
MENUCALCFLUX1D, MENUCALCPOS2D, MENUTRACEISOPH
COMMON BLOCKS:
Non
SIDE EFFECTS:
La chaine de caracteres est decodee en fonction de la position des
caracteres dans la chaine, donc le separateur peut etre quelconque
PROCEDURE:
La conversion inverse est faite par I2CDATE
EXAMPLE:
C2IDATE, '20/APR/1998', IDATE
MODIFICATION HISTORY: (bonmartin@obspm.fr)
08-oct-1996
Modif novembre 1997: Dates en anglais (KLK)
[Previous]
[Next]
NAME:
CAL_INFO
PURPOSE:
Routine returns baseline information (order of antennas, backend
channels, and backend channel phase) for a given pair of antennas.
CATEGORY:
OVRO APC DATA CALIBRATION
CALLING SEQUENCE:
cal_info,bl,header,cfg,order,bechan,bephz
INPUTS:
bl A number representing the baseline for which to return info, e.g.
12 for baseline 1-2, 25 for 2-5, 78 for 7-8, etc.
header The HEADER structure from the scan for which info is to be returned.
cfg The CONFIG structure from the scan for which info is to be returned.
OPTIONAL (KEYWORD) INPUT PARAMETERS:
ROUTINES CALLED:
OUTPUTS:
order The order of antenna pair, given by BL, in the MUX sequence.
bechan The backend channels corresponding to the pair of antennas,
as 0 = AB, -1 = BC, and +1 = CA
bephz The channel phase that must be applied (subtracted) before
ORDER is applied
COMMENTS:
To determine the closure phase for a triad of antennas 12n, subtract BEPHZ
from each phase, multiply by ORDER, and then add the phases according to
phi_12 + phi_2n - phi_1n.
CALLS: ***
NINT [1], NINT [2]
CALLED BY:
DAILY, XCALENDAR
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Written 06-Nov-2005 by Dale E. Gary
07-Nov-2005 DG
Had to return REFORMed values so they are scalars and not Array[1]
[Previous]
[Next]
NAME:
CAL_PCLOSE
PURPOSE:
Force phase closure in calibration data.
CATEGORY:
OVRO APC CALIBRATION
CALLING SEQUENCE:
calout = cal_pclose(calin)
INPUTS:
calin A float array of size (nc,nf,nb) where NC=5 is the number of
columns of calibration data (F_ghz, Amp, dAmp, Pha, dPha),
NF is the number of frequencies at which the calibration
data were taken, and NB=7 is the number of baselines for
which the calibration data were taken.
OPTIONAL (KEYWORD) INPUT PARAMETERS:
ROUTINES CALLED:
pclose
OUTPUTS:
calout An exactly parallel array to CALIN, but with phases corrected
for phase closure.
COMMENTS:
CALLS: ***
PCLOSE
CALLED BY:
ADJUST_AMF, ADJUST_REFCAL, BASEPHZ
SIDE EFFECTS:
RESTRICTIONS:
This routine will have to be fixed to work with more than 5
antennas (7 baselines)
MODIFICATION HISTORY:
Written 17-Jun-1999 by Dale E. Gary
01-Jul-1999 DG
Modified to use a more generic routine, PCLOSE(), to do most of
the work.
04-Apr-2000 DG
Reset phases to input phase if more than one of a triad is NaN
16-Jun-2000 DG
Made the routine more general, should work with any combination of
antennas provided the 12 baseline is included and is the first one.
04-Jan-2003 DG
New calibration scheme means phases close to zero, so removed 225.
in PCLOSE call.
[Previous]
[Next]
NAME:
CALC_VOLGAUSS
PURPOSE:
Calcul du volume gaussien a partir des parametres d'une ellipse et de la valeur
du pic
CATEGORY:
RH_2D, recherche de positions
CALLING SEQUENCE:
CALC_VOLGAUSS, Ellip, Dimx, Dimy, Tab
INPUTS:
Ellip structure decrivant la source
Dimx, Dimy: dimensions de l'image d'origine
OUTPUTS:
Tab: tableau 2D contenant le volume gaussien
CALLED BY:
CP_FLUXPOS_NRH2, CW_SCANSOURCE, EXTRACT_SOURCES, PLOT_MAXPOS
EXAMPLE:
MODIFICATION HISTORY:
Ecrit par: C Renie, decembre 1997
[Previous]
[Next]
NAME:
CALCFLUX
PURPOSE:
PROCEDURE DE CALCUL DE LA DENSITE DE FLUX
DES IMAGES EN FONCTION DU TEMPS PROVENANT DE LA FONCTION LEC1D (IMAGE 1D DU
RH)
CATEGORY:
NRH1 Calculs
CALLING SEQUENCE:
CALCFLUX, Tab, Unit, temps, flux
INPUTS:
TAB ...... Tableau issu de LEC1D contenant les images
(2 dimensions)
TAB(Espace,Temps)
(3 Dim sinon )
X(Espace,Temps,type)
type = 0 ---> Intensite
type = 1 ---> Polarisation
UNIT ......Numero d'unite logique dont TAB est issu.
KEYWORD PARAMETERS:
HEURES Tableau d'heures de debut, de fin, chaines de caracteres
['hh:mn:ss:ccc','hh:mn:ss:ccc']
CANAUX Tableau de canaux de debut et fin du calcul [Deb, Fin]
OUTPUTS:
TEMPS .........tableau de temps [ms]
FLUX .........tableau densites de flux I (flux(*,0))
et - si disponible dans TAB -
V (flux(*,1))
CALLS: ***
HMS, VERIF_CANAUX, VERIF_HEURES
CALLED BY:
MENUCALCFLUX1D, MENUTRACEISOPH
COMMON BLOCKS:
NRH1_GLOBAL
MODIFICATION HISTORY: (bonmartin@obspm.fr)
23/11/98 Adapte du logiciel XHELIO
[Previous]
[Next]
NAME:
CALCPOS
PURPOSE:
Cette procedure calcule les coordonnees heliographiques d'un point
a partir des coordonnes instrumentales
CATEGORY:
NRH general
CALLING SEQUENCE:
CALCPOS, freq, ih, mn, r1, s1, $ ; input
x, y ; output
INPUTS:
FREQ Frequence d'observation em MHz
IH Heure de l'image
MN Minutes "
R1 position instrumentale EW
S1 Position instrumentale NS
KEYWORD PARAMETERS:
Non
OUTPUTS:
X position heliographique EW
Y position heliographique NS
CALLS: ***
HEURE_TU, OMEG_BRUT, POS_HELIO, rh_date100 [1], rh_date100 [2]
CALLED BY:
PLOT_HG_MAN
COMMON BLOCKS:
Non
SIDE EFFECTS:
Ce module contient les procedures intrernes suivantes:
OMEG_BRUT calcul de l'angle solide du champ
POS_HELIO calcul des positions
HEURE_TU calcul du temps TU pour les sources
MODIFICATION HISTORY: (A Kerdraon)
Adapte de XHELIO (bonmartin@obspm.fr)
02 avr 3: mise au clair de commentaires sur new, nns, ins45 etc. dans ce
fichier et dans INIT_MALAX_2D.PRO.
[Previous]
[Next]
NAME:
calib_rate
PURPOSE:
reads output of analyze & apply calibration and rearrange
visibilities into complex array with index (i,j,k) where
i = time
j = baseline (j = 0,1,2,3,4,5,6,7,8,9)
k = frequency
CATEGORY:
OVSA APC imaging
CALLING SEQUENCE:
cal=calib_rate('inname')
cf. calib, 'inname', 'outname'
INPUTS:
infiles <= output of analyze.pro
OPTIONAL (KEYWORD) INPUT PARAMETERS:
None at present
ROUTINES CALLED:
calib_ap.pro
calib_apply.pro
ovsa_poln
and some other SSW files
OUTPUTS:
outfile => an idlsave file which will input to IMAGR.PRO
COMMENTS:
visibilies are in double flt, but here converted to single flt
may need some more actions like 'combine', 'backgr-subtr'
before going to IMAGR.PRO
CALLS: ***
APPLY_CAL_ALL, OVSA_POLN
SIDE EFFECTS: -
RESTRICTIONS:
R and L visibilities upto 7 baselines.
MODIFICATION HISTORY:
Written 05-JAN-2001 by JL
20-Mar-2001 DG
Changed to use new file convention--all polarizations in the
same file.
11-Apr-2001 DG
Changed to more general form, works with any set of antennas
and/or polarizations
23-Jul-2003 DG
Eliminate redundant code with OVSA_POLN routine, and call that
routine.
[Previous]
[Next]
NAME:
callisto_spg_recalibrate.pro
PROJECT:
ETHZ Radio Astronomy
CATEGORY:
Utility
PURPOSE:
This routine, given a Callisto spectrogram (in original LOG scale), will recalibrate it to yield proper values: either in the usual
Phoenix-2 45*LOG10(SFU+10) format, or in linear SFU values (when keyword /SFU is set).
Recalibration data is in the file callisto_recalibrate.fits in the dbase section of the ETH SSW software.
callisto_recalibrate.fits was derived by H. Perret from comparision with recalibrated Phoenix spectrograms.
CALLING SEQUENCE:
newspg=callisto_spg_recalibrate(spg)
-OR-
newdata=callisto_spg_recalibrate(data,freq_axis)
INPUT:
spg: an Callisto spectrogram structure
-OR-
data,freq : the data array and the frequency axis.
KEYWORD INPUT:
/SFU: if set, will return result in linear SFU scale. Otherwise, in Phoenix-2's usual 45*LOG10(SFU+10) format...
/TWO: if set, will take the second (smoother) calibration...
OUTPUT:
newspg: the newly calibrated spectrogram structure
-OR-
newdata
KEYWORD OUTPUT:
CALLS: ***
INTERPOL, MRDFITS [1], MRDFITS [2]
CALLED BY:
Modify Image Pixels, RAG Exponentiation, RAG Log
RESTRICTIONS:
Because we use the INTERPOL IDL routine, the values in the freq array must be monotonic (increasing or decreasing).
EXAMPLES:
HISTORY:
Pascal Saint-Hilaire, 2004/04/16 written.
shilaire@astro.phys.ethz.ch
[Previous]
[Next]
16-Aug-2000 DG
Renamed PLOTERR (IDL version) to OVSA_PLOTERR, and copied to
OVSA tree, then changed PLOTERR calls to OVSA_PLOTERR, to avoid
conflict with SSW's PLOTERR.
CALLS:
[Previous]
[Next]
NAME:
CALSPEC
PURPOSE:
Returns the flux spectrum, in Jy, of several main total power calibrator
sources, Cas A, Cyg A, Tau A and Vir A.
CATEGORY:
OVRO APC DATA CALIBRATION
CALLING SEQUENCE:
flux = calspec(srcname,epoch)
INPUTS:
srcname One of the 4 standard source names. A string (all caps)
as follows: 'CASA', 'CYGA', 'TAUA', 'VIRA'
epoch The approximate date as decimal year. This argument
is needed only for Cas A, since only it has a secular
decrement.
OPTIONAL (KEYWORD) INPUT PARAMETERS:
ROUTINES CALLED:
OUTPUTS:
flux The flux spectrum (at every harmonic, 5-90) of the
source specified.
COMMENTS:
There will have to be modifications to this routine when
additional antennas are available.
CALLS: ***
NINT [1], NINT [2]
CALLED BY:
TPSOLVE, TPSOLVE2
SIDE EFFECTS:
RESTRICTIONS:
This version assumes 27 m antennas. It could conceivably be needed
for 2 m flux measurements, but would not give the correct answer unless
changes are made.
MODIFICATION HISTORY:
Written 02-Aug-1998 by Dale E. Gary
[Previous]
[Next]
NAME:
CDATE
PURPOSE:
Cette fonction remplace le nom du mois sur 3 caracteres, par le
numero du mois
CATEGORY:
NRH1 General
CALLING SEQUENCE:
Resultat = CDATE( Date )
INPUTS:
DATE Chaine de caracteres contenant DD-MMM-yyYY
KEYWORD PARAMETERS:
Non
OUTPUTS:
Resultat Chaine de caracteres contenant DD/nm/yyYY
COMMON BLOCKS:
Non
SIDE EFFECTS:
La chaine de caracteres est decodee en fonction de la position des
caracteres dans la chaine, donc le separateur peut etre quelconque
EXAMPLE:
PRINT, DATE('20/APR/1998')
MODIFICATION HISTORY: (bonmartin@obspm.fr)
[Previous]
[Next]
NAME:
CENTER_NRH2
PURPOSE:
Procedure de calcul et de traitement des CENTRES ACTIFS des
images contenues dans un fichier NRH2
CATEGORY:
WIDGET
CALLING SEQUENCE:
CENTER_NRH2, [File],GROUP=group
INPUTS:
Parm1: Describe the positional input parameters here. Note again
that positional parameters are shown with Initial Caps.
OPTIONAL INPUT
FILE nom du fichier de position
si la chaine file n'est pas vide le fichier correspondant
sera ouvert
KEYWORD PARAMETERS:
GROUP Identification du widget appelant
OUTPUTS:
Describe any outputs here
CALLS: ***
CENTER_NRH2_EVENT, CW_FIELD, CW_PLOTSERIE, CW_XTD_NRHF, FXPAR [1], FXPAR [2]
HEADFITS [1], HEADFITS [2], HEADFITS [3], IND_RS, INIT_NRH_CFILE, MSH
NRH_CENTERASCI, OPEN_NRH_CFILE, READ_NRHPOS, STR_SEP, TR_TIME_NRH, XMANAGER
CALLED BY:
CW_POS
COMMON BLOCKS:
LIMIT Contenant la structure STR_LIM (NRH_STR_LIM)
PROCEDURE:
Cette procedure contient les widgets disponibles pour le trace des
resultats d'uncalcul de CENTRES ACTIFS
EXAMPLE:
MODIFICATION HISTORY:
Ecrit par: J Bonmartin (bonmartin@obspm.fr) le 12/10/98
23/10/98 modification d'appellation CENTER->SOURCE (JB)
Definition de SZ pour le trace des positions EW et NS
10/03/99 modifie la commande zoom, remplace return-event
par all_events (JB)
29/03/99 introduit le style de trace (JB)
20/04/99 Supprime le controle de fichiers
10/05/99 Echelle curseurs pour les positions. Supprime YRANGE,
YLAB pour OPLOT (JB)
26/10/00 traces en couleur (JB)
12/03/01 Suppression de FLUX dans le cas d'Hessi (JB)
30/12/03 creation fichier ascii des positions des centres (AB)
28/03/05 modif adaptation des bornes du trace de positions au
cas des images de plus de 4 rayons solaires
[Previous]
[Next]
NAME:
Change_Selection
PURPOSE:
Restores an image interactively choseN from the list of
files with ending ".tmpenrad".
CALLING SEQUENCE:
Change_Selection, image, xAxis, yAxis,
[ xMin, xMax, yMin, yMax]
OUTPUTS:
image: the 2D array
xAxis, yAxis: the 1d arrays corresponding to the image
xMin, xMax, yMin, yMax: the boundary of the image (in
pixel number) when it was stored.
KEYWORDS:
STATUS: "Done" or "Not Done" as result
FNAME: The filename. If set, the interactive part is
not used.
TEXT: If not set, the menu of the interactive part contains
the text: "Select image"
RESTRICTION:
Works only after initialization with "Init_selection".
LOCATION:
init_selection.pro
CALLS:
CALLED BY
Initialize Selection [2], Modify Image Pixels, RAG Exponentiation, RAG Log
Selection delete, put selection
[Previous]
[Next]
NAME:
CHANPHZCHEK
PURPOSE:
Analyze Channel Phase calibration data, which are data taken
in a special MUX mode (ID = 15) on the Sun. The data for the
same baseline are taken on more than one A, B, C channel
combination.
CATEGORY:
OVRO APC DATA ANALYSIS
CALLING SEQUENCE:
chanphzchek,infile,hrec,recs[,outfile=outfile]
INPUTS:
infile the name of the .ARC file containing the special
mode data
hrec the record numder for the header of the scan to
analyze
recs the record range to analyze, as a two-element
array, e.g. [2905,3501]
OPTIONAL (KEYWORD) INPUT PARAMETERS:
outfile an optional keyword giving the name of the
output file to create. If omitted, the name
!defaults.datadir+'generic.sav' is used.
ROUTINES CALLED:
analyze, lobe
OUTPUTS:
None
COMMENTS:
Once this procedure becomes standard, the results should be
written to the data file. It is not yet known if the channel
phases change from time to time, or are relatively constant.
CALLS: ***
ANALYZE [1], ANALYZE [2], ANALYZE [3], LOBE, VARIANCE, set_logenv [1]
set_logenv [2]
SIDE EFFECTS:
A plot is created showing a time plot of the phase differences
on different channels. The values to assign to the different
channels is printed to the log window.
RESTRICTIONS:
MODIFICATION HISTORY:
Written 06-Jun-2002 by Dale E. Gary
23-Dec-2002 DG
Added support for MUX sequence 17, for new backend MUX hardware.
02-Jan-2003 DG
Completely rewrote the newer part to reflect new understanding
of the Mk II backend and the meaning of the different combinations
of phases.
27-Jul-2003 DG
Set environment variable OVSA_ANALROUTINE to CHANPHZCHEK in order
to get around problem with phase lock bits in FLAGOOL. Since
antennas 7 and 8 may not be in lock, antenna 2 and 4 data written
in antenna 7 and 8 slots were coming up OOL. FLAGOOL now
interprets ant 7 and 8 OOL bits as ant 2 and 4 bits.
26-Jul-2005 DG
Now that we have R and L rather than linear feeds, the choice of
channels to average had to be changed. Data after 2004.231 will
use the new channels 1:2.
12-Nov-2006 DG
The addition of +/- 135 to the measurements is no longer
correct, since they are applied elsewhere (in gaincor, which
calls apply_bephz). Now removed. I also found a nicer way
to average noisy phases and calculate the std deviation. In
addition, there appears to be an anomaly with Ant 4, which can
be explained by a 7 degree phase difference between its
measurement on chan A and chan B after accounting for chan A and B
phases. In other words, it could be the switch or cables in the
MUX box.
[Previous]
[Next]
NAME:
CHECK_12AP
PURPOSE:
APCAL_ADD_27M_RL support routine. Checks 12 baseline data for
multiple .AMF files, plots some comparison data, and returns
appropriately averaged amplitudes and phases.
CATEGORY:
OVRO APC DATA CALIBRATION
CALLING SEQUENCE:
check_12ap,f,amp,damp,phz,dphz
INPUTS:
OPTIONAL (KEYWORD) INPUT PARAMETERS:
ROUTINES CALLED:
OUTPUTS:
f Array of size [nf] containing the frequencies used. NB: must be the
same for all .AMF files (61 DOSEQ)
amp Array of size [nf,npol] containing amplitudes for 12 baseline
damp Array of size [nf,npol] containing amplitude rms deviation for 12 baseline
phz Array of size [nf,npol] containing phases for 12 baseline
dphz Array of size [nf,npol] containing phase rms deviation for 12 baseline
COMMENTS:
CALLS: ***
LINFIT, LOBE, MOMENT, OPLOTERR, readamf
CALLED BY:
APCAL_ADD_27M_RL
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Written 26-Jul-2005 by Dale E. Gary
05-Sep-2005 DG
Used LOBE function to fix problem in which output phases (PHZ array) were
ranging from -180 to 180.
[Previous]
[Next]
NAME:
check_cals
PURPOSE:
Given an optional date (system date used if not specified), the function
will return 5 calibrators for use in the build_schedule procedure
CATEGORY:
OVRO APC DATA CALIBRATION
CALLING SEQUENCE
x = check_cals(date)
INPUT PARAMETERS:
date the date in the format : YYYY-MON-DD where MON is the first
3 letters of the month
ROUTINES CALLED:
External: uptime, anytim, msec2str, hms2sec
OUTPUTS:
The output a structure with the calibrators that are found to meet the specifications
COMMENTS:
The variable minlimit is the minimum time between two calbibrators.
CALLS: ***
HMS2SEC, MSEC2STR, READ_HSI_OBS, UPTIME, anytim [1], anytim [2], anytim [3]
anytim [4], anytim [5]
CALLED BY:
Build_Schedule
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Written 13-Mar-2002 by Dale E. Gary and Garrett Smith
[Previous]
[Next]
NAME:
CHECK_DIST
PURPOSE:
Routine to read each file of the OVSA software distribution and
determine what other routines it calls.
CATEGORY:
OVRO APC FILE
CALLING SEQUENCE:
check_dist[,outfile=outfile]
INPUTS:
outfile the name of a file to write the output to. If omitted,
the information is written to the screen.
OPTIONAL (KEYWORD) INPUT PARAMETERS:
ROUTINES CALLED:
break_file
OUTPUTS:
COMMENTS:
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], PROGMETER, UNIQ [1], UNIQ [2]
UNIQ [3], break_file [4], get_logenv [1], get_logenv [2]
SIDE EFFECTS:
The results are (optionally) written to a file.
RESTRICTIONS:
MODIFICATION HISTORY:
Written 20-Jul-2000 by Dale E. Gary
[Previous]
[Next]
NAME:
CHECK_SCHED_STATE
PURPOSE:
Support routine for the SCHEDULE. It checks the SCHED_STATE
file and returns 1 if okay to proceed, or 0 if the schedule
should remain IDLE. It also changes the contents of SCHED_STATE
file as necessary.
CATEGORY:
OVRO APC SCHEDULE SUPPORT
CALLING SEQUENCE:
result = check_sched_state(base)
INPUTS:
base The base widget number of the calling instance of
SCHEDULE. This will be compared to the number
written into the SCHED_STATE file when ACTIVE, to
see if we have control, or whether another instance
of SCHEDULE has control.
OPTIONAL (KEYWORD) INPUT PARAMETERS:
ROUTINES CALLED:
OUTPUTS:
result will be set to 1 if it is okay to proceed normally,
or 0 (FALSE) if the calling instance of SCHEDULE
must wait in IDLE mode.
COMMENTS:
CALLED BY:
SCHEDULE
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Written 07-Sep-2000 by Dale E. Gary
[Previous]
[Next]
NAME:
clean
PURPOSE:
get a CLEAN or DIRTY map
CATEGORY:
OVSA APC imaging
CALLING SEQUENCE:
clean,uv_ij,vis_ij,inp,map,cln,dirty=dirty
INPUTS:
uv_ij,vis_ij,inp
OPTIONAL (KEYWORD) INPUT PARAMETERS:
Input parameters are read from inpfile rather than keywords
ROUTINES CALLED:
fft_uv2xy.pro
find_axes.pro
clean_only.pro
OUTPUTS:
map,cln
COMMENTS:
major differences from AIPS/CLEAN
1. imsize can be chosen but then cellsize is determined accordingly.
2. H\"ogbom algorithm rather than BCG's is used for cleaning
3. A truncated gaussian is used for Convol-Grdding fcn.
4. Multifrequencies at OVSA is handled using freqid array
As a result, linear Frequency synthesis done when you specify multiple freqids,
5. Use keyword 'dirty' to get the dirty map.
CALLS: ***
BOX_CURSOR, CONGRID [1], CONGRID [2], CONGRID [3], LOADCT, PLOT_3MAPS
clean_only [1], clean_only [2], fft_uv2xy [1], fft_uv2xy [2], find_axes
CALLED BY:
imagr [1], imagr_batch
SIDE EFFECTS: -
RESTRICTIONS:
MODIFICATION HISTORY:
Written 05-JAN-2001 by JL
28-Feb-2003 DG
Now saves original system variables before displaying, and
sets them back before exiting. Changed displayed map size
to max of m/4 and CLBOX.
01-Mar-2003 DG
Replaced routine CLEAN_BIJM() with FIND_AXES(), to overcome problems
with the former. Also implemented ability to change CELLSIZE.
Also changed the algorithm for doing second clean box, or redoing
the box, to use the mouse rather than keyboard.
30-Dec-2003 DG
Fixed bug in clean box when doing non-standard (non-256 pixel)
map size.
[Previous]
[Next]
NAME:
clean_bijm
PURPOSE:
determine clean beam out of a dirty beam
CATEGORY:
OVSA, APC Imaging
CALLING SEQUENCE:
cbm = clean_bijm(uv_ij,dbeam)
INPUTS:
uv_ij: uv points
dbeam: dirty beam.
OPTIONAL (KEYWORD) INPUT PARAMETERS:
none
ROUTINES CALLED:
OUTPUTS:
cbm[0]= a, semi-major/minor axis closer to x-axis in pixel units
cbm[1]= b, semi-minor/major axis closer to y-axis
cbm[2]= p, orientation of b w.r.t y-axis in degree
clockwise=-, c.c.wise=+
COMMENTS:
Instead of a widely-used general gaussian fitting algorithms
here use is made of u,v data in such a way that the uv points with
the largest distance determines the orientation of the ellipse.
CALLS: ***
ROT
SIDE EFFECTS:
RESTRICTIONS:
assume 0.1 <= a, b <= 10.1
accuracy within 0.01 pixel units
use all but 1-5, 1-6 bsls for determining the semi-minor axis
MODIFICATION HISTORY:
Written 05-JAN-2001 by JL
[Previous]
[Next]
NAME:
clean_only
PURPOSE:
clean sidelobes in a dirty map
CATEGORY:
OVSA APC imaging
CALLING SEQUENCE:
clean_only, dmap, dbeam, clparm, cmap, cbeam, pmap, maxitr
INPUTS:
dmap, dbeam, clparm
OPTIONAL (KEYWORD) INPUT PARAMETERS:
all included in clparm
ROUTINES CALLED:
cvd_ellipse
OUTPUTS:
cmap, cbeam, niter_max, pmap (= deconvolved point sources)
COMMENTS:
- intended to do only cleaning and so this code needs not know
the actual pixel size. Everything works in pixel units.
- clean beam is created in an array form here (again in pixel units)
but only a (significant) part of it is returned.
the size of cbeam array varies depending on the beam size.
- dbeam is (2m by 2m) while dmap is (m by m).
Here for a cleaning purpose, we use only inner m by m area
CALLS: ***
CVD_ELLIPSE, PLOT_SET_XYSCAN, PLOT_XYSCAN
CALLED BY:
clean [2], clean [3], clean [4], slfcal [1], slfcal [2]
SIDE EFFECTS:
RESTRICTIONS:
arrary size of cbeam will be far smaller than m & automatically adjusted.
MODIFICATION HISTORY:
Written 05-JAN-2001 by JL
[Previous]
[Next]
NAME:
Click the Limits
PURPOSE:
Interface to read maximum and minimum of a range from
points clicked with the mouse.
CALLING SEQUENCE:
ClickLimits, low, high
OUTPUT PARAMETERS:
low, high: the two limits in the coordinate system
established.
KEYWORDS:
/YDIR: If present, the y coordinates are read, otherwise
the x coordinates.
TITLE: the name of the window containing the title.
SIDE EFFECTS
Uses the x windows system
CALLS:
[Previous]
[Next]
NAME:
CLOSE_ANT
PURPOSE:
Close the phases of a single antenna (actually returns closed
phases for a single triad of antennas, e.g. 1-2-4 or 1-2-5).
CATEGORY:
OVRO APC DATA CALIBRATION
CALLING SEQUENCE:
amfout = close_ant(amfdat)
INPUTS:
amfdat The array of data obtained from reading an AMF file
for a single antenna (array of size [6,NF,3], where
first index is AMF file column number, NF is number
of frequencies, and 3 is the number of baselines for
a single triad of antennas).
OPTIONAL (KEYWORD) INPUT PARAMETERS:
ROUTINES CALLED:
pclose
OUTPUTS:
amfout The same as the input data, except the phases are forced
to close to 135 degrees.
COMMENTS:
CALLS: ***
PCLOSE
CALLED BY:
APCAL_ADD_2MANT, APCAL_ADD_2M_RL
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Written 25-Mar-2002 by Dale E. Gary
03-Jan-2003 DG
Changed due to correction of backend phases, which
now cause all phases to close to zero.
[Previous]
[Next]
NAME:
CNV_H2XY
PURPOSE:
Convert heliographic coordinates, (lat,lng), to (x,y) offsets from
sun center, in arcsec.
CATEGORY:
CALLING SEQUENCE:
cnv_h2xy,p,b,r,lat,lng,x,y
INPUTS:
p Position angle (degrees) of the northern extremity of
the solar axis of rotation, measured eastward from the
north point of the disk.
b B angle (degrees) positive for solar north pole pointing
toward the Earth.
r Apparent solar disk radius (arcsec)
lng the solar longitude(s) of the point(s) to be converted,
in degrees, as +W. This may be an array of same dimension
as LAT.
lat the solar latitude(s) of the point(s) to be converted,
in degrees, as +N. This may be an array of same dimension
as LNG.
OPTIONAL (KEYWORD) INPUT PARAMETERS:
ROUTINES CALLED:
OUTPUTS:
x the W offset(s) of the point(s) in arcsec from sun
center (<0 => E). Output dimension is same as LAT, LNG
y the N offset(s) of the point(s) in arcsec from sun
center (<0 => S). Output dimension is same as LAT, LNG
COMMENTS:
CALLED BY:
ARLOCPLOT, SCHEDULE, SHOW_REGNS, SURVANAL, WREGION, get_survey
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Written 8-Jan-1997 Dale E. Gary
[Previous]
[Next]
NAME:
CNV_XY2H
PURPOSE:
Convert (x,y) offsets from sun center, in arcsec, to heliographic
coordinates (degrees, +W, +N).
CATEGORY:
CALLING SEQUENCE:
cnv_xy2h,p,b,r,lat,lng,x,y
INPUTS:
p Position angle (degrees) of the northern extremity of
the solar axis of rotation, measured eastward from the
north point of the disk.
b B angle (degrees) positive for solar north pole pointing
toward the Earth.
r Apparent solar disk radius (arcsec)
x the W offset(s) of the point(s) in arcsec from sun
center (<0 => E). This may be an array of same dimension
as Y.
y the N offset(s) of the point(s) in arcsec from sun
center (<0 => S). This may be an array of same dimension
as X.
OPTIONAL (KEYWORD) INPUT PARAMETERS:
ROUTINES CALLED:
OUTPUTS:
lng the solar longitude(s) of the point(s) to be converted,
in degrees, as +W. Output dimension is same as X, Y
lat the solar latitude(s) of the point(s) to be converted,
in degrees, as +N. Output dimension is same as X, Y
COMMENTS:
CALLED BY:
ARLOCPLOT, SCHEDULE, SOL2TXT, get_ovsa_log
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Written 09-Mar-1997 Dale E. Gary
[Previous]
[Next]
NAME:
Color_Palette
PURPOSE:
To display the numerical values associated
with a color table
CATEGORY:
Image Processing
KEYWORD:
DELETE: If set, the palette window is closed and the
procedure exited.
CALLED BY:
CT_Handling
COMMON BLOCKS:
PaletteWindow, for keeping the number of the opened
window.
SIDE EFFECTS:
A new window is opened
RESTRICTIONS:
Works only on color stations
MODIFICATION:
A.Csillaghy, April 1991
[Previous]
[Next]
NAME:
Columns_Read
PURPOSE:
Read vectors from a file with a (given) number of
columns and a given number of lines.
Although the vectors can have every meaning, their names
are in the procedure: x, y, qualifiers and errors.
Column numbers, lines, etc can be specified with keywords.
If not, they are asked in the terminal window.
CATEGORY:
Input/Output
CALLING SEQUENCE:
Columns_Read, file [, x ], y [,qualifier, dx, dy ]
INPUT:
file: the complete name of the file to be read
OUTPUT:
x,y: the values to be plotted
qualifier: the values corresponding to a plotting symbol
for Wave. If > 100, they are user symbols.
The values in the file are not the same,
their meaning is described in the users manual.
dx, dy: vectors for the construction of error bars.
They are 1D if the error bars are symmetrical,
2D otherwise.
KEYWORDS:
NCOLS, NLINES: number of columns and lines in the file.
XNR, YNR, QNR, DXLEFTNR, DXRIGHTNR,
DYUPNR, DYDOWNNR: the number of the concerned
column. The first have the number 1.
/INTERACTIVE: If present, the columns number etc.
will be asked ion the terminal window.
Otherwise, they are taken from the above
defined keywords.
/HEADER: If present, it signals the presence of a header
that will be jumped. The number of lines
to be jumped are assigned to the keyword.
STATUS: "Done" or "Not Done"
LINESTYLE: acoording to !p.lineStyle
USERSYM: see list of symbols available.
CALLS: ***
QUALIFTRANSFORM, Read_Test, SCANLINE
CALLED BY:
Onedimensional files handling
SIDE EFFECTS:
Open files, in interactive mode use the terminal
window.
MODIFICATION HISTORY:
Created by A.Csillaghy in June 1991. ETHZ
LINESTYLE and USERSYM added in May 1993, A.Cs
Minor modifs in March 95, ACs
[Previous]
[Next]
NAME:
COMP_CIRCLE
PURPOSE:
This procedure compute the polar parameters to plot a circle
CATEGORY:
NRH General
CALLING SEQUENCE:
COMP_CIRCLE, radius, angle, rayon
INPUTS:
Parm1: Describe the positional input parameters here. Note again
that positional parameters are shown with Initial Caps.
OPTIONAL INPUTS:
RADIUS circle radius, =1. if parameter = 0
KEYWORD PARAMETERS:
RESOL Number of the angle points computation, = 101 if
no present
OUTPUTS:
ANGLE Array of angle values (Size= Resol)
RAYON Circle radius (size=Resol)
COMMON BLOCKS:
Non
MODIFICATION HISTORY: (bonmartin@obspm.fr)
Ecrit par:Ludwig Klein, J Bonmartin le 11/12/98
[Previous]
[Next]
NAME:
COMP_DATE
PURPOSE:
Cette fonction compare 2 chaines de caracteres contenant des dates.
Si la date 1 est posterieure a la date 2 elle retourne 1, sinon elle
retourne -1
Elle retourne 0 en cas d'erreur de format de date
CATEGORY:
Calculs
CALLING SEQUENCE:
Resultat = COMP_DATE( Date1, Date2)
INPUTS:
DATE1 Date sous forme 'AAAA/MM/JJ' ou 'JJ/MM/AA'
DATE2 Date sous forme 'AAAA/MM/JJ'.ou 'JJ/MM/AA'
KEYWORD PARAMETERS:
OUTPUTS:
CALLS: ***
BIN_DATE, FORM_DATE, FXHMODIFY [1], FXHMODIFY [2], FXPAR [1], FXPAR [2]
HEADFITS [1], HEADFITS [2], HEADFITS [3], STR_SEP, UPD_NRH2DFITS
CALLED BY:
UPD_NRH2DFITS
EXAMPLE:
RES = COMP_DATE (Date, '21/04/98')
Res = -1 si date anterieure au 21 Avril 1998
MODIFICATION HISTORY:
Ecrit par: J Bonmartin le 07/04/98 (bonmartin@obspm.fr)
Traitement de l'annee sur 4 chiffres le 09/06/98 (J B)
[Previous]
[Next]
NAME:
COMPARE_CAL
PURPOSE:
Compares the Total Power (plotted with histogram) and baseline
amplitude-derived (plotted with symbols) calibration factors,
using the data contained in the REFCAL structure.
CATEGORY:
OVRO APC DATA CALIBRATION
CALLING SEQUENCE:
compare_cal,refcal[,/printer]
INPUTS:
refcal An instance of a REFCAL structure, as returned by NEWSCAN.
OPTIONAL (KEYWORD) INPUT PARAMETERS:
printer A switch that, if set, causes the output to be sent to
the default printer. Otherwise, three plot windows
are used.
ROUTINES CALLED:
OUTPUTS:
COMMENTS:
SIDE EFFECTS:
Three plots are created.
RESTRICTIONS:
MODIFICATION HISTORY:
Written 30-Dec-2000 by Dale E. Gary
[Previous]
[Next]
NAME:
COMPARE_CAL2
PURPOSE:
Compares the Total Power (plotted with histogram) and baseline
amplitude-derived (plotted with symbols) calibration factors,
using the data contained in the AMPCAL, TPCAL, and TPUPD structures.
Differs from COMPARE_CAL by comparing the feed-based factors
instead of baseline-based factors
CATEGORY:
OVRO APC DATA CALIBRATION
CALLING SEQUENCE:
compare_cal2,ampcal,tpcal,tpupd[,/printer]
INPUTS:
ampcal An instance of an AMPCAL structure, as returned by
get_ampcal_struct.
tpcal An instance of a TPCAL structure, as returned by
get_tpcal_struct.
tpupd An instance of a TPUPD structure, as returned by
get_tpupd_struct.
OPTIONAL (KEYWORD) INPUT PARAMETERS:
printer A switch that, if set, causes the output to be sent to
the default printer. Otherwise, three plot windows
are used.
ROUTINES CALLED:
OUTPUTS:
COMMENTS:
SIDE EFFECTS:
Three plots are created.
RESTRICTIONS:
MODIFICATION HISTORY:
Written 31-Dec-2000 by Dale E. Gary
[Previous]
[Next]
NAME:
Compute VMS Floats
CALLS: ***
VMSFLOAT
PROCEDURE:
The array of byte given as parameter is transformed in
array of reals, with dimensions nx,ny (if present).
CALLING SEQUENCE:
result = VMSFloat( array )
INPUT:
array: an array of bytes (one dimensional) The number of
bytes must be a multiple of four.
RESULT OF FUNCTION:
The array of reals resulting from the conversion of the
array of bytes.
[Previous]
[Next]
NAME:
CONCAT_OVSA_FILE
PURPOSE:
Concatenates (joins) two separate OVSA data (.ARC) files. This
is useful when a single day's data was split into two files
during observations.
CATEGORY:
OVSA APC FILE
CALLING SEQUENCE:
concat_ovsa_file[,file1][,file2][,outfile]
INPUTS:
file1 the name (with path) of the first file to concatenate.
If omitted, user is asked to choose a filename.
file2 the name (with path) of the second file to concatenate.
If omitted, user is asked to choose a filename.
outfile the name (with path) of the output file. If OUTFILE is the
same as FILE1, then the concatenation is done "in place."
If omitted, user is asked to choose a filename.
OPTIONAL (KEYWORD) INPUT PARAMETERS:
ROUTINES CALLED:
ovsa_make_index
OUTPUTS:
COMMENTS:
CALLS: ***
OKTOWRITE, OPENARC, OVSA_MAKE_INDEX, PROGMETER
SIDE EFFECTS:
A new file is created, or if OUTFILE is the same as FILE1 then FILE1 is modified.
RESTRICTIONS:
MODIFICATION HISTORY:
Written 08-Jun-2000 by Dale E. Gary
23-Jul-2003 DG
Changed name of MAKE_INDEX to OVSA_MAKE_INDEX to avoid conflict with
LASCO routine of the same name.
[Previous]
[Next]
NAME:
Congrid1d
PURPOSE:
Shrink or expand the size of an image, with the
nearest method
CALLING SEQUENCE:
Result = CONGRID1D(Image, Xs, Ys [, Interp = Interp])
INPUTS:
Image = array to resample, 1d or 2d.
Xs = desired number of columns for result.
Ys = number of rows for result.
OUTPUTS:
Result = Image of same type as input, of size (Xs, Ys).
CALLS: ***
CONGRID [1], CONGRID [2], CONGRID [3]
CALLED BY:
CT_Handling, Cont_Surf, Modify Image Pixels, RAG Exponentiation, RAG Log
phoenix_spg_get, rapp_get_spectrogram
SIDE EFFECTS:
None.
PROCEDURE:
Nearest neighbour method is used.
Simple call POLY_2D with the warping coefficients.
MODIFICATION HISTORY:
Original version: "Congrid", DMS, Sept. 1988.
Congrid1d: for 1d arrays also, A.Csillaghy, Jan.91, ETHZ
[Previous]
[Next]
PURPOSE:
Computes the mean background out ouf a defined
set of neighbouring profiles and subtracts it.
CALLING SEQUENCE:
result = ConstBackSub( image, min, max [, direction ] )
INPUTS:
image: 2D array
min, max: pixel number of beginning and end of the
background region, respectively
direction: 'X' or 'Y'
KEYWORDS:
BACKGROUND: to get the background array subtracted
AUTOMATIC: the background array to subtract is
searched automatically by taking some vectors
in the image with lowest mean and lowest
variance as background vectors. If a number is
passed it is taken as percet of channels to
consider else the default is 5 %.
BKGARR: the background field computed by the AUTOMATIC proc.
CALLS: ***
AVG [1], AVG [2], CHECKVAR [1], SIG_ARRAY, checkvar [2]
CALLED BY:
ETHZ_Background, Modify Image Pixels, RAG Exponentiation, RAG Log
constbacksub_v21, phoenix_spg_autoimprove, spectrogram__define
PROCEDURE:
Between min and max, the values are averaged in
X or Y, and the resulting vector is subtracted from the
original image.
SIDE EFFECT:
The image is returned as FLOAT type.
MODIFICATION HISTORY:
2004-2-24: some adaptations while integrating in the objects
# - stuff
sig_array stuff
csillag@fh-aargau.ch
1998-6-1: Performance optimization, June 98, P.Messmer
1993-7-1: AUTOMATIC in july 93, A.Cs
1994-1: BKGARR in Jan 94, A.Cs.
1991: Created in August 1991 by A.Csillaghy,
Inst. of Astronomy, ETH Zurich
[Previous]
[Next]
PURPOSE:
Computes the mean background out ouf a defined
set of neighbouring profiles and subtracts it.
CALLING SEQUENCE:
result = ConstBackSub( image, min, max [, direction ] )
INPUTS:
image: 2D array
min, max: pixel number of beginning and end of the
background region, respectively
direction: 'X' or 'Y'
KEYWORDS:
BACKGROUND: to get the background array subtracted
AUTOMATIC: the background array to subtract is
searched automatically by taking some vectors
in the image with lowest mean and lowest
variance as background vectors. If a number is
passed it is taken as percet of channels to
consider else the default is 5 %.
BKGARR: the background field computed by the AUTOMATIC proc.
CALLS: ***
AVG [1], AVG [2], CHECKVAR [1], SIG_ARRAY, checkvar [2]
CALLED BY:
ETHZ_Background, Modify Image Pixels, RAG Exponentiation, RAG Log
constbacksub_v21, phoenix_spg_autoimprove, spectrogram__define
PROCEDURE:
Between min and max, the values are averaged in
X or Y, and the resulting vector is subtracted from the
original image.
SIDE EFFECT:
The image is returned as FLOAT type.
MODIFICATION HISTORY:
Created in August 1991 by A.Csillaghy,
Inst. of Astronomy, ETH Zurich
AUTOMATIC in july 93, A.Cs
BKGARR in Jan 94, A.Cs.
Performance optimization, June 98, P.Messmer
[Previous]
[Next]
Wrapper around constbacksub.pro, for compability with old routines...
PSH, 2003/10/23
CALLS:
CALLED BY
rapp_get_spectrogram
[Previous]
[Next]
PROGECT:
Phoenix 2 solar radio spectrometer
NAME:
Cont_Surf
PURPOSE:
User interface to use the three-dimensional standard functions
"Contour" and "Surface". It is possible to change
contour parameters: annotation, character sizes,
colors used to represent the levels, labels of the levels,
line styles and thickness, maximum value and number of
levels drawn. An option for smoothing is given and
surface or contour plots can be printed and written in
PostScript files.
CATEGORY:
ETHZ Radio (/ssw/radio)
CALLING SEQUENCE:
Cont_Surf, image [, xAxis, yAxis]
INPUTS:
image: The two-dimensionnal array to be contoured
or surfaced. If "image" contains more than
200 elements in one direction, it is
compressed to that number of elements,
using bilinear interpolation. "image"
can be of any type.
xAxis, yAxis: These two 1D array ( of any type)
have dimensions corresponding those of the array
; "image" and contain its axis values.
KEYWORDS:
FILENAME: The name of the PostScript file.
If not present, the file will have
the same name as the title of the
(surface or contour) plot.
LANDSCAPE: If present, the PostScript file is written in
landscape mode, otherwise in portrait mode.
CALLS: ***
CHANGE_PARS, CONGRID [1], CONGRID [2], CONGRID [3], Congrid1d, GETIMAGESIZES
GETMISCPS, Read_Test, SET_XY, TEST_AXIS, XCHOICE, error
CALLED BY:
Display 2D Image
SIDE EFFECTS:
As all user interfaces, it opens windows on
X-windows terminals. Files can be produced, which will be written
in the current directory.
RESTRICTIONS:
Tested only on Unix.
MODIFICATION HISTORY
Created: A.Csillaghy May 91
Institute of Astronomy, ETH Zurich
IDL 5.1 version in October 1998, csillag@ssl.berkeley.edu
Replaced the Printing interface
Replaced
[Previous]
[Next]
Converts the 43-freq RLI calibration file into 5 files
with frequencies corresponding to the 10-freq I scans,
for use as a calibration for the I scan data.
Written 22-Jul-2000 by Dale E. Gary
CALLS:
[Previous]
[Next]
PURPOSE:
Computes the crosscorrelation of an image or a vector.
CALLING SEQUENCE:
result = Correl1D( image )
INPUT:
image: a 2D array (or 1D array), real
RESULT:
the corrcorrelated image
KEYWORD:
CALLS: ***
AVG [1], AVG [2]
CALLED BY:
Determine Drift Rate, Modify Image Pixels, RAG Exponentiation, RAG Log
PROCEDURE:
RESTRICTION:
MODIFICATION HISTORY:
Created in
Inst. of Astronomy, ETH Zurich
[Previous]
[Next]
NAME:
CP_FLUXPOS_NRH2
PURPOSE:
Cette fonction calcule le flux d'une position a un temps donne
CATEGORY:
RH_2D, recherche de positions
CALLING SEQUENCE:
flux = CP_FLUXPOS_NRH2(Str_gaus, Rayon, Freq, Npx, Npy)
INPUTS:
Str_gaus: struture decrivant le volume gaussien
Rayon: rayon solaire
Freq: frequence
Npx, Npy: nombres de pixels en x et y
OUTPUTS:
flux valeur du flux pour le volume gaussien Str_gaus
CALLS: ***
CALC_VOLGAUSS
CALLED BY:
CW_SCANSOURCE, POSTOFITS
EXAMPLE:
Please provide a simple example here
MODIFICATION HISTORY:
Ecrit par: C. Renie Sept. 1998
[Previous]
[Next]
NAME:
CPT_FLUX_NRH2
PURPOSE:
Cette procedure calcule le flux correspondant a des images
2D du NRH
CATEGORY:
Calculs NRH
CALLING SEQUENCE:
CPT_FLUX_NRH2,file, Str_inf2d, Str_lim, Flux, Time
INPUTS:
File Nom du fichier
Str_inf2d structure d'information de fichier
Str_lim structure contenant les limites de traitement (voir RH_2D)
KEYWORD PARAMETERS:
STOKES calcul sur STOKESV si = 1, sur STOKESI si =0
OUTPUTS:
FLUX Tableau de flux
TIME Tableau des temps
CALLED BY:
FLUX_NRH2
PROCEDURE:
Le calcul s'effectue sur une region et d'une heure
de debut et de fin determinees.
Par defaut les operations sont effectuees sur l'ensemble de l'image
et du debut a la fin du fichier
Les operations sont effectuees image par image donc le volume du
fichier ne constitue pas une limitation
CALLS: ***
HMS, RD_NRH2I
EXAMPLE:
Please provide a simple example here
MODIFICATION HISTORY:
Ecrit par: J Bonmartin le 12/01/98 (bonmartin@obspm.fr)
Commence a l'indice I=0 le 04/07/01 (JB)
[Previous]
[Next]
NAME:
CRE_LABELNRH
PURPOSE:
Cette fonction cree une chaine servant pour la visualisation des
donnees du NRH. Le contenu de la chaine retournee depend des
indications fournies dans STR_LABEL
CATEGORY:
Visualisation NRH
CALLING SEQUENCE:
Label = CRE_LABELNRH( Image, Str_im, str_label)
INPUTS:
IMAGE Donnees correspondant a la lecture d'images FITS de NRH2
STR_IM Structure contenant Date, frequence, Heure, Instrument,
Parametre, par exemple STR_IM
STR_LABEL stucture contenant les indications pour constituer le
label voir CW_LABELNRH.PRO.
Cette structure contient les champs
FREE, DATE, HEURE, FREQ
Si les champs date, heure, freq, sont a 1 les valeurs
correspondantes sont introduites dans LABEL. Le champ
FREE permet d'entrer un texte
KEYWORD PARAMETERS:
OUTPUTS:
LABEL chaine de caracteres
CALLED BY:
LABELNRH, NRH_IMAGE
RESTRICTIONS:
Cette fonction ne peut etre appelee qu'apres CW_LABELNRH qui cree
la structutre STR_LABEL, ou apres avoir cree cette stucture
PROCEDURE:
EXAMPLE:
Image = MRDFITS('File',1, Header,RANGE={10,10])
STR_LABEL = CW_LABELNRH()
LABEL = CRE_LABELNRH(Image, Header, Str_label)
La chaine LABEL contientles indications choisies dans
Cw_labelnrh
MODIFICATION HISTORY:
Ecrit par: J Bonmartin le 04/03/98 (bonmartin@obspm.fr)
[Previous]
[Next]
NAME:
CREATE_INDEX
PURPOSE:
Creates an INDEX segment at the end of a data file (or optionally
updates an existing one "in place")..
CATEGORY:
OVRO APC DATA ANALYSIS
CALLING SEQUENCE:
rec = create_index(a,nrec[,/update | ,outvar=outvar])
INPUTS:
a A file associated variable as returned from OPENARC.
nrec The number of records in the file, as returned from OPENARC
OPTIONAL (KEYWORD) INPUT PARAMETERS:
update Switch to invoke updating of an existing INDEX segment. If
set, and an INDEX segment already exists, the INDEX segment
will be overwritten in place. If an INDEX segment does not
already exist, a new INDEX segment is written at the end of
the file, as usual. If unset, and an INDEX segment already
exists, nothing is written and the routine returns the
start record of the existing INDEX segment.
outfile Name string for a new output file to which to write the INDEX
record, rather than writing to the current file. This
keyword is not compatible with the UPDATE keyword.
ROUTINES CALLED:
get_segments, findsegentries, decode, tl_decode, progmeter, is_rd_only
OUTPUTS:
rec The record number of the first record in the INDEX segment,
or -1 if none could be created.
COMMENTS:
CALLS: ***
DECODE, FINDSEG, FINDSEGENTRIES, FIND_INDEX, GET_SEGMENTS, IS_RD_ONLY, PROGMETER
TL_DECODE, TL_ENCODE
CALLED BY:
OVSA_GET_INDEX, OVSA_MAKE_INDEX, PUT_INDEX
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Written 27-Nov-1999 by Dale E. Gary
01-Dec-1999 DG
Changed to write the template into each record of the segment.
29-Dec-1999 DG
Added UPDATE keyword to allow updating an existing INDEX segment.
23-Mar-2000 DG
Fixed some bugs (rec = -2 if no index record, and LUN freed when non-existent)
07-Jun-2000 DG
Changed to use IS_RD_ONLY() function.
03-Mar-2001 DG
Added OUTVAR keyword, which points to an output file to write the
INDEX to.
[Previous]
[Next]
NAME:
CREATE_NRH_CFILE
PURPOSE:
Cette procedure cree un fichier de type CFILE de NRH
CATEGORY:
NRH flux
CALLING SEQUENCE:
CREATE_NRH_FILE, FILE, HEADER, TYPE
INPUTS:
FILE nom du fichier a ouvrir
HEADER Headre primaire du fichier ayant servi a calcukler le flux
TYPE Type des donnees contenues dans le fichier, Chaine de
caracteres mis dans le KEYWORD NRH_DATA
CALLED BY:
FLUX_NRH2
PROCEDURE:
Cete procedure cree un fichier de resultats de calculs du NRH
s'il n'existe pas et ecrit le header primaire correspondant a partir du
header du fichier ayant servi au calcul
Si le fichier existe, elle est inoperante. Les donnees sont ecrites
dans les extensions suivantes
CALLS: ***
FORM_DATE, STR_SEP, SXADDPAR [1], SXADDPAR [2], SXADDPAR [3], WRITEFITS [1]
WRITEFITS [2]
EXAMPLE:
Please provide a simple example here
MODIFICATION HISTORY:
Ecrit par:J Bonmartin (obspm.fr) le 15/09/98
[Previous]
[Next]
NAME:
CREATE_NRH_PFILE
PURPOSE:
Cette procedure cree un fichier vide de type PFILE (positons) de NRH
CATEGORY:
RH_2D, Recherche de position
CALLING SEQUENCE:
CREATE_NRH_PFILE, File, Fimg
INPUTS:
File: nom du fichier de positions a creer
Fimg: nom du fichier d'images correspondant
CALLS: ***
FORM_DATE, HEADFITS [1], HEADFITS [2], HEADFITS [3], STR_SEP, SXADDPAR [1]
SXADDPAR [2], SXADDPAR [3], WRITEFITS [1], WRITEFITS [2]
CALLED BY:
MKFILEPOS, POSTOFITS, WRITE_POSINRH
EXAMPLE:
Please provide a simple example here
MODIFICATION HISTORY:
Ecrit par: C. Renié 2/10/1998
[Previous]
[Next]
NAME:
CT_Handling
PURPOSE:
User Interface to work with color tables. One can load
a system-defined color table, modify it, save it etc.
CATEGORY
Image Processing
CALLING SEQUENCE:
CT_Handling
CALLS: ***
Color_Palette, Congrid1d, HIST_EQUAL_CT, HIST_EQUAL_INT, RAG_ADJCT, STEPS
XLOADCT [1], XLOADCT [2], XLOADCT [3], XPALETTE
CALLED BY:
Display 2D Image
SIDE EFFECTS:
Windows and menus are opened. When a color table
is saved, a new file with extention ".ctb" is created.
The name is asked to the user.
If it is already present, the old one is deleted.
RESTRICTION:
Works only on X-windows systems.
MODIFICATION HISTORY:
Created: 4/91, A.Csillaghy, Institute for Astronomy
ETH Zurich
Histogram Equalization added in October 92, A. Cs
IDL5/ssw/RagView version (IsIdl function eliminated) 3/98 ACs
[Previous]
[Next]
NAME:
CTRCALCHEK
PURPOSE:
Reduce CTRCAL observations (which determine the increment on/off
the Sun for the 27 m antennas).
CATEGORY:
OVRO APC DATA CALIBRATION
CALLING SEQUENCE:
ctrcalchek,filename,hrec,[,outfile=outfile][,after=after][,auto=auto]
INPUTS:
filename the name of the file containing the data.
hrec the record number of the scan header. Data
will be processed up to the next EOS segment.
If this argument is given, then AFTER keyword
is ignored.
OPTIONAL (KEYWORD) INPUT PARAMETERS:
outfile an optional string giving the name of the output SAVE file. If
omitted, the data are placed in file !DEFAULTS.WORKDIR+GENERIC.SAV
after an optional time string of the standard form
[yyyy.ddd ]hh:mm[:ss] after which to start
looking for a valid scan.
auto an optional keyword that, if set, forces a secondary calibration
that matches the RSTN fluxes for the given date.
ROUTINES CALLED:
openarc, newscan, get_cycle, flagool, gaincor, write_tpseg, update_tprecs, wtpcal
OUTPUTS:
COMMENTS:
CALLS: ***
FINDTODAYSFILE, FLAGOOL, GAINCOR, GET_CYCLE, MOMENT, NEWSCAN, OPENARC, OVSA_GET_INDEX
PROGMETER, UNIQ [1], UNIQ [2], UNIQ [3], UPDATE_TPRECS, WRITE_TPSEG, WTPCAL
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Written 19-Sep-1999 by Dale Gary
12-Nov-1999 DG
Finished the routine to some sort of workable state. Needs more work
to integrate into final "product."
07-Dec-1999 DG
Nearly finished, now useable for changing TPUPDATE but does not yet
update the primary calibration.
11-Jan-2000 DG
Eliminate hardwired directory location
04-Feb-2000 DG
Significant modification to TPUPDATE and .REC writing section, to reflect
more logical handling.
05-Feb-2000 DG
Removed now unnecessary sin and cos lookup tables in GAINCOR call.
14-Apr-2000 DG
Get rid of C:\TEMP references (use !Defaults.workdir)
24-May-2000 DG
Make routine work for 6-element mode.
16-Jan-2002 DG
Added AUTO keyword to allow for automatic setting of secondary calibration
to match the RSTN fluxes for the given date.
08-Feb-2002 DG
Several changes to fix crashes:
Added a check on first GET_CYCLE call to ensure that some data are
returned. Also added check for sufficient data--aborts with an error
message if not. Also require any frequency/pol to have at least 2
good data points (MOMENT fails otherwise).
16-May-2002 GN
Added code to catch and manipulate the errors.
The new keyword error can be used to find if CTRCALCHEK has returned with an error.
READ_RSTN_FLUX has been also modified to return an error occured in "auto" mode.
A test of presumbly good calibration factors has been introduced. If the median of afac
is less than 0.5 ore greater than 2, CTRCALCHEK does not update the file and an error is returned.
[Previous]
[Next]
NAME:
CTRL_NRHFILE
PURPOSE:
Cette fonction identifie le contenu d'un fichier: type de donnees,
reseau etc....
CATEGORY:
Fichiers NRH
CALLING SEQUENCE:
I = CTRL_NRHFILE ( FILE)
INPUTS:
FILE nom du fichier
KEYWORD PARAMETERS:
CONTENT verification du type de donnees (Images, Harmoniques,
Flux, Centres Actifs, etc...). Voir CW_NRHFILE pour
la liste des codes
ARRAY Reseau (non traite pour l'instant)
OUTPUTS:
Retour: 1 si le fichier correspond au code, sinon 0
PROCEDURE:
You can describe the foobar superfloatation method being used here.
You might not need this section for your routine.
CALLS: ***
STR_SEP
EXAMPLE:
IF CTRL_NRHFILE( File, CONTENT = 'f') THEN $
Print,'c'est un fichier de FLUX'
MODIFICATION HISTORY:
Ecrit par: J BONMARTIN le 13/02/98 (bonmartin@obspm.fr)
Le 18/01/01 ne pas tester CONTENT si nom non standard NRH (JB)
[Previous]
[Next]
NAME:
CURVEFIT
PURPOSE:
Non-linear least squares fit to a function of an arbitrary
number of parameters. The function may be any non-linear
function. If available, partial derivatives can be calculated by
the user function, else this routine will estimate partial derivatives
with a forward difference approximation.
CATEGORY:
E2 - Curve and Surface Fitting.
CALLING SEQUENCE:
Result = CURVEFIT(X, Y, Weights, A, SIGMA, FUNCTION_NAME = name, $
ITMAX=ITMAX, ITER=ITER, TOL=TOL, /NODERIVATIVE)
INPUTS:
X: A row vector of independent variables. This routine does
not manipulate or use values in X, it simply passes X
to the user-written function.
Y: A row vector containing the dependent variable.
Weights: A row vector of weights, the same length as Y.
For no weighting,
Weights(i) = 1.0.
For instrumental (Gaussian) weighting,
Weights(i)=1.0/sigma(i)^2
For statistical (Poisson) weighting,
Weights(i) = 1.0/y(i), etc.
A: A vector, with as many elements as the number of terms, that
contains the initial estimate for each parameter. IF A is double-
precision, calculations are performed in double precision,
otherwise they are performed in single precision. Fitted parameters
are returned in A.
KEYWORDS:
FUNCTION_NAME: The name of the function (actually, a procedure) to
fit. IF omitted, "FUNCT" is used. The procedure must be written as
described under RESTRICTIONS, below.
ITMAX: Maximum number of iterations. Default = 20.
ITER: The actual number of iterations which were performed
TOL: The convergence tolerance. The routine returns when the
relative decrease in chi-squared is less than TOL in an
interation. Default = 1.e-3.
CHI2: The value of chi-squared on exit (obselete)
CHISQ: The value of reduced chi-squared on exit
NODERIVATIVE: IF this keyword is set THEN the user procedure will not
be requested to provide partial derivatives. The partial
derivatives will be estimated in CURVEFIT using forward
differences. IF analytical derivatives are available they
should always be used.
OUTPUTS:
Returns a vector of calculated values.
A: A vector of parameters containing fit.
OPTIONAL OUTPUT PARAMETERS:
Sigma: A vector of standard deviations for the parameters in A.
CALLS: ***
NORP_CURVEFIT
CALLED BY:
AN_NIMCP, CDS_GAUSS, CDS_GFUNCT, CDS_LINEFIT_WRAP, DECOMPOSE_BATSE_DRM, DLAFIT
DSPEXP, FGAUSSINT_FUNCT, FUNCT, GAUSSFIT [1], GAUSSFIT [2], GAUSSFIT [4]
GAUSSFIT [5], GAUSSFIT2, GAUSSFIT_2, GAUSSINTFIT, LIMFIT, OVSA_PKFIT, PB_INVERTER
PNTFIT, STOKESFIT, VOIGTFIT [1], VOIGTFIT [2], WC2P, XPLOT_HT, find_axes, fit_1hxascan
hrts_w [1], hrts_w [2], hsi_pixon_calc_bgrnd, pointing, threeg_afit, twog_afit
COMMON BLOCKS:
NONE.
SIDE EFFECTS:
None.
RESTRICTIONS:
The function to be fit must be defined and called FUNCT,
unless the FUNCTION_NAME keyword is supplied. This function,
(actually written as a procedure) must accept values of
X (the independent variable), and A (the fitted function's
parameter values), and return F (the function's value at
X), and PDER (a 2D array of partial derivatives).
For an example, see FUNCT in the IDL User's Libaray.
A call to FUNCT is entered as:
FUNCT, X, A, F, PDER
where:
X = Variable passed into CURVEFIT. It is the job of the user-written
function to interpret this variable.
A = Vector of NTERMS function parameters, input.
F = Vector of NPOINT values of function, y(i) = funct(x), output.
PDER = Array, (NPOINT, NTERMS), of partial derivatives of funct.
PDER(I,J) = DErivative of function at ith point with
respect to jth parameter. Optional output parameter.
PDER should not be calculated IF the parameter is not
supplied in call. IF the /NODERIVATIVE keyword is set in the
call to CURVEFIT THEN the user routine will never need to
calculate PDER.
PROCEDURE:
Copied from "CURFIT", least squares fit to a non-linear
function, pages 237-239, Bevington, Data Reduction and Error
Analysis for the Physical Sciences. This is adapted from:
Marquardt, "An Algorithm for Least-Squares Estimation of Nonlinear
Parameters", J. Soc. Ind. Appl. Math., Vol 11, no. 2, pp. 431-441,
June, 1963.
"This method is the Gradient-expansion algorithm which
combines the best features of the gradient search with
the method of linearizing the fitting function."
Iterations are performed until the chi square changes by
only TOL or until ITMAX iterations have been performed.
The initial guess of the parameter values should be
as close to the actual values as possible or the solution
may not converge.
EXAMPLE: Fit a function of the form f(x) = a * exp(b*x) + c to
sample pairs contained in x and y.
In this example, a=a(0), b=a(1) and c=a(2).
The partials are easily computed symbolicaly:
df/da = exp(b*x), df/db = a * x * exp(b*x), and df/dc = 1.0
Here is the user-written procedure to return F(x) and
the partials, given x:
pro gfunct, x, a, f, pder ; Function + partials
bx = exp(a(1) * x)
f= a(0) * bx + a(2) ;Evaluate the function
IF N_PARAMS() ge 4 THEN $ ;Return partials?
pder= [[bx], [a(0) * x * bx], [replicate(1.0, N_ELEMENTS(f))]]
end
x=findgen(10) ;Define indep & dep variables.
y=[12.0, 11.0,10.2,9.4,8.7,8.1,7.5,6.9,6.5,6.1]
Weights=1.0/y ;Weights
a=[10.0,-0.1,2.0] ;Initial guess
yfit=curvefit(x,y,Weights,a,sigma,function_name='gfunct')
print, 'Function parameters: ', a
print, yfit
end
MODIFICATION HISTORY:
Written, DMS, RSI, September, 1982.
Does not iterate IF the first guess is good. DMS, Oct, 1990.
Added CALL_PROCEDURE to make the function's name a parameter.
(Nov 1990)
12/14/92 - modified to reflect the changes in the 1991
edition of Bevington (eq. II-27) (jiy-suggested by CreaSo)
Mark Rivers, U of Chicago, Feb. 12, 1995
- Added following keywords: ITMAX, ITER, TOL, CHI2, NODERIVATIVE
These make the routine much more generally useful.
- Removed Oct. 1990 modification so the routine does one iteration
even IF first guess is good. Required to get meaningful output
for errors.
- Added forward difference derivative calculations required for
NODERIVATIVE keyword.
- Fixed a bug: PDER was passed to user's procedure on first call,
but was not defined. Thus, user's procedure might not calculate
it, but the result was THEN used.
Steve Penton, RSI, June 1996.
- Changed SIGMAA to SIGMA to be consistant with other fitting
routines.
- Changed CHI2 to CHISQ to be consistant with other fitting
routines.
- Changed W to Weights to be consistant with other fitting
routines.
_ Updated docs regarding weighing.
[Previous]
[Next]
NAME:
Custom_2D
PURPOSE:
User Interface to change values of x- and y-axes,
the system variables containing the titles, and the
print format for postscript files.
CATEGORY
User Interface
CALLING SEQUENCE:
Custom_2D
CALLED BY:
Radio Astronomy Group View RAG View [1]
Radio Astronomy Group View RAG View [2]
SIDE EFFECTS:
On X-windows terminals, new windows will be opened.
On other terminals, the display is erased.
RESTRICTION:
Cannot be used without enrad.
MODIFICATION HISTORY:
Created: May 1991, A.Csillaghy
Institute of Astronomy, ETH Zurich
Modified in October 1991, A.Cs
Modifications in Dec. 92 for sixel printing, A.Cs
No minmax, Software fonts in Nov 93, A.Cs
[Previous]
[Next]
NAME:
Customize_1D
PURPOSE:
To change interactively with the help of menus
some system variable values, the shift
between plots for mdisp, allows to write text
on the display and redefine the default values for
postscript plots.
CATEGORY:
User interface
CALLING SEQUENCE:
Customize_1D
SIDE EFFECT
Uses menus and, on vt300 terminals, erases the display.
RESTRICTION:
Use only in interactive mode.
CALLS: ***
CHANGEATTR, DATA_DISPLAY, GETPSSIZES, General_Menu [1], General_Menu [2]
INSERTPLOT, LOADPLOT, No_Data, OVERALLDISPLAY, OVERPLOT_TEXTS, PSSPECIF
PS_Create_1D, PUTPSSIZES, PrintInterface, Read_Test, SINGLEPLOTS, error
CALLED BY:
MDisp
MODIFICATION HISTORY:
Created in June 1991 by A.Csillaghy, ETHZ
Modif. for sixel printing, Dec. 92, A.Cs
[Previous]
[Next]
NAME:
CVDOY
PURPOSE:
Given the 4-digit year and the day of year, return a 3-element vector
representation of the date, as [year, month, day], all numeric.
CATEGORY:
OVRO SPAN UTILITY
CALLING SEQUENCE:
date = cvdoy(year,doy[,/jul])
INPUTS:
year the 4-digit year, e.g. 1997
doy the day of year as an integer 1-366.
OPTIONAL (KEYWORD) INPUT PARAMETERS:
jul a switch that, if set, causes the DATE to be returned as
the Modified Julian Day number (JD-2400000.5).
ROUTINES CALLED:
OUTPUTS:
date if /JUL switch is NOT set, DATE is a 3-element vector
representation of the date corresponding to the inputs,
e.g. [1997,05,17] (meaning 17 May 1997), would be returned
for the call cvdoy(1997,137). If /JUL switch IS set,
DATE is the Modified Julian Day number for that date
COMMENTS:
CALLS: ***
JULDAY
CALLED BY:
ARLOCPLOT, DAILY, DECODE, DELAY, DUMPREC, FILENAME2DATE, GETGNP, GETGPSaVG [1]
GETGPSaVG [2], GETOFF, GETPARMS, GETSATaVG, NEWSCAN, PLOT_GCPARM, READ_FCHIST
SCHEDULE, SHOW_REGNS, SOLAID, SRSP_TL_DECODE, TL_DECODE, WACAL, WANALYZE, WPOINT
WRITE_FCHIST, WRITE_FCPARM, WRITE_GCPARM [1], WRITE_OFF
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Written 09-Mar-1997 by Dale Gary
27-Oct-1999 DG
Fixed long-standing bug that gave wrong date for
last day of the month.
11-Dec-1999 DG
Changed to print error, but not traceback, if DOY = 0.
05-Feb-2000 DG
Removed printed warning of 0 DOY.
26-Mar-2000 DG
Added /JUL switch, to return date in MJD
13-Oct-2002 DG
Removed help,/traceback (it was too annoying)
[Previous]
[Next]
NAME:
CW_FILE_NAME
PURPOSE:
Cette fonction demande un nom et controle le fichier correspondant
CATEGORY:
Compound widget
CALLING SEQUENCE:
Chaine = CW_FILE_NAME()
INPUTS:
KEYWORD PARAMETERS:
GROUP Identifieur du widget appelant
TITLE Titre a donner au widget
OLD Recherche de fichier existant
OUTPUTS:
CHAINE chaine de caracteres saisie
CALLS: ***
CW_FIELD, CW_FILE_NAME_EVENT, XMANAGER
CALLED BY:
NRH_VISU_2D
RESTRICTIONS:
Describe any "restrictions" here. Delete this section if there are
no important restrictions.
PROCEDURE:
Cette procedure controle l'existance d'un fichier correspondant au
nom demande
Si le Keyword OLD n'est pas positionne elle donne un message si un
fichier existe. Le nom est retourne si on CONTINUE, si non le nom est ''.
Une ouverture de fichier si le nom n'est pas EQ '' ouvre un nvouveau fichier
ou efface un ancien
Si le Keyword ODL est positionne un mesage est envoye si le fichier
n'existe pas. Si le fichier existe il peut etre ouvert pour un APPEND
EXAMPLE:
Please provide a simple example here
MODIFICATION HISTORY:
Ecrit par: J Bonmartin le 05/08/98
[Previous]
[Next]
NAME:
CW_HEADER
PURPOSE:
Cette procedure visualise le contenu du HEADER d'un fichier FITS
du NRH
CATEGORY:
COMPOUND_WIDGET
CALLING SEQUENCE:
CW_HEADER, File
INPUT:
FILE Nom du fichier
KEYWORD OARAMETERS:
GROUP Identification du widget appelant
EXTEN Numero de l'extension, 1ere extension = 1
CALLS: ***
CW_HEADER_EVENT, FXPAR [1], FXPAR [2], HEADFITS [1], HEADFITS [2], HEADFITS [3]
XMANAGER
CALLED BY:
MENUVERIF, NRH_FILTER
COMMON BLOCKS:
Non
MODIFICATION HISTORY:
Ecrit par: J Bonmartin le 19/12/97
le 06/11/98 Nom du fichier en argument remplace le COMMON FICRH
supression du controle de nombre d'extensions (JB)
[Previous]
[Next]
NAME:
CW_INFONRH
PURPOSE:
Cette procedure affiche les caracteristiques principales du
fichier lu
CATEGORY:
COMPOUND WIDGET
CALLING SEQUENCE:
ID = CW_INFONRH, parent, Struc
INPUTS:
PARENT Identifieur du widget appelant
STRUC Structure d'information de fichier (NRH_STR_INFIC)
OPTIONAL INPUTS:
Parm2: Describe optional inputs here. If you don't have any, just
delete this section.
KEYWORD PARAMETERS:
XSIZE dimension du widget (voir WIDGET_TEXT)
YSIZE dimension du widget (voir WIDGET_TEXT)
INFO remise a jour de l'affichage
CALLED BY:
CW_POS, FLUX_NRH2, GR_IMAGES, NRH2_PROJECTION, NRH_ANIM, NRH_FILTER, NRH_INTGCOMP
NRH_VISU_2D, SUN_IMAGE
EXAMPLE:
ID = CW_INFONRH(parent, Str)
Lecture d'un fichier au format NRH et affichage des caracteristiques
ID = CW_INFONRH( ID, Str, /INFO)
Remet a jour l'affichage apres lecture d'un autre fichier
MODIFICATION HISTORY:
Ecrit par: J Bonmartin le 03/11/97 (bonmartin@obspm.fr)
[Previous]
[Next]
NAME:
CW_LABELNRH
PURPOSE:
Tell what your routine does here. I like to start with the words:
"This function (or procedure) ..."
Try to use the active, present tense.
CATEGORY:
Compound widget
CALLING SEQUENCE:
Str_label = CW_LABELNRH ()
INPUTS:
KEYWORD PARAMETERS:
GROUP identifieur du widget appelant
AXIS widget de label des axes X, Y
CHARSIZE widget de dimension des caracteres (0.8 par defaut)
OUTPUTS:
STR_LABEL Structure definissant le contenu du label
STR_LABEL = {Str_label, $
Date:1, $ inscrite si = 1
Heure:1, $ inscrite si = 1
Freq:1, $ inscrite si = 1
Instrume:0, $ inscrit si =1
Physpar:0, $ inscrit si =1
Free:''} Champ libre
CALLS: ***
CW_BGROUP, CW_FIELD, CW_LABELNRH_EVENT, XMANAGER
CALLED BY:
NRH2_PROJECTION, NRH_VISU_2D, SUN_IMAGE
COMMON BLOCKS:
PROCEDURE:
Cette fonction permet de definir le contenu d'un label par des
boutons
EXAMPLE:
Str_label = CW_LABELNRH(GROUP = event.top)
MODIFICATION HISTORY:
Ecrit par: J Bonmartin (bonmartin@obspm.fr)
le 08/01/99 Rajout des keywords AXIS, CHARSIZE (JB)
[Previous]
[Next]
NAME:
CW_NRH_FILTER
PURPOSE:
Ce compound widget definit un filter pour les fichiers FITS du NRH
CATEGORY:
COMPOUND WIDGET
CALLING SEQUENCE:
File = CW_NRH_FILTER()
INPUTS:
KEYWORD PARAMETERS:
GROUP ID du widget appelant
TYPE Type de fichier selectionne
: 'i' images en coordonnees instrumentales
'h' images en coordonnees heliographiques
'a' harmoniques, Transformee de Fourier
'f' flux
's' centres actifs (sources)
par defaut TYPE = '?'
OUTPUTS:
FILE chemin et nom du fichier selectionne
OPTIONAL OUTPUTS:
La structure contient au retour les parametres definis pour le
filtrage des fichiers et le nom du fichier selectionne (avec le chemin)
CALLS: ***
CW_FIELD, CW_NRH_FILTER_EVENT, XMANAGER
CALLED BY:
NRH_FILTER
COMMON BLOCKS:
FICRH structure contenant les parametres de filtre des fichiers
et le nom du fichier selectionne (str_fic)
Description de la structure dans RH_2D.PRO
PROCEDURE:
Les noms des fichiers traites correspondent a la definition suivante
----------------------
pour les fichiers de type nrh2, TYPE= 'H'
nrhR_ffff_cpi_yyyymmjj_hhmnss:ms_e.fts
nrh nancay Radioheliographe
R reseau:e: Est-ouest, n: Nord_sud, 2: 2 dimensions
ffff frequence en 0.1Mhz
c coordonnees: i instrumentales, h heliographiques, f flux
s centres actifs,
a harmoniques transformee de Fourier
pi laisse libre a l'utilisateur,
proposition:
p interpolation (0 a 9)ou autre information
2**i points
i indice libre (0 a 9)
yyyymmjj date
hhmmss heure
ms millisecondes
e etat: b acquisition, c comprime, f decomprime (full)
-----------------------
ou bien pour les fichiers de la base, TYPE= 'B'
nfyymmjj.hhmnss.fts
f frequence: a 164Mhz, b: 327Mhz
cette procedure utilise PICKFILE
EXAMPLE:
FILE = CW_NRH_FILTER(GROUP= id)
MODIFICATION HISTORY:
Ecrit par: J Bonmartin le 21/08/98 (bonmartin@obspm.fr)
[Previous]
[Next]
NAME:
CW_OPTPOS
PURPOSE:
widget permettant de configurer les parametres du scan des images
et du tri des sources en position
CATEGORY:
RH_2D, recherche de positions
CALLING SEQUENCE:
CW_OPTPOS, GROUP=Group
KEYWORD PARAMETERS:
GROUP: Id de la widget appelante
CALLS: ***
CW_FIELD, CW_OPTPOS_EVENT, CW_OPT_HLP, XMANAGER
CALLED BY:
CW_POS
COMMON BLOCKS:
OPTPOSI, str_opt
MODIFICATION HISTORY:
Written by: C. Renié 10/03/1998
[Previous]
[Next]
NAME:
CW_PICKFILE_NRH
PURPOSE:
Compound WIDGET for file selection
Use DIALOG_PICKFILE to select a file, and shows the name of the
selected file
CATEGORY:
Compound Widget
CALLING SEQUENCE:
Result = CW_PICKFILE_NRH(Parent)
INPUTS:
PARENT ID of the parent widget
KEYWORD PARAMETERS:
REPERT Path of the directory
FILTER File filter
TITLE Title of the widget
VALUE Initial texte written in the widget
OUTPUTS:
RESULT ID of the created widget
On return the widget generates an event structure
ret = { ID:base, TOP:ev.top, HANDLER:0L, VALUE:file }
CALLS: ***
CW_FIELD, CW_PICKFILE_NRH_EVENT, CW_PICKFILE_NRH_GET_VALUE
CW_PICKFILE_NRH_SET_VALUE
CALLED BY:
MENUBCKGRD, MENUCALCFLUX1D, MENUCALCPOS2D, MENULISTPOS, MENUSHIFTRH1D
MENUTRACEISOPH, MENUTRACEPOS, MENUTRACEPROF, MENUVERIF
COMMON BLOCKS:
No
MODIFICATION HISTORY: (bonmartin@obspm.fr)
12/11/98 Repris des programmes XHELIO (JB)
[Previous]
[Next]
NAME:
CW_PLMONITOR
PURPOSE:
Compound widget. Gives graphical indication of phase lock status for
each antenna, and allows access to more information by clicking on the
appropriate LED.
CATEGORY:
OVRO APC DIAGNOSTIC
CALLING SEQUENCE:
PLMonID = CW_PLMonitor(parent,[GROUP=group])
INPUTS:
parent the widget ID of the base widget of the parent base,
in which to embed the widget
OPTIONAL (KEYWORD) INPUT PARAMETERS:
group the top base id of the calling program, so that the widget
will be destroyed if the calling program exits.
ROUTINES CALLED:
OUTPUTS:
PLMonID the widget id of the compound widget.
COMMENTS:
To use the routine, call it as above, then update it with the
WIDGET_CONTROL routine via SET_VALUE and SET_UVALUE. The required
values are:
UVALUE an array containing the list of frequencies in MHz for
the current observing sequence. The following is
typical:
WIDGET_CONTROL,PLMonID,SET_UVALUE=(*obseq.phord)*200
VALUE a 2-d array of size (NANT,NF) where NANT is the number
of antennas (currently 5) and NF is the number of
entries given in the frequency list (UVALUE). Each
entry represents whether the latest sample for a given
antenna and frequency was in phase lock (0) or out of
lock (1).
The phase lock history is accumulated internally in the routine.
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], CW_PLMONITOR_EVENT
CW_PLMONITOR_GETVALUE, CW_PLMONITOR_SETVALUE, UPDATE_TEXT, concat_dir [4]
CALLED BY:
SOLAID
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Written 29-Jul-1998 by Dale E. Gary
20-Aug-1998 DG
Change to display an LED for each oscillator, and make phase lock
history show one oscillator at a time. Also update the
phase lock history window each sample instead of just in response
to a mouse click.
12-Sep-1998 DG
Completely rewritten as a compound widget, for use in the SOLAID
interface.
15-Sep-1998 DG
Added new LED colors black and yellow.
15-Dec-1998 DG
Fixed bug where code failed when an oscillator had exactly one
used harmonic (problem was that the TOTAL routine fails when
and array has only one element).
09-Jan-1999 DG
Added UINT data type to fix OCTAL display of unsigned ACCUM value,
which broke on introduction of IDL 5.2.
11-Jan-2000 DG
Eliminate !UNIX system variable, and use FONT from !DEFAULTS
11-Apr-2000 DG
Make location of LED jpeg files independent of operating system
through the use of $SSW environment variable and concat_dir() routine.
23-May-2000 DG
Updated to work with antenna 7. If fewer than 6 ants are used,
missing ants will have black LEDs. When antenna 3 comes on line,
this routine will have to be updated once more.
15-Mar-2003 DG
Updated to add antenna 8.
14-Jul-2004 DG
Fixed bug that made Ant 8 display not respond properly to mouse clicks.
[Previous]
[Next]
NAME:
CW_PLOTSERIE
PURPOSE:
Cette fonction gere les parametres de trace en fonction du temps
des resultats de reduction de donnees du NRH
CATEGORY:
COMPOUND-WIDGET.
CALLING SEQUENCE:
ID = CW_PLOTSERIE (Parent)
INPUTS:
Parm1: Describe the positional input parameters here. Note again
that positional parameters are shown with Initial Caps.
KEYWORD PARAMETERS:
Ces KEYWORDS servent a donner des valeurs initiales
YPLOT nombre de traces en Y, 1 par defaut
XPLOT nombre de traces en X, 1 par defaut
SCALE Echelle logarithmique si = 0, lineaire si =1,
logarithmique par defaut
PRINT Trace dans fichiers Poscript si = 1, sinon visualisation X
X par defaut
PSNAME Nom du fichier POSCRIPT, file.ps par defaut
PNGNAME Nom du fichier PNG, file.png par defaut
BACKGROUND visualiser le bouton BACKGROUND
COLOR visualiser le bouton COLOR
OUTPUTS:
Certain BUTTON ne retournent pas d'evenements:
XPLOT nombre de traces en X (Plots on X)
YPLOT nombre de traces en Y (Plots on Y)
PRINT Ouverture d'un fichier Poscript si =1 (OPEN Print file)
CLOSE Fermeture du fichier Poscript (CLOSE Print File)
PNG Sauvegarde de la fenetre en PNG (SAVE on PNG)
Les autres BUTTON retournent un evenement et une stucture associee
a l'evenement
STRUCTURE:
event = {id:parent, Top:event.top, Handler:0L,Value:val}
A chaque de ces evenements est associe une U_VALUE. Liste des
U_VALUE et valeurs associee
PLOT pas de valeur, PLOT IDL (PLOT)
OPLOT pas de valeur, OPLOT IDL (OPLOT
SCALE Ehelle logarithmique (0) ou lineaire (1) (LOG scale)
YRGC Yrange defini par curseur, event.value = [Y1,Y2]
taleau des valeurs a passer a YRANGE (YRANGE Cursor)
YRGA Yrange defini automatiquement, event.value=[0.0,0.0]
(YRANGE auto)
BCK Controle du BACKGROUND
CLR Controle de la couleur
CALLED BY:
CENTER_NRH2, FLUX_NRH2
PROCEDURE:
Cette procedure cree et gere les widgets necessaire a la visualisation
de traces en fonction du temps.
Elle gere les variables !P.MULTI et !D.NAME
Il est necessaire de gerer les evenements crees par cette fonction
dans la procedure appelante, c'est a dire de prevoir les traitements
correspondant a chacune des U_VALUE definies precedamment.
Le fichier POSCRIPT doit etre ferme avant de pouvoir etre
visualisee
La table decouleur est modifiee par le widget COLOR YES et restauree
par COLOR NO
CALLS: ***
CW_BGROUP, CW_FIELD, CW_PLOTSERIE_EVENT, NRH_COLOR_PLOT
EXAMPLE:
Widget appelant
b= CW_PLOTSERIE(base3,PSNAME='flux.ps', PNGNAME='flux.png')
WIDGET_event, event
.....
WIDGET_CONTROL,event.id, Get_uvalue = ev
CASE EV OF
'PLOT': appeler le trace correspondant
'OPLOT': appeler le tracer correspondant a OPLOT
'SCALE': Echelle = event.value
'YRGA' : YRANGE = event.value
'YRGC': YRANGE = event.value
............
MODIFICATION HISTORY:
Ecrit par: J Bonmartin le 04/02/98
Le 22/01/04 Modif pour ecrans 24 bits et Write_png (AB)
[Previous]
[Next]
NAME:
CW_POS
PURPOSE:
Widget principale pour le recherche de positions dans un fichier d'images
RH_2D
CATEGORY:
RH_2D, recherche de positions
CALLING SEQUENCE:
cw_pos, GROUP=Group
KEYWORD PARAMETERS:
GROUP: Identificateur de la wideget appelante
CALLS: ***
CENTER_NRH2, CW_BRWRESULT1, CW_FIELD, CW_INFONRH, CW_OPTPOS, CW_PDMENU, CW_POS_HLP
CW_SCANSOURCE, CW_SELFIELD, DELFPOS, FXPAR [1], FXPAR [2], HEADFITS [1]
HEADFITS [2], HEADFITS [3], HMS, MAIN13_EVENT, MKFILEPOS, MK_RESUME, MSH, NRH_FCLOSE
NRH_FOPEN, NRH_IMAGE, NRH_PICKFILE, PDMENU4_EVENT, PLOT_MAXPOS, PLOT_SOURCES
POSTOFITS, READ_NRHIM, SCAN_SOURCES, SELTIME, TIME_IND_NRH, TRI_CENTRES
XDISPLAYFILE [1], XDISPLAYFILE [2], XMANAGER
CALLED BY:
HESSI_NRH, NRH
COMMON BLOCKS:
VISU_2D,str_visu
FICRH,str_fic
INFO2D, str_inf2d
LIMIT,str_lim
Communs pour la recherche de position:
DATAPOSI, fitsposi
OPTPOSI, str_opt
MODIFICATION HISTORY:
Written by: C. Renié, 12/1997 (christian.renie@obspm.fr)
mars, 1998 Activation du menu 'Options'
Recherche sur une region
Utilisation des COMMON generaux
jul,1999 Refonte GUI, utilisation de read_nrhim, selection temps
Le 13/09/00 Rajout BUFSIZE=0 pour OPENR
Le 28/06/01 Entrer par DIALOG_PICKFILE pour PLOT(JB)
Suprimer la lecture de fichier a l'entree
[Previous]
[Next]
NAME:
CW_RD_STRING
PURPOSE:
Cette fonction saisit une chaine de caracteres
CATEGORY:
Compound widget
CALLING SEQUENCE:
Chaine = CW_RD_STRING()
INPUTS:
KEYWORD PARAMETERS:
GROUP Identifieur du widget appelant
TITLE Titre a donner au widget
OUTPUTS:
CHAINE chaine de caracteres saisie
CALLS: ***
CW_FIELD, CW_RD_STRING_EVENT, XMANAGER
CALLED BY:
GR_IMAGES, NRH_VISU_2D
RESTRICTIONS:
Describe any "restrictions" here. Delete this section if there are
no important restrictions.
PROCEDURE:
Controle de nom de fichier. Remplcee pae CW_FILE_NAME
EXAMPLE:
Please provide a simple example here
MODIFICATION HISTORY:
Ecrit par: J Bonmartin le 05/03/98 (bonmartin@obspm.fr)
[Previous]
[Next]
NAME:
CW_REGION
PURPOSE:
Compound WIDGET pour la selection d'une region d'une image
visualisee
La commande 'SELECT' selectionne une region
La commande 'RESET' redonne les dimensions de l'image
Les limites de la region sont affichees
CATEGORY:
COMPOUN WIDGET
CALLING SEQUENCE:
Result = CW_REGION(parent, Image, Dim, Str_lim)
INPUTS:
Parent identification du widget parent
Image image visualisee
Dim nombre de pixels de l'image visualisee
Str_lim structure contenant les limites actuelles , voir RH.2D
KEYWORD PARAMETERS:
OUTPUTS:
Result: identification du widget
Apres un appel a 'SELECT' ou 'RESET', on a:
Uvalue = 'REGION'
les coordonnees de la region selectionne dans la structure
de retour EVENT :
{id:parent, Top:event.top, Handler:0L, XD:xd, XF:xf, YD:yd, YF:yf}
X, Y de debut et de fin de la region. Ces valeurs sont exprimees en
coordonnees de pixels ramenes aux coordonnees de l'image, meme si celle-ci
a ete visualisee sur DIM pixels
CALLS: ***
BOX_CURSOR2, CW_FIELD, IND_RS, REGION_EVENT, RS_IND, STR_SEP, UVALUE_REGION
CALLED BY:
CW_SELFIELD, REGION_EVENT, UVALUE_REGION
COMMON BLOCKS:
IDENT_REG,cursor,reset,textx,texty,state
RESTRICTIONS:
On ne peut pas selectionne une region sur une imge provenant d'une
selection precedente. L'image doit correspondre au tableau IMAGE
EXAMPLE:
Imag = INDGEN(64,64)
ID = CW_REGION( Parent, Imag, 512)
La commande 'SELECT' permet la selection d'une region dans l'image
de 64*64 pixels qui a ete precedemment visualisee sur 512*512 pixels
La commande 'RESET reinitialise les limites de la region a celles du tableau
soit X= 0,63, Y= 0,63
MODIFICATION HISTORY:
[Previous]
[Next]
NAME:
CW_SCANSOURCE
PURPOSE:
Widget permettant de faire un scan manuel d'une serie d'images
CATEGORY:
RH_2D, recherche de positions
CALLING SEQUENCE:
CW_SCANSOURCE, Fichimg, Index, GROUP=Group
INPUTS:
Fichimg: fichier contenant les images
Index: index de la premiere image
KEYWORD PARAMETERS:
GROUP: Identificateur de la widget appelante
CALLS: ***
AFF_DIST, CALC_VOLGAUSS, CONGRID [1], CONGRID [2], CONGRID [3], CP_FLUXPOS_NRH2
CW_FIELD, CW_SCANSOURCE_EVENT, HMS, IND_RS, PROFILES [1], PROFILES [2], READ_NRHIM
SURFR, TIME_IND_NRH, TVELLIPSE, XMANAGER, ZOOM, det_ellip, trv_dist
CALLED BY:
CW_POS
COMMON BLOCKS:
VISU_2D,str_visu
FICRH,str_fic
INFO2D, str_inf2d
LIMIT,str_lim
OPTPOSI, str_opt
MODIFICATION HISTORY:
Written by: C. Renié 06/1998
3/5/1999: utilisation de READ_NRHIM au lieu de mrdfits
modif de l'affichage des axes en pixels (20/07/01)
[Previous]
[Next]
NAME:
CW_SELFIELD
PURPOSE:
COUMPOUND WIDGET de selection d'une region
CATEGORY:
COMPOUND WIDGET
CALLING SEQUENCE:
CW_SELFIELD, Data, Info, Limit
INPUTS:
DATA Tableau 2dimensions contenant l'image
INFO Structure d'information d'image definie par STR_IMAGE
LIMIT contient les limites existantes en pixels
structure type STYR_LIM. elles sont affichees dans le Widget
OUTPUTS:
LIMIT Nouvelles limites retournees
KEYWORD;
SIZE Dimension de l'image
CALLED BY:
CW_POS, FLUX_NRH2, GR_IMAGES, NRH2_PROJECTION, NRH_ANIM, NRH_VISU_2D, SUN_IMAGE
PROCEDURE:
CE COMPOUND WIDGET utilise cw_region pour definir les coordonnees
d'une region
Il visualise en premier l'image puis permet la selection de la region
CALLS: ***
CONGRID [1], CONGRID [2], CONGRID [3], CW_REGION, CW_SELFIELD_EVENT, TVCIRCLE
XMANAGER
EXAMPLE:
CW_FIELD,im,str_image, str_limite
MODIFICATION HISTORY:
Ecrit par: J Bonmartin le 10/06/98 (bonmartin@obspm.fr)
derive de cw_selreg.pro
20/11/98 Remplace WINDOW par WIDGET_DRAW et gestion de
FIND_DRAW_WIDGET (C Renie@obspm.fr)
10/03/99 Wdelete de Id_draw3 (JB), supprime le 28/03/99
[Previous]
[Next]
NAME:
CW_SWITCH
PURPOSE:
Compound WIDGET for switch betewen different choices
CATEGORY:
Compound Widget
CALLING SEQUENCE:
Result = CW_SWITCH(Parent, Names)
INPUTS:
PARENT ID of the parent widget
NAMES String array giving the name of each choice.
KEYWORD PARAMETERS:
VALUE Initial texte written in the widget
UVALUE The "user value" to be assigned to the widget.
XSIZE The size of the widget (pixels)
FRAME Size of the frame around the widget
OUTPUTS:
RESULT ID of the created widget
On return the widget generates an event structure
ret = { ID:base, TOP:ev.top, HANDLER:0L,
VALUE:index of the choice }
CALLS: ***
CW_SWITCH_EVENT, CW_SWITCH_GET_VALUE, CW_SWITCH_SET_VALUE
CALLED BY:
MENUTRACEISOPH, MENUTRACEPOS, MENUTRACEPROF
COMMON BLOCKS:
No
MODIFICATION HISTORY: (bonmartin@obspm.fr)
12/11/98 Repris des programmes XHELIO (JB)
[Previous]
[Next]
NAME:
CW_XTD_NRHF
PURPOSE:
Cette fonction permet de choisir l'extension dans un fichier de
flux ou de position de centres actifs
CATEGORY:
COMPOUND WIDGET
CALLING SEQUENCE:
EXTEND = CW_XTD_NRHF (File)
INPUTS:
FILE Nom du fichier
CALLS: ***
CW_PDMENU, CW_XTD_NRHF_EVENT, FXBCLOSE [1], FXBCLOSE [2], FXBOPEN [1], FXBOPEN [2]
FXBOPEN [3], FXBREAD [1], FXBREAD [2], FXBREAD [3], FXPAR [1], FXPAR [2]
HEADFITS [1], HEADFITS [2], HEADFITS [3], IND_RS, XMANAGER
CALLED BY:
CENTER_NRH2, FLUX_NRH2, NRH_FLUXASCI, READ_FLUX, SUN_IMAGE
COMMON:
Non
KEYWORD PARAMETERS:
GROUP Inditifieur du widget appelant
OUTPUTS:
EXTEND Numero de l'extension correspondant au choix
PROCEDURE:
Un fichier de flux peut contenir le resultat de calculs effectues
sur plusieurs regions. Le resultat de chaque calcul est mis dans
extension (voir WRITE_FLUXNRH)
Cette fonction affiche les coordonnees de chaque region et retourne
le numero de l'extension correspondant a la region choisie
EXAMPLE:
Please provide a simple example here
MODIFICATION HISTORY:
Ecrit par: J Bonmartin le 30/04/98 (bonmartin@obspm.fr)
le 08/03/99 Fermeture de UNIT en sortie (JB)