!   egglobalOH --- Example of global OH observations.
!      Uses RDBE, DBBC, and MarkIV systems.
!      Uses Doppler calculations.
!      Code eggl_oh

!   Adapted from egiv.key, and example for Mark IV observations
!   Originally it was an example to produce a Vex file when 
!   that was only needed for non-VLBA stations.
!   Original by Huib vanLangevelde  5-Feb-1997.
!   Cover letter added by RCW  11-Apr-2000.
!   Convert to RDBE/DBBC  Nov 27, 2013.
!     This is mainly a global spectral line example now.


! ====================================================
! ======  Cover information and program control ======
! ====================================================
!  Control code and print requests
overwrite
sumitem=el1, el2, disk, dwell, early, slew
optmode = scans
opminant = 1
!
!   Proposal specific
!
expt     = 'OH Main line Global VLBI; Sched example'
expcode  = 'eggl_oh'
version  =  99.9
piname   = 'Huib van Langevelde'
address1 = 'JIVE, Radiosterrenwacht Dwingeloo'
address2 = 'Postbus 2, 7990 AA Dwingeloo'
address3 = 'the Netherlands'
phone    = '+31 521 595 220'
obsphone = '+31 528 221 273'
fax      = '+31 521 597 332'
email    = 'huib@jive.nfra.nl'
obsmode  = 'VLBA/MKIV'
obstype  = 'VLBI'
note1    = 'Make sure PHASE CAL is OFF.'
!
!  Cover letter
!
coverlet /
Any text can be written here.  It will be written to the
summary file and the operator schedules.  This would be a good
place to put complicated instructions that cannot fit in the
notes above.  This is mainly useful for stations where some 
items have to be controlled by hand (pcal, tsys measurements,
special frequencies or wiring etc).  For the fully automated stations
like the VLBA, the operators don't tend to read any such notes.
endcover /

! ===============================================
! ===========  External catalogs  ===============
! ===============================================
! Standard source catalogs are sources.gsfc and sources.rfc.
! This schedule uses some aliases only in sources.gsfc.
  srcfile  = '$SCHED/catalogs/sources.gsfc'
  stafile  = $SCHED/catalogs/stations_RDBE.dat
  freqfile = $SCHED/catalogs/freq_RDBE.dat

! ===============================================
! ================  Correlator  =================
! ===============================================
correl   = 'Socorro'
!
!   Need 12s averaging time and all channels we can get
!   Note that with modern systems, shorter integrations and more
!   channels could be used.
!
coravg   = 12
corchan  = 512
cornant  = 8
corpol   = 'off'
corwtfn  = 'uniform'
corsrcs  = 'standard'
cortape  = DAT
corship1 = 'Huib van Langevelde'
corship2 = 'JIVE, Radiosterrenwacht Dwingeloo'
corship3 = 'Postbus 2, 7990 AA Dwingeloo'
corship4 = 'the Netherlands'
cornote1 = 'Please make integration as short as possible'

! ===============================================
! ==================  Sources  ==================
! ===============================================
srccat /
!
!  The original file claimed this position was good on a sub-mas
!  scale, but Hipparcos has the star moving several mas/yr.
!
!  We are testing the proper motions capability here.
!  The values are real ones from Hipparcos.
!
source = 'S_Per', 'HIP11093'
!   ra=02:22:51.71829  dec= 58:35:11.5782 equinox=j2000  ! source?
   ra=02:22:51.71254  dec= 58:35:11.4500 equinox=j2000  ! Hipparcos
   pmra=2.28  pmdec=-3.07  paralax=0.62  epoch=1991.25
   vel = -40 /
endcat /

! =============================================== 
! ====================  Times ===================
! =============================================== 
year   = 1997
month  = 3
day    = 4
start  = 12:00:00 
! =============================================== 
! =================== Setup =====================
! =============================================== 
! This example used to use oversampling, but that is
! not well supported in the new systems to my knowledge.
! The DBBC also has a minimum bandwidth of 1 MHz so use that.
! It used to be 500 kHz in egiv.key
! The 1 MHz filters are not available at all MARKIV stations
! so there will be some warnings issued which we will ignore 
! for now.

setinit  = egiv.set /
  !  GM31, 500 kHz oversampled and 2 bit for line sensitivity
  !  Both OH main lines.  Also conform to the tuning restrictions
  !  for the various systems.  A frequency must be a multipls
  !  of 250 kHz to work on all systems.  Hence the choice of the
  !  reference frequency and the DOPINCR later.
  !  Lower the samprate Dec. 22, 2013.  The new systems cannot
  !  use oversampling.  This used to use 4 Msamp/s.

  !
  nchan  = 4  samprate = 2.0 
  bits = 2    bbfilter = 1.0
  pcal = off  barrel = roll_off         ! No PCal for line obs
  pol      = dual
  freqref = 1664.75
  freqoff = -0.5,-0.5,0.5,0.5
  /
endset /
!
setup = egiv.set

! =============================================== 
! ========== Spectral line information ==========
! =============================================== 
!
lineinit /
lineset  = 'OHmains'
restfreq = 1665.4018, 1665.4018, 1667.359, 1667.359 /
endlines /
!
!  This will be a mixture of RDBE_DDC, DBBC, and MARK4 systems
!  so a common DOPINCR is needed.

linename = 'OHmains' doppler  dopincr=250.0
! =============================================== 
! ================  The scans  ==================
! =============================================== 
!
!    Dwell schedule is best, Jb is slow especially near Zenit
!
stations = jodrell1, wstrbork, eflsberg, onsala85, medicina,
           noto, torun, vlba_hn, vlba_sc, gbt_vlba
!
!
source = '3C454.3'  gap = 40  dwell =22:00   dopsrc = 'S_Per' /
repeat 6 source = 'S_Per' gap = 40  dwell = 22:00   dopsrc = 'S_Per' /
source = '3C84'  gap = 40  dwell =22:00   dopsrc = 'S_Per' /
repeat 6 source = 'S_Per' gap = 40  dwell = 22:00   dopsrc = 'S_Per' /
source = '3C84'  gap = 40  dwell = 22:00   dopsrc = 'S_Per' /
repeat 6 source = 'S_Per' gap = 40  dwell = 22:00   dopsrc = 'S_Per' /
source = '3C84'  gap = 40  dwell =22:00   dopsrc = 'S_Per' /
repeat 6 source = 'S_Per' gap = 40  dwell = 22:00   dopsrc = 'S_Per' /
source = '3C84'  gap = 40  dwell = 22:00   dopsrc = 'S_Per' /
repeat 6 source = 'S_Per' gap = 40  dwell = 22:00   dopsrc = 'S_Per' /
source = '3C84'  gap = 40  dwell =22:00   dopsrc = 'S_Per'  /
repeat 6 source = 'S_Per' gap = 40  dwell = 22:00   dopsrc = 'S_Per' /
source = '3C84'  gap = 40  dwell = 22:00   dopsrc = 'S_Per' /
