! ==========================================================
! ==========  Example keyin format file for a  =============
! ==========  Phase-referenced EVN experiment  =============
! ==========     (strong source - 128 Mb/s)    =============
! ==========================================================

! ==========================================================
! =================  Cover Information  ====================
! ==========================================================

version  = 1
expt     = 'Phase-referencing of my favourite strong source'
expcode  = 'EO999'
obstype  = 'VLBI'
piname   = 'A.N. Observer'
address1 = 'An Institute'
address2 = 'A Street'
address3 = 'A Town'
address4 = 'A Country'
phone    = '555 1000'
obsphone = '555 1000'
email    = 'anobserver@institute.country'
fax      = '555 1001'
obsmode  = 'Phase-referencing of a source at 18cm (128 Mb/s)'
note1    = 'Place additional information here (note2-4 available)'

! ==========================================================
! ==============  Correlator Information  ==================
! ==========================================================

correl   = 'JIVE'
coravg   = 2
corchan  = 16
cornant  = 8
corpol   = 'off'
corwtfn  = 'uniform'
corsrcs  = 'from schedule'
cortape  = 'DAT'
corship1 = 'An Institute'
corship2 = 'A Street'
corship3 = 'A Country'
cornote1 = 'Place special requirements here (cornote2-4 available)'

! ==========================================================
! ==================  Program control  =====================
! ==========================================================

! Allow SCHED to overwrite existing files

overwrit

! Show start elevation and time on source before scan start  
! (or how late antennas are on source):
!
sumitem = el1, early

! Might prefer to print start and end elevation, time on source 
! and slew time in summary file
!
!sumitem  = el1, el2, dwell, slew


! ==========================================================
! ===================  Station Catalog  ====================
! ==========================================================

! Get stations from the DEFAULT catalog

stafile = $SCHED/catalogs/stations.dat

! List stations

stations = JODRELL1,WSTRBORK,EFLSBERG,ONSALA85,MEDICINA,TORUN,
           SHANGHAI,URUMQI

! ==========================================================
! ===================  Source Catalog  =====================
! ==========================================================

! Get source coordinates for fringe finders, phase-reference
! source, etc, from the DEFAULT catalog
! Standard source catalogs are sources.gsfc and sources.rfc.
! This schedule uses some aliases only in sources.gsfc.
srcfile  = '$SCHED/catalogs/sources.gsfc'

! But my favourite strong, polarised source isn't in the DEFAULT
! catalog so I shall specify that separately

srccat /
source='B0218+357'
        ra=02:21:5.6376 dec=35:56:13.8437 equinox='j2000' /
endcat /

! ==========================================================
! ==================== Setup Information ===================
! ==========================================================

! Get frequency information from the DEFAULT catalog

freqfile = '$SCHED/catalogs/freq.dat'

! Construct frequency setup
! 4 8-MHz channels, 2-bit sampling and dual polarisation => 128 Mb/s

setinit='eo999.18cm' /
        band='18cm'
        nchan=4
        bbfilter=8
        bits=2
        pol='dual'
        pcal='1MHz'
        barrel=roll_off /
endset /

! ==========================================================
! =================  Initial Scan Information  =============
! ==========================================================

year=2012
month=12
day=25
start=11:00:00

! Define the Setup to use for the observations



! ==========================================================
! ========================  The Scans  =====================
! ==========================================================
!
! PHASE REFERENCING is used in this example
! With this low sampling rate and bright target, phase referencing here 
! would be useful to obtain absolute position information rather than 
! help to detect the source
!
!
! Notes on sources relevant to Polarisation Calibration

! 3C84 - a bright UNPOLARISED source which can be used to
! solve for the instrumental polarisation (D-terms) and the
! RCP/LCP delay difference. The scans cover a wide range
! in parallactic angle - essential for accurate calibration.

! J0521+16 (3C138) - polarisation position angle calibrator.
! This source is monitored regularly at the VLA so that
! its true position angle of the polarisation is known
! => http://www.vla.nrao.edu/astro/calib/polar/
! Other similar sources can be found in the URL above
! Three scans are used so as to produce an adequate map.
!
!
!   AMPLITUDE CALIBRATION - Tsys MEASUREMENTS
!
! For amplitude calibration purposes, at MkIV EVN stations it 
! is recommended to insert regular gaps for Tsys calibration 
! approximately every 15 minutes.
! The telescopes must be on source by the start of the scan
! after the gap in order to make a valid Tsys calibration.
!
! Here a gap is inserted almost every phase-reference cycle.
!
! NOTE the use of DWELL for all calibrators to ensure that all
! telescopes are ON source before the measurement of Tsys
! and the use of DUR for the phase-reference steps
!
!
! The phase reference cycles are at least 10 minutes long as
! this is the minimum time required by Jb1 (Lovell telescope)
! slewing limitations.
! Should you wish to have a faster cycle (eg for higher frequencies)
! use Jb2 (the mark2 telescope) or you have to omit some of the source 
! changes with the Jb1 (Lovell) telescope. An example can be found in
! example  --   eg1024.key --
!
!
! First scan on the phase-calibrator.
 
source='J0204+3649' dur=00:02:00 gap=00:00:00 setup='eo999.18cm'/

! Cycle the next 2 scans 3 times
group 2 repeat 3
source='B0218+357'  dur=00:07:20 gap=00:00:00 /
source='J0204+3649' dur=00:02:00 gap=00:00:40 /

! Cycle the next 2 scans 3 times
group 2 repeat 3
source='B0218+357'  dur=00:07:20 gap=00:00:00 /
source='J0204+3649' dur=00:02:00 gap=00:00:40 /

! Includes D-term calibrator  and Pol. position angle calibrator
source='B0218+357'  dur=00:07:20 gap=00:00:00 /
source='J0204+3649' dur=00:02:00 gap=00:00:40 /
source='3C84'       dwell=00:08:00 /


! include observations of a fringe-finder (0234+285)
! and a bright unresolved source for amplitude calibration purposes
! (J0205+3212)
source '0234+285'   dwell=00:08:00 gap=00:01:10 /
source 'J0205+3212' dwell=00:08:00 gap=00:01:10 /

source='J0204+3649' dwell=00:02:00 gap=00:01:00 /

! Cycle the next 2 scans 6 times
group 2 repeat 6
source='B0218+357'  dur=00:07:20 gap=00:00:00 /
source='J0204+3649' dur=00:02:00 gap=00:00:40 /

! Includes D-term calibrator  
source='B0218+357'  dur=00:07:20 gap=00:00:00 /
source='J0204+3649' dur=00:02:00 gap=00:00:40 /
source='3C84'       dwell=00:08:00 /

source='J0204+3649' dwell=00:02:00 gap=00:01:00 /

! Cycle the next 2 scans 6 times
group 2 repeat 6
! Larger gap because Ur slower slew close to zenith
! 
source='B0218+357'  dur=00:07:20 gap=00:00:00 /
source='J0204+3649' dur=00:02:00 gap=00:00:50 /

! include observations of a fringe-finder (0234+285)
! and a bright unresolved source for amplitude calibration purposes
! (J0205+3212)
source '0234+285'   dwell=00:08:00 gap=00:01:10 /
source 'J0205+3212' dwell=00:08:00 gap=00:01:10 /

source='J0204+3649' dwell=00:02:00 gap=00:01:00 /

group 2 repeat 8
source='B0218+357'  dur=00:07:20 gap=00:00:00 /
source='J0204+3649' dur=00:02:00 gap=00:00:40 /

! Includes D-term calibrator  
source='B0218+357'  dur=00:07:20 gap=00:00:00 /
source='J0204+3649' dur=00:02:00 gap=00:00:40 /
source='3C84'       dwell=00:08:00 /
source='J0521+16'   dwell=00:08:00 /

source='J0204+3649' dwell=00:02:00 /

group 2 repeat 8
! larger gaps for Tsys calibration 
! (large telescope slewing times get longer at higher elevations
!  ==> gap increased to 70s)
source='B0218+357'  dur=00:07:20 gap=00:00:00 /
source='J0204+3649' dur=00:02:00 gap=00:01:10 /

! include observations of a fringe-finder (DA193)
! a bright unresolved source for amplitude calibration purposes
! (J0205+3212) and a polarization position angle calibrator
source 'DA193'      dwell=00:08:00 /
source 'J0205+3212' dwell=00:08:00 /
source='J0521+16'   dwell=00:08:00 /


source='J0204+3649' dwell=00:02:00 gap=00:00:50 /

group 2 repeat 2
source='B0218+357'  dur=00:07:10 gap=00:00:00 /
source='J0204+3649' dur=00:02:00 gap=00:01:10 /

! Includes D-term calibrator  
source='B0218+357'  dur=00:07:20 gap=00:00:00 /
source='J0204+3649' dur=00:02:00 gap=00:01:10 /
source='3C84'       dwell=00:08:00 /

source='J0204+3649' dwell=00:02:00 gap=00:01:10 /

group 2 repeat 2
source='B0218+357'  dur=00:07:00 gap=00:00:00 /
source='J0204+3649' dur=00:02:00 gap=00:01:10 /

group 4 repeat 2
! larger gaps for Tsys calibration 
! (large telescope slewing times get longer at higher elevations
!  ==> gap increased to 70s)
source='B0218+357'  dur=00:06:50 gap=00:00:00 /
source='J0204+3649' dur=00:02:00 gap=00:01:10 /
source='B0218+357'  dur=00:08:00 gap=00:00:00 /
source='J0204+3649' dur=00:02:00 gap=00:01:10 /

! Includes D-term calibrator  
source='B0218+357'  dur=00:07:20 gap=00:00:00 /
source='J0204+3649' dur=00:02:00 gap=00:01:10 /
source='3C84'       dwell=00:08:00 /

source='J0204+3649' dwell=00:02:00 gap=00:01:10 /

group 4 repeat 2
! larger gaps for Tsys calibration
! (slewing times becoming shorter again)
!  ==> gap decreased to 50s)
source='B0218+357'  dur=00:06:50 gap=00:00:00 /
source='J0204+3649' dur=00:02:00 gap=00:00:50 /
source='B0218+357'  dur=00:08:00 gap=00:00:00 /
source='J0204+3649' dur=00:02:00 gap=00:00:50 /

source 'J0205+3212' dwell=00:08:00 gap=00:01:10 /
source='J0521+16'   dwell=00:08:00 /

! ==========================================================
! ======================  End of keyin file  ===============
! ==========================================================
