CCD-Server Software Documentation


Location of this document: http://instrumentation.obs.carnegiescience.edu/Software/CCDSERVER/ccdserver.html


Index


Overview

The CCD data acquisition software generally consists of two programs:
  1. low-level CCD-Server (eg. ldss3server, mikeserver, etc)
    Note: The 'ccdserver' is a 32-bit process due to the limitations the the fiber interface driver.
  2. user-GUI (eg. ldss3gui, mikegui, etc)

The user-level instrument GUI runs on the observer workstation and communicates with the CCD-Server using TCP/IP sockets. The CCD-Server communicates with the DSP (digital signal processor) over a special serial (fiber-optics) line. It sends commands to the DSP, receives the data from the DSP and stores it in memory for retrieval by the user level program.
This document describes the low-level CCD-Server software. Since the CCD-Server software is very similar between different instruments I will explain it using IMACS as an example and then only point out important differences where they exist.

Each dewar has one dedicated CCD-computer that runs one instance of the CCD-Server program. The name of this program depends on the actual instrument.

Instrument CCD-computer CCD-Server Location .s-file
test system ccd01 ASB (gone?)
formerly LDSS3 ccd02 reused for parts (?)
MagE ccd03 mageserver Baade mage.s
Mike (blue) ccd04 mikeserver -c blue Clay mike_blue.s
Mike (red) ccd05 mikeserver -c red Clay mike_red.s
M2FS (blue) ccd04 m2fserver -c blue Clay m2fs_blue4.s, m2fs_blue1.s
M2FS (red) ccd05 m2fserver -c red Clay m2fs_red4.s, m2fs_red1.s
spare ccd06 Baade
IMACS-Mosaic3 (E2V) ccd07 imacserver -d3 (-f4) Baade imacs3.s
IMACS-Mosaic2 (E2V) ccd08 imacserver -d2 (-f2) Baade imacs2.s
spare ccd09 Clay
Boller & Chivens ccd10 bncserver duPont bnc.s
CAPS-Cam ccd10 capserver duPont caps.s
Direct / Echelle / WFCCD ccd10 ccdserver duPont site2k-1{2}amp.s, wf4k-1{2}amp.s
spare -- offline ccd11 duPont
spare -- offline ccd12 ccdserver Swope 4kx4k-4.s, 4kx4k-2.s
4Kx4K ccd13 ccdserver Swope -- not located by GabrielP
Guider/spare (?) -- offline ccd14 Swope
Guider/spare (?) -- offline ccd15 Swope

Each ccdXX computer has a developer (birk) account that contains one or more directories for the instruments that are supported by this computer. The instrument directory (eg. MIKE) constains a sub-directory named 'src' that contains the source code and binary (executable) for the CCD-Server.
To run the CCD-Server, login to the appropriate ccdXX computer and change to the development directory; eg. for MIKE, login to 'ccd04' and type

ccd04> cd /home/birk/MIKE/src
ccd04> ./mikeserver
to start Mike's CCD-Server program.

The CCD-Server programm up-loads the DSP-code (.s-file) to the DSP. This .s-file (eg. mike_blue.s) resides in the 'src' directory. The CCD-Server looks for this .s-file in three locations (in order):

  • value of the source-environment variable (eg. 'MIKESRC')
  • value of the HOME-environment variable ('HOME')
  • in the current directory

    When you are starting the CCD-Server program 'by hand' the source-environment variable is usually not properly set. Therefore I always create a link in $HOME to the various .s-files on each ccdXX computer.
    For regular operations, where the CCD-Server program is started automatically (by the ccdservd meta-server), the startup-script defines the appropriate source-environment variable.


    CCD-Server GUI

    The CCD-Server usually runs as a background program without direct user access ('-X' switch) and is controlled by the User-GUI via TCP/IP. For tests it is possible to run it with a GUI as explained below.

    IMACS

    Syntax: imacserver [-h pixels] [-c color] [-X] [-o]
    -h : font height in pixels (eg. '-h 18' uses a height of 18)
    -X : no GUI (server) mode
    -o : offline (data simulator)
    -c : {2,4} selects f/2 or f/4 version (not yet implemented)
    The GUI of the imacserver program looks like this:

    1st group
    File : [menu] :
  • Reset : reset the DSP and upload its code
  • Help : show locations of the documentation in a dialog box
  • Exit : close GUI
  • Options : [menu] :
  • DataPath : set data (save) path
  • DewarStatus : open a window with CCD temperature(s) and dewar pressure
  • CCD-Voltages: open a window to set the CCD bias- and clock-voltages
  • Disk : [bar] : disk status
    2nd group
    ExpTime
    [edit] : set exposure time (seconds)
    [output] : current time during exposure
    Loops
    [edit] : set (repeat) loop number
    [output] : current loop number
    ExpMode
    [menu] :
    • Auto : open during exposure
    • Dark : keep shutter closed
    [menu] : readout mode
    • Full : full readout of selected chips
    • Subraster : define subraster(s) for readout
    Binning
    [menu] : {1,2,3,4} readout binning factor for rows and columns
    [icon] : chip selection
    3rd group
    Start : [button] : start exposure (loop sequence)
    File# : [edit] : next filename number
    Pause : [button] : close shutter and pause exposure
    Abort : [button] : abort readout and dump data
    Shutter : [menu] : open/close shutter manually
    4th group
    Gain : [menu] : select {high,low} gain
    CDST : [edit] : set pixel time
    ClkDir : [menu] : set readout direction {right,left}
    5th group
    Message : [output] : server status messages


    Boller & Chivens Spectrograph

    Syntax: bncserver [-h pixels] [-X] [-o]
    There is no '-c' (color) switch.
    Other controls are identical to IMACS


    CAPS-Cam

    Syntax: capserver [-h pixels] [-X] [-o]
    There is no '-c' (color) switch.

    ReadMode
    [menu] :
    • FF-only : full-frame only
    • GW-only : guide-window only
    • FF+GW : full-frame and guide-window readout
    Shutter
    [menu] :
    • dark : keep shutter closed
    • used : open shutter during exposure

    GuideExp : [edit] : guide-window exposure time
    [output] : current guide-window time during exposure
    [output] : current guide-window exposure number
    GuideGuo : [edit] : guide-window geometry [x y w h]

    PixTime : [edit] : clocking parameter
    State : [output] : system state flags
    Hold_RLS : [edit] : clocking parameter
    Hold_RR : [edit] : clocking parameter
    Other controls are identical to IMACS


    LDSS3

    Syntax: ldss3server [-h pixels] [-c color] [-X] [-o]
    -c : {2,4} selects 2- or 4-output mode
    Other controls are identical to IMACS


    MagE

    Syntax: mageserver [-h pixels] [-c color] [-X] [-o]
    There is no '-c' (color) switch.
    Other controls are identical to IMACS


    The MagE Dewar-Status window displays a second temperature sensor for the cryo-tiger cold head.


    MIKE

    Syntax: mikeserver [-h pixels] [-c color] [-X] [-o]
    -c : {red,blue} selects MIKE-red or MIKE-blue camera
    OpAmp : [menu] : select op-amp {A,B}
    Heater : [edit] : set heater value {1,200}
    Temp : [output] : show CCD-temperature
    Other controls are identical to IMACS



    M2FS

    Syntax: pfserver [-h pixels] [-X] [-c #] [-o]
    -c : {red,blue} selects the color
    Other controls are identical to IMACS


    Meta-Server (ccdservd)

    The ccdservd program is a 'meta-server' because it is not directly part of the data-acquisition system, but it starts the actual CCD-Server programs when it is requested by any user-GUI. Each telescope dome has several ccdXX computers. Each of those computers can work as a backup for the others as long as the appropriate software is installed.
    Any user-GUI at startup tries to communicate with its associated CCD-Server (eg. mikegui with mikeserver). When the CCD-Server is not responding the user-GUI sends a startup-request to ccdservd. The ccdservd program then shuts-down all other (possibly) running CCD-Server programs and executes the requested startup-script.
    The following table has a list of locations and the corresponding ccdXX computers and startup-scripts.

    Location ccdXX computer(s) Instrument Startup-Script(s)
    Clay ccd04, ccd05, ccd09 MIKE ~/MIKE/mike_red , ~/MIKE/mike_blue
    Clay ccd04, ccd05, ccd09 M2FS ~/M2FS/m2fs_R , ~/M2FS/m2fs_B
    Clay ccd04, ccd05 LDSS3 (OCIW/retired) ~/LDSS3/ldss3_server
    Baade ccd03 MagE ~/MAGE/mage_server
    Baade ccd03, ccd07, ccd08 IMACS ~/IMACS/imacs_long, ~/IMACS/imacs_short
    duPont ccd10, ccd11 CAPS-Cam ~/CAPS/caps_server
    duPont ccd10, ccd11 B&C ~/BNC/bnc_server
    duPont ccd10, ccd11 Direct / Echelle / WFCCD ~/CCD/ccd_server
    Swope ccd12, ccd13 4Kx4K ~/CCD/ccd_server

    This is an example startup-script (ldss3_server):

    #!/bin/sh
    export LDSS3HOME; LDSS3HOME=$HOME/LDSS3
    export LDSS3SRC;  LDSS3SRC=$LDSS3HOME/src
    export LDSS3BIN;  LDSS3BIN=$LDSS3HOME/src
    cd $LDSS3BIN
    ./ldss3server -o -X >& /dev/null &
    

    The ccdservd program itself is started by a line in the /etc/rc.local script:
    su birk -c /home/birk/CCDSERVD/ccdservd.sh 
    
    The 'ccdservd.sh' scripts gets executed as user 'birk' and starts the actual 'ccdservd' program:
    #!/bin/sh
    cd $HOME/CCDSERVD
    ./ccdservd >& /dev/null &
    
    ccdservd utilizes a lock-file and an exclusive UDP port to ensure that only one instance of it is running at any given time.


    Setting Up a New ccdXX Computer



    2007-08-14, Christoph C. Birk, Carnegie Observatories (last updated: 2017-12-12)