[Previous]
[Next]
NAME:
W2L
PURPOSE:
Given a record and an offset, converts two consecutive words to
a long word.
CATEGORY:
OVRO SPAN DATA-ANALYSIS
CALLING SEQUENCE:
lword = w2l(rec,offset)
INPUTS:
rec an OVRO data or header record as returned by the GETDATA
or GETHEAD functions
offset the offset, in words (2-byte integers), to the first of
the two consecutive words to be converted to a long word
OPTIONAL (KEYWORD) INPUT PARAMETERS:
ROUTINES CALLED:
OUTPUTS:
lword the long word that results after conversion
COMMENTS:
CALLED BY:
DECODE, DUMPREC, FCAL_UPDATE, GAINCOR, LIMCHEK, PKUPCHEK, READ_MONITOR_SEG
SRSP_TL_DECODE, TL_DECODE, WATCHER, WRITE_GAINREC
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Written 31-Jan-1997 by Dale Gary
13-Feb-1997 DG
The unix keyword is no longer necessary due to use of !UNIX
system variable defined in DEFPARMS
11-Jan-2000 DG
Eliminated use of !UNIX variable by using !VERSION instead.
[Previous]
[Next]
NAME:W_HISTOGRAM
PURPOSE:
Return a distribution in which the number of elements in each bin is replaced by
the sum of each data element weight, if provided
CATEGORY:
CALLING SEQUENCE:
W_HISTOGRAM,DATA[,WEIGHT[,NORMALIZE=NORMALIZE]]
INPUTS:
data: array for each histogram has to be computed
WEIGHT: an array defining the wieght of each data point
OPTIONAL (KEYWORD) INPUT PARAMETERS:
some of the keywords accepted by IDL histogram function
NORMALIZE: set this keyword to normalize the histogram to unity area (1) or to number of data points (2)
ROUTINES CALLED:histogram
OUTPUTS:
The distributed histogram in which the number of elements in each bin is replaced by the sum
of the coresponding weight. The result may be normalized to unitt area or to total
number of elements of data array . If all weight's elements are set two 1, the result of w_histogram
is the same with that of histogram function.
COMMENTS:
CALLS: ***
ARR2STR [1], Arr2Str [2], BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3]
CORRELATE, DEFPARMS, DRAW_EVENT, FIRST, IBETA, JULDAY, LAST, LINFIT, LOADCT, MOMENT
OUTPLOT [1], OUTPLOT [2], OUTPLOT [3], PLOTDATA__DEFINE, PLOT_MED, PLOT_W, PROGMETER
QUERY, READ_MED, ROTATE_EVENT, R_CORRELATE, UNIQ [1], UNIQ [2], UNIQ [3], UTPLOT [1]
UTPLOT [2], UTPLOT [3], UTPLOT [4], UTPLOT [5], UTPLOT [6], WQUERY, WQUERY_EVENT
XMANAGER, break_file [4], psk_correlate
CALLED BY:
psk_correlate
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Create 28-March-2003 Gelu M. Nita
[Previous]
[Next]
NAME:
WACAL
PURPOSE:
Supervises analysis and solution of 2M ACAL data.
CATEGORY:
OVSA APC CALIBRATION ANALYSIS
CALLING SEQUENCE:
wcal,filename
INPUTS:
filename The name of the .ARC file containing the POINT
measurements.
OPTIONAL (KEYWORD) INPUT PARAMETERS:
ROUTINES CALLED:
acalchek, mountcal
OUTPUTS:
COMMENTS:
CALLS: ***
ACALCHEK, BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CVDOY, DECODE
FILENAME2DATE, FINDSEG, FINDSEGENTRIES, FIND_INDEX, GETDATA, GET_INDEX_STRUCT
GET_SEGMENTS, MOUNTCAL, MSEC2STR, OPENARC, WACAL_EVENT, XMANAGER, break_file [4]
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Written 11-Mar-2000 by Dale E. Gary
22-Jun-2002 DG
Added code to create a new output file (no longer defaults
to BORESITE.PNT) and use that output file when the SOLVE
button is selected, so that this routine is self-contained.
[Previous]
[Next]
NAME:
WAMPHIT
PURPOSE:
Supervises display and processing of results from
AMPHIT amplitude and phase fitting.
CATEGORY:
OVSA APC CALIBRATION ANALYSIS
CALLING SEQUENCE:
wamphit,filename
INPUTS:
filename The name of the .SAV file containing the output
from ANALYZE.
OPTIONAL (KEYWORD) INPUT PARAMETERS:
ROUTINES CALLED:
amphit
OUTPUTS:
COMMENTS:
CALLS: ***
AMPHIT, BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CW_BGROUP, OKTOWRITE, PCLOSE
PCOR12, UNIQ [1], UNIQ [2], UNIQ [3], WAMPHIT_EVENT, XMANAGER, break_file [4]
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Written 31-Mar-2000 by Dale E. Gary
06-Apr-2000 DG
Write polarization state to output file, obtained from input
filenames. Also include new keyword NDFAC in final call to AMPHIT
on saving the results.
14-Apr-2000 DG
Get rid of C:\TEMP references (use !Defaults.workdir)
28-Jul-2000 DG
Now writes NF, NBL, and NFILES to first line of .AMF file on save.
Also makes use of HEADER structure newly saved in ANALYZE output,
to give which antennas are available.
17-Dec-2002 DG
Added new arguments to calls to AMPHIT.
29-Sep-2004 DG
Start on adding dual-polarization capability. Reading and plotting
done, but still need to work on SAVE and probably some others.
07-Oct-2004 DG
Finished and tested routine. On SAVE, a single AMF file is created
with both polarizations.
15-Oct-2006 DG
Fixed triad_list to indicate ant 8 instead of ant 3 (no idea why it
was indicating ant 3)
[Previous]
[Next]
NAME:
WANALYZE
PURPOSE:
Supervises analysis and solution of PCAL data.
CATEGORY:
OVSA APC CALIBRATION ANALYSIS
CALLING SEQUENCE:
wcal,filename
INPUTS:
filename The name of the .ARC file containing the POINT
measurements.
OPTIONAL (KEYWORD) INPUT PARAMETERS:
ROUTINES CALLED:
analyze, basephz, amphit, plot_phz
OUTPUTS:
COMMENTS:
CALLS: ***
AMPHIT, ANALYZE [1], ANALYZE [2], ANALYZE [3], BASEPHZ, BREAK_FILE [1]
BREAK_FILE [2], BREAK_FILE [3], CVDOY, DECODE, FINDSEG, FINDSEGENTRIES, FIND_INDEX
GETDATA, GET_INDEX_STRUCT, GET_SEGMENTS, MSEC2STR, NINT [1], NINT [2], OPENARC
PLOT_PHZ, WANALYZE_EVENT, XMANAGER, break_file [4]
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Written 15-Mar-2000 by Dale E. Gary
23-Mar-2000 DG
Fixed bug that read srec and erec off by 1 column
30-Mar-2000 DG
Added some buttons for crude plotting and calibration
31-Mar-2000 DG
Added a button for creating a BASFIT input file for
baseline calibration.
14-Apr-2000 DG
Get rid of C:\TEMP references (use !Defaults.workdir)
10-May-2000 DG
Add 'i' to filenames, to reflect changes to ANALYZE (adds
polarization subscript to filename stem).
11-May-2000 DG
Now checks for existing analyzed files in !defaults.workdir,
and if they exist sets the analyze and select flags on startup.
15-Jun-2000 DG
Fix to handle 6 baselines (call to AMPHIT for Quickcal)
29-Dec-2000 DG
Fix small bug that occurred when there were no existing .SAV files.
[Previous]
[Next]
NAME:
WATCHER
PURPOSE:
Main monitoring routine, watches the DAILY.ARC file as records come
in to do various and sundry things as appropriate.
CATEGORY:
OVRO APC REALTIME
CALLING SEQUENCE:
watcher
INPUTS:
OPTIONAL (KEYWORD) INPUT PARAMETERS:
ROUTINES CALLED:
sysdoy, openarc, getlrecn, getdata, tl_decode, fcal_update, truncate, fst_mkparm,
flaremeter, fst_dswrite, fst_dsread
OUTPUTS:
COMMENTS:
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], DECODE, FCALCHEK, FCAL_UPDATE
FLAREMETER, FST_DSWRITE, FST_MKPARM, GCALCHEK, GETDATA, GETLRECN, GET_SCREEN_SIZE, L2W
LIMCHEK, NINT [1], NINT [2], OPENARC, PKUPCHEK, SCREENDMP, SYSDOY, TL_DECODE, TPANALYZE
TPCALCHEK, TRUNCATE, W2L, WATCHER_EVENT, WINDMETER, XMANAGER, break_file [4]
SIDE EFFECTS:
This list will grow. Receipt of segment types cause the following:
MONITOR check V/F against current frequency calibration (FCAL_UPDATE)
EOF truncate and delete the DAILY.ARC file (TRUNCATE)
RESTRICTIONS:
MODIFICATION HISTORY:
Written 26-Jul-1999 by Dale E. Gary
24-Jul-1999 DG
Added a command to clear the CPC's buffer on EOF, just before the
APC file is truncated.
31-Oct-1999 DG
Added windmeter to plot the wind speed and direction on receipt of a data record.
13-Nov-1999 DG
Changes to reflect new EOF handling.
18-Apr-2000 DG
Add automatic creation of TP FTS file and GIF file at end of
a solar scan.
12-Nov-2000 DG
Add automatic analysis of REFTPCAL (Cas A calibration).
29-Jan-2001 DG
Add automatic analysis of FCAL, GCAL
10-May-2001 DG
Possibly fixed long standing bug that caused routines to be called
with HREC = 0
24-Feb-2002 DG
Added call to FLAREMETER on receipt of a SOLAR scan header
12-Mar-2002 DG
Attempt to avoid startup problems with Flaremeter by starting it
on receipt of the first SOLAR data rather than on receipt of the
SOLAR header.
10-Jul-2003 DG
Added /HIDE keyword to SPAWN command to hide the command window.
18-Jul-2003 DG
Added code to avoid the infinite loop of calls to TRUNCATE when
DAILY.ARC is open by another process.
12-Jan-2004 DG
Added garbage collection call (HEAP_GC) to eliminate memory leaks.
Also made slight change to Windmeter (changes windbutton text)
17-Jan-2004 DG
Added printing of more information at HEAD_GC call.
21-Jul-2004 DG
PEAKUP (and perhaps others) seems to send an empty record at the end
instead of an EOS. The empty record is characterized by data values -1.
I added code to interpret all empty records as an EOS, so the analysis
routine will start for such cases.
07-Aug-2004 DG
Added check of TRAJECTORY segment, looking for SATELLITE sources. If
found, and an appropriate satellite ephemeris file is found, then the
emphemeris data are written to the TRAJECTORY segment and posted to
the ARC file.
25-Jul-2005 DG
Fixed a bug with satellite trajectories, when there were no
satellite emphemeris files.
08-Jan-2006 DG
On receipt of a header, call FST_mkparm, which creates a parameter file
for use by the FASR Subsystem Testbed.
11-Apr-2006 DG
Add FST enable button, and provision to start and stop FST acquisitions.
14-Apr-2006 DG
Add check on whether FST command was received (once per second) and resend
if not.
02-Jun-2006 DG
Added provision for sending GEOMETRY structure via fst_write, and regularized
handling of FST to start on receipt of first DATA record after HEADER.
14-Jun-2006 DG
Move geometry handling to FST_MKPARM routine, and fix bug that caused FST START
command to be repeated over and over on receipt of data record.
11-Aug-2006 DG
Set default FSTbutton state to checked/on.
[Previous]
[Next]
NAME:
WD_NRH_ROUT
PURPOSE:
Cette procedure contient les widgets pour le tarce des flux des
routines afin de generer des images PNG pouvant servir a la
visualisation sur le WEB
CATEGORY:
NRH Routine
CALLING SEQUENCE:
WD_NRH_ROUT
INPUTS:
KEYWORD PARAMETERS:
GROUP Identification du Widget appelant
OUTPUTS:
OPTIONAL OUTPUTS:
CALLS: ***
CW_FIELD, NRHR_PLOTI, WD_NRH_ROUT_EVENT, XMANAGER
COMMON BLOCKS:
SIDE EFFECTS:
Cette procedure prend le dernier fichier nrin*.pro disponible
dans le repertoire courant et boucle si aucun fichier n'est
disponible
RESTRICTIONS:
PROCEDURE:
Cette procedure appelle NRHR_PLOTI periodiquement et enregistre
le trace dans rout.png
EXAMPLE:
MODIFICATION HISTORY:
Ecrit par:J Bonmartin (bonmartin@obspm.fr) le 11/10/00
[Previous]
[Next]
NAME:
WDIALOG_HISTORY
PURPOSE:
Reads an APC data file, finds all DIALOG HISTORY segment records,
and displays them as ASCII text, for viewing, printing, or saving
to a file.
CATEGORY:
OVSA APC WIDGET
CALLING SEQUENCE:
wdialog_history,filename
INPUTS:
filename the path and name of an OVSA data file
OPTIONAL (KEYWORD) INPUT PARAMETERS:
ROUTINES CALLED:
openarc, getdata, wint, wstr, okaytowrite, break_file, dumprec, toprinter
OUTPUTS:
COMMENTS:
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CW_PDMENU, DIALOG_HISTORY_EVENT
GETDATA, OKTOWRITE, OPENARC, OVSA_GET_INDEX, PICKFILE, RDBYTE, STR_SEP, TOPRINTER
XMANAGER, break_file [4]
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Written 11-Mar-2000 by Dale E. Gary
13-Mar-2000 DG
Slight change to separate and trim blanks from dialog strings.
18-Jul-2001 GN
Replaced get_index by ovsa_get_index to avoid conflict with Yohkoh
[Previous]
[Next]
NAME:
WDLA_ADJ
PURPOSE:
Simple table widget to allow adjustment of delay offsets, in case
of a bad fit to the delay peak.
CATEGORY:
OVRO APC CALIBRATION
CALLING SEQUENCE:
wdla_adj,in,out
INPUTS:
in the array of delay offsets to be adjusted, as determined by
DLASCAN routine.
OPTIONAL (KEYWORD) INPUT PARAMETERS:
ROUTINES CALLED:
OUTPUTS:
out a _pointer_ to the returned array of adjusted delay offsets.
The pointer points to a copy of IN, if no adjustments
were made.
COMMENTS:
CALLS: ***
WDLA_ADJ_EVENT, XMANAGER
CALLED BY:
DLASCAN
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Written 11-Jan-2001 by Dale E. Gary
10-Jul-2004 DG
Add case of 21 baselines (7 antennas)
07-Apr-2006 DG
Add EDITABLE keyword to TABLE widget, which is now necessary
for IDL 6.2
[Previous]
[Next]
NAME:
WDUMPREC
PURPOSE:
Reads an APC data file and interactively shows raw or slightly
formatted data dump information, for viewing, printing, or saving
to a file.
CATEGORY:
OVRO APC DATA-ANALYSIS
CALLING SEQUENCE:
wdumprec,filename,recn
INPUTS:
filename the path and name of an OVRO data file
recn the ordinal number of the record within the data file, at
which to start the dump.
OPTIONAL (KEYWORD) INPUT PARAMETERS:
ROUTINES CALLED:
openarc, getdata, wint, wstr, okaytowrite, break_file, dumprec, toprinter
OUTPUTS:
COMMENTS:
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CW_PDMENU, DECODE, DUMPMAIN_EVENT
DUMPREC, FINDSEG, GETDATA, GET_HEAD_STRUCT, GET_OBS_STRUCT, OKTOWRITE, OPENARC
OVSA_GET_INDEX, PICKFILE, TOPRINTER, UNIQ [1], UNIQ [2], UNIQ [3], WINT, WSTR, XMANAGER
break_file [4]
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Written 26-Sep-1997 by Dale Gary
12-Jan-1998 DG
Changed to Menubar operation rather than menu buttons
17-May-1999 DG
Changed call to DUMPREC to specify 16 entries in each line in case
of RAW dump. Also changed EREC to set to RECN in STATE structure
so that WDUMPREC maintains expected behavior.
26-Jul-1999 DG
Vastly improved printing, simply by using the TOPRINTER procedure
11-Jan-2000 DG
Eliminated use of !UNIX by using !DEFAULTS.FONT instead.
20-Jul-2004 DG
Significant additions to implement frequency selection (more
sophisticated selections should be added).
[Previous]
[Next]
NAME:
WEEKDAY
PURPOSE:
Compute weekday given year, month, day.
CATEGORY:
CALLING SEQUENCE:
wd = weekday(y,m,d,[nwd])
INPUTS:
y, m, d = Year, month, day (Like 1988, 10, 31). in
KEYWORD PARAMETERS:
OUTPUTS:
wd = Returned name of weekday. out
nwd = optional Weekday number. out
CALLS: ***
YMD2JD [1], YMD2JD [2], YMD2JD [3]
CALLED BY:
DT_TM_MAK [1], DT_TM_MAK [2], DT_TM_MAK [3]
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner. 31 Oct, 1988.
Johns Hopkins University Applied Physics Laboratory.
RES 18 Sep, 1989 --- converted to SUN
Copyright (C) 1988, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
[Previous]
[Next]
NAME:
WEEKDAY
PURPOSE:
Compute weekday given year, month, day.
CATEGORY:
CALLING SEQUENCE:
wd = weekday(y,m,d,[nwd])
INPUTS:
y, m, d = Year, month, day (Like 1988, 10, 31). in
KEYWORD PARAMETERS:
OUTPUTS:
wd = Returned name of weekday. out
nwd = optional Weekday number. out
CALLS: ***
YMD2JD [1], YMD2JD [2], YMD2JD [3]
CALLED BY:
DT_TM_MAK [1], DT_TM_MAK [2], DT_TM_MAK [3]
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
R. Sterner. 31 Oct, 1988.
Johns Hopkins University Applied Physics Laboratory.
RES 18 Sep, 1989 --- converted to SUN
Copyright (C) 1988, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
[Previous]
[Next]
NAME:
WFSURVEY
PURPOSE:
Widget routine to show the results of a Frequency Survey,
which is an all-frequency scan in total power.
CATEGORY:
OVRO APC DATA ANALYSIS
CALLING SEQUENCE:
wfsurvey,filename,srec
INPUTS:
filename the name of the file containing data to be plotted.
srec the record number to start plotting from. Plotting
will continue until an EOS segment is found.
OPTIONAL (KEYWORD) INPUT PARAMETERS:
ROUTINES CALLED:
OUTPUTS:
COMMENTS:
CALLS: ***
BOX_CURSOR, COORD_CONV [1], COORD_CONV [2], CW_BGROUP, FREESCAN, FTAB2TC, GETDATA
INSERT_FSURVEY, INTERPOL, NEWSCAN, OPENARC, OVSA_GET_INDEX, READ_MONITOR_SEG
TL_DECODE, WFSURVEY_EVENT, XMANAGER
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Written 26-Nov-2000 by Dale Gary
15-Feb-2002 DG
Changed to get frequency calibration from MONITOR segment
in the same data file. Also added a couple of buttons to
control plotting full resolution and solid lines.
[Previous]
[Next]
NAME:
WGETGPS
PURPOSE:
WIDGET program to show global positioning satellite information, including
HA and DEC pointing coordinates. What is shown in the table is the
rise/set times and positions over 24 h on today's date. When a satellite
is selected, the HA and DEC is plotted for the selected satellite, for
the duration of its visible period. The term visible means it is in a part
of the sky that the small antennas can point to.
CATEGORY:
OVRO APC SCHEDULE
CALLING SEQUENCE:
wgetgps,sat=sat
INPUTS:
OPTIONAL (KEYWORD) INPUT PARAMETERS:
sat a pointer to a structure that contains information about the
selected satellite.
ROUTINES CALLED:
OUTPUTS:
COMMENTS:
CALLS: ***
CW_BGROUP, GETGPSLIST, NINT [1], NINT [2], SYSDOY, WGETGPS_EVENT, XMANAGER
CALLED BY:
SCHEDULE
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Written 13-Mar-2005 by Dale E. Gary
[Previous]
[Next]
NAME:
WGETSATS
PURPOSE:
WIDGET program to show geostationary satellite information, including
HA and DEC pointing coordinates. What is shown in the table is the
average position over 24 h on today's date, along with total deviation
from that average position. When a satellite is selected, its actual
position for the current time is also shown. Uses data from GEO.TXT,
updated daily from http://www.celestrak.com/NORAD/elements/geo.txt .
Optionally, HA and DEC for the selected satellite, for the 24 hour
period, can be plotted.
CATEGORY:
OVRO APC SCHEDULE
CALLING SEQUENCE:
wgetsats,sat=sat
INPUTS:
OPTIONAL (KEYWORD) INPUT PARAMETERS:
sat a pointer to a structure that contains information about the
selected satellite.
ROUTINES CALLED:
OUTPUTS:
COMMENTS:
CALLS: ***
CW_BGROUP, GETSATS, NINT [1], NINT [2], SYSDOY, WGETSATS_EVENT, XMANAGER
CALLED BY:
SCHEDULE
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Written 10-Oct-2002 by Dale E. Gary
08-Jul-2004 DG
Added a line to sort the table according to HA of satellite.
17-Jan-2005 DG
Fixed the sorting business--I was to sort the structure, not
the table.
[Previous]
[Next]
NAME:
WINDMETER
PURPOSE:
A widget that displays a wind meter with a vector that indicates
wind speed and direction, with option to plot a time history of
the wind.
CATEGORY:
OVRO APC UTILITY
CALLING SEQUENCE:
id = windmeter(/INIT,[GROUP=group][,LABEL=label]$
[,BUTTONTEXT=buttontext])
status = windmeter(id,speed,dir)
status = windmeter(id,/DESTROY)
INPUTS:
id the widget ID returned by a previous, initializing
call to WINDMETER (that used the /INIT switch).
This input is ignored if INIT keyword is set.
speed the new wind speed value to set the widget to [mph].
This input is ignored if INIT keyword is set.
dir the new wind direction to set the widget to [degrees].
This input is ignored if INIT keyword is set.
OPTIONAL (KEYWORD) INPUT PARAMETERS:
init a keyword switch that governs which of two calling
sequences is being used. If set, a new widget is
created. If not set, an existing widget is to be
updated.
destroy a keyword switch that destroys the widget created by
a previous call to WINDMETER (that used the /INIT switch)
group the top base id of the calling program, so that the widget
will be destroyed if the calling program exits.
This input is ignored if INIT keyword is not set.
label an optional title for the wind meter window. If
omitted, the title "Latest Wind Info" is used.
This input is ignored if INIT keyword is not set.
buttontext
an optional text for a button, such as a cancel button
to close the wind meter window.
If omitted, no button is present. If set and the user
clicks on the button an event is generated. To detect
the event, call WIDGET_EVENT as discussed below.
This input is ignored if INIT keyword is not set.
ROUTINES CALLED:
OUTPUTS:
id the widget id of the compound widget (only when INIT
keyword is set).
status the status of the cancel button (only when INIT keyword
is not set). If the cancel button has been pressed,
status='Cancel' and if not an empty string ('') is returned.
If an error in calling sequence occurs (ID or VALUE
is not supplied) then status='Cancel' also. NB: If
the widget is initialize without a button, status
will always be an empty string ('')
COMMENTS:
To use the routine, call it with the /INIT switch to create the
widget, then call it repeatedly without the /INIT switch to update
it. When done with the widget, it should be destroyed.
CALLS: ***
CALDAT, GET_SCREEN_SIZE, UTPLOT [1], UTPLOT [2], UTPLOT [3], UTPLOT [4], UTPLOT [5]
UTPLOT [6], WINDMETER_EVENT, WINDMETER_GETVALUE, WINDMETER_SETVALUE, XACK, XKILL
XREALIZE, XSHOW
CALLED BY:
WATCHER
SIDE EFFECTS:
RESTRICTIONS:
The wind meter widget must be explicitly destroyed.
MODIFICATION HISTORY:
Written 31-Oct-1999 by Dale E. Gary
Uses structure from the PROGMETER routine.
Make sure that the original graphics window is restored.
[Previous]
[Next]
NAME:
WINT
PURPOSE:
Obtain integer values from the user via an IDL form. This is
just a convenient interface to the CW_FORM routine.
CATEGORY:
OVRO UTILITY
CALLING SEQUENCE:
out = wint,title,text=text,label,init,tag,button=button
INPUTS:
title a string label, which can be used variously as a
title, heading, or prompt
label a string array of the same length as the INIT and
TAG arrays, giving a text label to be associated
with each integer value the user is to enter
init an array of integer initializers, of the same length
as the LABEL and TAG arrays
tag an array of structure tags, of the same length as
the LABEL and INIT arrays, by which the output
structure members can be accessed
OPTIONAL (KEYWORD) INPUT PARAMETERS:
text an optional string array giving lines of text to
follow the title. This is intended as further
descriptive text for clarity.
button an optional array of string labels for buttons.
If omitted, a single OK button is present. The
button names are also used as structure tags in
the output structure, so they must be single words
without spaces.
ROUTINES CALLED:
OUTPUTS:
out a structure containing an entry for each integer
plus an entry for each button. The tag names
for the integers are as given in the TAG array,
while the tag names for each button are the
button labels themselves. If a button has been
pressed, its value in the structure will be 1,
otherwise 0.
COMMENTS:
CALLS: ***
CW_FORM
CALLED BY:
LOCATE_SCAN, WDUMPREC
SIDE EFFECTS:
RESTRICTIONS:
The field widths of the integers is currently limited to 5.
The integer widgets and buttons are oriented in rows, so
there is a practical limit to the number allowed. The button
labels are also used as structure tags, so care must be taken
to ensure they are suitable (e.g. do not use spaces)
MODIFICATION HISTORY:
Written 09-Apr-1997 by Dale E. Gary
[Previous]
[Next]
NAME:
WLOKMAP
PURPOSE:
Gives widget access to the Lokmap routine, so that the results
can be paged through. Interactively shows lokmaps for all
oscillators on all antennas.
CATEGORY:
OVRO APC DIAGNOSTIC
CALLING SEQUENCE:
wlokmap,fcdata,tctab
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.
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). Passed through to LOKMAP.
OPTIONAL (KEYWORD) INPUT PARAMETERS:
ROUTINES CALLED:
lokmap
OUTPUTS:
COMMENTS:
CALLS: ***
CW_BGROUP, CW_PDMENU, LOKMAIN_EVENT, LOKMAP, TOPRINTER, XMANAGER
CALLED BY:
FCALCHEK
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Written 29-Jul-1998 by Dale E. Gary
21-Aug-1998 DG
Implement printing using the new TOPRINTER command, and added
the Epoch argument
11-Jan-2000 DG
Eliminated use of !UNIX variable by using !DEFAULTS.FONT instead.
13-Mar-2000 DG
Fixed to work with up to 8 antennas. Still would not work if some
antennas are skipped, since only NANT is known to this routine, not
which antennas make up the N antennas.
29-Jan-2001 DG
Removed now unnecessary FTAB variable, to reflect new FCAL scheme.
[Previous]
[Next]
NAME:
WPHZFIT
PURPOSE:
Widget routine to help adjust phases for lobe ambiguities, to
give a consistent solution for all baselines.
CATEGORY:
OVRO APC PHASE CALIBRATION
CALLING SEQUENCE:
wphzfit,calout[,info=info]
INPUTS:
calout output of AMPHIT, an array of scan-averaged amplitudes and
phases, of size CALOUT(NCOL,NF,NBL) where NCOL=6 is the
number of columns, with the contents:
f_GHz amp damp pha dpha sigma
NF=6 is the number of frequencies in standard PCAL observing
sequence, and NBL=7 is the current number of baselines not
including small-small baselines.
sn specifies Signal to Noise ratio to use when deciding what
frequencies to use (this is just passed on to PHZFIT). If
omitted, the standard value of 2.0 is used.
OPTIONAL (KEYWORD) INPUT PARAMETERS:
info a string variable containing information about the source,
which will be appended to the title of the widget window.
ROUTINES CALLED:
pclose, phzfit
OUTPUTS:
COMMENTS:
CALLS: ***
GET_SCREEN_SIZE, PCLOSE, PHZFIT, WPHZFIT_EVENT, XMANAGER
CALLED BY:
BASEPHZ, DAILY, daily_cal
SIDE EFFECTS:
Currently just writes a file !DEFAULTS.WORKING+SAVE.TXT
RESTRICTIONS:
This routine will likely have to be modified when additional baselines
are added.
MODIFICATION HISTORY:
Written 09-Sep-1999 by Dale E. Gary
14-Apr-2000 DG
Get rid of C:\TEMP references (use !Defaults.workdir)
09-May-2000 DG
Add NOLOBE switch to PCLOSE call for phase slope closure.
11-May-2000 DG
Check that closed PSLP and POFF actually go through the points,
or if POFF needs to be adjusted by +/- 360 degrees.
28-May-2000 DG
Change to use SIGMA of fit parameters rather than CHI-SQUARE
16-Jun-2000 DG
Changes to (sort-of) get the routine working for 6-element. Not
general.
30-Aug-2004 DG
Add keyword passing of information string, to identify the source.
06-Nov-2005 DG
Add support for 7 antennas (11 baselines)
18-Jan-2006 DG
Added SN input, to allow lowering of Signal to Noise if too many
baselines are lost due to noisy data. Default is 2.0, but it can
be lowered to 1.5 or so if desired.
[Previous]
[Next]
NAME:
WPOINT
PURPOSE:
Supervises analysis and solution of interferometric POINT data.
CATEGORY:
OVRO APC CALIBRATION ANALYSIS
CALLING SEQUENCE:
wpoint,filename
INPUTS:
filename The name of the .ARC file containing the POINT
measurements.
OPTIONAL (KEYWORD) INPUT PARAMETERS:
ROUTINES CALLED:
pntchek, mountcal
OUTPUTS:
COMMENTS:
CALLS: ***
CVDOY, DECODE, FINDSEG, FINDSEGENTRIES, FIND_INDEX, GETDATA, GET_INDEX_STRUCT
GET_SEGMENTS, MOUNTCAL, MSEC2STR, OPENARC, PNTCHEK, WPOINT_EVENT, XMANAGER
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Written 29-Dec-1999 by Dale E. Gary
[Previous]
[Next]
NAME:
WPREFERENCES
PURPOSE:
Widget routine to read, save, and change preference files for
OVRO data analysis.
CATEGORY:
OVRO APC DATA ANALYSIS
CALLING SEQUENCE:
wpreferences
INPUTS:
OPTIONAL (KEYWORD) INPUT PARAMETERS:
ROUTINES CALLED:
OUTPUTS:
COMMENTS:
CALLS: ***
CW_BGROUP, DEFPARMS, PICKFILE, WPREFERENCESMAIN_EVENT, XMANAGER
CALLED BY:
LAUNCHER, OVSA_EXPLORER formerly OVSA_PRESUB
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Written 26-Sep-1997 by Dale Gary
21-Mar-1998 DG
Added provision for saving and displaying the name of the
current preferences file in the base widget label. Also
added the "RESET to Defaults" button.
11-Jan-2000 DG
Eliminated use of !UNIX variable by using !DEFAULTS.FONT instead.
Added four new entries to preferences: Ephemdir, Webdir, Cmddir, Font.
20-Jul-2000 DG
Fixed incorrect indication of an error on opening the widget.
01-Jan-2004 GN
Added /No_Block keyword in calling of XManager
[Previous]
[Next]
NAME:
WREGION
PURPOSE:
WIDGET program to show solar active region information, including
pointing offsets. Solar data are obtained from the EPHEM.REC file,
which is included in each data scan.
CATEGORY:
OVRO APC SCHEDULE
CALLING SEQUENCE:
wregion
INPUTS:
OPTIONAL (KEYWORD) INPUT PARAMETERS:
ROUTINES CALLED:
OUTPUTS:
COMMENTS:
CALLS: ***
CNV_H2XY, DECODE, PANDB, SET_LABELS, SYSDOY, TL_DECODE, WREGION_EVENT, XMANAGER
CALLED BY:
SCHEDULE
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Written 17-Mar-1999 by Dale E. Gary
27-Jul-1999 DG
Significant changes to allow it to work more closely with the SCHEDULE.
The routine can be run within the widget heirarchy of SCHEDULE now,
and sends back information on the active region selected.
11-Jan-2000 DG
Eliminated hardwired directory locations.
22-Jul-2005 DG
Add code to handle case of NO numbered regions on disk
[Previous]
[Next]
NAME:
WRITE_DAILY
PURPOSE:
Writes the DAILY phase cal solution to an OVSA data (.ARC)
file.
CATEGORY:
OVSA APC CALIBRATION SUPPORT
CALLING SEQUENCE:
result = write_daily(filename,lines,refscan)
INPUTS:
filename The name of the .ARC file containing the data that were
analyzed, and into which the results of the analysis
are to be written.
lines The fit parameters, encoded as an array of text strings.
There are two header lines, then one line for each scan
containing HREC, TREF, and then PSLP and POFF for each
baseline (NANT*2 - 3 baselines).
scan The array of SCAN structures (defined in DAILY()),
corresponding to the scans used.
OPTIONAL (KEYWORD) INPUT PARAMETERS:
ROUTINES CALLED:
OUTPUTS:
result A flag to indicate the success or failure of the call.
COMMENTS:
CALLS: ***
GETDATA, HMS2SEC, MSEC2STR, NINT [1], NINT [2], OPENARC, TLSNOW, TL_DECODE, TL_ENCODE
CALLED BY:
DAILY
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Written 23-Jul-2000 by Dale E. Gary
[Previous]
[Next]
NAME:
WRITE_FCHIST
PURPOSE:
Writes a history file of frequency calibration update parameters
determined during analysis of MONITOR segments (FCAL_UPDATE)
CATEGORY:
OVRO APC ANALYSIS FCAL
CALLING SEQUENCE:
result = write_fchist(VF_tab,tls)
INPUTS:
VF_tab the update table of tuning current changes corresponding
to the three oscillators of each antenna
tls a standard time/label structure from the scan header
segment record of the scan.
OPTIONAL (KEYWORD) INPUT PARAMETERS:
ROUTINES CALLED:
OUTPUTS:
result gives an indication of the success of the attempt to
write the updates to the file. If -1, the attempt
failed, 0 otherwise.
COMMENTS:
The data are written to the standard files, yyyymm.UPD, where yyyy
is the 4-digit year, mm is the 2-digit month. If a file does not
exist, it is created. If the file exists, the new entries are
appended to the file.
CALLS: ***
CVDOY
CALLED BY:
FCAL_UPDATE
SIDE EFFECTS:
Data are written to standard files.
RESTRICTIONS:
MODIFICATION HISTORY:
Written 18-Aug-1999 by Dale E. Gary
23-May-2000 DG
Modified to work with 6 antennas.
[Previous]
[Next]
NAME:
WRITE_FCPARM
PURPOSE:
Writes the frequency parameters determined during gain calibration
(FCALCHEK) into standard database files, one for each antenna.
CATEGORY:
OVRO APC ANALYSIS FCALCHEK
CALLING SEQUENCE:
result = write_fcparm(TC_tab,sigma,tls[,msglun=msglun])
INPUTS:
TC_tab the updated table of tuning current coefficients, of size [NANT,5,NOSC]
sigma an array of standard deviations of the data relative
to the fits (from POLY_FIT routine called in TCFIT2), of size [NANT,NOSC]
header the HEADER structure from the header segment of the FCAL scan.
tls a standard time/label structure from the scan header
segment record of the FCAL scan.
OPTIONAL (KEYWORD) INPUT PARAMETERS:
msglun the logical unit number of FCAL.MSG file. If nonzero,
indicates that the routine was called from a command
file, so issue no modal messages, and print any error
messages to msglun.
ROUTINES CALLED:
OUTPUTS:
result gives an indication of the success of the attempt to
write the offsets to the file. If -1, the attempt
failed, 0 otherwise.
COMMENTS:
The data are written to the standard files, yyyymm_n.FCH, where yyyy
is the 4-digit year, mm is the 2-digit month, and n is the antenna
number. If a file does not exist, it is created. If the file exists
it is searched for an entry corresponding to the date and time in the
header. If no entry exists a new entry is inserted in the appropriate
place. If an entry for this date does already exist then the
user is asked to verify overwriting the existing data.
CALLS: ***
CVDOY
CALLED BY:
FCALCHEK
SIDE EFFECTS:
Data are written to standard files.
RESTRICTIONS:
MODIFICATION HISTORY:
Written 15-Jun-1998 by Dale E. Gary
14-Jan-2001 DG
Completely rewritten for the new FCAL scheme, which uses a 4th-degree
polynomial fit.
[Previous]
[Next]
NAME:
WRITE_FLUXNRH
PURPOSE:
Ecriture d'un fichier de flux , format FITS
CATEGORY:
Traitements NRH
CALLING SEQUENCE:
WRITE_FLUXNRH, File, Header, Flux, Time, Str_lim
INPUTS:
FILE Nom du fichier a ecrire
HEADER Header FITS du fichier ayant servi a calculer le flux
FLUX Tableau de flux
TIME Tableau des heures corespondantes (ms)
STR_LIM Structure contenant les limites definies pour le calcul
(voir RH_2D)
CALLED BY:
FLUX_NRH2
PROCEDURE:
Cette procedure modifie le header d'origine et ecritle fichier FITS.
Elle genere un Header primaire puis le Header modifie en EXTENSION 1
puis enregistre les tableaux de TEMPS et de FLUX sous forme de table
binaire avec en ligne 1 et les colonnes TIME et FLUX.
Dans le cas ou on calcule le flux sur plusieurs regions, en conservant
les autres parametres, le resultat est enregistre a la fin du fichier
dans une nouvelle extension
CALLS: ***
FXBCREATE [1], FXBCREATE [2], FXBFINISH [1], FXBFINISH [2], FXBHMAKE [1]
FXBHMAKE [2], FXBWRITE [1], FXBWRITE [2], FXHMODIFY [1], FXHMODIFY [2], FXPAR [1]
FXPAR [2], HEADFITS [1], HEADFITS [2], HEADFITS [3], SXADDPAR [1], SXADDPAR [2]
SXADDPAR [3], SXDELPAR [1], SXDELPAR [2], SXDELPAR [3]
EXAMPLE:
CPT_FLUX_NRH2, Str_fic.file, Str_lim, Flux, Time
Header = HEADFITS(str_fic.file, EXTEN = 1)
File= MOD_NRHFILE(Str_fic.file,CONTENT='f', Heure=Str_lim.hd, $
DIRECTORY= 'Current')
WRITE_FLUXNRH,File, Header, Flux, Time, Str_lim
Calcule le flux, en fonction des limites donnees dans str_lim
Lit le Header du fichier d'images
Definit le nom du fichier de flux
Ecrit le fichier
MODIFICATION HISTORY:
Ecrit par: J BONMARTIN le 13/02/98 (bonmartin@obspm.fr)
Le 10/05/99 Enleve FILENAME dans le HEADER d'extension (JB)
[Previous]
[Next]
NAME:
WRITE_GAINREC
PURPOSE:
Formats the gain parameters and data determined during gain calibration
(GCALCHEK) into a Gain Parameter segment and returns it for writing.
CATEGORY:
OVRO APC ANALYSIS GCALCHEK
CALLING SEQUENCE:
noupdate = write_gainrec(header,gcparm,offsets,gains,[,msglun=msglun])
INPUTS:
header the header structure derived from the header of the GCAL
scan.
offsets the array of NANT*NANT offsets determined by GCALCHEK.
gcparm an array of size (6,NANT) containing the gain parameters
as determined by GCALCHEK.
gains the modeled RCVR, ND, and RESID as determined by GCALCHEK.
OPTIONAL (KEYWORD) INPUT PARAMETERS:
msglun the logical unit number of GCAL.MSG file. If nonzero,
indicates that the routine was called from a command
file, so issue no modal messages, and print any error
messages to msglun.
ROUTINES CALLED:
tl_encode
OUTPUTS:
noupdate indicates whether an existing C:\EPHEM\GPARM.REC file should
be updated (or whether none exists and so one should be
written). If 0, the file should be written. If 1, the
file should not be written. This latter condition occurs
when the existing file has a later date that the currently
analyzed GCAL.
COMMENTS:
The data are written to the standard file, GPARM.REC, which is the
Gain Parameter segment that will appear in each subsequent data file
in the HOUSEKEEPING scan. If a GPARM.REC already exists in
!DEFAULTS.EPHEMDIR, it is read and used as a template. If not, a new
record is created.
CALLS: ***
NINT [1], NINT [2], TL_ENCODE, W2L
CALLED BY:
GCALCHEK
SIDE EFFECTS:
Data are written to the standard file.
RESTRICTIONS:
MODIFICATION HISTORY:
Written 22-Nov-1999 by Dale E. Gary
26-Nov-1999 DG
Fixed bug in writing the offsets--bytes must be written as packed
integers.
01-Dec-1999 DG
Changed to merely return the filled-in segment without writing it
to disk. Writing will be handled by GCALCHEK
11-Jan-2000 DG
Eliminated hardwired directory locations.
06-Nov-2003 DG
Changed to work for either 3-record case (prior to 2003.310) where
only R data are written, or for 6-record case (after 2003.310) where
both R and L data are written.
14-Nov-2003 DG
Fixed a bug in writing the datablock that caused it to be mostly
zero since day 1! It was never used before, but will be in the
future.
[Previous]
[Next]
NAME:
WRITE_GCPARM
PURPOSE:
Writes the gain parameters determined during gain calibration
(GCALCHEK) into a standard database file.
CATEGORY:
OVRO APC ANALYSIS GCALCHEK
CALLING SEQUENCE:
result = write_gcparm(gcparm,tls[,msglun=msglun])
INPUTS:
gcparm an array of gain parameters as determined by GCALCHEK.
tls a standard time/label structure from the scan header
segment record of the GCAL scan.
OPTIONAL (KEYWORD) INPUT PARAMETERS:
msglun the logical unit number of GCAL.MSG file. If nonzero,
indicates that the routine was called from a command
file, so issue no modal messages, and print any error
messages to msglun.
ROUTINES CALLED:
OUTPUTS:
result gives an indication of the success of the attempt to
write the offsets to the file. If -1, the attempt
failed, 0 otherwise.
COMMENTS:
The data are written to the standard file, yyyymm.GNP, where yyyy
is the 4-digit year and mm is the 2-digit month. If the file
does not exist, it is created. If the file exists it is searched
for an entry corresponding to the date and time in the header. If
no entry exists a new entry is inserted in the appropriate
place. If an entry for this date does already exist then the
user is asked to verify overwriting the existing data.
CALLS: ***
CVDOY
CALLED BY:
GCALCHEK
SIDE EFFECTS:
Data are written to the standard file.
RESTRICTIONS:
MODIFICATION HISTORY:
Written 14-Mar-1998 by Dale E. Gary
15-Mar-1998 DG
Added msglun switch for unattended operation.
15-Jun-1998 DG
Changed name of routine and made slight change to header format
13-Mar-2000 DG
Changed to work with up to 8 antennas.
11-Dec-2000 DG
Change "nominal" ND factor from 0 to 1, for missing/bad data.
07-Apr-2006 DG
Fix problem with bad data printing NaN in output file--set to
default value of 1 (attenuator factor)
[Previous]
[Next]
NAME:
WRITE_GCPARM
PURPOSE:
Writes the gain parameters determined during gain calibration
(GCALCHEK) into a standard database file.
CATEGORY:
OVRO APC ANALYSIS GCALCHEK
CALLING SEQUENCE:
result = write_gcparm(gcparm,tls[,msglun=msglun])
INPUTS:
gcparm an array of gain parameters as determined by GCALCHEK.
tls a standard time/label structure from the scan header
segment record of the GCAL scan.
OPTIONAL (KEYWORD) INPUT PARAMETERS:
msglun the logical unit number of GCAL.MSG file. If nonzero,
indicates that the routine was called from a command
file, so issue no modal messages, and print any error
messages to msglun.
ROUTINES CALLED:
OUTPUTS:
result gives an indication of the success of the attempt to
write the offsets to the file. If -1, the attempt
failed, 0 otherwise.
COMMENTS:
The data are written to the standard file, yyyymm.GNP, where yyyy
is the 4-digit year and mm is the 2-digit month. If the file
does not exist, it is created. If the file exists it is searched
for an entry corresponding to the date and time in the header. If
no entry exists a new entry is inserted in the appropriate
place. If an entry for this date does already exist then the
user is asked to verify overwriting the existing data.
CALLED BY:
GCALCHEK
SIDE EFFECTS:
Data are written to the standard file.
RESTRICTIONS:
MODIFICATION HISTORY:
Written 14-Mar-1998 by Dale E. Gary
15-Mar-1998 DG
Added msglun switch for unattended operation.
15-Jun-1998 DG
Changed name of routine and made slight change to header format
[Previous]
[Next]
NAME:
WRITE_OFF
PURPOSE:
Writes the offsets determined during gain calibration (GCALCHEK)
into a standard database file.
CATEGORY:
OVRO APC ANALYSIS GCALCHEK
CALLING SEQUENCE:
result = write_off(offsets,header[,msglun=msglun])
INPUTS:
offsets an array of channel offsets as determined by GCALCHEK.
tls a standard time/label structure, from the scan header
record of the GCAL scan.
OPTIONAL (KEYWORD) INPUT PARAMETERS:
msglun the logical unit number of GCAL.MSG. If nonzero, it
indicates that the routine was called from a command
file, so issue no modal messages, and print any error
messages to msglun.
ROUTINES CALLED:
OUTPUTS:
result gives an indication of the success of the attempt to
write the offsets to the file. If -1, the attempt
failed, 0 otherwise.
COMMENTS:
The data are written to the standard file, yyyymm.OFF, where yyyy
is the 4-digit year and mm is the 2-digit month. If the file
does not exist, it is created. If the file exists it is searched
for an entry corresponding to the date and time in the header. If
no entry exists a new entry is inserted in the appropriate
place. If an entry for this date does already exist then the
user is asked to verify overwriting the existing data.
CALLS: ***
CVDOY
CALLED BY:
GCALCHEK
SIDE EFFECTS:
Data are written to the standard file.
RESTRICTIONS:
MODIFICATION HISTORY:
Written 14-Mar-1998 by Dale E. Gary
15-Mar-1998 DG
Added msglun keyword for unattended operation.
15-Jun-1998 DG
Slight change to header format
18-Jan-2004 DG
Write out header according to number of antennas
[Previous]
[Next]
Project : ovsa
Name : write_ovsa_fits
Purpose : Write an ovsa FITS file
Category : ovsa analysis
Explanation :
Syntax : write_ovsa_fits, avg, datasetname, f, $
feedinfo, sigma, srcname, tavg, tls, xcen, ycen
CALLS: ***
ANYTIM2UTC [1], ANYTIM2UTC [2], ARR2STR [1], Arr2Str [2], FXADDPAR [1]
FXADDPAR [2], FXBADDCOL [1], FXBADDCOL [2], FXBCREATE [1], FXBCREATE [2]
FXBFINISH [1], FXBFINISH [2], FXBHMAKE [1], FXBHMAKE [2], FXBWRITE [1]
FXBWRITE [2], FXHMAKE [1], FXHMAKE [2], FXWRITE [1], FXWRITE [2], SEC2HMS
CALLED BY:
SURVANAL, TPANALYZE
Examples : write_ovsa_fits, avg, 'G0281439_07263',$
f, feedinfo, sigma, 'AR8340', tavg, tls, xcen, ycen
Inputs : avg = data in [channel number,freq,time] format
datasetname = data source id
f = frequency array
feedinfo = antenna number and polarization
sigma = errors for avg
srcname = source name
tavg = time array
tls = structure containing time and date
xcen = antenna pointing in arcsec from sun centre
ycen = antenna pointing in arcsec from sun centre
Outputs : IAU standard OVSA FITS file
Keywords : None
History : Written 09 December 1999, P. T. Gallagher, NJIT
Contact : ptg@penumbra.njit.edu
[Previous]
[Next]
NAME:
WRITE_OVSA_LOG
PURPOSE:
Write a single line of text to the daily log file, tagged with the date and time
CATEGORY:
OVRO APC SCHEDULE
CALLING SEQUENCE:
write_ovsa_log,command
INPUTS:
command The text that will be sent to the CPC or interpreted by the APC
OPTIONAL (KEYWORD) INPUT PARAMETERS:
ROUTINES CALLED:
OUTPUTS:
COMMENTS:
CALLED BY:
MAKE_EPHEM, SCHEDULE, WSTATUS_HISTORY
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Written 14-Jan-2000 by Dale E. Gary
23-Jul-2003 DG
Changed WRITE_LOG to WRITE_OVSA_LOG to avoid conflict
with routine of the same name in BATSE tree.
[Previous]
[Next]
NAME:
WRITE_POSINRH
PURPOSE:
Ecriture d'un fichier de positions au format FITS
CATEGORY:
RH_2D, Recherche de position
CALLING SEQUENCE:
WRITE_POSINRH, File, Fileimg, tabposi
INPUTS:
File: Nom du fichier de positions a ecrire
Fileimg: Header primaire du fichier images
Tabposi: Tableau de structure de type position
CALLS: ***
CREATE_NRH_PFILE, FXBCREATE [1], FXBCREATE [2], FXBFINISH [1], FXBFINISH [2]
FXBHMAKE [1], FXBHMAKE [2], FXBWRITE [1], FXBWRITE [2], FXHMODIFY [1]
FXHMODIFY [2], FXPAR [1], FXPAR [2], HEADFITS [1], HEADFITS [2], HEADFITS [3], MSH
SXADDPAR [1], SXADDPAR [2], SXADDPAR [3], SXDELPAR [1], SXDELPAR [2], SXDELPAR [3]
CALLED BY:
MKFILEPOS, POSTOFITS
MODIFICATION HISTORY:
Ecrit par: c. Renié 07/1998
04/1999: modification des keywords TIM_STR et TIM_END
07/2001: commentaires dans MAJAXIS, MINAXIS
[Previous]
[Next]
NAME:
WRITE_TPSEG
PURPOSE:
Writes total power calibration results from either TPCALCHEK or
CTRCALCHEK to the data (.ARC) file, and updates the INDEX records
to point to the new calibration.
CATEGORY:
OVRO APC DATA CALIBRATION
CALLING SEQUENCE:
result = write_tpseg(filename,hrec,segtyp,data1[,data2])
INPUTS:
filename the name of the file containing the data.
hrec the record number of the scan header for the
calibration scan (either REFTPCAL or TPUPDATE).
segtyp the segmentcode for the type of calibration, either
!SEGM.TPCAL or !SEGM.TPUPD.
data1 the binary segment records of the appropriate data,
either 2 TPCAL segment records or 2 TPUPD segment
records, as intarr(1024,2).
OPTIONAL (KEYWORD) INPUT PARAMETERS:
data2 the binary segment records of the TPCAL data, as
intarr(1024,2). If SEGTYP is !SEGM.TPCAL, then
data2 is the same data as data1. If omitted,
no primary total power calibration update is
done. See comments for further information.
ROUTINES CALLED:
openarc, getdata, tl_decode, ovsa_get_index, put_index
OUTPUTS:
result a flag indicating success or failure. 0 = fail,
1 = success.
COMMENTS:
The DATA2 argument is used as a switch to indicate that the
primary total power calibration should be updated. If omitted,
the TPCAL or TPUPD segment is written only to the area left
blank for the purpose (by ARCHIVE) in the REFTPCAL or TPUPDATE
scan. If included, the TPCAL segment will be written as part
of a new HOUSEKEEPING scan at the end of the file, and the
index record will be set to point to this new HOUSEKEEPING
entry.
CALLS: ***
GETDATA, OPENARC, OVSA_GET_INDEX, PUT_INDEX, TL_DECODE
CALLED BY:
CTRCALCHEK, TPCALCHEK2
SIDE EFFECTS:
Changes are made to the data (.ARC) file.
RESTRICTIONS:
MODIFICATION HISTORY:
Written 12-Nov-2000 by Dale Gary
18-Jul-2001 GN
Replaced get_index by ovsa_get_index to avoid conflict with Yohkoh
27-Aug-2005 DG
The number of TPCAL and TPUPD records has increased from 2 to 4, so
this routine has been modified accordingly. It will still work for
older data, and keys off the number of records passed in.
[Previous]
[Next]
NAME:
WSTATUS_HISTORY
PURPOSE:
Reads the DAILY.LOG file, displays it in a text widget, and allows
entry of STATUS comments into the log.
CATEGORY:
OVSA APC WIDGET
CALLING SEQUENCE:
wstatus_history,filename
INPUTS:
SH_Main The widget ID of an external base widget to attach the
widget heirarchy to. This will be the SCHEDULE base
widget, in practice.
OPTIONAL (KEYWORD) INPUT PARAMETERS:
ROUTINES CALLED:
openarc, getdata, wint, wstr, okaytowrite, break_file, dumprec, toprinter
OUTPUTS:
log A structure containing the tag OPEN, which is used by
SCHEDULE to determine if WSTATUS_HISTORY window is open.
COMMENTS:
CALLS: ***
CW_BGROUP, STATUS_HISTORY_EVENT, WRITE_OVSA_LOG, XMANAGER
CALLED BY:
SCHEDULE
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Written 12-Jan-2001 by Dale E. Gary
23-Jul-2003 DG
Changed WRITE_LOG to WRITE_OVSA_LOG to avoid conflict
with routine of the same name in BATSE tree.
[Previous]
[Next]
NAME:
WSTR
PURPOSE:
Obtain string values from the user via an IDL form. This is
just a convenient interface to the CW_FORM routine.
CATEGORY:
OVRO UTILITY
CALLING SEQUENCE:
out = wstr,title,text=text,label,init,tag,button=button
INPUTS:
title a string label, which can be used variously as a
title, heading, or prompt
label a string array of the same length as the INIT and
TAG arrays, giving a text label to be associated
with each integer value the user is to enter
init an array of string initializers, of the same length
as the LABEL and TAG arrays
tag an array of structure tags, of the same length as
the LABEL and INIT arrays, by which the output
structure members can be accessed
OPTIONAL (KEYWORD) INPUT PARAMETERS:
text an optional string array giving lines of text to
follow the title. This is intended as further
descriptive text for clarity.
button an optional array of string labels for buttons.
If omitted, a single OK button is present. The
button names are also used as structure tags in
the output structure, so they must be single words
without spaces.
ROUTINES CALLED:
OUTPUTS:
out a structure containing an entry for each string
plus an entry for each button. The tag names
for the strings are as given in the TAG array,
while the tag names for each button are the
button labels themselves. If a button has been
pressed, its value in the structure will be 1,
otherwise 0.
COMMENTS:
CALLS: ***
CW_FORM
CALLED BY:
APCALCHEK, LOCATE_SCAN, NEWSCAN, PCALCHEK, WDUMPREC
SIDE EFFECTS:
RESTRICTIONS:
The field widths of the string is currently limited to 10.
The string widgets and buttons are oriented in rows, so
there is a practical limit to the number allowed. The button
labels are also used as structure tags, so care must be taken
to ensure they are suitable (e.g. do not use spaces)
MODIFICATION HISTORY:
Written 09-Apr-1997 by Dale E. Gary
[Previous]
[Next]
NAME:
WTESTPLOT
PURPOSE:
Widget routine to test plotting and reading a file that is
growing in real time.
CATEGORY:
OVRO APC DATA ANALYSIS
CALLING SEQUENCE:
wtestplot,filename,srec
INPUTS:
filename the name of the file containing data to be plotted.
srec the record number to start plotting from. Plotting
will continue until an EOS segment is found.
OPTIONAL (KEYWORD) INPUT PARAMETERS:
ROUTINES CALLED:
OUTPUTS:
COMMENTS:
CALLS: ***
CW_BGROUP, DUMPREC, OPENARC, TL_DECODE, WTESTPLOT_EVENT, XMANAGER
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Written 13-Jan-1998 by Dale Gary
[Previous]
[Next]
NAME:
WTPCAL
PURPOSE:
CATEGORY:
OVRO APC WIDGETS
CALLING SEQUENCE:
updflag = wtpcal(f,solspec0,solrms0,refcal,solmed[,twometer=twometer][,auto=auto][,GROUP=Group])
INPUTS:
f Array of frequencies corresponding to the measurements [GHz], of
size [NF]
solspec0 Array of values representing the uncalibrated solar total power
spectrum, of size [NPOL,NANT,NF], where NPOL = 3 is the number
of polarizations, NANT is the number of antennas, and NF is the
number of frequencies (corresponding to array F).
solrms0 Array of values representing the total power residuals, of size
same as SOLSPEC0.
refcal A REFCAL structure as constructed by NEWSCAN() routine.
OPTIONAL (KEYWORD) INPUT PARAMETERS:
twometer A keyword specifying that the channels in SOLSPEC0 to be calibrated
correspond to the 2 m antennas. If omitted or zero, the 27 m
channels are calibrated.
auto A keyword specifying that automatic calibration to the RSTN flux for
the day is to be done. If the RSTN fluxes are not available on
this day then no update is done.
group The widget ID of the group leader. If given and the group leader's
widget is destroyed, this widget is destroyed also.
ROUTINES CALLED:
OUTPUTS:
updflag An integer flag that specifies what kind of update the user selected.
UPDFLAG = 0 => no update
UPDFLAG = 1 => update secondary calibration (TPUPDATE)
UPDFLAG = 2 => update primary calibration (TPCAL)
solmed The array of actual solar flux units as a function of frequency,
of size [NF]. The calibration factors are just those required
to convert the data to this total power spectrum.
COMMENTS:
CALLS: ***
CW_BGROUP, LOADCT, READ_RSTN_FLUX, RSTN2ANT, SPLINE, WTPCAL_EVENT, XMANAGER
CALLED BY:
CTRCALCHEK
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Written 05-Dec-1999 by Dale E. Gary
30-Jan-2000 DG
Added Zoom button.
24-May-2000 DG
Changes to make it work with 5 or 6 antennas. Additional small changes needed
when another antenna is added.
11-Nov-2000 DG
Changed to overplot the current expected RSTN flux, if any.
16-Jan-2002 DG
Added AUTO keyword, for automatic updating of secondary calibration
to match the RSTN fluxes for that day.
07-Nov-2003 DG
Several changes to reflect new dual-polarization feeds on 27-m dishes. Added
AUTO calibration button.
24-Aug-2005 DG
Several changes to reflect dual-polarization on all dishes.
28-Aug-2005 DG
Cleaned up user interface (button handling).
[Previous]
[Next]
NAME:
WUPTIME
PURPOSE:
WIDGET interface to UPTIME, to show calibrator rise and set
times.
CATEGORY:
OVRO APC SCHEDULE
CALLING SEQUENCE:
wuptime[,fmin][,date][,jd=jd]
INPUTS:
fmin the flux density limit above which to display calibrators.
If omitted, 5 Jy is used.
date a string containing the date, as YYYY-MM-DD (although any
delimiter is allowed, eg. YYYY/MM/DD), for which the
UPTIME information is desired. If omitted, the current
system date is used. If both DATA and JD keyword are
specified, DATE overrides JD.
OPTIONAL (KEYWORD) INPUT PARAMETERS:
jd the Julian date for which the UPTIME information is desired.
If omitted, the current system date or date specified in
DATE is used. If both DATE and JD are specified, DATE
overrides JD.
ROUTINES CALLED:
uptime, set_labels (internal), sysdoy, sixty, julday
OUTPUTS:
COMMENTS:
CALLS: ***
CW_BGROUP, CW_FIELD, REVERSE, SET_LABELS, SIXTY, SYSDOY, UPTIME, WUPTIME_EVENT, XMANAGER
CALLED BY:
SCHEDULE
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Written 17-Mar-1999 by Dale E. Gary
16-May-1999 DG
Added pre-sort of table to RA order (since non-calibrators
are out of order at the end when initially generated).
27-Jul-1999 DG
Significant changes to make it work more closely with SCHEDULE.