IMACS Software Documentation


Location of this document: http://instrumentation.obs.carnegiescience.edu/Software/IMACS/dataacq.html


Data Acquistion

CCDServer (imacserver)
DSP communicaton / provide data for the CamGUI
CamGUI
Data acquisition user interface
QlTool
Quick look data display



CCDServer (imacserver)

Controls - TCP/IP-Interface

Note: automatically started by the ccdservd demon.

The imacserver program handles the communication with the DSP. It sends commands to the DSP, receives the data from the DSP and stores it in memory for retrieval by the user level program camgui. imacserver usually runs as a background program without direct user access ('-X' switch) and is controlled by camgui. For tests it is possible to run it with a GUI as shown below.

Syntax: imacserver [-h pixels] [-c mode] [-X] [-o]
-h : font height in pixels (eg. '-h 18' uses a height of 18)
-X : no GUI mode
-c : 'mode' may be "short" or "long" (Note: this switch is ignored until we have 2 dewars)
-o : offline (data simulator)

Controls

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] :
    [menu] : readout mode
    Binning
    [menu] : {1,2,3,4,5,6,7,8} 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


    TCP/IP Interface

    This interface is used by the CamGUI to control the CCDserver.

    port = _____ (f/4: BasePort+7, f/2: BasePort+9)

    version
    return version string: "version= 1.01"
    start
    start exposure (exposure time + readout array)
    expose
    start exposure (no readout)
    read
    readout array
    stop
    stop exposure (close shutter if open, but continue with readout)
    abort
    abort exposure (close shutter if open, no readout)
    status
    returns the CCDserver status:
    "readout= %.3f" : during readout; '%.3f' is the effective exposure time
    "exposure= %.3f" : during exposure; '%.3f' is the current exposure time
    "loop= %.3f" : during exposure loop; '%.3f' is the effective exposure time (no exposure, no readout)
    "idle= %.3f" : server is idle (no exposure, no loop, no readout) '%.3f' is the last exposure time
    temp
    returns the CCD temperature(s); eg. "temp= -109.7 -110.1 -109.8 -110.2 -110.0 -109.8 -109.9 -109.7"
    heat
    returns the CCD heater value(s); eg. "heat= 99 100 99 100 98 98 101 101"
    pid
    returns the CCD PID-loop status; eg. "pid=1"
    setp
    returns the CCD heater setpoint(s); eg. "setp= -110 -110 -110 -110 -110 -110 -110 -110"
    bias #
    returns the bias 8 voltages for chip '#'; eg. "bias#= 4.44 4.75 4.66 6.47 2.78 4.80 4.76 4.30"
    clocks #
    returns the 16 clock voltages for chip '#'; eg. "clocks#= 0.3 0.5 -1.8 -2.5 -1.2 5.6 1.2 3.4 1.1 4.4 0.9 0.9 0.1 1.6 3.0 -2.2"
    vacuum
    returns the dewar pressure; eg. "vacuum= 0.000e+00"
    shutter {open,close}
    open/close shutter; returns status; eg. "closed"
    pause
    pause exposure (close shutter if open)
    resume
    resume exposure (open shutter if in "auto" mode)
    exptime #
    set exposure time to '#' seconds
    shutmode {auto,dark}
    set shutter mode
    subrmode a b
    set subraster mode
    'a': 0= full readout, 1= subraster readout
    'b': 0= full save, 1= minimal save
    binning XxY
    set binning to 'X' (rows) and 'Y' (columns); return: eg. "1x1"
    cdst #
    set pixel time to '#' units
    gain {0,1}
    set gain {low,high}



    CamGUI

    CamGUI Controls - Sub-Windows - Scripting - TCP/IP-Interface
    Syntax: camgui [-h pixels] [{-f2,-f4}] [{-d2,-d2}]
    -h : Font height in pixels (eg. '-h 18' uses a height of 18)
    -f2 : Dewar at f/2 focus (default: f/4).
    -d2 : Mosaic2 dewar (default: Mosaic3).

    The "Sience Array Control" GUI provides the following functions:

    The data files will be written in FITS format, one for each of the eight chips. The filename convention is

    ccd1234c5.fits
    where '1234' is a running exposure number, automatically incremented by the control software and 'c5' designates the corresponding chip (ie. chip-5).

    CamGUI Controls

    1st group
    File [menu]
  • Reset DSP/Server : send request to the imacserver to upload the DSP-code and re-start the DSP.
  • Help : open web-browser with the IMACS documentation
  • Exit : close GUI
  • Shutdown : shutdown the entire IMACS software (MechGUI, CamGUI, QlTool, Xdbserver)
  • Modules [menu]
  • QL-Tool : Open (or move to foreground) the Quick-Look tool
  • MechGUI : Open the IMACS mechanics GUI
  • TeleGUI : Open the IMACS telescope GUI
  • Options [menu]
  • DataPath : set path for the FITS files (images)
  • LogFile : edit name of the logfile in a dialog-box
  • Sounds : opens a window that defines the sounds for the Shutter Closed and Exposure done events.
  • ExpProgress : opens a window that shows the estimated time remaining for the exposure loop and the current seeing from the guider camera (if available from the TeleGUI).
  • DewarStatus : opens a window that displays the CCD temperature(s) and dewar pressure
  • CCD-Voltages: opens a window that displays the CCD bias- and clock-voltages. (password protected)
  • ReadSpeeds : opens a window that sets the readout parameters (password protected)
  • 2nd group

    ExpTime
    [edit] : set exposure time (1..8200 seconds)
    [bar] : exposure (left to right) and readout (right to left) progress
    [output] : current time during exposure
    Loops
    [edit] : set (repeat) loop number
    [output] : current loop number
    ExpType
    [menu] :
    [menu] : readout mode
    Binning
    [menu] : {1,2,3,4,5,6,7,8} readout binning factor for rows and columns
    [icon] : chip selection

    3rd group

    Object : [edit] : set object name
    Comment : [edit] : comment for FITS header

    4th group

    Start: [button] : start exposure
    Snap: [button]: start 4x4 binned exposure (used to clean the array)
    File#: [edit] : set file number (ccdXXXXcY.fits)
    'XXXX' is a 4 digit exposure (file-) number
    'Y' is the chip number (1..8).
    Pause: [button] : pause exposure (shutter closes until button is pressed again)
    Stop/Abort: [button] :
    Stop during exposure: close shutter and start readout
    Abort during readout: abort readout and dump data
    Shutter: [icon] : shutter status

    5th group

    Exec: [button] : open Run Script dialog box
    Create: [menu] : open Create Script dialog box

    6th group

    Speed: [menu] : set readout speed
    Disk: [bar] : disk status


    CamGUI Sub-Windows

    Dewar-Status - Subrasters - CCD-Voltages - Read-Speeds - Nod+Shuffle - MMTF - Sounds - ExposureProgress

    Dewar Status


    The dewar status window with 8 temperatures, heater values and pressure reading (VacSensor).
    The ion pump should be operated in the 'Auto' mode. The ion pump will be turned off automatically when the 'CryoT' temperature is above -145 [C] or the VacSensor reading is above 2.0e-4 [mbar].
    Note that the VacSensor reading should be 0.0 because it bottoms out at 1.0e-4 [mbar].
    The ion pump has a more precise pressure sensor, but it only works when the ion pump is on (it uses the current created by the pump).

    Subraster Definition

    Chip: select the chip on which to set a subraster
    CoordMode: coordinate mode {XYWH,XXYY}
    XYWH: center coordinates, width and height
    XXYY: use X1 to X2 and Y1 to Y2
    Subraster #: The coordinates/geometry of this subraster
    Load: load a subraster definition from disk
    Save: save the current subraster definition to disk
    SaveMode: FITS file save mode {Full,Minimal}
    Full: save the full size of the CCD array (padded with '0' outside the subraster)
    Minimal: save only the enclosing rectangle of a subrasters
    Done: close the dialog -- allows to continue the data acquisition
    Clear: clear all subrasters (on this chip)
    Apply: check the validity of the definition, but keep the dialog open
    CopyToAll: copy the current definition to all other chips
    Note: While the subraster definition dialog is open you may add ('a') or remove ('r') subrasters using the QuickLook tool.

    CCD-Voltages


    Instrument specialist only; access to this window is password protected.

    Read Speeds


    Instrument specialist only: This window allows to set the pixel-times and gain values for the 4 readout speeds (snail,slow,fast,turbo). Access to this window is password protected.

    Nod & Shuffle Dialog


    This windows allows to set the Nod & Shuffle parameters:
    Shuffle: [edit] : shuffle distance (arcsec)
    [output] : rounded up to pixels
    Telescope-Nod: [edit] : telescope motion [arcsec] between exposures
    DwellTime: [edit] : exposure time between shuffles/nods
    N-Cycles: [edit] : number of 'A-B' cycles (2 exposures per cycle)

    MMTF Straddle & Shuffle Dialog


    This windows allows to set the MMTF-Shuffle parameters:
    Shuffle: [edit] : shuffle distance (arcsec)
    [edit] : shuffle distance (pixels)
    Straddle: Off1 [edit] : off-band z-value
    On [edit] : on-band z-value
    Off2 [edit] : off-band z-value
    DwellTime: [edit] : exposure time between shuffles
    N-Cycles: [edit] : number of 'On-Off1-Off2-On' cycles (4 exposures per cycle)

    Etalon script definition dialog-box(s)


    Create Etalon script dialog; scan(seq) or scan(blk) modes

    File: [edit] : Script filename (the .script extensions is appended if necessary)
    Mode: [menu] : etalon script mode (ie. scan)
    Z0: [edit] : first z-value
    dZ: [edit] : delta z-value
    nZ: [edit] : number of z-values
    Save : [button] : save script
    The total number of exposures will be nZ.


    Create Etalon script dialog; straddle mode

    File: [edit] : Script filename (the .script extensions is appended if necessary)
    Mode: [menu] : etalon script mode (ie. straddle)
    Z0: [edit] : on-band z-value
    dZ1: [edit] : delta off-band z-value
    dZ2: [edit] : delta off-band z-value
    nC: [edit] : number of cycles (4 exposures each)
    Save : [button] : save script
    The total number of exposures will be 4*nC.


    Create Etalon script dialog; paralellize mode

    File: [edit] : Script filename (the .script extensions is appended if necessary)
    Mode: [menu] : etalon script mode (ie. parallelize)
    X0: [edit] : first x-value
    dX: [edit] : delta x-value
    nX: [edit] : number of x-values
    Y0: [edit] : first y-value
    dY: [edit] : delta y-value
    nY: [edit] : number of y-values
    Save : [button] : save script
    The total number of exposures will be nX*nY.

    Dither script definition dialog-box


    Create Dither script dialog; Canonical mode

    File: [edit] : file name
    the extension .script will be appended to the file name
    Pattern: [menu] : dither pattern (Canonical is currently the only pattern available)
    Guider: [menu] : { none, PR, PR+SH }
    none: no guiding during script
    PR: principal guider only (must be running at the beginning of the script)
    PR+SH: principal and Shack-Hartman guiding
    Step: [edit] : dither step-size in arc-seconds
    N: [menu] : { 2, 3, 4, 5 }
    Number of dither positions
    Save: [button] : saves the dither script file and closes the dialog

    Event Sounds Dialog

    CamGUI will play sounds after the following events:

    The sound files have to be in a directory pointed to by a environment variable called IMACSOUNDS. This variable is set in the
    imacs startup script. If it is not set the keyboard-beeps (2 times after shutter, 3 times after readout) will be used as in previous versions.
    If the text is enclosed in quotes it will be spoken.

    Exposure Progress


    Scripting

    A script may be exectuted by the CamGUI by pressing the "Exec" button

    That opens this dialog:

    File: [edit] : Script filename (the .script extensions is appended if necessary)
    Run: [button] : start executing script
    Stop: [button] : stop script (gracefully) after the current command has finished
    Line: [output] : display the currently executed script line
    Close: [button] : close this window (and stop script, if running)

    There are two kinds of scripts that can be created by the CameraGUI:
    MMTF (Etalon) scripts.
    Dither scripts.

    More general scripts may be possible in the future ...

    Create Etalon Script


    Create Etalon script; scan(seq) or scan(blk) modes

    File: [edit] : Script filename (the .script extensions is appended if necessary)
    Mode: [menu] : etalon script mode (ie. scan)
    Z0: [edit] : first z-value
    dZ: [edit] : delta z-value
    nZ: [edit] : number of z-values
    Save : [button] : save script
    The total number of exposures will be nZ.


    Create Etalon script; straddle mode

    File: [edit] : Script filename (the .script extensions is appended if necessary)
    Mode: [menu] : etalon script mode (ie. straddle)
    Z0: [edit] : on-band z-value
    dZ1: [edit] : delta off-band z-value
    dZ2: [edit] : delta off-band z-value
    nC: [edit] : number of cycles (4 exposures each)
    Save : [button] : save script
    The total number of exposures will be 4*nC.


    Create Etalon script; paralellize mode

    File: [edit] : Script filename (the .script extensions is appended if necessary)
    Mode: [menu] : etalon script mode (ie. parallelize)
    X0: [edit] : first x-value
    dX: [edit] : delta x-value
    nX: [edit] : number of x-values
    Y0: [edit] : first y-value
    dY: [edit] : delta y-value
    nY: [edit] : number of y-values
    Save : [button] : save script
    The total number of exposures will be nX*nY.

    Create Dither Script


    Create Dither script dialog

    File: [edit] : file name
    the extension .script will be appended to the file name
    Pattern: [menu] : dither pattern (Canonical is currently the only pattern available)
    Guider: [menu] : { none, PR, PR+SH }
    none: no guiding during script
    PR: principal guider only (must be running at the beginning of the script)
    PR+SH: principal and Shack-Hartman guiding
    Step: [edit] : dither step-size in arc-seconds
    N: [menu] : { 2, 3, 4, 5 }
    Number of dither positions
    Save: [button] : saves the dither script file and closes the dialog


    TCP/IP Interface

    port = _____ (f/4: BasePort+1, f/2: BasePort+2)
    version
    return version string: "version=3.5.1"

    status
    check status of CamGUI (data acquisition); return: "idle" or "exposure= %d" or "readout= %1.f" or "-E..."

    reset
    reset 'CCD-Server/DSP' communication; return: "done" or "-E..."

    start [#]
    start a loop of '#' exposures; return: "ok" or "-E..."



    QuickLook Tool

    Control Window - Mosaic Overview - Magnifier
    Syntax: qltool [-h pixels]
    -h : font height in pixels (eg. '-h 18' uses a height of 18)

    Control Window

    File : [menu] :
    Options : [menu] :
    Lookup-Table: [menu] : {Grey,InvG,Rain,BBdy}: set color lookup table for data display windows
    Magnification: [menu] : {mag1,mag2,mag4,mag8}: set magnification for magnifier window
    Pixel: [output] : pixel coordinates (x=680,y=1129) and pixel value (1234)
    Radius: [button] : [output] : [button] : in/decrease the radius for aperture statistics
    min/max: [output] : minimum (1042) and maximum (34247) pixel values within the aperture
    mean/dev: [output] : mean (1980.7) and standard-deviation (4041.4) within the aperture
    flx,fwhm: [output] : estimated flux (294437) and FWHM (2.65 pixels) of the object in the aperture

    Mosaic Overview

    Displays all eight arrays in a pixel-averaged de-magnification to 256x512 (512x1024 with 'Options--LargeDisplay) per chip.
    After loading a file from disk the title bar shows the name of that file.

    Maximum: [edit] : high-cutoff (white-level) of colormap
    Stretch: [menu] : Scaling scheme for colormap
    Scale: [menu] :
    Minimum: [edit] : low-cutoff (black-level) of colormap
    Mouse functions on the Mosaic-Overview window:
    press/drag left mouse-button:
    Move magnifier/aperture to current cursor position. The magnifier cannot be moved across chip boundaries.
    press middle mouse-button:
    Cycle through magnifications (1mag -> 2mag -> 4mag -> 8mag -> 1mag)
    press/drag right mouse-button:
    Squeeze colormap.
    Keyboard functions on the Mosaic-Overview window:
    Space: FWHM-fit and flux-estimate at current magnifier position
    Arrow: (cursor-key) move magnifier 1 pixel
    '1': move magnifier to the center of chip-1 ('2'..'8' move to chip-2..8)
    If the CamGUI is in subraster-definition mode:
    a: add a subraster at the current magnifier position. The geometry is set with the 'Options--SubrDim' dialog-box.
    r: remove subraster closest to the current magnifier position
    n: move magnifier to the closest subraster

    Magnifier

    The magnifier window displays an enlarged area around the current cursor position on the Mosaic-Overview window.


    Christoph C. Birk, Carnegie Observatories (last updated: 2016-02-05)