Subsystems of SUSI

SUSI is a very complex piece of equipment. I think of it in two ways: as group
of physical subsystems and as a group of control/software subsystems.

Physical subsystems                    Control/software subsystems
Siderostats                        scheduler
Vacuum System                      sidcon
Beam Reducing Telescope (BRT) area sidcongtk
Optical Path Length Corrector      wobble2 & wobble2gtk
Longituduinal Dispersion Corrector fringecon & fringecon_client
Centre table                       opcon
Red table                          opttab2
Blue table                         merlin
Control room			   picomotors
Auxilliary systems	           CVS
Laser Metrology System            cron
Clock                           Computers
ND Filters             Weathermon

General Physical Layout:

 Siderostats -> vacuum pipes -> beam-reducing telescope (BRT) area --------- 
                                  incl. acquisition camera                  |
                                  wobblers (tip-tilt system)                |
 Control room <- Red table  <- centre table <- Longitudinal <- Optical <---- 
                    or                         Dispersion      Path          
                 Blue Table                    Corrector       Length        

Software Layout (corresponding to above):

 sidcon     ->              -> StartrackNG                               --
                               acquisition system                          | 
                               wobble2                                     |
 arthur     <-   opttab2    <-             <-      LDC      <-  opcon   <--

Control Layout:

A typical, but simplified, control system looks like this

              TCP/IP              linux             physical 
 clients GUI ---------> server   --------> driver  ----------> hardware
              sockets   (susiui)  device   & AV68k   link

e.g. the pathcomp system (now superseded by opcon),

                  TCP/IP              linux           physical 
 [no client GUI] ---------> pathcomp -------->  plc  ----------> carriage motors,
                  sockets   (Peleas)  device   AV68k    link     piezos, etc
                                               ^  |
                                               |  |
                         plc ------------------    --------->laser
                         (Ra) [to be superseded]             metrology


-Siderostats, housings, neds, periscope mirrors

 SUSI's "preferred" baselines.
 Baseline Length (m)	Stations employed
           5	          N1-S1
           10	          N1-S2
           15	          N3-S1
           20	          N3-S2
           30	          N1-S3
           40	          N3-S3
           60	          N4-S2
           80	          N4-S3
           110	          N1-S4
           160	          N4-S4

           220	          N5-S2
           320	          N5-S4
           452	          N5-S5
           640	          N6-S6

-Autocol numbers: Beware, if the display on a sidcon
reads ***.000, it's got about a 1 in 1000 chance of being correct, as
sometimes something weird happens and the display resets to ***.000.
Seems only to be a problem with North 4 at the moment, but it is an error 
I've [MJI] seen in the past. So, after autocollimating a siderostat,
it is good to write down/type the numbers straight away in case something
like this happens.


Vacuum System
 Vacuum pipes link the siderostats to the BRT area.
 Pumps are in the shed by the e-w vacuum pipes. Key in the usual place.
 Pump down the vacuum every few (2-3) days. See the gauges in the NE
 corner of the control room. (but S gives an incorrect reading)
 There are two pumps, for redundancy. It runs fine, but slower, under one pump. 
 The pumps have internal valves to prevent oil being sucked into the vacuum but
 the clamp-valves provide a backup and extra protection and should be used.
 To isolate one pump from the system, in case of failure close the wheel-valve
 between the vacuum set and manifold.Ground level pump is the backing pump, the
 upper one is the 'Roots blower' (!) The blower cannot operate at high pressure
 and there are interlocks to protect it. 
 There is one control panel per pump.
 Turn LH Red switches to on. Middle switches to on. (These usually left on)
 Then swivel RH switches to 'on'
 Now open clamp-valves to N and S pipes.
**This order ensures nothing is sucked into the pipes!
 Pump for ~1-2 hrs.
 Close valves.
 Then switch off pumps.
 One gauge (S) does not read correctly.
 If a pump/motor/etc fails isolate it by closing the wheel valve on top.

 Here are Bill's instructions:
The SUSI vacuum gauges are thermistor gauges that measure the thermal
conductivity of the residual gas and are very non-linear. They are
very poor at reading high (or extremely low) pressures but are
excellent for pressures in the range of approximately 0.1 to 10 torr
and were chosen for that reason.  

The vacuum meter at SUSI has two scales, but only the upper one should
be used.  This scale is misleading since it appears to be labeled
"ATM".  The actual units of the scale are torr (1 T = 133 Pa or
1/760th of standard atmospheric pressure).  The right hand limit of
the scale is 760 T; this is unfortunately marked ATM and wrongly
implies that the scale is in atmospheres, not torr.  The height of the
column in a mercury barometer at sea level is approximately 760 mm and
this is the origin of the unit.
Beam Reducing Telescope (BRT) area

Optical Path Length Corrector
The cart slews at ~5m/min
Longituduinal Dispersion Corrector
Ensure LEDs are on otherwise the  limit switches don't work.
Has a nasty habit of regularly dieing due to RTP read failures IF its
electronics are not cooled. Direct a fan onto its electronics box. 
Simply switch off-on at north el rack, reset (red button below) & restart.
 May need to unplug/replug or power cycle at back of rack too.
Centre table

Red table
Aligning and focussing the apd fibres. [MI]

The field-of-view of the fibres is roughly 20" on the sky. This means in
principle that the alignment is not critical: the full PSF including the
first airy ring is about 10" at 900 nm, giving a maximum tolerance of
about +/- 5" on the sky. This kind of leeway is necessary as the
absolute aiming position of the tip/tilt system is dependant on
dispersion and spectral type (can change by up to 1" or so), and
experience has shown that alignment is not completely stable over
time. The difficult part of aligning the fibres is ensuring that the focus
is also correct, and this cannon be done easily by simply measuring the
amount of starlight coming in to the fibres (although possible in
principle). So, here is another (better?) technique for fibre alignment:

1) Get the MAPPIT laser set up on Peter's fibre-alignement rig (a short
piece of optical rail, hopefully with some/all of the following
components already mounted and sitting in the optics lab). Three
componenets are required: the MAPPIT laser, the fibre holder and a short
focal length lens (one marked '20' on the lens holder is perfect).
2) Take this set up to the roof of the optical enclosure next to the apds.
Unplug one of the fibres from the its apd and plug it into the fibre
3) Align the set up so that the laser is focussed on the fibre head. This
is quite tricky, and you can tell the alignment is correct when the
bright scattered laser spot on the fibre face mostly dissapears.
4) Get off the roof, and check that the laser is bright when it comes out
of the other end of the fibre.
5) Use the mirror 'M' on the red table to reflect this beam accross the
room. The beam edges should diverge by 6 mm over 5 m due to the angular
size of the fibre core. If not, adjust the fibre focus (the large ring to
the back of the fibre mount) until this condition is reached. This is not
particularly accurate, and I'd love it if someone else has a better
idea, but the beam quality isn't really all thaat great...
6) Turn the red table laser on (put appropriate slides etc in place) and
with a roughly 10 mm aperture in, adjust the West-Central OPLC mirrors to
get the laser spots onto the target at the large BRT.
7) Turn this laser off, take mirror 'M'/slides shutters out and align the
beam coming out of the fibre with the same target. Keep the same 10mm
aperture in. The pattern on the targets will not be bright (it's a
divergent beam after all), but should be brightest in the centre. Move the
fibre face using the large knobs on the side and top of the mount to align
the brightest bit of the pattern up with the target. If you can get this
right to within 5mm, then this corresponds to 2'' on the sky and is
8) Repeat with the other fibre.

CCD Cooler
Things to consider:
1. Check that the coolant level is OK.  There is a large screw-cap on
the top of the unit (you need a ladder to inspect this).  The fluid
level should cover the cooling coils.  If the level is low just add water.
2. The temperature setting might be incorrect.  This needs occasional
adjustment due to seasonal changes.  It may be set too low.  The idea is
to keep the water temperature *slightly* below the ambient temperature
in the instrument enclosure.  If it is set too low the cooler has a lot
of work to do and more importantly there is a risk of condensation if
the temperature of the pipes, etc., fall below the dew point.

Blue table

Control room

Auxilliary systems
To download recent weather data follow WJTs document 
"How to download data from the environdata data logger".
Laser Metrology System
Complicated...but needn't be!
Cold start: Leave ~2hr to settle
Warm start: Leave ~15mins to settle
 If it fails to lock, ie. you see red and/or orange lights:
  *Switch off/on at north electronics rack
  Now the system goes through an approx 10min warm-up period.
  During this time do:
   If needle is to far right <=> turn pot CW
   If needle is to far left  <=> turn pot CCW
  Repeat steadily and with care as required to keep needle in
  'control range' until all LEDs go out. Hopefully the needle now
  remains in the 'control range'. If not repeat from *.
The residual 'background jitter' visible on the oscilloscopes is due to the
control-room air-con unit. The fan outside the building causes it.

The Clock
SUSI has a new GPS clock from Nov 19 2009 - the Krontek KT2000 NTP server.
See Krontek for a datasheet or manual.

The following notes relate to the old clock - no longer required I guess.

The 'Datum TymServe 2100' clock lives in the north electronics rack underneath
the GPS receiver. It should display 3 green lights and the correct time and

WJT has written some comprehensive notes
 about time at SUSI, ntp, etc. Read these first.

If the clocks on arthur, peleas, gareth, gaheris are out of sync restart
arthur first then the others.
If the clock is wrong it needs resetting (Bill did this remotely). Just switch
off, wait 5mins, switch on, wait 20mins for all three green light to come on.
Display contrast: press 4 to decrease
                  press 9 to increase

I set the following options:
 1/ IP address=
 2/ Mode=timecode  (which makes the clock read its time from the gps)
 3/ Set Year=2006
 4/ Set Local time offset=+10:00:00

Other settings I did not change are:
 1/ Net Mask=
 2/ Default route=
 3/ Host IP address=
 4/ Ethernet address=00a06e040060
 5/ DHCP=autooff
 6/ Telnet=autoon



Mikes notes are at /mirror/home/mireland/latex/scheduler.tex [or .ps]
My additions to Mike's notes:
 a/ load [script file] is now implemented. Click 'go' to run the script.
 b/ foto Takes photometry files: north and south and dark. Does all
     necessary shutter and siderostat commands.
 c/ for fs need to start 200-300 micron below expected position of fringes
     to allow pellicle time to move away before scan starts.
 d/ Any command can be entered in 'insert command' box. It is executed immediately
    or as soon as the present active command is completed.

1. Get the system set for observing: all servers and clients open, optics aligned, sids 
    running, etc
2. Go to target star and do a refin alignment with the PHP
3. scheduler & in an arthur window
4. Create a targetname.sched file (or do this before starting alignment). These are 
   stored in /export/snert/data/schedules.
    They should look something like:
      acq 3699            acquire an alignment star
      align               and do align procedure
      hrf 3699            now do scans on HR3699 and follow with foto(metry) files
      hrf 3884
      hrf 4114
      hrf 3884
      hrf 3685
      hrf 3884
      hrf 3699
      load ../schedules/lcar.sched      and now reload this file to repeat

    A cycle takes 40-50 mins if everything goes smoothly
    ie. ~5-6mins per star
    To stop simply hit 'stop' in scheduler whenever you wish.
5. Type load targetname.sched into scheduler
6. 'Single Command' step through acq and align then hit go. 
7. The scheduler already knows about
    sids, fs parameters, the data directory, file number and scans parameter.
   Now it just cycles through the sched file.
8. Note: To clear a .sched file from the scheduler just do:
    load ../schedules/empty.sched (which is empty as its name suggests)
    and hit 'single command' twice. This saves closing/reopening scheduler.

The following is the old method we used before scheduler ran everything in case you need it.
 When scan set ends...
 Scheduler starts new astromod
 Meanwhile acquire north on StartrackNG. Wait for sids to slew to star then grab and centre
 Wobble2 will close loop automatically if 'tasc' is toggled in wobble2 window and pointing is 
 Acquire south on STNG. Wobble2 closes auto.
 Move pellicle to park  - but ensure n&s wobble remain closed
   s might open when pellicle passes.
   Could go to control|widefield to recentre/reclose
 Scheduler will search and find fringes
   If not found do 'fs start end speed' [set start and end sensibly or -1500 +1500 if 
    first time, and speed=10 for slow, reliable search.] or try sfo if you know where
   the fringes are.
 Record log sheet data from Merlin

-Do nfoto, sfoto, dfoto between between each star if necessary
-Keep an eye on the no of scans. There is no obvious 'finished' signal.
-May need to hit 'stop' before 'go' sometimes
 Manual photometry - nfoto: smsin, nmsout, maintain tracking on sids and OPLC
                     dfoto: smsout, nmsout, maintain tracking on OPLC, stop tracking on sids
                            start set a few seconds after servos open.
    Do ~100 scans for each d,b,sfoto set with long scan.
    Do ~400 scans for each d,b,sfoto set with short scan???

-Scheduler has time-outs on gaining a sid/wobbler lock and on finding fringes.
  But it will just wait for you to manually reacquire on the sids, re-lock the servos
  or scan for fringes. After completing each of these manual operations simply hit 'go'
  and scheduler will take over from where it paused. Woo hoo!:)
-If fringecon finds false fringes or looses the fringes during a scan then
  on fringecon do:
  stop  (scheduler will remain in "waiting for scan set to end" mode)
  start continuous, fs or sfo, start scan
  At end of scan scheduler will save as correct run no and continue as normal.

-Wobble2 looses star: go to control|widefield and move sids manually
  Siderostats fail to slew to target. Just hit 'Track' in sidcongtk   
To record pointing data do spd in sidcon of choice.
This records data in /usr/local/susi/tmp/?n?  where eg ?n?= s3s direction-sid-periscope
But move this data (to, say, that nights data directory) as the next spd will overwrite it.
To stop recording data do cpf.

wobble2 & wobble2gtk
These control the tip-tilt (or wobble) system.
Start xrun_wobble2 first and run the autolist. Then start wobble2gtk, from
any machine. Then start StarTrackMsg on the PC.

John Davis has written some notes and made an image about getting beams on the wobble camera chip correctly.
fringecon & fringecon_client
-Fringecon can send offsets of up to 20 microns in standard modes
 (probably not a good idea to set long scan damping to less than 3 seconds
 now that I think about this), but this should be a gentle ramp
 over 80 ms and I think should only produce errors of about 0.5 um.[MJI]

 automatically turns the feedback to pathcomp on if you know the fringes
 are there, even if the signal-to-noise hasn't reached 5.0 yet.

For normal observing with the long scan locked on increase the damping time
to keep the signal-to-noise high (certainly higher than 3.0 in general).
On faint stars this might mean using damping=20s.

Short/Long Scan
The short and long scan require different parameters.
The short scan is useful in good and average seeing. It will improve the data
quality by a factor of ~2 (in one run you get 4000 short or 1000 long scans in
the same time). It might be worth finding the fringes with the long scan then
moving to the short scan.

To change to the short scan set (or check) the following:
 in fringecon:
  svd 0.4  (this is the default for both long and short scans)
  svg 16   (this is the big change - default is 1.2)
 in fringecon_client set (from the menus):
  lut scan35f_256
  damp 5          (The ~normal damping time)
  filter 0.7 0.08 (default)
 in scheduler set:
  scans 4000 50
To log opcon data:
Use the menu item to toggle opcon logging on/off.
The opcon.log file is in ~snert/data/temp, which is also /export/snert/data/temp.
You must to manually copy this file (to the data directory, say) after logging
opcon data. Reopening the log overwrites the old data.

Do: astromod xxxx ny sz n/s  eg. astromod 1922 n4 s1 s
Each picomotor pair (az+el) has a Driver Module. All, except the reference, come in 
Driver pairs with daisy-chained power, eg. drivers 6&7 or 4&5. Then all Driver Modules
have their network connections daisy-chained. There is only one Ethernet Controller which
MUST be switched on last (power board just inside south door from control room with 
apd/CCD power). Also need to power on all Driver Modules with a lower value than the 
ones you want to use, eg. if using just 8&9 need to power up all from 1-7 as well.
If the ethernet controller is replaced will need to reset its network parameters.
 ie its hostname & ip address (see /etc/hosts), ipmode (=stat), gateway
( and netmask (

WJT has written an application, 'picoset', which sets all the picomotor speeds in one
easy step. See also the document "How to set the picomotor speeds".
CVS software
For general information try:
 Try man cvs.
  This says there are really only five essential commands
    cvs checkout module
    cvs update
    cvs add file
    cvs remove file
    cvs commit file
 See the CVS home pages at CVS (Concurrent Versions System) for gory details.

To make CVs work for you first put the following lines in your .bashrc (or .cshrc) file:
 # CVS hostname
 # Our domain
 # CVS root directory
 export CVSROOT

Now you can do the following (using sidstats as an example)[from JRN]:
 Logged in as yourself, in your home directory, assuming you do not have a directory
 named 'etc' type

  cvs checkout etc/sidstats [ie CVSROOT/etc/sidstats. Also look in CVSROOT/src]
  cd etc
  cvs log sidstats

 This will give you the log which should be a quick note of what was changed.

 Once finished with the log, in your home directory type

  cvs release -d etc

 A message will say how many altered files you have in the repository and if you
 want to proceed with the release and delete. [the -d option deleted the
 directories and files produced]

 Checking out different versions is more difficult and can lead to some
 problems. My [JRN] suggestion is to correlate the log file with the observing log
 (written in the red pad thingy) rather than checking out other versions where you
cron is a program that runs jobs at predefiened times.
crontab -l lists the jobs
crontab -e edits the jobs
 04 08 * *  Mon echo "Copying web files to arthur"
 05 08 * *  *   /usr/bin/scp -pqrC /import/www/restricted/susi/* snert@arthur:public_html/susi

 min  hr  dom mon  dow
 *     *   *   *    *  command to be executed
 -     -    -    -    -
 |     |     |     |     |
 |     |     |     |     +----- day of week (1 - 7) (monday = 1)
 |     |     |     +------- month (1 - 12)
 |     |     +--------- day of month (1 - 31)
 |     +----------- hour (0 - 23)
 +------------- min (0 - 59)
The system is controlled from arthur, gaheris, gareth and peleas.
Each runs different software. If you reboot arthur you then need to 
reboot each of the others

To reboot them:
 ssh name
 su & root_password

To shutdown do:
 su & root_password
 /sbin shutdown now
 turn them off
 [Is this correct??]
SUSI Software Standard
There is a document about preferred SUSI coding practices.

SUSI software can be found in /usr/local/susi/bin/

In /usr/local/susi/etc/ can be found sidstats, system, etc
ND Filters
There is a set of Neutral Density Filters located just in front of the
 alignment lasers.
Open these with the 'Filters' icon on ROCS. This oens a Putty terminal.
Writing in this window is weird. First hit x to close window - then answer no.
Now when typing line-feeds are bad.
If you dont get an error returned things are working correctly.
Commands are: 
   where ?=1 -> ND?
Use pos=4 for autocollimating
The Weather Monitor provides external and tunnel conditions.
Do xrun_weathermon on peleas.
 write here

Andrew Jacob
Last modified: Wed Jun 2 17:02:58 EST 2004