The Data Acquisition System (DAQ)
was developed by Marcin
Sokolowski
DAQ is a program for collecting images from CCD cameras and performing
on-line analysis.
The images produced by ccd cameras have a resolution of 2062x2048
pixels and dynamic range of 16 bits per pixel which leads to 8248 kB
size of every image. The exposures are 5 or 10 seconds with 2 seconds
dead time needed for chip readout. The amount of data produced every
night by a single camera is ~25 GB. Image compression allows to reduce
the amount of data by factor of ~2. The daq module is build of several
custom designed libraries realizing different tasks.
Most of the components were developed in C++ and C.
The most important components of data acquisition system are :
Camera
driver
It is a library for operating cameras and performing image
collection. It allows to change parameters of the cameras and realize all
hardware functionality of cameras. The driver can communicate
with camera by two different interfaces. Originally developed cameras
had only USB2.0 interface. The driver realized this communication
protocol on kernel and application level, kernel module pikam.ko was
written to realize this task. The new cameras are also equipped with
the gigabit ethernet interface. In this case the driver is developed
in the form of C++ library and no dedicated kernel module is required.
The ethernet communication uses external library Socket.
The type of communication is configurable by the daq configuration
files or command line program options.
Data Analysis
This module is responsible for the on-line data analysis. The on-line
data analysis consists of image reduction and flash recognition algorithm
which is described in separate section. On-line reduction consists of
dark subtraction, photometry and astrometry. Astrometry determines
transformation which allows to calculate equatorial coordinates of any (x,y)
position on chip. It allows to determine coordinates of the image center
which can be compared with the coordinates passed from the mount.
The difference of expected and real image center coordinates
allows to calculate corrections of mount tracking speeds.
DAQ
interface
This module is responsible for communication of DAQ module with other parts
of pi system. DAQ module communicates with Pi-Manager ( piman )
program which coordinates performance of the whole system. The interprocess
communication was based on mico CORBA technology.
Piman program executes night schedule program, programmed in the form
of pish script. DAQ program like any other module in the pi-system exports
set of functions which can be launched by piman in order to realize required tasks.
It is possible to overwrite commands from night script by using pishell
program which is a command line interface allowing execution of
any commands implemented in system modules.
Data storage
The daq program writes images to the disk and essential information about
every image to the database. It also saves the results of flash recognition
algorithms to the disk and database. The sub renders of every interesting
event are created and stored on the disk. The PostgreSQL
database is used to permanently store image information and results of on-line
algorithms. A C++ API library libpqxxx
was used to communicate with the database.
DAQ program is started every evening together with all other programs
controlling the pi system. Program writes log files which can be used to trace any problem in the
data acquisition. Status file is updated every 15 seconds, this allows pi
alert system to detect any hang-up or crash of image collection which
is immediately sent to person on duty. Most of the common problems are
handled by the DAQ module itself and in case of crash program is
automatically restarted in order to continue image collection without any delays.