next up previous contents index
Next: Other Observatories Up: Some advanced applications Previous: BIMA Simulations with UVGEN

Antennae files

One of uvgen's keywords, ant=, is used to enter an array configuration[*]

One can obtain this antenna file from the COMMON block by using the following script[*]:

    % com2ant.csh > current.ant
    % uvgen ant=current.ant ...

and a listing of the script:

#! /bin/csh -f
#
#   convert the current antenna positions from COMMON to an antenna file
#   for uvgen

set antpos=(`value name=antpos | awk '{print $NF}' | tr D e`)

set nants=`expr $#antpos / 3`
set check=`expr $#antpos % 3`
if ( "$check" != 0) then
  echo "Unexpected output of antpos array; there are $tmp entries"
  echo "and this should have been a multiple of 3"
  exit 1
endif

@ x = 1
@ y = `expr $x + $nants`
@ z = `expr $y + $nants`
while(1)
  if ($x > $nants) break
  echo $antpos[$x] $antpos[$y] $antpos[$z] | awk \
	'{ printf("%f,%f,%f\n",$1,$2,$3)}'
  @ x++
  @ y++
  @ z++
end

A comment on using the right version of the COMMON  block: if you need to have an exact copy of the COMMON version running at the site, copy it with rcp:

    rcp obs@hat.berkeley.edu:/tmp/hatcomsol $HATCOMMON

or ftp  it if the rcp  command gives you no permission.



Peter Teuben
9/29/2000