[Previous]
[Next]
NAME:
L2W
PURPOSE:
Given a long integer, converts it to a two-element array of 2-byte words.
The order of the words depends on the state of the !UNIX system variable.
CATEGORY:
OVRO SPAN DATA-ANALYSIS
CALLING SEQUENCE:
wrdarr = l2w(longint)
INPUTS:
longint the long integer to be converted to 2-byte words.
OPTIONAL (KEYWORD) INPUT PARAMETERS:
ROUTINES CALLED:
OUTPUTS:
wrdarr the array of two 2-byte words that results after conversion. The
order of words depends on the state of the !UNIX system variable.
If zero, the words are in significance order. If !UNIX = 1, the
word order is reversed.
COMMENTS:
CALLED BY:
DECODE, MAKE_EPHEM, TL_ENCODE, WATCHER
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Written 30-Jan-1999 by Dale E. Gary
11-Jan-2000 DG
Eliminate !UNIX variable and use !VERSION instead
[Previous]
[Next]
NAME:
LABELNRH
PURPOSE:
Cette fonction appelle CW_LABELNRH pour definir le contenu du
label a afficher sur une image, et CRE_LABELNRH pour creer le
label
CATEGORY:
Visualisation NRH
CALLING SEQUENCE:
Label = LABELNRH( Image, Header)
INPUTS:
IMAGE Donnees correspondant a la lecture d'images FITS de NRH2
HEADER Header du fichier traite
KEYWORD PARAMETERS:
GROUP Identifieur du widget appelant
OUTPUTS:
LABEL chaine contenant le label
CALLS: ***
CRE_LABELNRH
COMMON BLOCKS:
PROCEDURE:
EXAMPLE:
Image = MRDFITS('File', 1, Header, RANGE+(20,20)
Label LABELNRH( Image, Header)
ou bien
Label LABELNRH( Image, Header, GROUP=event.top)
pour l'appel dans un traitement d'evenement
MODIFICATION HISTORY:
Ecrit par: J Bonmartin le 04/03/98
[Previous]
[Next]
NAME:
LASTHREC
PURPOSE:
Returns the record number of the last header in a data file,
or if TSTR is set the record number of the next header after
the time specified by TSTR.
CATEGORY:
OVRO APC DATA-ANALYSIS
CALLING SEQUENCE:
hrec = lasthrec(a,nrec[,tstr=tstr])
INPUTS:
a the ASSOC variable associated with the file to
examine
nrec the number of records currently in the file
OPTIONAL (KEYWORD) INPUT PARAMETERS:
tstr a string of the form [YYYY.DOY ]HH:MM[:SS] giving
the time after which the first header record number
is to be returned.
ROUTINES CALLED:
get_segments tl_decode
OUTPUTS:
hrec the record number of the desired header, or -1 if
an error occurred or if there are no headers after
the time specified.
COMMENTS:
CALLS: ***
GET_SEGMENTS, TL_DECODE, T_CMP
CALLED BY:
ACALCHEK, APCALCHEK, DLACHEK, DLASCAN, DLCALCHEK, FCALCHEK, FLAREMETER, GCALCHEK
LIMCHEK, PCALCHEK, PKUPCHEK, PNTCHEK, SATCALCHEK, SOLAID, TPCALCHEK1, TPCALCHEK2
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Written 11-Jan-1998 by Dale Gary
[Previous]
[Next]
NAME:
LAUNCHER
PURPOSE:
Main routine for displaying APC data directories and launching
analysis tasks. A list widget shows the contents of data directories
and optionally the scan and segment headings of the files. A
context-sensitive list widget is used to launch tasks depending on the
type of file/scan/segment selected.
CATEGORY:
OVRO APC ANALYSIS WIDGET
CALLING SEQUENCE:
launcher
INPUTS:
OPTIONAL (KEYWORD) INPUT PARAMETERS:
ROUTINES CALLED:
break_file, get_segments, gettask, openarc, wpreferences,
findsegentries (internal routine), filename2date
OUTPUTS:
COMMENTS:
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CW_PDMENU, DEFPARMS, DIAGNOSE
FILENAME2DATE, FINDSEGENTRIES, GETLRECN, GETTASK, GET_SEGMENTS, LAUNCHERMAIN_EVENT
OPENARC, SCHEDULE, WPREFERENCES, XMANAGER, break_file [4]
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Written 25-Sep-1997 by Dale Gary
11-Jan-1998 DG
Changed to use openarc and new version of get_segments
12-Jan-1998 DG
Changed to menubar rather than menu buttons
26-Jul-1998 DG
Convert file list from directory into an alpha-numerically sorted list
08-Jan-1999 DG
Added date widget, on selection of a filename. (Fixed case where selected
file is DAILY.ARC, 09-Jan-1999)
15-Apr-1999 DG
Added buttons for launching the Schedule and Diagnostics
20-Apr-1999 DG
Considerable changes to enable opening and closing of SCANs (in addition
to files), to show or hide segments within the SCAN.
17-May-1999 DG
Added findsegentries() function and associated code to deal with segments
that are not in a scan. Also fixed problem with opening scans after
data had changed (as file grows).
29-Dec-1999 DG
Added check for POINT scan
11-Jan-2000 DG
Eliminated !UNIX variable by using !DEFAULTS.FONT
21-Jul-2000 DG
Now sorts filenames by uppercase.
15-Aug-2000 DG
Change "change file directory" to accept a directory only, not
a file.
22-Jun-2002 DG
Slight change to use FILENAME2DATE() routine.
[Previous]
[Next]
NAME:
LEC1D
PURPOSE:
Cette procedure lit les donnees contenues dans un fichier au format
HELIO ou au format FITS 1D
CATEGORY:
Put a category (or categories) here. For example:
Widgets.
CALLING SEQUENCE:
LEC1D, Unit, Images, Struc
INPUTS:
UNIT Unite de lecture du fichier. Le nom du fichier est soit
disponible soit par le COMMON NRH1_GLOBAL,Nomfich ou
passe par le KEYWORD Fichier
IMAGES Tableau 2 ou 3 dimensions contenant les images
2 dimensions IMAGES[Espace,Temps] si 1 parametre se STOKES
3 dimensions IMAGES[Espace,Temps,I:V] si les parametres i et V
STRUC Structure liee aux images (voir NRH1_STR_IMAGES__DEFINE)
KEYWORD PARAMETERS:
FICHIER Nom du fichier. Si non present nom du fichier pris dans
Nomfich(Unit) ou demande si Nomfich(Unit0=''
DEBUT heure de debut chaine de caracteres au format NRH
(hh:mn:ss:mmm)
FIN Heure de fin chaine de caracteres au format NRH
POLAR Lecture du parametre V
INTENS Lecture du parametre I
ARRAY Valable pour les fichiers FITS
0 Reseau E-W, 1 Reseau N-S
CALLS: ***
HMS, INDICE, LEC_NRH1D, LITENTETE, MSH, STR_SEP
CALLED BY:
NEWLEC1D
COMMON BLOCKS:
NRH1_GLOBAL defini dans NRH1.PRO
MODIFICATION HISTORY: (bonmartin@obspm.fr)
12/11/98 Adapte du logiciel XHELIO (JB)
[Previous]
[Next]
NAME:
LEC_NRH1D
PURPOSE:
Cette procedure lit les images contenues dans un fichier FITS
au format NRH 1D
CATEGORY:
NRH1 Fichier
CALLING SEQUENCE:
LEC_NRH1D,Unit, Hd, Hf, Images
, ARRAY=Array
INPUTS:
UNIT Unite logique de lecture. Le nom de fichier est dans
Fichinfo(unit).nomfich
HD Heure de debut (hh:mn:ss:ccc)
HF Heure de fin (hh:mn:ss:ccc)
KEYWORD PARAMETERS:
ARRAY Reseau 0:E-W, 1:N-S
OUTPUTS:
IMAGES Tableau d'images a 2 ou 3 Dimensions suivant que le motcle
'TYPE' contient:
'I' lecture de I seul
'I+V' lecture de I et V
2 dimensions IMAGES(Espace,Temps)
3 dimensions IMAGES(Espace,Temps,I:V)
CALLS: ***
FXBCLOSE [1], FXBCLOSE [2], FXBHEADER [1], FXBHEADER [2], FXBOPEN [1], FXBOPEN [2]
FXBOPEN [3], FXBREAD [1], FXBREAD [2], FXBREAD [3], MOTCLE, TIME_IND_NRH
CALLED BY:
LEC1D
COMMON BLOCKS:
NRH1_GLOBAL.
MODIFICATION HISTORY: (bonmartin@obspm.fr)
12/11/98 Adapte du logiciel XHELIO (JB)
[Previous]
[Next]
NAME:
LECDESCR
PURPOSE:
Cette procedure lit le contenu de l'entete des fichiers au
format HELIO
CATEGORY:
NRH1 Fichier
CALLING SEQUENCE:
LECDESCR, Unit, Nomfich, Longrec, Dfixe, Mot, Valcle, Comm
INPUTS:
UNIT Unite de lecture
NOMFICH Nom du fichier
KEYWORD PARAMETERS:
Non
OUTPUTS:
LONREG Longueur en octets de l'enregistrement
DFIXE Structure contenant les valeurs entieres ou relles de l'entete
MOT Tableau des mots cles
Val Tableau des valeursa associees aux mots cles
COMM Tableau contenant les commentaires
CALLS: ***
LIT_HEADER_NRH1, STR_SEP
CALLED BY:
LITENTETE, MENUBCKGRD, SHIFTRH1D
COMMON BLOCKS:
Non
SIDE EFFECTS:
Liste des valeurs de DFIXE
- (TAB(1),NBLOCS), ! NBE DE BLOCS DU DESCRIPTEUR
- (TAB(2),ENTET), ! NOMBRE DE VALEURS DE L'ENTETE
- (TAB(3),RE), ! ENTETE D'IMAGE ENTIERE OU REELLE
- (TAB(4),NAXES), ! NBE D'AXES D'UNE IMAGE
- (TAB(5),NPIX(1)), ! NBE DE PIXELS SUR LES AXES
- (TAB(10),RI(1)), ! ORIG ET DELTA REEL (0) OU ENTIER (1)
- (TAB(15),ORIG(1)), ! VALEUR DE L'ORIGINE SUR LES AXES REELS
- (TAB(20),DELTA(1)), ! INCREMENT ENTRE CHAQUE PIXEL AXES REELS
- (TAB(15),NORIG(1)), ! VALEUR DE L'ORIGINE SUR LES AXES ENTIERS
- (TAB(20),NDELTA(1)), ! INCREMENT ENTRE CHAQUE PIXEL AXE ENTIER
- (TAB(25),DATE(1)), ! DATE DU FICHIER EN JJ/MM/AA
- (TAB(28),HDEB), ! HEURE DE DEBUT EN MS
- (TAB(29),HFIN), ! HEURE DE FIN EN MS
- (TAB(30),VMIN), ! VALEUR MINIMUM DU FICHIER
- (TAB(31),VMAX), ! VALEUR MAXIMUM DU FICHIER
- (TAB(32),NREG), ! SI LE DERNIER AXE EST IRREGULIER
- (TAB(32),REG), ! INCREMENT QUI PEUT LE RECONSTITUER
- (TAB(33),FACBLOC(1)) !FACTEUR DE BLOCAGE POUR UN AXE DONNE
RESTRICTIONS:
Si RI(n) est egal a 0, on se sert de ORIG(n) et de DELTA(n) et si RI(n) est
egal a 1, on se sert de NORIG(n) et de NDELTA(n).
Si NDELTA(n) est egal a 0 pour le dernier axe, on sait que celui-ci est
irregulierement echantillonne et dans ce cas la description de chaque
pixel se fait en tete d'image, dans la zone reservee par ENTET=Nbe de
donnees (INTEGER*4 ou REAL*4) qui se trouve dans chaque image avant les
pixels de l'image
MODIFICATION HISTORY: (bonmartin@obspm.fr)
26/11/98 adapte du logiciel XHELIO (JB)
[Previous]
[Next]
NAME:
LECP1D
PURPOSE:
LECTURE DE FICHIER DE POSITIONS 1D AU FORMAT HELIO
CATEGORY:
NRH1 Positions
CALLING SEQUENCE:
LECP1D , Unit, Tabl, Struc
INPUTS:
UNIT Unite logique associee au fichier
KEYWORD PARAMETERS:
FICHIER Nom du fichier, sinon, nom du fichier dans NRH1_GLOBAL
DEBUT Heure de debut('hh:mn:ss:ccc')
FIN Heure de fin
OUTPUTS:
TABL Tableau de donnees
STRUCT Structure d'informations
tabl ........ Tableau contenant les Donnees Lues
tableau a 3 dimemsions
tabl(numim,0, *) = No d'Image ou le sursaut apparait
tabl(numim,1, *) = Canal
tabl(numim,2, *) = Amplitude
tabl(numim,3, *) = Flux
tabl(numim,4, *) = Diametre
| | |
| | |
| | +--> indice temporel
| +-----> Type d'information
+---------> Numero du sursaut
struc ....... Descripteur des Donnees Lues
struc.Lun = unite logique assignee au fichier
struc.Hdeb = Temps de debut de lecture
struc.Hfin = Temps de fin de lecture
struc.type = Information de type chaine de caract
('Position 1D')
struc.tabe(0) = No de l'image lue
struc.tabe(1) = Temps
struct.tabe(2) = nb de points de la position
CALLS: ***
HMS, LITENTETE
CALLED BY:
NEWLECP1D
COMMON BLOCKS:
NRH1_GLOBAL
PROCEDURE:
Cette procedure appelle LITPOS1D
MODIFICATION HISTORY: (bonmartin@obspm.fr)
20/11/98 adapte du logiciel XHELIO (JB)
[Previous]
[Next]
NAME:
LECP2D
PURPOSE:
Cette procedure lit le contenu d'un fichier de position de centroid
NS, EO
CATEGORY:
NRH1 Positions
CALLING SEQUENCE:
LECP2D , Unit, Tabl, Struc
INPUTS:
UNIT Unite logique associee au fichier
KEYWORD PARAMETERS:
FICHIER Nom du fichier, si abscent defini par UNIT
DEBUT Heure de debut 'hh:mn:ss:ccc'
FIN Heure de fin 'hh:mn:ss:ccc'
OUTPUTS:
TABL ........ Tableau contenant les Donnees Lues
tableau a 3 dimemsions
tabl(numim,0, *) = position heliogr en X
tabl(numim,1, *) = position heliogr en Y
tabl(numim,2, *) = Flux EW
tabl(numim,3, *) = Flux NS
tabl(numim,4, *) = Diametre EW
tabl(numim,5, *) = Diametre NS
| | |
| | |
| | +--> indice temporel
| +-----> Type d'information
+---------> Numero de position
STRUC ....... Descripteur des Donnees Lues
struc.Lun = unite logique assignee au fichier
struc.Hdeb = Temps de debut de lecture
struc.Hfin = Temps de fin de lecture
struc.type = Information de type chaine de caract
('Position 1D')
struc.tabe(0) = No de la position lue
struc.tabe(1) = Temps
struct.tabe(2) = nb de points de la position
CALLS: ***
HMS, LITENTETE
CALLED BY:
NEWLECP2D
COMMON BLOCKS:
NRH1_GLOBAL
MODIFICATION HISTORY: (bonmartin@obspm.fr)
26/11/98 Adapte du logiciel XHELIO (JB)
[Previous]
[Next]
NAME:
LEGEND
PURPOSE:
Create an annotation legend for a plot.
EXPLANATION:
This procedure makes a legend for a plot. The legend can contain
a mixture of symbols, linestyles, Hershey characters (vectorfont),
and filled polygons (usersym). A test procedure, legendtest.pro,
shows legend's capabilities. Placement of the legend is controlled
with keywords like /right, /top, and /center or by using a position
keyword for exact placement (position=[x,y]) or via mouse (/position).
CALLING SEQUENCE:
LEGEND [,items][,keyword options]
CALLED BY:
GE_WINDOW [1], GOES_MEWE_TEM, HESSI_ATTENUATOR_SPECTRA, LEGENDTEST
PLOT_RESULTS [2], PLOT_SOURCES, hsi_image_plot, hsi_imagefile2png, hsi_obs_times
hsi_one_qlook_image, hsi_show_flags [2], inspec_f, inspec_t, plot_goes_ospex
plot_goesp, soon_cadence, sooncat_cadence, trace_cosmic2hist_accum
EXAMPLES:
The call:
legend,['Plus sign','Asterisk','Period'],psym=[1,2,3]
produces:
-----------------
| |
| + Plus sign |
| * Asterisk |
| . Period |
| |
-----------------
Each symbol is drawn with a plots command, so they look OK.
Other examples are given in optional output keywords.
lines = indgen(6) ; for line styles
items = 'linestyle '+strtrim(lines,2) ; annotations
legend,items,linestyle=lines ; vertical legend---upper left
items = ['Plus sign','Asterisk','Period']
sym = [1,2,3]
legend,items,psym=sym ; ditto except using symbols
legend,items,psym=sym,/horizontal ; horizontal format
legend,items,psym=sym,box=0 ; sans border
legend,items,psym=sym,delimiter='=' ; embed '=' betw psym & text
legend,items,psym=sym,margin=2 ; 2-character margin
legend,items,psym=sym,position=[x,y] ; upper left in data coords
legend,items,psym=sym,pos=[x,y],/norm ; upper left in normal coords
legend,items,psym=sym,pos=[x,y],/device ; upper left in device coords
legend,items,psym=sym,/position ; interactive position
legend,items,psym=sym,/right ; at upper right
legend,items,psym=sym,/bottom ; at lower left
legend,items,psym=sym,/center ; approximately near center
legend,items,psym=sym,number=2 ; plot two symbols, not one
legend,items,/fill,psym=[8,8,8],colors=[10,20,30]; 3 filled squares
INPUTS:
items = text for the items in the legend, a string array.
For example, items = ['diamond','asterisk','square'].
You can omit items if you don't want any text labels.
OPTIONAL INPUT KEYWORDS:
linestyle = array of linestyle numbers If linestyle(i) < 0, then omit
ith symbol or line to allow a multi-line entry.
psym = array of plot symbol numbers. If psym(i) is negative, then a
line connects pts for ith item. If psym(i) = 8, then the
procedure usersym is called with vertices define in the
keyword usersym. If psym(i) = 88, then use the previously
defined user symbol
vectorfont = vector-drawn characters for the sym/line column, e.g.,
['!9B!3','!9C!3','!9D!3'] produces an open square, a checkmark,
and a partial derivative, which might have accompanying items
['BOX','CHECK','PARTIAL DERIVATIVE'].
There is no check that !p.font is set properly, e.g., -1 for
X and 0 for PostScript. This can produce an error, e.g., use
!20 with PostScript and !p.font=0, but allows use of Hershey
*AND* PostScript fonts together.
N. B.: Choose any of linestyle, psym, and/or vectorfont. If none is
present, only the text is output. If more than one
is present, all need the same number of elements, and normal
plot behaviour occurs.
By default, if psym is positive, you get one point so there is
no connecting line. If vectorfont(i) = '',
then plots is called to make a symbol or a line, but if
vectorfont(i) is a non-null string, then xyouts is called.
/help = flag to print header
/horizontal = flag to make the legend horizontal
/vertical = flag to make the legend vertical (D=vertical)
box = flag to include/omit box around the legend (D=include)
clear = flag to clear the box area before drawing the legend
delimiter = embedded character(s) between symbol and text (D=none)
colors = array of colors for plot symbols/lines (D=!P.color)
textcolors = array of colors for text (D=!P.color)
margin = margin around text measured in characters and lines
spacing = line spacing (D=bit more than character height)
pspacing = psym spacing (D=3 characters)
charsize = just like !p.charsize for plot labels
charthick = just like !p.charthick for plot labels
thick = array of line thickness numbers (D = !P.thick), if used, then
linestyle must also be specified
position = data coordinates of the /top (D) /left (D) of the legend
normal = use normal coordinates for position, not data
device = use device coordinates for position, not data
number = number of plot symbols to plot or length of line (D=1)
usersym = 2-D array of vertices, cf. usersym in IDL manual. (D=square)
/fill = flag to fill the usersym
/left_legend = flag to place legend snug against left side of plot
window (D)
/right_legend = flag to place legend snug against right side of plot
window. If /right,pos=[x,y], then x is position of RHS and
text runs right-to-left.
/top_legend = flag to place legend snug against top of plot window (D)
/bottom = flag to place legend snug against bottom of plot window
/top,pos=[x,y] and /bottom,pos=[x,y] produce same positions.
If LINESTYLE, PSYM, VECTORFONT, THICK, COLORS, or TEXTCOLORS are
supplied as scalars, then the scalar value is set for every line or
symbol in the legend.
Outputs:
legend to current plot device
OPTIONAL OUTPUT KEYWORDS:
corners = 4-element array, like !p.position, of the normalized
coords for the box (even if box=0): [llx,lly,urx,ury].
Useful for multi-column or multi-line legends, for example,
to make a 2-column legend, you might do the following:
c1_items = ['diamond','asterisk','square']
c1_psym = [4,2,6]
c2_items = ['solid','dashed','dotted']
c2_line = [0,2,1]
legend,c1_items,psym=c1_psym,corners=c1,box=0
legend,c2_items,line=c2_line,corners=c2,box=0,pos=[c1(2),c1(3)]
c = [c1(0)<c2(0),c1(1)<c2(1),c1(2)>c2(2),c1(3)>c2(3)]
plots,[c(0),c(0),c(2),c(2),c(0)],[c(1),c(3),c(3),c(1),c(1)],/norm
Useful also to place the legend. Here's an automatic way to place
the legend in the lower right corner. The difficulty is that the
legend's width is unknown until it is plotted. In this example,
the legend is plotted twice: the first time in the upper left, the
second time in the lower right.
legend,['1','22','333','4444'],linestyle=indgen(4),corners=corners
; BOGUS LEGEND---FIRST TIME TO REPORT CORNERS
xydims = [corners(2)-corners(0),corners(3)-corners(1)]
; SAVE WIDTH AND HEIGHT
chdim=[!d.x_ch_size/float(!d.x_size),!d.y_ch_size/float(!d.y_size)]
; DIMENSIONS OF ONE CHARACTER IN NORMALIZED COORDS
pos = [!x.window(1)-chdim(0)-xydims(0) $
,!y.window(0)+chdim(1)+xydims(1)]
; CALCULATE POSITION FOR LOWER RIGHT
plot,findgen(10) ; SIMPLE PLOT; YOU DO WHATEVER YOU WANT HERE.
legend,['1','22','333','4444'],linestyle=indgen(4),pos=pos
; REDO THE LEGEND IN LOWER RIGHT CORNER
You can modify the pos calculation to place the legend where you
want. For example to place it in the upper right:
pos = [!x.window(1)-chdim(0)-xydims(0),!y.window(1)-xydims(1)]
CALLS: ***
DOC_LIBRARY
Common blocks:
none
Procedure:
If keyword help is set, call doc_library to print header.
See notes in the code. Much of the code deals with placement of the
legend. The main problem with placement is not being
able to sense the length of a string before it is output. Some crude
approximations are used for centering.
Restrictions:
Here are some things that aren't implemented.
- An orientation keyword would allow lines at angles in the legend.
- An array of usersyms would be nice---simple change.
- An order option to interchange symbols and text might be nice.
- Somebody might like double boxes, e.g., with box = 2.
- Another feature might be a continuous bar with ticks and text.
- There are no guards to avoid writing outside the plot area.
- There is no provision for multi-line text, e.g., '1st line!c2nd line'
Sensing !c would be easy, but !c isn't implemented for PostScript.
A better way might be to simply output the 2nd line as another item
but without any accompanying symbol or linestyle. A flag to omit
the symbol and linestyle is linestyle(i) = -1.
- There is no ability to make a title line containing any of titles
for the legend, for the symbols, or for the text.
Side Effects:
Modification history:
write, 24-25 Aug 92, F K Knight (knight@ll.mit.edu)
allow omission of items or omission of both psym and linestyle, add
corners keyword to facilitate multi-column legends, improve place-
ment of symbols and text, add guards for unequal size, 26 Aug 92, FKK
add linestyle(i)=-1 to suppress a single symbol/line, 27 Aug 92, FKK
add keyword vectorfont to allow characters in the sym/line column,
28 Aug 92, FKK
add /top, /bottom, /left, /right keywords for automatic placement at
the four corners of the plot window. The /right keyword forces
right-to-left printing of menu. 18 Jun 93, FKK
change default position to data coords and add normal, data, and
device keywords, 17 Jan 94, FKK
add /center keyword for positioning, but it is not precise because
text string lengths cannot be known in advance, 17 Jan 94, FKK
add interactive positioning with /position keyword, 17 Jan 94, FKK
allow a legend with just text, no plotting symbols. This helps in
simply describing a plot or writing assumptions done, 4 Feb 94, FKK
added thick, symsize, and clear keyword Feb 96, W. Landsman HSTX
David Seed, HR Wallingford, d.seed@hrwallingford.co.uk
allow scalar specification of keywords, Mar 96, W. Landsman HSTX
added charthick keyword, June 96, W. Landsman HSTX
Made keyword names left,right,top,bottom,center longer,
Aug 16, 2000, Kim Tolbert
Added ability to have regular text lines in addition to plot legend lines in legend.
If linestyle is -99 that item is left-justified .Previously, only option for no sym/line
was linestyle=-1, but then text was lined up after sym/line column.
10 Oct 2000, Kim Tolbert
Make default value of thick = !p.thick W. Landsman Jan. 2001
[Previous]
[Next]
NAME:
LIMCHEK
PURPOSE:
Main routine to analyze LIMPOINT data. Responds to scans
of type PNTCAL (scan code 8) or TEST DATA (scan code 1).
CATEGORY:
OVRO APC DATA ANALYSIS
CALLING SEQUENCE:
limchek[,filename][,hrec | ,after=after][,debug][,/cmdfile]
INPUTS:
filename the name of the file containing PNTCAL data. If
omitted, the file DAILY.ARC in directory
!DEFAULTS.WORKDIR is assumed.
hrec the record number of the SOLAR 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:
after an optional time string of the standard form
[yyyy.ddd ]hh:mm[:ss] after which to start
looking for a valid PNTCAL or TEST DATA scan.
cmdfile a switch that indicates that the routine was called
from a command file, so issue no modal messages, and
print any error messages to <WORKDIR>\ACAL.MSG.
debug a switch that activates some debugging statements
for getting an indication of intermediate steps.
This switch is not compatible with /CMDFILE switch.
ROUTINES CALLED:
openarc, getdata, lasthrec, tl_decode, decode, limfit
OUTPUTS:
COMMENTS:
There will have to be modifications to this routine when
additional antennas are available.
CALLS: ***
GETDATA, LASTHREC, LIMFIT, NEWSCAN, OPENARC, TL_DECODE, W2L
CALLED BY:
WATCHER
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Written 20-Dec-1998 by Dale Gary
22-Dec-1998 DG
Added proper gain/nonlinearity calibration. Eliminated
saturated data.
[Previous]
[Next]
NAME:
LIMFIT
PURPOSE:
LIMCHEK support routine. Fits LIMPOINT data to find the best
fit to solar disk center at all of the measured frequencies,
and returns results.
CATEGORY:
OVRO APC LIMCHEK SUPPORT ROUTINE
CALLING SEQUENCE:
limfit,avdat,obseq,traj,pk,po,rmserr[,/debug]
INPUTS:
avdat the LIMPOINT data array, of size (nant,nf,nblk), where
the first index is the number of antennas (5--only
the first two [27 m] are used), second index is the
number of frequencies (8), and the third index is
the number of "blocks" (pointings--20)
in the LIMPOINT Trajectory.
obseq the observing sequence structure associated with the
LIMPOINT data.
traj the trajectory segment structure associated with the
LIMPOINT data.
OPTIONAL (KEYWORD) INPUT PARAMETERS:
debug a switch to enable plotting of some intermediate
results.
ROUTINES CALLED:
OUTPUTS:
pk an array of size (nant,nf,2) containing the percent
peak level above the minimum data value at each frequency
for each of the two axes (0 = HO, 1 = DO).
po an array of size (nant,nf,2) containing the pointing
offsets in degrees for each of the two axes, HO and DO.
rmserr an array of size (nant,nf,2) containing the rms error of the
fit for the two axes, HO and DO.
COMMENTS:
CALLS: ***
CURVEFIT, DISKFUNCT, MOMENT, NINT [1], NINT [2]
CALLED BY:
LIMCHEK
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Written 20-Dec-1998 by Dale E. Gary
14-Dec-1999 DG
Cleaned up a problem when all measurements at a frequency were NaN.
Also added labels to the plots.
[Previous]
[Next]
NAME:
LIT_HEADER_NRH1
PURPOSE:
Cette procedure est appelee par LITENTETE et remplit la structure
FILEINFO a partir des Headers d'un fichier FITS du NRH 1D
CATEGORY:
NRH1 Fichier
CALLING SEQUENCE:
LIT_HEADER_NRH1, Fichier, Fileinfo
INPUTS:
FICHIER Nom du fichier
KEYWORD PARAMETERS:
Non
OUTPUTS:
FILEINFO structure de type NRH1_FILEINFO
CALLS: ***
FXBCLOSE [1], FXBCLOSE [2], FXBCOLNUM [1], FXBCOLNUM [2], FXBOPEN [1], FXBOPEN [2]
FXBOPEN [3], FXPAR [1], FXPAR [2], HEADFITS [1], HEADFITS [2], HEADFITS [3], HMS
STR_SEP
CALLED BY:
LECDESCR
COMMON BLOCKS:
NRH1_HELIO
PROCEDURE:
Cette procedure remplit les champs de la structure FILEINFO, ainsi
que la partie texte (mot et valeurs) a partir des mots cles FITS
MODIFICATION HISTORY: (bonmartin@obspm.fr)
Ecrit par: J Bonmartin le 13/11/98
[Previous]
[Next]
NAME:
LITENTETE
PURPOSE:
Cette procedure lit le descripteur fixe et le descripteur chaine
d'un fichier HELIO ou bien appelle LIT_HEADER_NRH1 si l'extension
du nom de fichier est ".fts" (fichiers FITS) et remplit la structure
FILEINFO
CATEGORY:
NRH1 Fichiers
CALLING SEQUENCE:
LITENTETE, Unit, Nom, Fileinfo
INPUTS:
UNIT Unite de lecture
NOM Nom du fichier
KEYWORD PARAMETERS:
Non
OUTPUTS:
FILEINFO Structure de type NRH1_FILEINFO
CALLS: ***
LECDESCR
CALLED BY:
FUSIONPOS1D, LEC1D, LECP1D, LECP2D, NEWLITENTETE
COMMON BLOCKS:
Non
MODIFICATION HISTORY: (bonmartin@obspm.fr)
13/11/98 Adapte du logiciel XHELIO (JB)
modif mars 96 : nblfixe nb de blocs occupes par le descripteur fixe
=1 si longrec/4 > 64
>1 si longrec/4 < 64
modif dec 96 : erreur dans codage de la date en caracteres corrigee
modif oct 97 : cas des enrgts longs >65534 : string too long
modif nov 97 : ecriture de la date en anglais
[Previous]
[Next]
NAME:
LITPOS1D
PURPOSE:
Cette procedure lit une position d'un fichier de position de
centroid (positions 1D ou positions 2D)
CATEGORY:
NRH1 positions
CALLING SEQUENCE:
LITPOS1D,Unit, Valeurs, Vinfo, Numero
INPUTS:
UNIT unite logique associee au fichier
NUMERO Numero de la position
KEYWORD PARAMETERS:
TEMPDB Temps de debut
TEMPFI Temps de fin
DEUX_D Lecture de positions 2 dimensions
OUTPUTS:
VALEURS Valeurs de la position
VINFO Structure contenant les informations associees a la position
COMMON BLOCKS:
NRH1_GLOBAL
MODIFICATION HISTORY: (bonmartin@obspm.fr)
20/11/98 adapte du logiciel XHELIO (JB)
[Previous]
[Next]
NAME:
LITSEQ
PURPOSE:
Cette fonction retourne le contenu d'un fichier NRH1 au format
helio
CATEGORY:
NRH1 ficchier
CALLING SEQUENCE:
Image = LITSEQ( Unit, [Debut], [Fin])
INPUTS:
UNIT Unite de lecture associee au fichier
OPTIONAL INPUTS:
DEBUT Temps de debut en millisecondes dans la journee
FIN Temps de fin em milli secondes dans la journee
KEYWORD PARAMETERS:
Non
OUTPUTS:
IMAGE Tableau contenant les images,
2 dim: [espace, temps] pour Stokes I
3 dim: [espace,I:V, temps]
COMMON BLOCKS:
NRH1_GLOBAL
MODIFICATION HISTORY: (bonmartin@obspm.fr)
16/11/98 adapte du logiciel XHELIO (JB)
[Previous]
[Next]
NAME:
Load Plot
PURPOSE:
Loads a plot from the plot table.
CALLING SEQUENCE:
LoadPlot, name [, length , x,y,qual, dx, dy,
title, xTitle, yTitle, text, color, linestyle,
thick, offset, subTitle, overallQual, symsize ]
INPUT:
name: a string or array of string
OUTPUTS:
length: the length of the relevant data
x, y: the plot values. To plot correctly the i-th plot loaded, ; ; type
Plot, x(0:length(i-1),i), y(0:length(i)-1,i)
or
Data_display, x, y, LENGTH = length
dx, dy: the errors in x- and y-directions
title, xTitle, yTitle, text, color, linestyle, thick, offset,
subTitle, overallQual, symsize: attributes of the plots loaded
RESTRICTION:
Works only after running init_data.pro
REMARK:
For better description of the parameters, see "data_display"
or
CALLS:
[Previous]
[Next]
NAME: Load Selection
PURPOSE: Loads in variables the data related to the plots selectioned.
CALLING SEQUENCE:
LoadSelection [, name, length, x, y, qual, dx, dy,
color, lineStyle, thick, offset, overallQual,
userSym, title, xTitle, yTitle, subtitle, text,
symsize ]
CALLS:
[Previous]
[Next]
NAME:
Load_Plot
PURPOSE:
Loading into variables a plot stored in the plot table.
CATEGORY:
Data Management
CALLING SEQUENCE:
Load_Plot, name [ ,x, y [, qualifier [, dx, dy ] ] ]
INPUT:
name: the name of the plot
OUTPUTS:
x, y : the points to be plotted
qualifier: the symbol number with which the points should
be plotted
dx, dy: the error of the points in x or y direction.
COMMON BLOCK:
Data, opaque, for access to the plot table
[Previous]
[Next]
NAME:
Load_User_CT
PURPOSE:
Read user defined color tables that have been
saved with the procedure "Save_User_CT"
CATEGORY
Input/Output
CALLING SEQUENCE:
Load_User_CT [, name] [, red, green, blue ]
INPUT ARGUMENT:
name: the name of the file containing the table. If this
parameter is not present, the file to open
will be asked interactively.
OUTPUT ARGUMENTS:
red, green, blue: the vectors containing the new loaded
color table.
COMMON BLOCK:
The block "Colors" is used to store the loaded table.
SIDE EFFECT:
By reading interactively the file name, windows
are used.
RESTRICTION:
Works only on graphics terminals.
CALLS:
[Previous]
[Next]
NAME:
LOADINTENS
PURPOSE:
Cette procedure extrait une image STOKES I d'un tableau d'images.
CATEGORY:
NRH1 fichier
CALLING SEQUENCE:
LOADINTENS , Tabl, Image, Num, Finfo, Lun
INPUTS:
TABL Tableau contenant les images (voir LEC1D pour le format)
NUM Indice de l'image a extraire dans le tableau
Parametres conserves pour la compatibilite des programmes
FINFO Structure d'indormation de fichier (NRH1_FILEINFO)
LUN Unite logique de lecture
KEYWORD PARAMETERS:
Non
OUTPUTS:
IMAGE Tableau 1 dim contenant l'image
CALLED BY:
ANIMPROF, FOLLOWPOS1D, PROFDECOMP1D
COMMON BLOCKS:
Non
RESTRICTIONS:
MODIFICATION HISTORY: (bonmartin@obspm.fr)
16/11/98 Adapte du logiciel XHELIO
[Previous]
[Next]
NAME:
LOADPOLAR
PURPOSE:
Cette procedure extrait une image STOKES V d'un tableau d'images.
Si STOKES V est abscent, IMAGE = STOKES I
CATEGORY:
NRH1 fichier
CALLING SEQUENCE:
LOADPOLAR , Tabl, Image, Num, Finfo, Lun, Ok
INPUTS:
TABL Tableau contenant les images (voir LEC1D pour le format)
NUM Indice de l'image a extraire dans le tableau
Parametres conserves pour la compatibilite des programmes
FINFO Structure d'indormation de fichier (NRH1_FILEINFO)
LUN Unite logique de lecture
OK =1 si STOKES V est abscent
KEYWORD PARAMETERS:
Non
OUTPUTS:
IMAGE Tableau 1 dim contenant l'image
CALLED BY:
ANIMPROF, FOLLOWPOS1D, PROFDECOMP1D
COMMON BLOCKS:
Non
RESTRICTIONS:
Si STOKES V est abscent STOKES I est retourne ainsi que OK=1 et
envoi d'un message
MODIFICATION HISTORY: (bonmartin@obspm.fr)
16/11/98 Adapte du logiciel XHELIO
[Previous]
[Next]
NAME:
LOBE
PURPOSE:
Convert the input phase (may be an array) to the principle lobe
defined as 0 to 360 degrees by default, or -180 to 180 degrees
by use of MID0 switch.
CATEGORY:
OVRO APC UTILITY
CALLING SEQUENCE:
phases = lobe(inphz[,/mid0])
INPUTS:
inphz an array or single value giving the phase in degrees
OPTIONAL (KEYWORD) INPUT PARAMETERS:
mid0 a switch indicating whether the principle lobe is
defined by -180 to 180, or 0 to 360.
ROUTINES CALLED:
OUTPUTS:
phases the output phases, rotated to the principle lobe,
0 to 360 degrees, by default, or -180 to 180 degrees
if MID0 switch is set.
COMMENTS:
CALLED BY:
ADJUST_AMF, ADJUST_REFCAL, AMPHIT, APCAL_ADD_27MANT [1], APCAL_ADD_2MANT
APCAL_ADD_2M_RL, APPLY_CAL, CHANPHZCHEK, CHECK_12AP, DAILY, MAKE_APCAL2, MAKE_APCAL3
NEWSCAN, PCLOSE, PHZFIT
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Written 25-Jul-2000 by Dale E. Gary
[Previous]
[Next]
NAME:
LOCATE_SCAN
PURPOSE:
Locates scans in all data (.ARC) files in filelist (or all files
in the !DEFAULTS.DATADIR directory) meeting the given criteria.
CATEGORY:
OVRO APC FILE UTILITY
CALLING SEQUENCE:
locate_scan[,filelist=filelist][,muxseqid=muxseqid][,obsid=obsid]$
[,srcname=srcname][,nant=nant][,scancode=scancode]
INPUTS:
OPTIONAL (KEYWORD) INPUT PARAMETERS:
filelist gives a list of file names to search. If omitted, all files
in !DEFAULTS.DATADIR are searched.
muxseqid gives the MUX sequence ID to match (this is rather obscure, but
main use is to look for MUXSEQID 15 or 17 (when taking CHANPHZ obs)
obsid gives the Observing Sequence ID to match
srcname gives the source name to match
nant gives the number of antennas to match
scancode gives the scancode to match
ROUTINES CALLED:
OUTPUTS:
COMMENTS:
CALLS: ***
GET_SCANINFO, GET_SCNTYP, WINT, WSTR
SIDE EFFECTS:
Write the results to the terminal/log window
RESTRICTIONS:
The input data (.ARC) files must have INDEX segments.
MODIFICATION HISTORY:
Written 27-Jul-2000 by Dale E. Gary
19-Oct-2000 DG
Added FILELIST keyword.
12-Nov-2006 DG
Added MUXSEQID
[Previous]
[Next]
NAME:
LOKMAP
PURPOSE:
Routine to mimic the output of the PDP-11 routine of the same name.
Returns status of the phase lock for each harmonic in an ASCII table.
Also inserts asterisks at the locations of the fitted frequencies.
CATEGORY:
OVRO APC DIAGNOSTIC
CALLING SEQUENCE:
out = lokmap(fcdata,iant,iosc,ftab,tctab,epoch)
INPUTS:
fcdata The full FCAL data array obtained from an FCAL sequence on
the CPC, as created in FCALCHEK.PRO. The array size is
FCDATA(nosc,nant,4096), where nosc=3 is the number of
oscillators, and nant is the number of antennas.
iant The antenna number of the antenna for which the output should
be generated. This is the ordinal (index) number 0-4.
iosc The oscillator number for which the output should be
generated. IOSC = 0,1,2 for Lo, Mid, Hi oscillator.
ftab The frequency table as contained in the FCPARM.FTH file.
The array size is FTAB(nant,nosc*3).
tctab The tuning current table as contained in the FCPARM.FTH file.
The array size is TCTAB(nant,nosc*3).
epoch A string giving the year, day of year, and start time of the
data (just tls.yrday+tls.timstr).
OPTIONAL (KEYWORD) INPUT PARAMETERS:
ROUTINES CALLED:
ftab2tc
OUTPUTS:
out The ASCII table, suitable for direct output.
COMMENTS:
CALLS: ***
FTAB2TC
CALLED BY:
WLOKMAP
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Written 29-Jul-1998 by Dale E. Gary
21-Aug-1998 DG
Added EPOCH argument so that output can be labelled with date
and time.
14-Mar-1999 DG
Update to use generally useful routine FTAB2TC.
13-Mar-2000 DG
Small change to allow operation for up to 8 antennas.
29-Jan-2001 DG
Changes to reflect new FCAL scheme.
[Previous]
[Next]
NAME:
LST
PURPOSE:
Calculate the Local Sidereal Time for the Solar Array at the
Owens Valley Radio Observatory, given a date and time.
CATEGORY:
OVRO SPAN UTILITY
CALLING SEQUENCE:
lst = lst(year,doy,time[,dut])
INPUTS:
year the 4-digit year
doy the day of year
time the time [msec]
dut the time difference UT1 - UTC [msec]. If omitted,
zero is used.
OPTIONAL (KEYWORD) INPUT PARAMETERS:
ROUTINES CALLED:
date2mjd
OUTPUTS:
lst the Local Sidereal Time for OVRO [msec]
COMMENTS:
CALLS: ***
DATE2MJD [1], DATE2MJD [2], DATE2MJD [3]
CALLED BY:
ACALCHEK, PNTCHEK, UPTIME
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Written 11-Mar-1997 by Dale Gary
11-May-1999 DG
Change JULDATE call to DATE2MJD, which is part of solarsoft
software tree
21-Jan-2000 DG
Small change to make the routine work when time is an array
14-Mar-2000 DG
Found a mistake (!) that may have had serious consequences.
Part of code that converts LST to positive when negative never
got executed.