## Setup Procedure

The standard setup defines the target source(s), configures the spectral correlator, selects the observing frequency, and leaves the system ready for receiver tuning.

    !----------------------------------------------------------------------
    !
    ! PR:SETUP-zzzzzzzz.OBS ! Setup procedure for project "zzzzzzzz"
    !
    !    - Date:          01-Jun-2019
    !    - Author:
    !    - PI:
    !    - Local contact:
    !    - Project ID:    zzzzzzzz
    !    - Verified by:   person (date)
    !
    !    - Rating:                       A or B
    !    - Number of telescopes assumed: 10
    !    - Observing mode:               mapping/detection/moving body,track-sharing/mosaic
    !    - Time:                         [A,B,C,D,any] Any = CD (specify ’Any’ if not ABCD)
    !      (total hr os/configuration [A,B,C,D,Any] all sources/fields combined)
    !
    !    - Requested on-source time (h): sumt(Time)
    !    - Time per source:              Fraction of time spent per source in case of track
    !                                    sharing
    !
    !    - Requested sensitivity:        2mJy/20MHz   (e.g., rms at the given representative
    !                                                  frequency)
    !    - Additional sensitivity:       0.1mJy/16GHz (e.g., continuum sensitivity)
    !    - rms for one mosaic pointing:  RMS_PER_POINTING
    !
    !    - Requested minimum S/N:	     REQUESTED_SIGNAL_NOISE
    !    - Representative Frequency:     REPRESENTATIVE_FREQUENCY in GHz
    !
    !    - Water limit:                  REQUESTED_WATER_LIMIT
    !    - Obs date constraint:	     OBS_DATE_CONSTRAINT
    !
    !    - Sun avoidance:                SUN_AVOIDANCE
    !
    !    - Other comments:               SETUP_COMMENT
    !
    !------------------------------------------------------------------------
    ! Do not edit directly, but copy first then
    !
    !        All lines marked !**! must be customized.
    !            lines marked !* ! can be modified.
    !
    !------------------------------------------------------------------------
    SET\END                           ! Finish previous observation
    @ PR:defaults                     ! Restore defaults parameters
    !
    SET\PROJECT zzzzzzzz              !**! Specify project number for further
    !
    SYMBOL GO "@ PR:bserve-all zzzzzzzz" !* ! data processing
    CATA SOU INTER_BASE:iram.sou         !* !
    CATA PHA INTER_BASE:phase-pdb.sou    !* !
    LET RECEIVER 1                       !**! Choose observing receiver: receiver 1 @ 3mm
    !                                                                 receiver 2 @ 2mm
    !                                                                 receiver 3 @ 1mm
    !
    LET LOW_LIMIT %LOW_LIMIT%                 !* ! Low elevation limit 15 degrees
    SAY "Project 'PROJECT' starting"
    !
    SYMBOL NAME "NNNN EQ 2000 00:00:00.00 00:00:00.00 LSR 0.0"  !**! Source
    !
    LET N_SUBSCANS 45                 !* ! Scan length (in seconds)
    LET N_SCANS 30                    !* ! Number of scans on SOURCE (22.5 minutes = 30*45sec)
    LET N_SOURCES 1                   !* ! use SYMBOL NAME if N_SOURCES.EQ.1
    IF (N_SOURCES.GT.1) THEN
      LET NAME_SOURCE[1:N_SOURCES]   ".." ".."  !* Enter list of sources (maximum 30)
      LET N_SCANS_SOURCE[1:N_SOURCES] ..   ..   !* Enter time per source (in scans)
    ENDIF
    !
    LET CALIBRATOR_1 "......."        !**! 1st CALIBRATOR
    LET CALIBRATOR_2 "......."        !**! 2nd CALIBRATOR
    LET CALIBRATOR_3 "......."        !* ! 3rd CALIBRATOR
    LET N_CALIBRATORS 2               !* ! Use 2 phase calibrators every N_SCANS
    LET N_SUBS_CAL  45                !* ! Scan length on calibrator (in seconds)
    LET N_SCANS_CAL  3                !* ! Nb scans on each calibrator (3 scans)

    LET FSWI_CAL  .FALSE.             !* ! No fast-switching by default

    LET N_MOSAIC 0                    !* ! No mosaic mode
    IF (N_MOSAIC.NE.0) THEN
       DEFINE REAL X_MOSAIC[N_MOSAIC] Y_MOSAIC[N_MOSAIC] T_MOSAIC[N_MOSAIC] /GLOBAL
       LET X_MOSAIC .. ..            !* ! offsets in arcsec
       LET Y_MOSAIC .. ..            !* ! offsets in arcsec
       LET T_MOSAIC .. ..            !* ! in units of N_SUBSCANS
    ENDIF
    !
    LET SOLVE_POINT YES
    LET SOLVE_FOCUS YES
    !
    LET FOCUS_RECEIVER 'RECEIVER'     !* ! Focusing on observing receiver
    LET POINT_RECEIVER 'RECEIVER'     !* ! Pointing on observing receiver
    !
    LET POINT_SOURCE_1 "......."      !**! 1st pointing source
    LET POINT_SOURCE_2 "......."      !* ! 2nd pointing source
    LET FOCUS_SOURCE_1 "......."      !**! 1st focusing source
    LET FOCUS_SOURCE_2 "......."      !* ! 2nd focusing source
    !
    SET\UNLOCK
    !
    LINE MYLIN 90.0000 LSB 6000.000 /RECEIVER 1
    BASEBAND HLO 1 /RECEIVER 1
    BASEBAND HLI 1 /RECEIVER 1
    BASEBAND HUI 1 /RECEIVER 1
    BASEBAND HUO 1 /RECEIVER 1
    BASEBAND VLO 1 /RECEIVER 1
    BASEBAND VLI 1 /RECEIVER 1
    BASEBAND VUI 1 /RECEIVER 1
    BASEBAND VUO 1 /RECEIVER 1
    !
    ! PLUS high spetcral resolution chunks
    SPW /CHUNK 20 to 36 /BASEBAND HLO /RECEIVER 1
    SPW /CHUNK 20 to 36 /BASEBAND VLO /RECEIVER 1
    SPW /CHUNK 10 to 26 /BASEBAND HLI /RECEIVER 1
    SPW /CHUNK 10 to 26 /BASEBAND VLI /RECEIVER 1
    SPW /CHUNK 20 to 36 /BASEBAND HUO /RECEIVER 1
    SPW /CHUNK 20 to 36 /BASEBAND VUO /RECEIVER 1
    SPW /CHUNK 10 to 26 /BASEBAND HUI /RECEIVER 1
    SPW /CHUNK 10 to 26 /BASEBAND VUI /RECEIVER 1
    !
    !
    IF (N_SOURCES.GT.1) THEN
      SOURCE 'NAME_SOURCE[1]' /TYPE OBJ
     ELSE
      SOURCE 'NAME' /TYPE OBJ
    ENDIF
    !
    SET\RECE 'RECEIVER' ! Choose receiver band for the observation
    !
    SET\OBS
    !
    LOAD /FREQUENCY                          ! Load frequency, but don't move antenna now
    !
    ! Make sure any changes in the spectral configuration will be detected:
    SET\LOCK
    !
    LET CHANGE_SPECTRAL .FALSE.                 !* ! .TRUE. if need to switch to broad_band
    !                                              !(not needed with PolyFiX)
    IF (CHANGE_SPECTRAL) THEN
       SPECTRAL /BROAD
    ENDIF
    !
    SET SHOW OFF
    !
    TYPE PR:clean.obs
    SAY "Project zzzzzzzz   Type: TYPE /  Category: CATEGORY" !**!
    SAY " "
    SAY "        Tuning Receiver "'RECEIVER'":              1           " !**!
    SAY " "
    !
    ! Insert here any other instructions to the operator/astronomer
    !
    SAY "Frequency sent, receivers may be tuned"
    SAY "Execute all observations by typing GO"
    SAY " "
    SAY "Type END when project is finished"
    SAY " "
    SYMBOL PROCEED /INQUIRE "Type RETURN to remove this page: "
    SET SHOW ON
    SET SHOW ON

All information appearing on lines marked !**! must have been supplied in the observing proposal, lines marked !* ! will use default values if not specified. The remaining part of the procedure will be defined by IRAM personal (your local contact, usually). The project number (zzzzzzzz in this example) is assigned by IRAM when observing proposals are received. After final checking by IRAM staff, this file will be given to the operators and Astronomers on Duty, together with a copy of the proposal and any accompanying information the PI may find useful. The on-duty astronomer will fill in a NOTE file that summarizes the individual conditions and particular problems encountered during each track observed. The NOTE file will provide some suggestions in cases where the data calibration is not straight-forward. A copy of it will be given to the PI when he/she visits Grenoble for data reduction after the project is completed.