.ec _
.ll 76
.ad b
.in 4

.ti -4
1 PDBI_\
.ti +20
PDBI_\ Language summary
 
.nf
LINE          : define receiver setup 
NARROW__INPUT  : define the input of the narrow-band correlator 
PLOT          : plot the resulting frequency coverage 
PRINT         : print the corresponding observing procedure 
SPECTRAL      : define the configuration of the spectral units of 
                 the narrow-band correlator 
WIDEX         : reserved for future use...
.fi

.ti -4
1 ALMA_\
.ti +20
ALMA_\ Language summary
 
.nf
BASEBAND      : define position of correlator basebands (ALMA)
FREQUENCY     : define receiver setup (ALMA)
PLOT          : plot the resulting frequency coverage (PdBI, 30-m and ALMA)
SPWINDOW      : define spectral windows (ALMA)
.fi


.ti -4
1 BASEBAND

[ALMA_\] BASEBAND i frequency [sideband]

The ALMA correlator is composed of four quadrants, each of them being
able to process 2 GHz (x 2 polarization) of the receiver output. This
is called a baseband, and this 2 GHz slice can be placed at any
position in the receiver bandwidth. The BASEBAND command is used to
define the i-th baseband, by selecting the frequency of its center. This
can be done either in the RF or the IF domains
.nf  
  - if the frequency is < 1000, it is interpreted as a rest frequency
    in GHz.
  - if the frequency is > 4000, it is interprested as an intermediate
    frequency in MHz; a second parameter giving the sideband (LSB/USB) 
    is then necessary.

Example: Receiver band 7 is tuned at 220 GHz LSB (with command
FREQUENCY). It outputs 4-8 GHz
signals in USB (corresponding to 234 to 238 GHz) and LSB (218 to 222
GHz). Baseband 1 can e.g. be placed at IF = 6.2 GHz in LSB, which
corresponds to 220.8 GHz. The commands "BASEBAND 1 220.8" and
"BASEBAND 1 6200 LSB" are therefore equivalent.

Entering "BASEBAND i" with no further arguments calls an interactive
mode in which the baseband is defined with the cursor on the plot
produced by the FREQUENCY command. Clicking in the plot defines the
frequency/sideband of the center of the baseband. Basebands are 
automatically shifted to be fully included within the IF band. 

The command "BASEBAND" alone enters a loop to interatively
define all four basebands (it is equivalent to FOR I 1 TO 4;
BASE I; NEXT).

.ti -4
1 FREQUENCY

[ALMA_\]FREQUENCY Name Frequency Band Center 

Define and plot the receiver frequency coverage of ALMA. The command
syntax is similar to that of the LINE command for the Plateau de Bure:
.nf
  Name      is a line name to label the plot
  Frequency is the rest frequency in GHz
  Band      should be USB or LSB
  Center    is the IF1 frequency in MHz [optional]
.fi
 
The command produces a plot of the USB and LSB frequency band. It is
then necessary to define the position of the four correlator basebands 
(command BASEBAND) and then the spectral windows within each basebands
(command SPWINDOW).

A typical session to define an ALMA setup would be:
.nf
freq something 220 lsb ! define receiver tuning
base 1 220.8	       ! define baseband #1
plot base 1	       ! plot baseband #1
spw 1 		       ! define spectral windows on baseband 1
		       !   using the cursor
.fi

.ti -4
1 LINE
.ti +4
[PDBI_\]LINE Name Frequency Band [Lock [Center [Harm]]]

Define and plot the receiver frequency coverage of the Plateau de Bure
Interferometer (with the receivers installed in winter 2006/2007).
The command syntax is identical to that of the corresponding command
in OBS:
.nf
    Name      is a line name to label the plot
    Frequency is the rest frequency in GHz
    Band      should be USB or LSB
    Lock      is LOW or HIGH [optional, default LOW]
    Center    is the IF1 frequency in MHz [optional, default 6500]
    Harm      is the harmonic number [optional]
.fi 

o The receiver band to be used (1 to 4) will be determined by the
software.

o Since 2015, NOEMA observations are preferentially performed using a
limited number of LO frequencies for which receiver performances have
been optimized. Those frequencies are distributed all over the
receiver bands every 500MHz. For latest states of NOEMA (from 2015
on), this is taken into account in the ASTRO\LINE command. The command
checks that the LO frequency is located on this grid. When this is not
the case, the command returns an error and a new IF center frequency
is proposed to ensure a tuning frequency that matches the grid.  The
option /ONGRID can be used in order to let the command use this
suggested frequency and avoid to return an error.  The tuning frequency is
computed using only the source LSR velocity. With the Doppler
tracking, the actual LO is slightly different from the tuning
frequency.  Both tuned and tracked LO frequencies are given in output
when the LINE command arguments match the tuning grid.  With the
option /FIXED__FREQ, the command ignores the tuning grid.

o The center frequency is expressed in the first IF (4-8 GHz =
4000-8000 MHz). WARNING: it is highly not recommended to center the
line frequency at 6 GHz. This is because the correlator analyses
quarters of the 4 GHz bandwidths, and 6 GHz is very precisely at the
limit between two such adjacents quarters.

o The plot displays the four "quarters" Q1...Q4 that can be 
selected as input for the correlator (see NARROW__INPUT command):
  Q1 = 4.2-5.2 GHz, Q2 = 5.0-6.0 GHz
  Q3 = 6.0-7.0 GHz, Q4 = 6.8-7.8 GHz

o Commands NARROW and SPECTRAL are available to setup the IF
processor and the spectral units of the narrow-band correlator (see
the corresponding help). A typical ASTRO session would look like:

.nf
line toto 100 usb           ! choice of rx tuning
narrow q1 q3                ! choice of the correlator windows
spectral 1  20 320 /nar 1   ! correlator unit 1
spectral 2 320 200 /nar 2   ! correlator unit 2
spectral 2 320 210 /nar 2   ! new def. of unit 2 --> plot is updated
...
.fi

o Command PLOT can be used to plot the full receiver coverage, that of
the NARROW band correlator, or that or the WIDEX correlator.

o LINE can also be used to produce plots of the frequency coverage of
the old receivers (replaced in 2006/2007). The command OBSERVATORY PDBI year
allows one to select the instrument as of the selected year:
.nf
- 1995: 3 and 1.3 mm receivers, 500 MHz bandwidth
- 2000: 3 and 1.3 mm receivers, 580 MHz bandwidth
- 2006: new generation receivers (NGR: 4 GHz bandwidth, 2 polar.)
- 2010 NGR +  modifications in the LO system
- 2013 = 2010 + additional slight modification in the LO system
- 2015 = 2013 + Optimized tuning on a LO grid [default]
.fi
For the OLD receivers (years 1995 & 2000), the commands NARROW,
SPECTRAL, PLOT are not active. Please enter HELP LINE OLD for a
description of the behaviour of the LINE command in that case.


.ti -4
2 /FIXED__FREQ

[PDBI_\]LINE Name Frequency Band [Lock [Center [Harm]]] [/FIXED__FREQ]

For pdbi__year 2015, this option allows to plot the frequency coverage
without checking that the LO frequency is on the grid of tuning (every
500MHz in LO)

.ti -4
2 /ONGRID

[PDBI_\]LINE Name Frequency Band [Lock [Center [Harm]]] [/ONGRID]

For pdbi__year 2015, this option let ASTRO adapt the Center IF
frequency so that the LO frequency falls on the grid of optimized
tuning (every 500 MHz) in LO.


.ti -4
2 OLD

.ti +4
[PDBI_\]LINE Name Frequency Band [Lock [Center [Harm]]]
[/MOLECULES File] [/SPECTRAL Unit Bandwidth IF__2] /WIDTH width
.ti +4
[PDBI_\]LINE /SPECTRAL Unit Bandwidth IF__2
.ti +4
[PDBI_\]LINE /AUTO
 
Plot rest frequency coverage of Plateau de Bure Interferometer using 
the OLD receiver system (replaced in 2006/2007).  The command syntax 
is identical to that of the corresponding command in OBS.
.nf
    Name is a line name to label the plot
    Frequency is the center frequency in GHz
    Band should be USB or LSB
    Lock (optional) is LOW or HIGH
    Center (optional), the center IF2 frequency in MHz, default 350.
    Harm (optional), the harmonic number.
.fi 
The option /MOLECULES enables to plot the rest frequencies of several 
transitions, found in file File. This is a text file with entries:
.in +4
.br 
Freq    'chain'
.br
where Freq is the rest frequency in GHz and 'chain' the line name
to be plotted by GreG, between single quotes. Example:
.br
88.632  'HCN'
.br
89.081  'HCO_\u+'
.in -4 
The option /WIDTH width is used to introduce a finite width (in km/s)
for the molecular lines displayed.

The option /SPECTRAL is used to overlay the desired spectral correlator
configuration. 
.in +4
.br
Unit is the correlator unit number (1 to 8)
.br
Bandwidth is the bandwidth in MHz (20, 40, 80 or 160)
.br
IF__2 is the center frequency (in MHz) of the unit in the second IF
(in the range 110 to 590 MHz).
.in -4

With only the /SPECTRAL option, the corresponding unit overlay will
be drawn on an existing LINE plot.
 
Because only one synthesizer is used to generate the 1st and 2nd LOs,
the IF frequency is slightly variable (between 1.500 and 1.550 GHz),
and the Doppler tracking is correct only for the specified band (USB
or LSB).  The last specified source is used to get the Doppler shift.
The image frequency doppler shift is wrong by at most 2.Ers/Harm,
where Ers is the Earth rotation speed, or about 0.9 km/s, roughly 0.04
km/s at 86 GHz.

The option /AUTO is used to guess the line frequencies and spectral
setup for Bure, given a set of variables:
.nf
N__LINE     int  number of line frequencies 
N__CONT     int  number of continuum frequencies
for each of N__LINE:
LINENAME__i char line name of line table
LINEVELO__i char velocity range (2 values: min, max  in km/s)
LINEFREQ__i dble line frequency (MHz)
LINEVRES__i dble velocity resolution (km/s)
for each of N__CONT:
CONTTABLE__i char  name of continuum  table
CONTBANDS__i char  range of frequency bands for the continuum
                  (min1 max1 min2 max2 ...)
.fi
Output is also in a set of variables, used by setup writing procedures.
look into LINE__* and SPEC__* variables.

.ti -4
1 NARROW__INPUT

[PDBI_\]NARROW__INPUT Q1|Q2|Q3|Q4 Q1|Q2|Q3|Q4 

Select the two entries of the PdBI narrow-band correlator. The PdBI
receivers have 4 GHz bandwidth (for each polarization), from IF=4 GHz
to IF=8 GHz. The WIDEX correlator is able to analyse the whole
bandwidth, but the narrow-band correlator can process only two 1 GHz
wide bands.

The receiver 4 GHz bandwidth is split into four "quarters": 
.nf
         Q1 = 4.2-5.2 GHz    Q2 = 5.0-6.0 GHz
         Q3 = 6.0-7.0 GHz    Q4 = 6.8-7.8 GHz
.fi
and two of them must be selected as inputs to the narrow-band
correlator. Any combination is possible. The polarization that 
is selected depends on the selected quarter:
.nf
  - the correlator input 1 can only be Q1 HOR, Q2 HOR, Q3 VER, Q4 VER
  - the correlator input 2 can only be Q1 VER, Q2 VER, Q3 HOR, Q4 HOR
.fi

Example: NARROW__INPUT Q1 Q2 selects Q1 HOR as first input, and Q2 VER
as second input. Simultaneous measurements of the two HOR and VER
polarizations is obtained with e.g. NARROW__INPUT Q1 Q1.
 
.ti -4
1 PLOT

.ti +4 
[PDBI_\]PLOT [LINE|NARROW|WIDEX] 
  or 
.ti +4 
[ALMA_\]PLOT [FREQUENCY|BASEBAND i]

         [/LIMITS min max]                             
         [/MOLECULES FileName [Mol1 Mol2 ... Moln]]    
         [/WIDTH width]                              
         [/SPURIOUS [NO]]
         [/ATMOSPHERE [water]]

         
The PLOT command is used to change the plot options and update the
plot accordingly. Except for some restrictions on /LIMITS, 
the options are valid for all observatories.

Three types of plots can be produced for the Plateau de Bure:

o LINE mode = plot of the LSB and USB (as produced by the LINE
command). Note that the new generation receivers at PdBI are
single-side band: the image sideband appears in light grey. 
Widex and Narrow-band units are indicated.
 
o  NARROW mode = SSB plot of the two selected entries of the 
narrow-band correlator. This plot is aimed at zooming on the two 1 GHz
inputs of the correlator, as selected by the NARROW__INPUT command.
The position and width of the 8 spectral units are drawn. 
 
o WIDEX mode = plot of the WIDEX frequency coverage.

Two types of plots can be produced for ALMA :

o FREQUENCY mode = plot of the LSB and USB ouptut of the receiver
band (as produced by the FREQUENCY command). 

o BASEBAND mode = plot of the baseband #i. The position and width of
the spectral windows defined with SPWINDOW are also drawn.

After each of the LINE, NARROW__BAND, SPECTRAL or WIDEX commands, the
plot is updated. 

.ti -4
2 /LIMITS

[PDBI_\]PLOT LINE       [/LIMITS min max]  

[ALMA_\]PLOT FREQUENCY  [/LIMITS min max]  

Selects the IF range (in MHz) to be plotted. This is to zoom on 
a specific part of the receiver bandwidth. Only valid in LINE
mode (for PDBI) or FREQUENCY mode (for ALMA).

.ti -4	
2 /MOLECULES	 

[PDBI_\ or  ALMA_\]PLOT [...] [/MOLECULES [FileName [Mol1 Mol2 ... Moln]]    
   
   Display the name of molecules and transitions found in the specified catalog. 
   
   Note: the whole plot is redrawn. Displayed lines are not simply overlaid on 
the current existing plot.

Default is to use the GAG__MOLECULE file, distributed with ASTRO but a user-defined
catalog can also be specified. This file must be a text file with entries:
.in +4
.br 
Freq   'chain'
.in -4
where Freq is the rest frequency in GHz and 'chain' the line name
to be plotted by GreG, between single quotes. Example:
.in +4
.br
88.632  'HCN'
.br
89.081  'HCO_\u+'
.in -4
Another supported format is "Comma Separated Value", as produced by
many spreadsheet processors, i.e. 
.in +4
.br 
115.230, HCN J=1-0, 
.in -4
(Depending on the LOCALE, the "comma (,)" may be a "semi comma (;)".) 
.ti -4
2 /WIDTH

[PDBI_\ or  ALMA_\]PLOT [...]   [/WIDTH width]                              

   PLOT /WIDTH width is used to introduce a finite width (in km/s)
for the molecular lines displayed.

.ti -4
2 /SPURIOUS

[PDBI_\ ALMA_\]PLOT [...]   [/SPURIOUS [NO]]
   
   Plot or not the position of spurious lines due to interferences.
For Plateau de Bure, they are at IF1=4500 MHZ, 6300 MHz, and at 3 and 4 times the LO1REF
frequency; plotting is the default, it can be deactivated with PLOT
/SPURIOUS NO

.ti -4
2 /ATMOSPHERE 

[PDBI_\  or ALMA_\]PLOT [...]   [/ATMOSPHERE [Water]]

    Display the atmospheric transmission (at zenith) and expected Tsys 
(at current elevation) according to the specified conditions. Water can 
be specified to overidde the current value.

The transmission and Tsys are computed on-the-fly using the ATMOSPHERE command (see
corresponding help). The command ATMOSPHERE /PRINT can be used to list
the input parameters that were used. The ATM model version can be
changed using the SET ATM OLD|NEW command (the NEW version is
recommended).

.ti -4
1 PRINT

[PDBI_\]PRINT [filename]

Write in an output file (default is setup.obs) the OBS command lines
that correspond to the receiver and backend tuning selected with the
LINE, NARROW, and SPECTRAL commands. This file can directly be
included in the observing procedure (``setup'' file) to be run at the
Plateau de Bure. It can also be executed in ASTRO to (re)produce the
the frequency coverage plot.

Example of output:
.nf
  !
  ! Plateau de Bure receiver and backend setup
  ! Written by ASTRO command PRINT on 11-FEB-2008
  !
  ! ----- Receiver -----
  !
  LET RECEIVER 1
  LINE test  100.000000 LSB  LOW  6500.00  57 /RECEIVER 1
  !
  ! ----- IF processor -----
  ! Selected quarters are Q3 VER and Q4 HOR
  !
  NARROW Q3 Q4 /RECEIVER 1
  !
  ! ----- Narrow-band correlator -----
  !
  SPECTRAL 1  80  550.00 /NARROW 1 /BAND LSB /RECEIVER 1
  SPECTRAL 2 320  360.00 /NARROW 1 /BAND DSB /RECEIVER 1
  SPECTRAL 3 320  740.00 /NARROW 1 /BAND DSB /RECEIVER 1
  SPECTRAL 4  80  350.00 /NARROW 2 /BAND LSB /RECEIVER 1
  SPECTRAL 5  20  793.00 /NARROW 2 /BAND LSB /RECEIVER 1
  SPECTRAL 6  20  700.00 /NARROW 2 /BAND LSB /RECEIVER 1
  SPECTRAL 7 320  540.00 /NARROW 2 /BAND DSB /RECEIVER 1
  SPECTRAL 8 320  830.00 /NARROW 2 /BAND DSB /RECEIVER 1
.fi
.\"====================================================================
.ti -4
1 SPECTRAL 

[PDBI_\]SPECTRAL iunit bandwidth fcent /NARROW 1|2 [/BAND LSB|USB|SSB|DSB]

Select the width and position of each spectral unit of the 
narrow-band correlator. 
.nf
  - 'iunit' is the correlator unit number (1 to 8)
  - 'bandwidth' is the bandwidth in MHz (20, 40, 80, 160, or 320)
  - 'fcent' is the center frequency (in MHz) of the unit in the 
     third IF, i.e. the IF at the entry of the narrow-band correlator 
     (in the range 100 to 1100 MHz).
.fi
The option /NARROW is mandatory, and is used to select which entry 
of the correlator the unit is connected to. The SPECTRAL command
updates the current plot by drawing the position and width of the
selected correlator unit. The list of the current correlator setup,
including the number of channels and resolution, is printed out.

Alternatively, the command "SPECTRAL iunit" with no other arguments
calls the cursor and allows one to define interactively the spectral
unit:
.nf
  - Left hand click defines the central freuency and the narrow band 
    unit
  - +/- increases/decreases the bandwidth
  - < and > shifts the position of the unit by 5 MHz
  - E is used to Exit this mode 
.fi
The plot is updated after each action.

Option /BAND LSB|USB|SSB|DSB can be used to define the processing mode of
the selected correlator unit. There is no practical difference between
LSB and USB tunings. The DSB mode provides twice as many channels than
the LSB or USB modes for the same bandwidth, but the central channels
suffer from the Gibbs effect. This mode is therefore not optimized for
spectroscopic studies. Choosing between an SSB or DSB mode is possible
only if a bandwidth of 160 or 80 MHz has been selected (320 MHz is
only available in DSB mode; 40 and 20 MHz are only available in SSB).
Default is DSB for 320 MHz wide units, LSB for the other bandwidth.
The /BAND option has no consequences on the plot produced by ASTRO,
but affects the printout (number of channels and resolution) and the
setup file produced by the PRINT command.

.ti -4
1 SPWINDOW

[ALMA_\] SPWINDOW ispw width frequency [/BASEBAND i] 
        [/POLAR p] [USE u] [/RESET]

This command is used to define a spectral window in the i-th baseband.
The /BASEBAND option is mandatory, unless a a PLOT BASEBAND command has 
been run, in which case the plotted baseband is selected. 

The parameters of the spectral window are then defined as follows:
.nf
  - 'ispw' is the correlator window number (each baseband has its
    own list) -- Currently, it can only be equal to 1 (one spectral
    window per baseband).
  - 'width' is the bandwidth in MHz: 31.25, 62.5, 125, 250, 500, 
    1000, or 2000. NB: for simplicity, the software accepts and 
    corrects 32, 60, 64, 120, 128, 256.
  - 'frequency' is the center frequency (in MHz) of the window in the IF
    domain, as displayed in the plot produced by PLOT BASE.
  - The /POLAR option is used to define how many polarization products
    must be computed (1,2, or 4). Default is 1.
  - The /USE option defines which fraction of the correlator is to
    be used. This modifies the number of output channels, and therefore 
    the spectral resolution. Default is 100. Valid values are 3.125%,
    6.25%, 12.5%, 25%, 50%, and 100%. Entries < 1 are accepted (e.g. 0.5
    instead of 50). 
.fi
Depending on all these input parameters, the software checks whether
one or several correlator modes are available (not all combinations
are possible). Obvioulsy, defining several windows on one baseband is
possible only if each window uses < 100% of the correlator resources.

The command "SPWINDOW ispw" with no additional parameters calls an
interactive mode in which the spectral window can be defined with the
cursor:
.nf
  - Left hand click defines the central frequency.
  - +/- increases/decreases the bandwidth
  - < and > shifts the position of the unit by 5 MHz
  - P changes the number of polarization products (1-2-4)
  - U and I decrease/increase the fraction of the correlator to
    be used for that spectral window.
  - E is used to Exit this mode 
.fi
The plot is updated after each action.

.ti -4
1 WIDEX

[PDBI_\]WIDEX

This command is foreseen to provide tuning parameters of the WIDEX
correlator. None of them is currently open to the users, so the command
only plots the frequency coverage of WIDEX.

The WIDEX command is therefore equivalent to PLOT WIDEX.

.ti -4
1 ENDOFHELP
