Global Presentation Template

Transcription

Global Presentation Template
RTS2 – an Open Source
Observatory Control System,
ready for the Prime Time?
on behalf of a large collaboration
Petr Kubánek
Institute of Physics, Czech Republic
IAA CSIC Granada & IPL UV Valencia, Spain
http://rts2.org
A question to begin with..
What you would like
the observatory software
to do?
You know, well, everything.
Does that include image processing?
Hm..yes, the ideal one should do it.
Scheduling? Environmental control? Database?
Human control of the observatory? A fully
autonomous mode? Fast interruptions?
You named it..
Tool “make paper –journal Nature” with fancy
GUI?
Yes, that will be an excellent tool!
Growing..
●
●
●
●
Up to late 2008, single man operation and
development
Vermes Observatory, Switzerland – 2009+
Currently about 4 active developers
(Switzerland, India, USA, Chile, ..)
Multiple observatories running the software for
different purposes
Big mounts at great sites..
●
1.2m FLWO
●
1.23m CAHA
●
1.5m SPM
●
Another 1.5m under negotiations..
Observatory environment
Camera
Executor
Selector
Telescope
Centrald
rts2-xmlrpcd
Dome
GUI
rts2-mon
WWW
scripts
Software
●
Scheduling
●
●
Logging, events generation,..
●
●
Disk space, dome close/open messages,..
Modular
●
●
●
Human, queue, merit function, NSGA-II (Genetic
Algorithm)
LSST CCD testing lab, various strange sensors
(monochromater, laser,..)
Network centric – modules communicates through
TCP/IP.
Open source
●
CVS (now Subversion) versioned from the beginning
Software
●
Scripting
●
●
Simple, XML-RPC, standard input / output
Remote access
●
ssh, web (AJAX)
●
C/C++, Python, PostgreSQL
●
LibNOVA
●
●
Celestial mechanics library
Own communication protocol (ASCII over TCP/IP)
●
SPIE 2008 poster
Block
App
AppDb
Daemon
Centrald
Client
Device
Camera
Sensor
Nightreport
Synchronization
●
Observatory – wide states, propagated by the protocol
●
Two-way confirmation of devices states (query, reply)
●
State contains “BOP” - Block Operation – bits:
●
●
BOP_EXPOSURE
●
BOP_TEL_MOVE
●
BOP_READOUT
Scripting holds if the system is at a given state
●
Camera will not expose if telescope raised BOP_EXPOSURE
flag
Scheduling
●
Queues → prioritized queues → “meta queues”
●
Different scheduling modes available
●
FIFO
●
Circular
●
Highest elevation
●
West-east
●
Meridian west-east
●
….
FIFO
A
B
C
Circular
A
A
B
B
C
C
Multiple queues
●
Enable to switch observing plan during night
●
If seeing is good, go for queue “good seeing”
●
If it is bad, go for queue “bad seeing”
●
Events at given time entered into queue
–
–
Observe exoplanet transit from 2:00 to 4:00
Otherwise run targets from SN follow-up queue
Scripting
●
Want solution, that will be:
●
Robust
●
Platform and language independent
●
Allow quick interruptions
●
Provides rich image processing capabilities
●
Separates scripting from the observatory drivers
Solution – standard in/out control
●
Solution, that is
●
Robust
–
●
Platform and language independent
–
●
Simply shut down in/out communication with the script
Provides rich image processing capabilities
–
●
Any language, any platform
Allow quick interruptions
–
●
If the script exits, next target is picked up
Depending on language of your choice; Python does
Separates scripting from the observatory drivers
–
Script is separate program, not requiring any library; can be tested
outside of the observatory environment
Scripting example..
#!/bin/bash
for x in 1 2; do
echo “value exposure = $x”
echo "exposure"
read exp_end
echo "V W0 filter += 1"
echo "V T0 WOFFS += 0.01 0.01"
read x y
echo "rename $y %b/test/%f"
read renamed
echo "log E renamed $y to $renamed"
echo "? infotime"
read x
echo "G centrald sun_az"
read y
echo 'double test_double "[AU] double test value" 6.721'
sleep 5
done
GUI
●
●
●
Engineering interface – ncurses based
GUI – System → XMLRPCD → JSON → HTTP
→ GUI in Python/PyGTK
GUI configuration/screens kept on server
●
●
●
Easy upgrade
Ability to control multiple observatories with different
value set from a single client
JSON interface used for Web (2.0) GUI as well
{"mw":500,"mh":400,"t":"vbox","c":[
{"t":"vtable","c":[
{"t":"vlab","device":"SD","value":"good_weather"},
{"t":"vlab","device":"SD","value":"stop_move"},
{"t":"vlab","device":"SD","value":"stop_move_err"},
{"t":"eval","device":"SD","value":"timer_count","ro":false},
{"t":"bool","device":"SD","value":"generate_critical","ro":false}
]},
{"t":"form","name":"Test2","url":"forms/test2.json"},
{"t":"target_b","device":"EXEC","value":"next","name":"Next"},
{"t":"reload"},{"t":"set"}
]}
Conclusions
●
●
●
Mature, operational network of a fully
autonomous telescopes
Wide and growing range of system features
(and functionalities)
A decade of design, development, deployment
(and failures)