Pwxcb User's Guide
David Gordon
17 May 1995, Revised 9 Nov, 1999

Pwxcb is the Mark III program for creating cable and weather calibration files
for input into Mark III VLBI data bases by program Dbcal. Pwxcb extracts
cable and weather data from Mark III log files, VLBA log files, and many
other types of files. Pwxcb will make screen plots of this data and allow
editing by an analyst. It also has several options for modifying data and for 
automatically editing data. It will generate hard copy plots of the data,
and it will save the data into cable and weather calibration files.

Pwxcb was developed and is maintained by David Gordon at the Goddard Space
Flight Center. Any problems, requests, or suggestions should be addressed to
him. Pwxcb handles a wide variety of inputs, and these seem to be constantly 
changing, particularly the less standardized ones. Every attempt is made to
keep up with such changes, but inevitably, there will usually be some lag.  

To run Pwxcb, you type a string like:  

'pwxcb i j k l m'

Where the i, j, k, l, and m are optional RMPAR parameters. In brief, their
possible values and corresponmding meanings are given below.

   i = INPUT CONTROL INDEX
      i = 1 --> Process most Mark III/IV antenna logs (default)
      i = 2 --> Process Cable from Mark 3/4 log and/or weather from Rinex file
      i = 3 --> Replot an existing cable and/or weather file
      i = 4 --> Process a Haystack weather file (T, P, Dewpoint)
      i = 5 --> Process a K-4 Japanese cable and/or met file
      i = 6 --> Process a VLBA log file
      i = 7 --> Process a DSS65 or GOLDVENU weather file 

   j = PROCESSING CONTROL INDEX
      j = 1 --> Interactive processing (default)
      j = 2 --> Batch mode processing (not currently available)

   k = DATA MANIPULATION INDEX 
      k = 1 --> No optional data manipulation (default) 
      k = 2 --> Manipulate weather: (F --> C, Dewpoint --> Humidity,
                  Multiply pressure by a constant, Truncate humidities
                  to 100%, Replace temperature and/or humidity values
                  with constant values, swap pressure and humidity)
      k = 3 --> Manipulate cable (Multiply/divide by a constant)
      k = 4 --> Manipulate both weather and cable

   l = AUTOMATIC EDITING OPTION INDEX
      l = 1 --> No auto-editing (default)
      l = 2 --> Auto-edit cable (eventually both weather and cable) 
      l = 3 --> Auto-edit cable only        
      l = 4 --> Auto-edit weather only (not currently available)

   m = AUTO-PLOTTING OPTION INDEX
      m = 1 --> Make laser-jet plots using PC8/PGPLOT (default)
      m = 2 --> Don't make laser-jet plots


Notes:

Default modes need not be specified unless a higher order, non-default mode
is envoked. For example, to use the k=2 option on a normal log file, you must
enter 'pwxcb 1 1 2'.

Several of the input options include a mild auto-editing of humidities in that
humidity values greater than 100% but less than 120% are truncated to 100%.
This is assumed to be due to slight overflows or miscalibrations of the 
hygrometers, which are known to not be highly accurate. But for values larger
than this, it is probably wise for the analyst to perform some very careful and 
concienscious editing, and often to investigate why such large values are 
occuring. Our experience here at GSFC has shown that sometimes the hygrometer
is totally unreliable and it would be better to substitute some constant value,
such as 50% instead. And also occassionally, humidity and pressure values have
gotten reversed in the file from what was expected, and this obvious fact might
be hidden if automatic humidity truncating to 100% were always done.

The second RMPAR parameter (j) currently has no effect. It is reserved for 
future use.

The fifth RMPAR parameter allows turning ON or OFF the laser-jet hard copy 
plotting of the data. This option is somewhat unnecessary because the program 
always asks at the end if the user wants to cancel the plot. 

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 

Common Examples: (Not all possible combinations shown)


pwxcb             All default RMPAR parameters. Use to process normal Mark III
                  log files and some abnormal ones as well. This is the most 
                  common mode of operation. If in doubt, try this mode first.

pwxcb 2           Use for processing cable from a Mark III/IV log and 
                  weather from an auxilliary file. Currently supports Rinex
                  met files and some old Ny Alesund weather station files. 

pwxcb 3           Use to replot existing cable and/or weather files that were 
                  created during a previous run of pwxcb. There is a check 
                  built in to prevent plotting the cable from one station with
                  the weather from another station - the station names and 
                  file descriptors must match. The analyst can edit the data 
                  and save the editied files, provided they carefully answer
                  the questions about saving the file. This mode is often used
                  with the third RMPAR parameter to fix weather and/or cable 
                  problems that weren't handled the first time through pwxcb.

pwxcb 4           Use for processing a weather file from Haystack Observatory. 
                  Has been used whenever the Westford met sensor was
                  inoperative. Consult with Mike Poirrier or David Gordon on 
                  how to obtain one of these files. 

pwxcb 5           Use for processing the Japanese cable and/or weather files,
                  from the K-4 VLBI system.

pwxcb 6           Use for processing a standard VLBA log file, which is a 
                  humungous file containing weather readings and cable cal
                  delays and lots of other stuff from every VLBA antenna in an
                  experiment. This option works differently from the others in
                  that the analyst can process ALL VLBA stations in the file
                  in a single pwxcb run.
                  
pwxcb 7           Use for processing a weather file supplied by the DSN 
                  stations DSS65 or GOLDVENU. We don't get many of these so
                  there's no guarantee that the file format may not have 
                  changed from the previous time. Consult with D. Gordon if 
                  this mode doesn't work. Also note that DSS45 Mark III log 
                  files usually contain weather readings and should be 
                  processed using the i=1 default mode instead.

pwxcb 1 1 2       Use to manipulate the weather while processing a normal log
                  file. Options that can be selected include: 
                    - Change Fahrenheight to Centrigrade
                    - Change dewpoint to humidity
                    - Multiply all pressures by any constant desired
                    - Truncate ALL humidities above 100% to 100%
                    - Replace all temperatures and/or humidities with constants
                    - Swap the humidity and pressure values

pwxcb 3 1 2       Use to manipulate the weather while replotting and editing
                  an existing weather file. Same options as the previous
                  example. The cable file could also be replotted, edited, and
                  included on the hardcopy plot at the same time. 

pwxcb 1 1 3       Use for cable manipulation while processing a normal log
                  file. Allows either multiplying or dividing all cable values
                  by a specified constant value. 

pwxcb 3 1 3       Use for the same cable manipulation as above while replotting
                  an existing cable file. 

pwxcb 1 1 4       Use for both weather and cable manipulation (as in above
                  examples) during normal log processing.

pwxcb 3 1 4       Use for both weather and cable manipulation (as in above
                  examples) while replotting existing cable and weather files.
 
pwxcb 1 1 1 2     Normal log processing, but the program Will determine the 
                  cable cal sign, or sense, if possible, and will edit out the
                  cable sign check readings. This option is not guaranteed and
                  the manufacturer assumes no responsibility for its usage.

pwxcb 1 1 1 1 2   Don't ask and don't make laser-jet plot.



David Gordon
Code 926
NASA Goddard Space Flight Center
Greenbelt, MD 20771
301-614-6107
dgg@leo.gsfc.nasa.gov
