Location of this document:
http://instrumentation.obs.carnegiescience.edu/Software/ZWO/zwogcam.html
TCP/IP Interface
Starting the GUI
- Startup the ZwoGcam GUI:
- ./gcamzwo -t2 -h raspberrypi
- "-m" mode:
- -m2: 1000x1000, 2x2 binned (500x500 GUI image)
- -m3: 1512x1512, 2x2 binned (504x504 GUI image)
- -m4: 2000x2000, 2x2 binned (500x500 GUI image)
- -m5: 2520x2520, 2x2 binned (504x504 GUI image)
- -mh: high resolution: 2048x2048, 1x1 binned (512x512 GUI image)
- -mf: full field: 2400x2400, 2x2 binned (600x600 GUI image)
- default: 1800x1800, 2x2 binned (600x600 GUI image)
-
- "-f" file (located in GCAMZWOPATH or /opt/gcamzwo if not set)
- load configuration from ASCII file containing one 'keyword value' pair
per line; e.g.
pfs.ini:
- host lab-pi-01: RaspberryPi host name ("-h")
- port 1: rotator port ("-p")
- mode 2: image geometry mode: 1000x1000 ("-m")
- gnum 3: guider number ("-g")
- gmode 4: guider mode ('gm')
- gmpar t: guider mode parameter ('gm')
- angle -128: "-a"
- elsign -1: "-e"
- rosign 0: "-r"
- parity -1: "-i"
- offx -10: "-o"
- offy 85: "-o"
- px 53: pixel scale [milli-arcsec] ('px')
- lmag: lupe magnification ('lmag')
- pct 60: percent scaling ('pct)
- bkg 24: background scaling ('bkg')
- span 5000: imacs scaling ('span')
- bx 41: guide box size ('bx')
- gain lo: amplifier gain ('gain')
- sw 6: slit width, used for fit in 'gm4' ('sw')
- sn 0.7: guider control loop sensitivity ('sn')
- exptime 0.5: exposure time in seconds ('exptime')
"-h" host:
hostname (IP number) of the zwoserver computer (RaspberryPi)
"-t" telescope:
-t2: Clay (host=mag2tcs, port=5801 or 5810+rotatorPort)
-t1: Baade (host=mag1tcs, port=5801)
-t0: no telescope [default]
"-g" # {1,2,3}:
guider (camera) number
"-o" dx,dy :
Window offset on the CMOS array.
"-p" #
rotator port. If set it will be used to calculate the TCS port
(5810+rotatorPort).
"-a" angle {-360..+360} : [default=-120]
constant angle in the camera angle formula 'PA = angle +elsign*ELEVATION +rosign*ROTATORE'
"-e" elsign { -1 , +1 , 0 }: [default=-1]
elevation sign in the camera angle formula 'PA = angle +elsign*ELEVATION +rosign*ROTATORE'
"-r" rosign { -1 , +1 , 0 }: [default=0]
rotator sign in the camera angle formula 'PA = angle +elsign*ELEVATION +rosign*ROTATORE'
"-i" parity { -1 , +1 }: [default=+1]
Parity for the compass "L" display.
"-v": vertical layout
GUI Elements
-
- tf: exposure time, current time, frame number
- av: number of frames averaged
- send: seconds until next send;
number of the last frame sent
-
- FpS: frames per second (acquisition, display, guiding)
- The maximum display frame rate may be throttled for better
keyboard response time via the 'dt' command (default=5 Hz)
-
- Temp: CCD temperature [deg.Celsius] and cooler power [percent].
-
Keyboard Commands
- F1
- stop guiding/calculating
- F2
- start calculating the guide corrections
- F3
- start guiding (send corrections to TCS)
- F4
- move the guide-box to the centeroid and then start calculating
- F5
- move the guide-box to the centeroid and the start guiding
- F9
- send 'gpfld#' to the TCSIS, where '#' is the value of '-g gnum'.
- F10
- send 'gpsha#' to the TCSIS, where '#' is the value of '-g gnum'.
- tf #
- set the exposure time to '#' seconds {0.01..30}
- av #
- Average '#' frames (for display and guiding, 0=off)
- dt #
- Throttle the display update frame rate to '#' Hz (default=5)
- apa [#]
- toggle auto-get position angle ('pa') from the TCSIS
- '#' is the optional update period in seconds (default=30)
- pa
- set the position angle manually
- mm #
- set mouse mode {1,2,-2,3}
- left click: move 1/10 of the distance (requires "Control" key)
- left click while holding down the right mouse button: move the full distance
(requires "Control" key)
- 1 (or b): move guider box to the mouse position. Shows "bx" on mm label when active.
- 2 (or p): move guider probe to the mouse position (not available for SV). Shows "pr" on mm label when active.
- -2 (or t): move the SH- and PR-probes and the telescope to the mouse position. Shows "tl" on mm label when active.
- 3 (or c): move the telescope to the mouse position. Shows "pt" on mm label when active.
- gm #
- guider mode (paramter in 'gpaer' command when using mm-2 or mm2).
- sh #
- Shack-Hartman (mask) mode ('flag' in the header when sending data on port 5700).
- xys c x y
- set cursor 'c' to coordinate 'x,y'
- xyr c x y
- move cursor 'c' by 'x,y' pixels
-
-
- send [#]
- send the guider images to the 'SendHost' (Menu: GuiderX--SendHost)
via TCP/IP every '#' seconds; '0' means 'off'.
- Without parameter the GUI will send one file.
- write [#]
- writes the next '#' images to disk as FITS files (default=1)
- tec {#,off,fan_on,fan_off}
- #: Turn on the temperature control at setpoint # [Celsius].
- off: Turn off the temperature control.
- fan_on: Turn on the fan. No temperature control.
- fan_off: Turn off the fan. No temperature control.
- gain {#,# #,lo,med,hi}
- #: set the gain {0..570} and leave the offset as is.
- # #: set the gain {0..570} and offset {0..80}.
- lo: sets the gain/offset to '0 10'.
- med: sets the gain/offset to '150 21'.
- hi: sets the gain/offset to '300 50'.
- sm #
- Smooth the displayed image using the box-car (4,2,1, weights) algorithm,
running '#' iterations ('0' turns off the smoothing).
Please note, this does not affect the guiding.
- sw #
- Set the slit width for the "gm4" fit (default=6 [pixels]).
- fm #
- Function mode: determines the action for the F1 and F3 keys. Shows as "fm gd" or "fm sh" in the fm label box.
- fm1 (or fm gd):
- F1: stop guiding
- F3: start guiding
- fm2 (or fm sh):
- F1: save 'tf(F3)', 'av', 'send' parameters; then restore 'tf(F1)', av=0, send=0
- F3: save 'tf(F1)'; then restore 'tf(F3)', 'av' and 'send' paramters
- mask {on, off, #}
- "on": turn on hot pixel masking
- "off": turn off hot pixel masking
- "#": create a mask using cutoff of #-sigma above the average
- Please use the following procedure for creating a new mask:
- ensure that the camera is well covered (dark) and the cooler is OFF
- "mask off"
- "tf 5"
- "av 5"
- wait at least 1 minute
- "mask 4"
- set "av 0" and "tf" to the desired value
- "mask on"
- The mask will be stored in GCAMZWOPATH or /opt/gcamzwo if not set, as a file named
"zwoSERIALNUMBER_gggg.mask"
and automatically loaded at startup of the zwogcam
('gggg' is the geometry).
- curcol {dark,light}
- dark: black cursor color
- light: light grey cursor color [default]
- magpix
- Toggle printing the value at the magnifier center pixel
- lmag {1,2,4}
- Set the magnification for the magnifier (lupe) window.
- exit
- Close the GUI immediately (without a confirmation dialog box).
- dspi [config_name]
- Restart the acquisition with optional configuration file.
- Without parameter: restart with current configuration.
- With parameter: load the specified .ini config file (e.g.,
dspi mage loads mage.ini) and restart acquisition.
- Shows an error message if the config file doesn't exist.
- reset
- Same as dspi (alias for restart acquisition).
-
-
TCP/IP Interface
The GUI is listening on port 52200+gnum.
Each command must be terminated
by a [LF] (ASCII=10, 0x0a, '\n') character.
The response string will also be terminated by a [LF].
All communications are initiated by the client (your program).
An easy way to test the interface is the 'nc' (netcat) utility. It can be
run like a terminal emulator (^D terminates the connection) or be used in scripts:
xterm> nc localhost 52201
version
0.332
^D
xterm>
Note: Most commands should work with the TCP/IP interface.
- fone
- equivalent of "F1" on the keyboard.
- returns "OK".
- fthr
- equivalent of "F3" on the keyboard.
- returns "OK".
- version
- returns "0.322"
- status
- returns the current guider state as a single line of
key=value pairs, separated by blanks, e.g.
init=1 loop=1 guiding=3 gm=1 fm=1 mm=1 exptime=0.100 av=0 gain=300
offset=50 send=0 temp=-15.0 setp=-15 cooler=42 cfps=9.98 gfps=9.87
fwhm=1.23 flux=123456 peak=45678 back=1234 dx=+0.12 dy=-0.34 az=+0.051
el=-0.024 x=256.0 y=256.0 bx=15 px=196 pa=45.0 sn=1.0
- init: camera initialized (0/1) –
loop: acquisition loop running (0/1) –
guiding: 0=off, 2..5 = active mode (<F2>..<F5>),
negative while the first correction is still pending –
gm/fm/mm: guide/function/mouse mode –
av: rolling average –
send: send flag –
temp/setp/cooler: last values read by the
housekeeping thread (stale if the cooler is off) –
cfps: camera frame rate, gfps: guider loop rate –
peak: peak pixel –
dx/dy: centroid offset [pixels] –
az/el: last guider correction [arcsec] –
x/y: guide box center [pixels], bx: box size –
px: pixel scale [mas] – pa: position angle –
sn: sensitivity.
- The photometry fields (fwhm, flux, peak,
back, dx, dy, az, el,
gfps) hold the last measurement; they are only updated while
guiding.
2021-11-09,
Christoph C. Birk, Carnegie Observatories