!*******************************************************************
! Id target-fsw-xxx_xx.pako, v0.3, 2007.11.27, SL Exp$
!
!
!*******************************************************************
! Usage: @target-fsw-xxx_xx number_of_loop
!
! Purpose: Carry out FREQUENCY SWITCH on the target source
!
! Parameters: number_of_loop: Number of loops of the form:
!                             cal cold, start start
! Variables: f_off1..f_off4: frequency offsets [MHz] for different receivers
!                            used for switching
!             your-source: source name, has to be edited in procedure below
!
! 
! Sequence: Cal cold, the sky part of the calibration is performed
!                 600 arcsec away in Azimuth
!           start frequency switch with 12 subscans, 
!                 each subscan has 30 sec duration 
!                 the time in each frequency phase is 2 sec
!                     (range: 0.1  - 2.55 sec for 100KHz,
!                             1.0 - 2.55 sec for Autocorrelator)
!           start frequency switch again
!
! *****************************************************************
!
! Please substitute in the procedure below the frequency offset 
! (f_off1...f_off4) and receiver names (receiver_name1 ..receiver_name4).
! If you use fewer than 4 receivers, delete the additional lines
!
! *****************************************************************
!
@backends-xxx_xx             ! set backends
!
define integer numberLoops
define integer numberSubscans

let numberLoops = &1
let  numberSubscans = 12    !! To be optimized to the duration between two calibration
!
SET angleUnit arcsec
!
! Frequency Switch
define real foff1
define real foff2
define real foff3
define real foff4

let foff1 = 4.2	! Set the frequency switch for receiver 1. Default is 4.2 MHz
let foff2 = 4.2	! Set the frequency switch for receiver 2. Default is 4.2 MHz
let foff3 = 4.2	! Set the frequency switch for receiver 3. Default is 4.2 MHz
let foff4 = 4.2	! Set the frequency switch for receiver 4. Default is 4.2 MHz

!
! The receiver name receiver_nameX has to be replaced by A100, B100, C150, D150, A230, B230
! C270, D270
!

    SWFREQUENCY foff1 /TPHASE 1.  /RECEIVER receiver_name1 
    SWFREQUENCY foff2 /TPHASE 1.  /RECEIVER receiver_name2
    SWFREQUENCY foff3 /TPHASE 1.  /RECEIVER receiver_name3 
    SWFREQUENCY foff4 /TPHASE 1.  /RECEIVER receiver_name4

OFFSET /clear

for i 1 to numberLoops
    CALIBRATE /default
    START


    TRACK 0. 0. /NSUBSCANS numberSubscans /TSUBSCAN 30. 

    START
    START
next


!! All the XML command files will be put in the job queue. 
!!     





