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] :
- 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,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:
- set exposure time
- set exposure type (eg. dark)
- set readout mode (e.g. subraster)
- set focus-sequnce parameters
- set binning
- set object name (written into FITS header)
- set file-numer (FITS)
- provide status information about data acquisition
(e.g. shutter, time to finish exposure, free disk space)
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] :
- Object : regular mode for science data
- Nod & Shuffle : shuffle data and move telescope
(dialog)
- MMTF-Shuffle : shuffle data and change etalon wavelength
(dialog)
- Bias : 0 seconds exposure (shutter closed)
- Dark : exposure with shutter closed
- Flat : regular shuttered exposure
- [menu] : readout mode
- Full : full array readout
- Subraster : subrastered readout (dialog)
- Scan: scan (continous) readout
- 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
- Slow: 145 seconds (1x1), 50 seconds (2x)
- Fast: 100 seconds (1x1), 40 seconds (2x)
- Turbo: 85 seconds (1x1), 30 seconds (2x)
- 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)
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.
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:
- Shutter closed (ready for telescope moves, filter changes, etc)
- Exposure (readout) done
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)
- binning [XxY]
- set the binning as a single string, eg. 1x2
- return: the current binning as a single string, eg. "2x2"
- datapath [path]
- set the data path for the FITS files.
- return: the current data path.
exptime [#]
set the exposure time in seconds.
return: the current exposure time, eg. "2.0"
exptype [name]
set the exposure type {Object,Bias,Dark,Flat}.
return: the current exposure type, eg. "Object"
frame [#]
set the file (frame) number (1..9999).
return: the current file (frame) number.
object string
set the object name to 'string'.
return: the current object name
Note: 'object' without a parameter will clear the object name.
reset
reset 'CCD-Server/DSP' communication.
return: "done" or "-E..."
runtime
estimate the remaining time [seconds] for the current expousre loop
return: # [est]
The letters ' est' are appended to the return string if the current
binning/speed combination has not been measured.
subrmode [#] [#]
set subraster/full readout mode:
subrmode 0: full readout (automatically reverts to all chips)
subrmode 1 0: set subraster mode (full save)
subrmode 1 1: set subraster mode (minimal save)
Please note that subraster definitions are kept between calls of 'subrmode'.
Carlos: if you want to automatically clear all subrasters when
switching to subraster mode, please let me know
addsub c x y w h
add a subraster to chip 'c' at [x,y] with geometry [w,y].
If 'c' is negative the values 'x y w w' will be interpreted
as 'x1 x2 y1 y2'.
Carlos: if you prefer the default to be 'x1 x2 y1 y2',
please let me know
remsub c x y
remove a subraster on chip 'c' at [x,y].
setsub c x y w h
shortcut for 'subraster 1 1' and 'addsub c x y w h'.
This creates one subraster with minimal save area.
This is useful if you only want to use one subraster.
start [#]
start a loop of '#' exposures.
return: "ok" or "-E..."
speed [{Slow,Fast}]
set the readout speed.
return: "Fast" or "Slow"
status
check the status of CamGUI (data acquisition).
return: 1:exposing, 0:idle
version
return version string: eg. "3.19"
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] :
- Load: Load file(s)
- Help: start browser with IMACS software manual
- Exit: close this GUI
- Options : [menu] :
- Satlevel: set count-level above which pixels are marked
saturated (red)
- SubrDim: set width and height of a new subraster created by 'QlTool'
- ClearFrame: if checked: clear frame before a new image is displayed
- LargeDisplay: if checked: set data window geometry to 1024x1024
- 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
- man: manual scaling of colormap
(enter values into 'Maximum', 'Minimum' edit windows
- 67%: set black/white cutoffs using
67% of the histogram of all pixels values
- 90%: set black/white cutoffs using
90% of the histogram of all pixels values
- med3: set black/white cutoffs to +-3 sigma
around median of all pixels.
- med5: set black/white cutoffs to +-5 sigma
around median of all pixels.
- 3/10: set black as 'median-3*sigma' and
white as 'median+10*sigma
- mima: set black to the minimum and
white to the maximum pixel value
- Scale: [menu] :
- On: scale the background (bias-level) of each chip separately
(the bias-brightness for all 8 chips will appear similar)
- Off: scale the colors for all 8 chips together
(the bias-brightness will differ from chip to chip)
- 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.
- The current chip-number is displayed in the title bar of the magnifier.
- The position of the magnifier is set by left-clicking in the
Mosaic-Overview window.
It can be moved with the cursor-keys on the Mosaic-Overview.
- The size of the magnifier window is adjustable by click/drag on
the window borders.
- The magnification can be set in the
QlTool Control Window
Christoph C. Birk, Carnegie Observatories (last updated: 2016-02-05)