Äîêóìåíò âçÿò èç êýøà ïîèñêîâîé ìàøèíû. Àäðåñ îðèãèíàëüíîãî äîêóìåíòà : http://curl.sai.msu.ru/mass/download/doc/massug.pdf
Äàòà èçìåíåíèÿ: Sun Jan 18 20:35:56 2004
Äàòà èíäåêñèðîâàíèÿ: Mon Oct 1 20:13:18 2012
Êîäèðîâêà:

Ïîèñêîâûå ñëîâà: m 94
MASS Software Version 2.04 User Guide
V.Kornilov, N.Shatsky, O. Voziakova Decemb er 30, 2003


Contents
1 MASS software op eration overview 1.1 Main features of measurement pro cess with MASS instrument . . 1.2 The basic op erations . . . . . . . . . . . . . . . . . . . . . . . . . 1.2.1 Scintillation indices measurement (or, historically, normal 1.2.2 Background measurement . . . . . . . . . . . . . . . . . . 1.2.3 Flux estimation . . . . . . . . . . . . . . . . . . . . . . . . 1.2.4 Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2.5 Detector counting measurement . . . . . . . . . . . . . . . 1.2.6 Detector statistic measurement . . . . . . . . . . . . . . . 1.2.7 Initialization . . . . . . . . . . . . . . . . . . . . . . . . . 1.2.8 Device parking . . . . . . . . . . . . . . . . . . . . . . . . 1.2.9 Op erations with scenaria . . . . . . . . . . . . . . . . . . 1.2.10 Device direct control . . . . . . . . . . . . . . . . . . . . . 1.2.11 Configuration p ossibilities . . . . . . . . . . . . . . . . . . 2 Installation, tuning and startup 2.1 Installation of the MASS software Turbina 2.2 Editing the configuration file . . . . . . . 2.2.1 Preferences section . . . . . . . . . 2.2.2 General section . . . . . . . . . . . 2.2.3 Op erations section . . . . . . . . . 2.2.4 Display section . . . . . . . . . . . 2.3 Lo cal start up . . . . . . . . . . . . . . . . 2.4 Remote and automatic running . . . . . . 2.4.1 X-windows starting for Turbina . . 2.4.2 Automatic start-up . . . . . . . . . 2.4.3 Remote start-up . . . . . . . . . . 2.5 Working under the Sup ervisor control . . 3 Main Turbina program window and menu 3.1 Main window . . . . . . . . . . . . . . . . 3.2 The Structure of the Main Menu Tree . . 3.3 File menu item . . . . . . . . . . . . . . . 3.4 Measurements menu item . . . . . . . . . 3.5 Tests menu item . . . . . . . . . . . . . . 3.6 To ols menu item . . . . . . . . . . . . . . 3.7 Control menu item . . . . . . . . . . . . . 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 5 6 6 6 6 7 7 7 8 8 8 8 8 9 9 12 13 14 15 17 19 21 21 21 22 23 26 26 27 29 29 30 31 32

.... .... mo de) .... .... .... .... .... .... .... .... .... .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

tree ... ... ... ... ... ... ...


3.8 Config menu item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.9 Help menu item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.10 Results Window content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Measurements and results 4.1 Measurements with MASS . . . . . . . . . . . . . . 4.1.1 The observational pro cedure . . . . . . . . 4.1.2 Writing a new scenario . . . . . . . . . . . . 4.2 Output data in MASS Software . . . . . . . . . . . 4.2.1 Mass-file structure . . . . . . . . . . . . . . 4.2.2 Statistic moments file . . . . . . . . . . . . 4.2.3 Relation of prefixes to the MASS op eration 4.2.4 Count-file handling and data re-calculation .... .... .... .... .... .... mo des .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

33 34 35 37 37 37 37 38 38 41 41 42 44 44 45

5 Version 2.04 features with resp ect to 2.03 version 5.1 Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2 Further mo difications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2


Bibliography
[1] Kornilov V., Combined MASS/DIMM instrument for atmospheric turbulence measurements. A Proposal to Cerro Tololo Inter-American Observatory. Septemb er 27, 2002 [2] Kornilov V., Shatsky N., Shugarov A., Voziakova O. Combined MASS/DIMM instrument for atmospheric turbulence measurements. Electronics and Device control. Novemb er 2003. [3] Kornilov V., Potanin S., Shatsky N., Shugarov A., Voziakova O. Combined MASS/DIMM instrument for atmospheric turbulence measurements. Optical and mechanical design. Alignment. Decemb er 2003. [4] Kornilov V., Tokovinin A., Voziakova O., Zaitsev A., Shatsky N., Potanin S., Sarazin M. MASS: a monitor of the vertical turbulence distribution. Pro c. SPIE, V. 4839, p. 837-845, 2003 [5] A.Tokovinin, V.Kornilov, N.Shatsky, O.Voziakova, Restoration of turbulence profile from scintil lation indices, MNRAS 2003, V. 343, P. 891

3


Introduction
This do cument presents the information on the use of the MASS Software. It is created for the control of the op erations with the Multi-Ap erture Scintillation Sensor device designed at Sternb erg Astronomical Institute, according with a Prop osal to CTIO [1]. The pro ject was implemented in frame of the AURA contract No. C10389A. While the MASS-DIMM device incorp orates two instruments in one b ox, the software describ ed here do not take into account existence of the DIMM channel of the device which is controlled by the different program. The do cument consists of several Chapters first of which presents an overview of what can b e done with the program and what are the general ideas of implementation of its functionality in form of its modes. Next chapter is more practical ­ it describ es how to install and prepare the software for a particular use. Chapter 3 tells ab out the comp osition of the program interface and gives more details on how the device works in its numerous mo des and which settings affect its p erformance. Chapter 4 describ es in brief the usual observational sequence (details are given already in previous chapters) and explains the data output in details. Finally, the last chapter 5 gives a helpful list of changes intro duces in the version 2.04 of the program Turbina which resulted from the first exp erience of automated way of use of the device. The drawbacks which still p ersist are mentioned as well. Compared to the previous versions of the current do cument, more details and practical advises are given, which allow to call it a real User Guide for the first time.

4


Chapter 1

MASS software operation overview
1.1 Main features of measurement pro cess with MASS instrument

The software for control of MASS op erations and data acquisition and reduction provides b oth reliable scintillation indices and atmospheric turbulence profile measurement and an ease of control and handling. The software supp orts all op erational mo des needed for making measurements, including testing, calibration and auxiliary measurements. In order to measure correctly scintillation indices (SI), series of separate star flux measurements with integration time less than scale time of scintillation (a few milliseconds) must b e obtained. This is done by photometric mo dules of the device which output is then transmitted to the MASS-machine where data flow is pro cessed. One can see ([4] and [5]) that there are a few physical parameters, which define the values of SI calculated on the base of statistical moments of the incoming data. In each channel such parameters are: background value, non-Poisson and non-linearity. The first one dep ends on sky condition, the last two are detector characteristics. Reduction of calculated SI and integral characteristics of the atmospheric turbulence to standard condition requires a star sp ectral energy distribution and its airmass. This information as well as instrument geometry are needed for turbulence profile restoration. During measurement, the star light flux variation dep ends not only on scintillation but on other factors: atmospheric transparency changes, tracking errors, wind pushes. To eliminate the influence of these factors, the incoming data must b e filtered from side of low frequencies. Such a filtering may b e implemented by calculation of the statistical moments around a sliding average flux value. In practice, the measurement data are obtained and reduced by separate segments of ab out 1 s duration each (so called base time). To obtain a reliable output values with appropriate accuracy, the additional averaging of the computed SI and other values is used. The full time, needed to obtain separate measurement value ( e.g. atmospheric turbulence profile, or background level, and so on) , is an accumulation time at a minute scale. Finally, to ensure the correct p erformance of the MASS electronics and data pro cessing, a numb er of tests must b e provided by the software.

5


1.2

The basic op erations

To supply a full scop e of the needed data for measurements and subsequent reduction, MASS software (the program Turbina) includes a set of op erational mo des. Some of them represent measurement mo des themselves, other -- preparation mo des. Below follows a short description of implemented op erational mo des. Recall that all measurement mo des are using three different integration times for their temp oral organization: Exposition ­ the micro-exp osure duration in milliseconds during which one individual count is integrated in the photometric mo dules for each channel (elementary exp osure); BaseTime ­ the duration of the single blo ck of counts in seconds by which the individual statistical moments (and, for some mo de, scintillation indices) are pro duced; AccumTime ­ the duration of the mo de working in seconds; during this time N = AccumT ime B aseT ime individual sets of statistical moments are accumulated and then averaged to pro duce the single output result. The results of each mo de are displayed on the screen and saved in the output file. Note that all fluxes in the program refer to 1 ms integration time (i.e. scaled to this value if the actual exposition is different).

1.2.1

Scintillation indices measurement (or, historically, normal mo de)

This is a ma jor (scientific) mo de of measurements. During AccumTime the measurements are done by blo cks of the duration BaseTime. For every blo ck, statistical moments and then scintillation indices are computed. For SI, the last-obtained background values are taken, or, if no Background mo de was started b efore, the values from configuration file are adopted. From these instantaneous scintillation indices, the resp ective (basetime-related) atmospheric turbulence integral moments are computed (p owers 0, 1, 5/3 and 2 of altitude). For the whole AccumTime measurement, the average values of the scintillation indices and the estimates of their errors are computed and saved. Turbulence integral moments are similarly averaged and the atmospheric integral characteristics (free seeing, isoplanatic angle, effective turbulence altitude etc) are derived and corrected for non-zenith star p osition. Then the turbulence profile is restored from average SI using two metho ds (see [5]).

1.2.2

Background measurement

For correct calculation of the scintillation indices, the sky background level (non-scintillating) must b e known. The star must b e removed from the field ap erture b efore starting the mo de. The sky background is estimated by measuring the flux during the AccumTime. Subsequent scintillation indices calculations use these background values. If they are wrong by some reason (bad or outdated measurements) -- check situation and rep eat the background measurement.

1.2.3

Flux estimation

In some cases (star identification, p ointing checking etc), the brightness of a star (or any other light source) is needed. This auxiliary mo de allows to get such an estimation. Its results do not play any role in interpretation of results of subsequently run mo des. 6


The duration of measurement is determined by the parameter FluxEstimationTime which has a sense of accumulation time for this mo de. Data accumulation go es in the same way as in scintillation measurements. Meanwhile, data reduction is restricted to calculation of the average value and its error over the complete data set.

1.2.4

Tests

There are three tests implemented in the program ­ Detector test, Exchange test and Statistic test. They allow to check the state of b oth hardware and software. Exchange test Idea of this mo de is to check the state of communication with device. Using settings for normal mo de measurements (exp osition, base time etc.) the photometric mo dules transmit the predefined test data, to b e checked by the program. First, each mo dules is tested separately (one after other). Then, all mo dules are tested simultaneously (work like in real measurement conditions). Detectors test Check the PMT sensitivity. The control LED is activated and, after a small pause, the flux measurements are done. The control light is then switched off. The measured fluxes and detector non-Poisson parameters are compared with those written in configuration file. Statistic test This test mo dels the pro cess of measurement of scintillation with help of blinking control LED. Instrument works like in the real SI measurements. The derived indices are compared with those calculated from the known LED flux variation. The LED is blinking synchronously with measurements with a p erio d of 4 micro exp osures: 1) middle level 2) max level 3) middle level 4) min level. Masking of resp ective micro exp osures allows to derive these levels explicitly and to predict the value of scintillation index.

1.2.5

Detector counting measurement

This complex auxiliary pro cedure provides measurement of the PMTs count rate as a function of HV and pulse discrimination threshold for a sp ecified grid control light levels. The mo de consists of three emb edded lo ops. The outer lo op is over the light fluxes, the intermediate lo op is over the HV levels, and the innermost lo op is over the discrimination level. The dark counting, if needed, should b e sp ecified explicitly (with the light level 0). For every p oint, the average flux value, its error and a non-Poisson co efficient are computed. Duration of the mo de dep ends on pro duct of numb er of p oints in the grids over HV, discrimination and light levels. The detector counting measurement is intended to define optimal work condition for detector PMTs. As a final result, a series of dep endences of the count rate and non-Poisson parameter on HV value may b e plotted [3].

1.2.6

Detector statistic measurement

This pro cedure provides measurement of the main statistical parameters of the detector ­ nonlinearity co efficient and non-Poisson parameter. The measurements are done when optimal HV and discrimination threshold were defined and set in the system.

7


This mo de includes separate measurements for sp ecified set of the control light levels. The resulting dep endence of the current non-Poisson parameter on the flux level p ermits to compute non-linearity co efficient and non-Poisson parameter for each detector channel [3].

1.2.7

Initialization

Device initialization mo de is a preparation mo de which activates initial settings of the instrument electronic mo dules. Some program variables are initialized, to o. Also, the initialization may involve a numb er of mo des sp ecified in the initial scenario script (see 1.2.9). The initialization is an obligatory first step b efore any other measurement mo des after the program start-up.

1.2.8

Device parking

This mo de shuts down the device in a safe waiting state with a well defined status. As a rule, high voltage turns off. The mo de is called automatically b efore the normal exit from the program. To continue the measurements with a program after parking, it is obligatory to do the Initialization.

1.2.9

Op erations with scenaria

Scenario is a simple mechanism which provides an execution of a sequence of op eration mo des. The desired sequence is defined by the scenario script which is an expression involving the symb ols denoting the mo des (or commands) and op erations with them: grouping the sub expressions (parentheses (...) ), grouping the mo des (addition sign +) and rep etition of mo des or sub expressions (multiplication sign * ). Normally, the scenario script is comp osed and written in the configuration file to simplify (automate) routine well tested measurements during long time p erio d. Redefinition of the scenario script up on work is p ossible as well. Before scenario launching the software always checks the scenario content and estimates its execution duration.

1.2.10

Device direct control

Device direct control itself is not a separate op erational mo de. It provides a p ossibility of manual control of the device auxiliary functions: turn on/off high voltage, field ap erture illumination, control light etc. Mainly, these are needed during device installation, preparation tasks, alignments and etc. The settings done under such a control are valid until parking the device.

1.2.11

Configuration p ossibilities

An interactive GUI provides p ossibilities to change program configurations during Turbina program execution. Similarly to the direct device control options, changed configuration parameters are active during current session if they are not saved. Once saved, new values are written into the main configuration file and b ecome active up on the next program run as well.

8


Chapter 2

Installation, tuning and startup
2.1 Installation of the MASS software Turbina

The MASS device is op erated by the program turbina written in C++ language for the real-time communication with the system hardware. Both desktop or laptop PC computer running under Linux OS can b e used. So far as MASS device is designed to b e connect to the PC via parallel p ort and sp ecial RS485/LPT converter [2], computer must have LPT p ort working in EPP mo de. The MASS software itself do esn't require a large disk free space (1 Gb is enough) or p owerful PC hardware, and in general, requirement to PC follows the one for mo dern Linux distribution with XWindows graphic shell. Installation pro cedure is roughly following: 1. Install the Linux distributive. The software was tested with SuSE 7.2, 8.2, Slackware 8.0 and RedHat 8.0 Linux distributions. The following comp onents are obligatory to install: ­ ­ ­ ­ ­ ­ XWindows with any window manager (KDE or whatso ever) gcc/g++ compilers ncurses text dialogs package Qt graphic libraries versions 2 and/or 3, development package sources of the installed Linux kernel xmgrace and xfig utilities for output data analysis

Normally, using the standard installation option, the first three comp onents are installed by default, but others, esp ecially, the development libraries and include files of Qt are not. Note, that this MASS software do es not demand Real-Time Linux installation contrary its early version. 2. Login as ro ot 3. Insert the compact disk with Turbina distributive and make the following actions: # mount /dev/cdrom /cdrom # cd /cdrom # ./unpack

9


The last command starts the script which just takes the archives from the CD and unpacks them in the right places of the file system. The comp onents of the Turbina program are put in following places: /usr/share/turbina/ ­ working directory: input and output data (star list, sp ectra, weight functions etc.), configuration files, etc. /usr/src/rs485-X.X.X ­ the sources of the RS-485 interface driver /usr/share/doc/turbina/ ­ MASS and Turbina do cumentation /usr/src/turbina/ ­ source files of Turbina to make executable /usr/share/supervisor/ ­ Sup ervisor manager program package They must b e compiled and built which is describ ed in following steps of installation. 4. Compile of the RS-485 driver. Go to the sources directory, make a link to current kernel sources directory, to the current (provided) version of the RS-485 driver sources. Then enter the driver directory, configure, compile and install the driver and make the device for the RS-485 interface: # # # # # # # cd /usr/src ln -s [kernel-source-code-directory] linux ln -s rs485-3.X.2 rs485 cd rs485 make make modules_install make create_dev

Notes: ­ Do make menuconfig b efore make if your LPT p ort address and IRQ are different from 378H and IRQ7, resp ectively. ­ The installation command copies the driver lpt.o from the /modules sub directory to /lib/modules/[kernel-version]/misc. ­ The device-making instruction (last "make") actually do es mknod /dev/mcua0 c 28 0 and creates the devices /dev/mcua0 and /dev/mcua1; this is needed only if you install the driver for the first time in the system. 5. Install the RS-485 driver. Try to say # modprobe lpt or # insmod lpt The driver is installed instead of the parallel p ort driver. Thus, the driver is installed if parallel p ort is not o ccupied. Otherwise, unload all drivers that use it by the command rmmod [driver-name]. The command lsmod lists all loaded drivers. The name of lowlevel LPT driver is parport, but firstly unload the high-level drivers that use it (they are listed by lsmod in 4-th column of parport row), then unload parport.

10


If the kernel is compiled with the LPT driver already built in (not loaded as a mo dule), b o ot the computer with the option parport=0 in /etc/lilo.conf (in the section that contains the parameters of the chosen kernel, this is a case of loading the linux with LILO). These steps of "cleaning" the unnecessary drivers and installing the lpt should b e written in one of the system start-up script (normally somewhere in /etc/rc.d/, consult your system administer how to do this). Otherwise, the cleaning of LPT-drivers and insmod lpt must b e done each time the Linux is restarted. 6. Test the driver and communication. ­ Make sure that the LPT p ort is in the EPP mo de (check in BIOS settings). The LPT p ort address normally is: 378H IRQ7. ­ Connect the electronics to LPT p ort through the RS485/LPT converter. Power the electronics with +12V (green LED on). ­ Compile and start the low-level program for direct communication with the electronic mo dules of MASS: # cd /usr/rs485/test/ # make # ./lmox The screen message shows the version of the driver and < prompt if the communication is established. Write 10 a2. The answer should b e Data 2 bytes 0b 07. Then press Enter to exit. If either device mcua0 or driver lpt or PS485/LPT converter are not found or the electronics is not accessible, there will b e appropriate error message. 7. Compile the Turbina program. Go the the Turbina source directory, copy the Makefile which represents the use of your version of Qt (see whether it is /usr/lib/qt2 or qt3), and compile the program: # # # # cd /usr/src/turbina cp Makefile.qt2 Makefile make clean make

Thus, the compilation of Turbina is started. When finished, the turbina executable is created in the current directory. Try to start it: # ./turbina If starts, install the executable: # make install This way, the program may b e started as simply typing turbina from any directory. Potential problems: 11


­ Absence of symb olic link to the real Qt library in /usr/lib. The symb olic directory /usr/lib/qt2 must p oint to the actual Qt2 directory, like /usr/lib/qt2.1. The same for Qt3 library: the link /usr/lib/qt3 to p oint to the real Qt3 directory. ­ Sometimes the links to sp ecific library mo dules are required when compiling turbina. Put the required links: libqt-mt.so -> libqt-mt.so.3 -> [real file]. ­ Incomplete Qt libraries. In some Linux installations the Qt directories are not complete. In this case, use the Linux distribution and up date the system to install qt devel. ­ Error messages at linking saying that some Qt libraries are not found. In this case, make symb olic links to the missing libraries in /usr/lib. 8. Check the Sup ervisor program. The Sup ervisor is a Tcl script which do es not require compilation. Thus, if you need such a functionality, follow the instructions in the Sup ervisor User Guide do cument. 9. Check the PC clo ck, which must b e set to lo cal time, as usual, with a prop er value of the time-zone set. In this case, the Universal Time (UT) is computed prop erly for writing the output file records and ob ject visibility calculations (autonomous Turbina functioning and Sup ervisor).

2.2

Editing the configuration file

All parameters which control b oth the hardware and software characteristics of the program Turbina are stored in text configuration files turbina.cfg (main CFG, changeable from Turbina menu) and device.cfg ("engineer" settings only, inaccessible from the program). Both files have the same structure of hierarchical levels. Upp er level consists of Sections; each section may have any numb er of Subsections. Thus, there are up to two levels of enclosure (no "SubSubsections"). Lowest level of hierarchy is a list of parameters. Names of (sub)sections (given in quotes) and names of parameters are fixed and cannot b e changed. The values of parameters may b e of following typ es: ­ ­ ­ ­ numerical (integer or floating p oint) character (strings) set of values separated by commas or spaces (no matters) Logical: On/Off or Yes/No

The values of parameters are validated by the program on startup and the message is given in case when the non-allowed value is encountered or some field is absent or non-recognized. Character-typ e parameter values (except for the scenario mo de symb ols) are case-insensitive. Parameters cannot b e removed from the file, in this case they disapp ear also from the menu. Sections and parameters with unrecognized names are ignored. The line starting with `#' as a first non-blanc character is a comment string not interpreted by the program. The part of line after semicolon ';' is also a comment but displayed by the program as a short help in the dialog for the resp ective parameter mo dification. When the file is written by the program back to disk (after a mo dification via the menu tree), the latter comments are retained but comment lines started with `#' are not. Therefore, keep the original turbina.cfg file as a reference to prevent loss of some parameters string. 12


File device.cfg contains imp ortant device constants. Some lines (parameters) may b e mo dified during MASS installation and alignment pro cedure (see [3]). First of all, the Magnification parameter is very imp ortant for correct turbulence profile restoration and must b e written after MASS installation at the feeding telescop e and measurement of magnification (see [3]). It is also useful to have a FocalLength parameter close to true one, but it do es not affect at the output results. After careful studying of the the MASS detectors [3] with help of the program to ols: Detector count measurements and Detector statistic measurements (see Sect 3.6), a need for correction of some electronics parameters can arise. These are: ­ working high voltage HighVoltage in Auxiliary/Common subsection; ­ non-linearity parameters NonLinearityA/B of the detectors in the Bicounters/Bicounter 1 or 2/ subsections; ­ non-Poisson parameters NonPoissonA/B in the same sections; ­ discrimination thresholds DiscriminationA/B. Also, the mo dule identifications must b e changed after their re-programming. Never edit the Module/Command sections! Third configuration file is status.dat placed in the directory config/; it contains program service information only for its auto-validation of the turbina.cfg content. Below we describ e section-by-section the content and edition of the MASS main configuration file turbina.cfg. Note, that the structure of the configurating file corresp onds in general to the Turbina GUI menu tree (see Chapter 3).

2.2.1

Preferences section

Section "Preferences" SubSection "Text window settings" ; WindowGeometry auto ;left top width height in pxs FontSizeLarge 12 ;fontsize of text window FontSizeSmall 10 ;fontsize of data and message text EndSubSection SubSection "Graphic window settings"; WindowGeometry 640 -45 620 960 ;left top width height in pxs FontSize 10 ;fontsize of graphic window Background darkGreen ;background color for graph window AxesColor lightGray ;color of axes PointSize 1 ;size of point in pxs EndSubSection EndSection This section helps to adjust the app earance of the program windows. WindowGeometry allows to set the desirable dimensions of the program windows on the X-windows screen or set auto for default b ehavior. Large font in Text window settings manipulates the sizes of Menu item names, Small font is used for the output data numb ers and message text. Graphic window settings refer to the result plots. The color names in the configuration file are standard and include: black, white, darkgray, gray, lightgray, red, green, blue, cyan, magenta, yellow, darkred, darkgreen, darkblue, darkcyan, darkmagenta, darkyellow. 13


2.2.2

General section
; ; ;TURBINA version number ;date of introduction, DD.MM.YY ;who modifies the program ; ;version of this conf. file ;date of introduction DD.MM.YY ;who modifies this conf. file ; ;observatory or site name ;longitude of the site: h,m,s ;latitude of the site: d,m,s ;tmZome (Local-UT) ; ;list of stars for measurements ;set of energy distributions (SED) ;spectral response of detectors ;weightDir ;lutDir ; ;directory for temporal files ;directory for mass, cnt, stm files ;directory for logging files ; ;Turbina port number for SV usage

Section "General" SubSection "Program version" Version 2.04 Date 26.12.03 Modified O.Voziakova EndSubSection SubSection "Configuration version" Version 1.18 Date 16.12.03 Modified V.Kornilov EndSubSection SubSection "Site" SiteName CTIO Longitude -04 43 15.5 Latitude -30 09 55 TimeZone -4 EndSubSection SubSection "Inputs" StarData data/star.lst SpectraDir spectra/ Response data/mass_dimm.crv WeightDir weight/ LutDir lut/ EndSubSection SubSection "Outputs" TempDir working/ DataDir out/ LogDir log/ EndSubSection SubSection "Socket" Port 16007 EndSubSection EndSection

This section contains the general information on the observational pro cess and environment. The first two subsections are not interpreted by Turbina but serve for control of the "freshness" of configuration file with resp ect to the program version. Being changed, the program version will b e restored by the Turbina program. Note also, that the real program version is written in the output *.mass-file as well. The subsection Site has to b e filled with the observation place information. It is used for calculations of star p ositions and UT from the computer clo ck. Since star p osition (its airmass) is used for turbulence profile restoration, incorrect values in this subsection lead to biases in output results. The next two subsections are the input and results files lo cation and names counted from the Turbina working directory (/usr/share/turbina/, see Sec. 2.1). The last subsection Socket contains a p ort numb er using for TCP connection to Turbina. 14


2.2.3

Op erations section

Section "Operations" ; SubSection "Common" ; WithDevice Yes ;Is the MASS device connected? MirrorPollingTime 1 ;polling period in s TemperPollingTime 20 ;polling period in s HighPollingTime 2 ;High voltage polling period in s FluxEstimationTime 4 ;sec SciCountsSave On ;save the Normal/Generalized mode counts TechCountsSave On ;save the Detector Stat. meas. counts LogSave On ;save the log of the session EndSubSection SubSection "Initialization" ; IlluminationLevel 0.5 ;default illumination level(0.0-1.0) Illumination On ;turn illumination on/off HighVoltage Off ;turn HV on after start up Safety On ;automatic HV turn-off if overlight occurs InitialScenario X+D+S ;scenario to do automat-ly on startup ScenarioRun Off ;on/off making InitialScenario EndSubSection SubSection "Star Pointing" ; CoordinateSystem HA ;Show either RA or HA of star EndSubSection SubSection "Normal mode" ; Exposition 1.0 ;micro-exposition time in ms (>=1) BaseTime 1.0 ;base time in sec. AccumTime 60 ;accumulation time in sec. Cn2Method X ;Cn2 restor.: fi[X]ed, f[L]oating layers EndSubSection SubSection "Background measurement" ; Background 0.01,0.01,0.02,0.06 ;previous measurement results AccumTime 10 ;full time of the measurement EndSubSection SubSection "Detectors counting measurement"; Voltage 650 750 850 900 950 ;voltage set for counting measurement, V Discrimination 0.3 0.4 0.5 0.6 ;level set for counting measurement, mV Light 0.2 ;light level for counting AccumTime 40 ;accumulation time in sec for a point. EndSubSection SubSection "Detectors statistics measurement"; Light 0 0.1 0.2 0.4 0.6 0.8 1.0 ;light levels for measurements 60 ;accumulation time in sec for a point. AccumTime EndSubSection ; SubSection "Tests" 40 ;exchange test duration in sec. ExchangeTestTime 60 ; DetectorTestTime

15


DetectorLight 0.53 TestCounts 70 120 300 700 FluxTolerance 0.2 NonPoisTolerance 0.2 StatisticLight 0.5 Modulation 0.1 EndSubSection SubSection "Parking" Illumination Off HighVoltage Off EndSubSection SubSection "Scenario" Scenario_1 4*(50*D+U+L)+Q Scenario_2 X+Q StopOnError No EndSubSection SubSection "SVScenario" Measurement N Scenario_1 B Scenario_2 F EndSubSection EndSection

;reference light level for detector test ;reference counts in channel A ;allowed tolerance for real counts ;allowed tolerance for non-Poissonity ;light levels for statistical test ;modulation amplitude for statist. test ; ;illumination turn on/off ;leave-state for HV ; ;measurement sequence n*+()BCVXDULSNGQ ;second sequence ;stop or not on a failed measurement ; ;measurement sequence n*+()BCVXDULSNGQ ;background ;flux estimation;

This is the main section in configuration file which drives the measurements with MASS. It consists of the subsection Common which is followed by subsections each sp ecifying the parameters of the particular mo de of MASS functioning. The last two subsections give a numb er of scenaria (mo de sequences) which can b e selected in the program for execution (subsection Scenario) and which are executed up on the Sup ervisor request (subsection SVScenario). Flag StopOnError defines a software reaction if some kind of errors app ear up on a scenario execution. Subsection Common includes flag WithDevice which, b eing set to No, p ermits to run program without a MASS device, e.g. for a debugging purp ose. Other flags -- SciCountsSave and TechCountsSave -- should b e set On for sp ecial measurements only, since the counts saving consumes a large space on the hard disk, normally this flags are Off. The flag LogSave, b eing set On, op ens the logging of the exchange with device. During initial usage p erio d it is recommended to set the flag On. Polling p erio d parameters help to achieve a wanted reaction time on device status changes. First of the mo de subsections is Initialization. It sp ecifies the b ehavior of the program when either the menu item Initialization is selected or SV command INIT is received. Flag ScenarioRun controls whether the InitialScenario will b e executed during Initialization or not. A counterpart of this subsection is the subsection Parking which sp ecifies what is done to put the device in a waiting state. Each following subsection corresp onding to separate op erational mo de has a "standard" parameter AccumTime. Parameters DetectorTestTime and ExchangeTestTime have the same meaning. For complex mo des, such a Detector counting measurement and Detector statistic measurement, the parameter defines a time needed to obtain one p oint of a measured dep endence. Note, that parameters setting the control LED light intensity (Light, DetectorLight,

16


Table 2.1: MASS measurement mo des and the CFG parameters which affect their p erformance Mode Normal Flux Estimation Background Exchange Test Detector Test Section Operations/Normal mode Operations/Common Operations/Normal mode Operations/Common Operations/Normal mode Operations/Background measurement Operations/Tests Operations/Normal mode Operations/Normal mode Operations/Tests Parameters (all) SciCountsSave BaseTime, Exposition FluxEstimationTime BaseTime, Exposition (all) ExchangeTestTime BaseTime, Exposition BaseTime, Exposition DetectorTestTime DetectorLight, TestCounts FluxTolerance NonPoisTolerance AccumTime, Modulation StatisticLight BaseTime, Exposition, BaseTime, Exposition (all) TechCountsSave BaseTime, Exposition (all) TechCountsSave

Statistic Test

Operations/Tests Operations/Normal mode

Detector Statistics measurement

Operations/Normal mode Operations/Detectors statistics measurement Operations/Common Operations/Normal mode Operations/Detectors counting measurement Operations/Common

Detector Counting measurement

StatisticLight, and IlluminationLevel) is normalized to its maximal value and b elong thus to [0,1] range. We present a table which relates the MASS op eration mo des to the CFG parameters which alter their p erformance (Table 2.1 and Table 2.2). The meaning of other, more sp ecific parameters, is describ ed in the Sec. 3.2.

2.2.4

Display section
;Results display representation ;Average fluxes, -> 0-mag in graphics ;channel IDs A..D ;full, no,full,brief+graphic ;color names, white by default ;relative size of graph, integer

Section "Display" SubSection "Flux" EntityList A,B,C,D Show F,N,F,BG Color yellow,green,blue,red Size 1,1,1,1

17


ReferVal 100,100,2000,1000 EndSubSection SubSection "Index" EntityList A,D,AB,CD Show B,B,B,B Color red,red,cyan,gray,cyan Size 1,1,1,1 ReferVal 1,1,1,1 EndSubSection SubSection "DESI" EntityList A,C,D Show n,n,n Color red,green,blue,yellow Size 1,1,1 ReferVal 1,1,1 EndSubSection SubSection "Integral" EntityList FSEE,FHEFF,TAU,ISOPL Show FG,B,B,FG Color red,green Size 1,1,1,1 ReferVal 0.5,1,1,2 EndSubSection SubSection "Profile" Show Bg Type Smooth Color cyan LUT heat Size 2 ReferVal 6.0e-13 EndSubSection EndSection

; ;Scintillation indices ;chans IDs A,D, AB, CD ;all the brief ;color names ;relative size of graph, integer ; ;Scintillation indices ;chan(s) IDs A,AB,+s(hifted) ;all the none ;color names, white by default ;relative size of graph, integer ; ;Atmospheric integral parameters ;Any integrals ;full+graphic,brief,brief,full+graphic ;color names, white by default ;relative size of graph, integer ; ;Restored Cn2 profile ;brief+graphic ;Smooth OR Bars ;only bars type ;Look-up table name, only smooth type ;relative size of graph, integer ;

For any kind of output data, the user can list the parameters for display in the field EntityList: e.g. A,B for Fluxes, Indices or DESI or FSEE as free seeing for Integrals. Thus, ­ A ... D denote the MASS channel identifiers; AB ­ the channels combination (for differential indices); ­ FSEE, FHEFF, ISOPL, M0 and M2 denote the integrals of seeing, effective altitude, isoplanatic angle, turbulence integral over free atmosphere and second moment of turbulence. Parameters in this section affect the way the results of measurements are visualized. The file output do es not dep end on any of these parameters. The SubSections denote here the kinds of the output information which can b e displayed. Within each subsection, the different results (output parameters) which can b e displayed are all of the same sense, so the general principles of their visualization are the same. The list EntityList determines the numb er of displayed results (at least in the graphic window) for each kind of parameter. It should b e stressed that if either of parameters in a 18


particular row/column of the Main Results Window is ordered here to b e shown, all the rest data in the same column and row are also shown even if they weren't listed in entity list. For all the entities listed in EntityList, the display mo de "Show" is used to describ e how to visualize the data: N B F G ­ ­ ­ ­ do not show results; "brief" data: with no errors in main results window; "full" data: with errors; may accompany any of N, B or F: show graphically in graphic window.

2 The last subsection Profile sp ecifies the way to display graphically the C n ­profile. If the Bars-typ e is selected, each layer of the restored profile is shown as a narrow bar which vertical size is prop ortional to the strength of the layer. Smooth way shows the dithered picture of the turbulence in a selected lo ok-up table (input field LUT). Size is an integer-typ e parameter which sp ecifies the relative height of the shown graph. E.g., if the given parameter is shown with Size=2, the Y-axis of its graph will b e two times longer than that for a parameter with Size=1. The absolute size of axis (say, in pixels) is adjusted for all shown graphs (i.e. for entities which have G in Show parameter, see ab ove) in such a way that they together o ccupy all the area of the graphics window. The control over the scale of displayed data is given the field ReferVal which directly affects the range of correctly displayed values. The data p oints of the value equal to ReferVal are plotted exactly in the middle of the graph along the plotted delimiting line; values which are ab ove 2 â Ref er V al are plotted always at the top margin. The Show and Size descripting parameters are listed in the same order as the entities for which they are given. In case of absence of a parameter or its wrong value, the default is used (N for Show, white for Color). The excessive descriptors are ignored.

Table 2.2: MASS preparing mo des and the CFG parameters which affect their p erformance Mode Initialization Star Select Star show Scenario Select Scenario Run Parking Section Operations/Initialization General/Site Operations/Star Pointing Operation/Scenario Operations/SVScenario Operations/Parking Parameters (all) Longitude, Latitude, Timezone (all) (all) (all) (all)

2.3

Lo cal start up

Switch on the PC and start Linux as usual. There are two user groups which can work with Turbina. The users from first mass root group have full program p ossibilities, the mass users have restricted p ossibilities (they can p erform measurements, but cannot mo dify most part of the configuration parameters). As a rule, 19


mass root group is identical to root, and mass -- to users group. Nevertheless to satisfy the observatory security p olitics, it is p ossible to change this corresp ondence in a source program mo dule names.h redefining massRootGroupName and massUserGroupName constants. Do not forget then add the new group into /etc/group file with help of your system administer and recompile Turbina. Login as mass root or mass user and op en/select the X-terminal. If machine has b o oted into the text mo de, login and start first the X-windows (normally by typing startx). Make sure that MASS is p owered up and connected to PC via the line cable with DB9 connectors. On the PC side, the cable is inserted in the RS485/LPT converter. Then start the program typing: > turbina It is assumed that all the parameters of the site and observations are prop erly assigned in the configuration file. Be sure that parameters in General/Site subsection are correct (see Sec 3.8 and 2.2.2). It is desirable to check that there is a space free for writing the output files. When Turbina starts, the console message TURBINA Ver.2.04 rs485 driver ver.3.0.2 app ears first. Any extra-message means the p ossible problem with communication with the MASS device or RS-485 driver. The message "bind: Address already in use" means that the initialization of the Turbina server so cket fails which happ ens when the program is restarted so on after connection shutdown. In this case, wait for a couple of minutes and start the program again. In case some files or directories mentioned in the Turbina configuration files or configuration files themselves are missing, the corresp onding message app ears saying so. After passing the files checking, the program checks the corresp ondence of the scintillation weighting function files to the optical parameters (magnification, geometry etc) in the configuration. In case the mismatch is found (which is a case when the magnification value is significantly mo dified), the window dialog app ears which requests for p ermission to recalculate the weighting function. Press "Calculate all" to avoid this message further. The weights calculations may take a few minutes, dep ending on the machine sp eed. Then program main window shown in Fig. 2.1 app ears. Another window, for graphic results output, is op ened automatically. At this stage, the message may come which rep orts the problem of communication or identification for a sp ecific hardware mo dule of the device. The identification mismatch usually arises after the mo dule reprogramming or usage of the device.cfg file written for another device. It may b e Ignore-d for a while but the correct device.cfg file must b e maintained afterwards (see [2]). Other problems demand a sp ecial treatment. If no messages app eared the Turbina is ready for work. Please note that, contrary to previous versions, no Initialization is done at program start. Hence, first action which must b e p erformed, is the device Initialization. The initialization can b e done either manually via GUI command Tools/Initialization (see Sec 3.6) or via the Sup erVisor command INIT after SV start (see Sect 2.5). Initialization includes the device initialization stage and InitialScenario playing, the latter takes place only if the flag Operations/Initialization/ScenarioRun is set On in turbina.cfg. Normally, the InitialScenario contains some device tests (e.g. D+S) but this is completely arbitrary. The user should wait until the message It's Ok is indicated and the buttons on the left 20


side of the window b ecome bright (active). This means that the measurements with MASS can b e started. If Initialization is started from SV, the further actions should take place after the INIT-command returns OK STATUS=READY.

2.4

Remote and automatic running

In previous section we considered the manual Turbina starting-up, which is usually needed in the testing phase, measurements under op erator control, installation and debugging of the rob otic system and so on. Naturally, it is the same p ossible to run Turbina from remote machine in such a manual mo de. If the MASS device is p owered and line cable and converter are connected, the most convenient way is to enter to MASS-machine using ssh -X connection under either mass user or mass root login. Since the exp orting of X-windows at remote host involves extensive traffic, the delayed reaction problems may arise if your link capabilities are restricted. In other resp ects the program will work in the same way as started lo cally.

2.4.1

X-windows starting for Turbina

When system is fully debugged, work without observer intervention b ecomes p ossible. Such work can b e controlled either by the scenario mechanism of the Turbina itself or under the external Sup erVisor control via TCP so cket connection. For these cases an automatic or remote start-up is necessary. Since Turbina requires X-windows graphics, the main problem is how to provide the suitable X-server. There are three principal situations: 1. no X-server started on MASS machine; 2. X-server works from mass user name, and Turbina must b e started by the same user. 3. X-server works from somebody user, but Turbina must b e started by mass user. Solutions for these cases differ by a single detail: use an existent X-server or run a new X-server. In the Case 2, the existent X-server can b e used by Turbina. For this, the command export DISPLAY=0:0 must b e executed b efore Turbina run. For cases 1 and 3 X-server must b e started b efore Turbina start for which, as describ ed ab ove, a script startx may b e executed. Note, meanwhile, that this script creates the server with default display screen 0:0. To initiate additional server with another display screen, say :1, it is easier to use the command xinit. This way, the X-server can b e run for the single particular client program, such as Turbina: xinit /full/path/to/turbina -- :1 In this case, the screen :1 is created and the program starts within it immediately, omitting any other services like window manager. When Turbina finishes, the X-windows shut down as well. This metho d works for b oth automatic and remote start-ups.

2.4.2

Automatic start-up

For non-assisted systems, it's essential to b e able to revive after (p ossibly o ccasional) reb o ots. In our case this means that execution of the Turbina program must b e somehow app ended to the chain of the system startup scripts. One of the ways to p erform such a chain is to make following: 21


1. Configure the login screen program (such as GDM or KDM) to make mass user autologinning, optionally after a sp ecified timeout. For example, the configuration of the graphic login manager in RedHat is lo cated in Start/System settings/Login screen graphics menu item; in SuSE ­ in the program Control Center (see System administering/ Login manager/Options). 2. Write a script which launches Turbina (and, p ossibly, other comp onents of your rob otic system) and place it in the Autostart area of your window manager (for KDE, this is the /.kde/Autostart directory). If the Sup erVisor program is needed for the system management, it must b e started after Turbina call on a background. The machine configured like this b ehaves like following: when the system b o ot scripts are completed, the X-windows are started with the login screen manager program. At this p oint, the mass user is logged in automatically and its preferred window manager is launched. When the screen is ready, the Turbina windows app ear, provided that there is no problem with the hardware and service files (see Sec. 2.3). Alternatively, Turbina can b e started automatically in pre-defined time with help of CRONdaemon. As considered ab ove, two situations emerge: start on b ehalf of a user who is already running X-windows and start op ening the new X-server. First case requires preparation of a shell script (E.g. turbina cron start), which executes export DISPLAY=0:0 and then launches Turbina. The call of this script must b e written in CRON table sp ecifying the start time and the user name. An example of a resp ective crontab line is following: 13 19 * * * mass_user /usr/share/turbina/config/turbina_cron_start

In this case Turbina starts daily at 19 hours 13 minutes of the lo cal time. In order to start the new X-server, add the next line in crontab file: 13 19 * * * mass_user xinit /usr/X11R6/bin/turbina -- :1 It is necessary to extend crontab PATH environment variable with /usr/X11R6/bin to provide correct execution of xinit script. Turbina starts from /usr/X11R6/bin directory, which is the destination of its make install instruction. Instead of direct call of xinit, the corresp onding script may b e written and executed by CRON-daemon. Before starting Turbina, this script may check whether it is already running or not.

2.4.3

Remote start-up

Now it is clear from Sec. 2.4.1 how to start Turbina execution without display exp orting to the remote host used. Dep ending on situation, the p ossibility with either display exp ort to the existing X-server on MASS-machine or starting there the new X-server sp ecially for Turbina execution, can b e used. To prevent non-authorized actions at MASS-machine the Turbina screen can b e lo cked. For this the start-up script must include a sequence of background calls to 1) any Windows manager (E.g. Windowmaker as a very simple manager), 2) Turbina, and 3) xlock display lo cking utility.

22


2.5

Working under the Sup ervisor control

If the Turbina program is used as a comp onent program in a system driven by the Sup ervisor manager program, it is started as usual and Turbina p ort numb er and MASS machine IP address are written in the Sup ervisor configuration file. Port numb er is sp ecified in General/Socket of turbina.cfg, it must not coincide with the p ort of any active service in the system. Consult the file /etc/services for selection of a free p ort numb er. When SV acquires the connection to Turbina, the so cket connection is created and Turbina immediately switches into the SV-controlled state when it is ­ ready to execute the commands translated via created so cket connection; ­ insensitive to the lo cal user control. The latter means that the menu items in the Turbina window are disabled and all the buttons in the window are not active as well. The only active button is the sp ecial upp er-left "Red Button" with a logo SV in the main Turbina window (b ecomes bright when SV is connected) which allows to switch back into the lo cal control mo de. If it is pressed, any command from SV is not executed and replied as ERROR STATUS=LOCAL. All the GUI controls b ecome active and allow to op erate MASS-device lo cally. To allow back the SV-control, the button must b e pressed again ­ other buttons on the screen b ecome again disabled and SV-commands are executed. As describ ed in Sec. 2.3, Turbina starts with device in the non-initialized state. In this state, any command from SV (see b elow) which involves the work with the device except for INIT is replied as ERROR STATUS=PARKED. The command PARK, naturally, do es not cause any action and replied as OK STATUS=PARKED. And the commands SET, GET are executed; SET replies with a notification OK STATUS=PARKED. While running, Turbina switches b etween the following states denoted by its status (returned by GET STATUS command) driven by the mentioned commands: PARKED ­ start-up state, PARK command (QUIT - b efore termination) READY ­ INIT command, after completion of RUN, STOP BUSY ­ INIT, PARK, RUN commands: lasts from reply OK WAIT=nnn till reply OK STATUS=READY up on completion of the resp ective action. LOCAL ­ state with the lo cal control activated (see ab ove) Some commands may cause the error state which is lasts normally until the next valid command supplied (except for ERFAT). These are: NOSTAR ­ RUN-commands issued without an ob ject selected (see SET OBJECT=nnnn b elow) ERANG ­ sp ecified parameter value is not allowed (e.g. non-existent star numb er or invalid scenario script supplied) ERSYN ­ command or parameter name is not recognized ERFAT ­ error during execution of the RUN, INIT, PARK commands due to bad data or device/program malfunction Below we list the commands which may b e used by SV to p erform rob otic-mo de measurements with MASS: 23


INIT PARK QUIT GET STATUS GET IDENT GET BKGR GET FLUX GET INTEGRAL GET SCIND GET XPROFILE GET LPROFILE GET SCEN1 GET SCEN2 RUN RUN SCEN1 RUN SCEN2 STOP STOP NOW SET OBJECT=nnn SET SCEN1=xxxx SET SCEN2=yyyy

-

initialize device (not program!), play INIT scenario park device park and terminate Turbina execution request of Turbina status request of the program identity (name and version) get last obtained values of the background get last obtained fluxes (format of F-prefixed line in mass-file) ... atmospheric parameters (A-prefixed line) ... scintillation indices (I-prefixed line) ... turbulence profile with fixed altitude grid (T-prefixed line, Meth=X) ... turbulence profile with floating layers (T-prefixed line, Meth=L) current script of Scenario_1 of the SVscenario .............. of Scenario_2 run the main scenario of SVscenario ("measurement", cannot be SET) run Scenario_1 run Scenario_2 stop current scenario execution break the current measurement and scenario execution set current star HR nnn number set new xxxx-script for Scenario_1 (say, B+2*D+F, no spaces or quotes!) similarly for Scenario_2

Note that scenaria Scenario 1 and Scenario 2 mentioned ab ove are the usual scenaria similar to those describ ed ab ove in Sect. 4.1.2. They are destined for the dynamic re-loading during work under SV control and are suited to particular sp ecial needs of the system. For example, they may help to organize the star searching pro cedure, start centering and background measurement, or testing of the device. Note also that GET-commands may b e used in any state of the program, including p olling of data during scenario execution. Format of returned data is describ ed in Sec. 4.2.

24


Figure 2.1: The view of the Turbina program main window. Results of the scintillation measurement mo de are displaied.

25


Chapter 3

Main Turbina program window and menu tree
3.1 Main window

The top line of the main window is a Menu bar. Any action with MASS may b e p erformed by selecting the necessary item in the p op-up Menu tree (see Sect. 3.2). Also, some shortcuts are available to execute frequently used action via a combination of keystrokes. The second line gives an information on the sup ervisor connection status, selected ob ject of observations and current time. On the startup of Turbina, the star is not selected (undefined) and observer must use the Select Star menu. The current star name (Alp Hya), its current airmass (1.01) and the Lo cal Time (1:30:09) are displayed and up dated continuously. The Sup ervisor (on the left) changes its color from dark red (as shown in Figure) to bright when the logo Sup ervisor program connects to Turbina and the latter starts to execute its commands. It is a button by which the user may give a command to ignore Sup ervisor command and take GUI command (Red button). The third line sp ecifies the name of the current mo de (or template) started (Run measurement for example) and the time left until its completion. Last two windows inform on the currently selected Scenario and scenario time left. Below the mo de line, the results output window follows. Its content dep ends on the started mo de and is describ ed in Sect. 4.2. To the left of this window, the To ol buttons are placed. The upp er button Show Star op ens the window where the current star parameters are displayed (it's a short-cut of File/Show Star menu item). The next button Select Star allows to select the ob ject in the star list (equivalent of File/Select Star). Last three buttons mimic the audio-player functions and make easy to Start , Stop and Pause the selected scenario. Just b elow the results window, there is a narrow message window. In this place, the messages from the program ab out the completion of a mo de, some measurement result (as shown in Figure) or ab out some abnormal system state are shown. The last two lines in the Main window are the Device Status line and a Program Status bar. In the former, the p osition of the viewer mirror, field Illumination, High Voltage state and the device interior temp erature. The last line indicates normally the action of the program which is under evaluation. In this line, the help-texts on the configuration file parameter are displayed while accessing them via menu items in Config/.... 26


3.2

The Structure of the Main Menu Tree

The main menu tree allows to make all the op erations with MASS. Some menu items are disabled (marked in grey color) if they are not accessible in a current context state or not suited for usage/mo dification by a ordinary user. In latter case, they are available for ro ot user only. Below we give the explanation on what is done up on the selection of the menu items. The describ ed op erations dep end on the values of parameters listed in a configuration file (CFG) which we give in quotes sp ecifying the section of CFG from which they are taken. Main menu File (Sec. 3.3) SubMenu Comment Select star Show star ----------­ Exit Measurements (Sec. 3.4) Run measurement Background Flux estimation ----------­ Select Scenario ----------­ Run scenario Stop scenario Pause scenario Tests (Sec. 3.5) Exchange test Detectors test Statistic test To ols (Sec. 3.6) Initialization Detectors counting meas. Detectors statistic meas. ---------- Talk Break accumulation Parking SubSubMenu,dialog or select-list User's comment input Program star selection Selected star information

Initial + 2 work scenarios

27


Control (Sec. 3.7)

Turn HV On/Off Turn Safety On/Off Turn Light On/Off ---------- Set Illumination Level... Set Light Level... Set Hight Voltage...

Adjust the diaphragm il lum. Set the control light level Set the HV level Text Window Settings Graphic Window Settings

Config (Sec. 3.8)

Preferences

General

Program version Configuration version Site Inputs Outputs So cket

Op erations

Common Initialization Star p ointing Normal mo de Background measurement Detectors counting meas. Detectors statistics meas. Tests Parking Scenario

Display

Flux Index DESI Integral Profile

Save CFG Help (Sec. 3.9)

28


3.3

File menu item

The menu item File includes p ossibilities to add comments during observations and for work with a star list and data bases. Comment The dialog for adding a single line user's comment in the mass-file. The comment is app ended to the file with a time stamp after finishing the current measurement. Shortcut is [Ctrl]-[C]. Select star The item op ens the list sp ecified in the turbina.cfg/General/Inputs/StarData/Star.lst containing 130 stars brighter than 3 mag available for MASS measurements. This file can b e replaced by another file having the same format. The displayed list is normally sorted by airmass, but can b e resorted by any field (such as: HR numb er, Name, Hour Angle (HA), Decl. AirMass (restricted to b e less than 10), Vmag, Sp ectrum) by clicking on the field name (header). You can select star by double-click on the star row or by pressing button [Select]. The star information is refreshed in the program at the moment of closing of the window. The parameter CoordinateSystem from the CFG section Operations/Star Pointing sp ecifies the selection b etween Right Ascension and Hour Angle for displaying. Button 2 on the left b order of the program window do es the same. Show star The item shows information on selected star. Button 1 [Show] on the left b order of the program window do es the same. Information for p ointing at the selected star contains the Name, co ordinates (HA/RA, Decl), Vmag, Sp ectrum and comment. The field HA can b e changed by field RA dep ending on flag General/Inputs/CoordinateSystem in the turbina.cfg file. The information is up dated every second. Exit Exit the program, the instrument is parked. Shortcut is [Ctrl]-[Q].

3.4

Measurements menu item

The menu item Measurements contains several commands for making observations. All commands run immediately except for the Select Scenario. Rememb er, that the measurement mo des don't check is high voltage turned on or turned off. Run measurement Immediately run measurement of scintillation indices (further -- Normal mo de, see Sect. 1.2.1). Counters are in the mo de determined by the parameters from the section Operations/Normal mode in CFG. Full results scop e is saved in the file *.mass (see Sect. 4.2) while a part determined in Display/Index, DESI, Integral, Profile sections of CFG is also displayed in the results window and in the graphic window.

29


The individual counts from blo cks are saved in the binary count-file if the scientific countsaving is enabled (Operations/Common/SciCountsSave=On in CFG). Background The sky background is estimated from measurement started immediately (see Sect. 1.2.2). The results of the command are displayed in the message window and saved in the file *.mass. Next indices calculations use these background values. Also, if Config/Save CFG is pressed, these values are saved in turbina.cfg and used in the next Turbina call as default values b efore the first run of Background mo de. If the obtained background values are seemingly wrong -- check situation and rep eat the background measurement, otherwise the subsequent SI measurements will b e severely violated. Flux estimation The brightness of a star (or any other light source) is estimated (see Sect. 1.2.3). Accumulation time is set by the parameter FluxEstimationTime from the section Operations/Common. The current values of fluxes and their errors are displayed; note that the error of an average decreases while measurements progress. Shortcut to call this mo de is [Ctrl]-[F]. Select scenario Select a script from the list sp ecified in the Operations/Scenario section of the CFG. Run scenario Execute the selected script (also duplicated by the button 3). Stop scenario Ab ort the current script (duplicated by the button 4). It waits until the current mo de is finished. If the script is re-started after this, its starts from the b eginning of the script. Pause scenario Susp end the current script (e.g. to re-center the star), duplicated by the button 5. It waits until the current mo de is finished. After the second press of the button, the script execution is resumed.

3.5

Tests menu item

The item Test of the main menu contains three tests of the instrument and software. The parameters of these tests are sp ecified in the section Operations/Tests of the CFG. Exchange test This test consists of two parts. First part: all counting mo dules are separately tested during one base time in the Normal mo de. Second part: during the ExchangeTestTime all 4 counters are tested in the working configuration. Normal mo de settings is restored and kept active after 30


the test finishes. The results of the tests (p ercentage of the packets loss or "Ok") are displayed on the screen and saved in the data file. Detectors test Check the PMT sensitivity. The control light with the level TestFlux is activated and, after a small pause (to warm up the LEDs) the measurements are done during DetectorTestTime. The control light is then switched off. The measured fluxes must corresp ond to the TestCounts to within a FluxTolerance relative error. The counts are displayed on the screen. If they do not corresp ond to TestCounts, the message is given: "Invalid fluxes!". The resulted nonPoisson parameters of detectors are also checked to corresp ond to the NonPoisson parameters of counters (in device.cfg) to within a NonPoisTolerance relative error. Statistic test For Statistic Test (see Sect. 1.2.4), the intensity of the control light is set to the level sp ecified in the parameter StatisticLight of the section Operations/Tests and mo dulated with Modulation relative amplitude. Before measurements, the pause is done to stabilize the flux of the LED. Test duration and settings are the same as for the normal mo de. When the test is finished, the control light is switched off. The format of the displayed and saved results is identical to the normal mo de. The exp ected index values, computed from the measured mo dulation levels for comparison, are displayed for examination and stored in the file in the same format as measured indices. No formal test result is pro duced, the judgment has to b e done by op erator.

3.6

To ols menu item

Item To ols in the main menu contains the commands for auxiliary measurements and control. Initialization Initial settings of the instrument are activated as sp ecified in the Operations/Initialization section. Initialization must b e rep eated after change of some parameters through the Config item of the main menu and after "Parking" function. Detector counting measurement The counting measurement is started (see 1.2.5) according the parameters sp ecified in the subsection Detectors counting measurement. The its outer lo op is over the light fluxes listed in Light. HV levels and discrimination levels are set according Voltage and Discrimination lists. Other settings are the same as for Normal mo de. Every p oint of this mo de is measured during the AccumTime. For every p oint, the average flux value, its error and a non-Poisson parameter are computed. After inner lo op is finished the results for current HV and light are displayed on the screen and written to the output file.

31


Detector statistic measurement This pro cedure provides a measurement of the main statistical parameters of the detector (Sec. 1.2.6). The mo de parameters are sp ecified in the subsection Detector statistic measurement. The lo op over light level list Light is done. Every p oint is accumulated during AccumTime after warming of the LED for 30 s. For every p oint, the average flux value, its error and a non-Poisson parameter are computed. The resulting table is written to the file. Talk It op en the dialog window for sending the commands of the low level to micro-controllers for debugging purp oses and abnormal states. The mo dules replies are shown in the same window. Break accumulation Stop the current measurement after the end of the Base-time count series acquisition. Parking To shut down the device in agreement with section Parking parameters (e.g HV Off etc). Done automatically b efore the (normal) exit from the program. To continue the measurements with a program, it is obligatory to do the Initialization.

3.7

Control menu item

Control ­ a folder for making the op erations with a device without changing the CFG. Pay attention that menu items don't indicate current status of the device, only p ossible function in time. For example, if the string HV On is shown, it's mean that High voltage is off and can b e turned on by pressing this menu item. These settings will b e valid until new Initialization command. HV On/Off Switch the high voltage unit (see the initialization pro cedure after the program startup) Safety On/Off Enable/disable the shutting down the high voltage up on the detection of the to o high photocurrent in any channel. Turn light on/off Item switches the control light for testing purp oses. Set illumination level Set the intensity of lighting with a logarithmic intensity step. Additional sub-window will app ear.

32


Set light level Mo dify the relative intensity of the control light. Additional sub-window will app ear. Set HV Set the new value of hight voltage in Volts. Additional sub-window will app ear.

3.8

Config menu item

The item Config p ermits for user to change the program and device parameters situated in the CFG. The vertical menu structure mimics the one of the configuration file, the headings rep eat the names of Sections. The next level menu reflects the Subsection of the Section. The dialog window content lists only the parameters resided in turbina.cfg. The dialogs themselves are not shown in the figure of Menu Tree. The new parameters b egin work immediately, if no message is app eared: Field: .... Active after restarting. Setting are not saved in turbina.cfg if user don't press Save CFG which is placed in the vertical menu b ottom. Also, question ab out the saving of the changed parameters will arise during program exiting. Preferences Menu item p ermits to change the text window parameters (Text Window Settings Subsection) and of the graphic window (Graphic Window Settings Subsection). Both allow to define manually the dimensions of the program and graphics windows in X-display units or put auto for default "optimal" settings. Font sizes should b e adjusted exp erimentally (dep end strongly on X-window settings). Graphic settings include additionally the choice of the axes and background colors from a list and the size of the datum p oint on a graph. General Here observer can change the parameters in following Subsections: Program version ­ program version numb er, date of intro duction, who mo difies the program. Note, that the Turbina always write correct version numb er, even one will change it. Configuration version ­ configuration file version numb er and date, author of mo dification. Site ­ observatory/site name, longitude of the site: h, m, s, latitude of the site: d, m, s, time zone. Input ­ input data: the list of stars for measurements, file with a sp ectral resp onse of the MASS, weight functions directory for atmospheric calculations. Output ­ output data: temp orary data placement, output data directory (mass- , stm- and count- files) and log- file placement. Socket port ­ numb er of the p ort for connection from Sup erVisor program.

33


Op erations Items p ermit to change a numb er of parameters in following Subsections: Common -- p o oling p erio ds, flux estimation integration time, mo des of data saving. Initialization ­ initial device status and actions after Initialization command. Star pointing ­ switch b etween I and I I co ordinate systems. Normal mode ­ parameters of the scintillation indices measurements (see Sec. 1.2.3). Background measurement ­ accumulation time and adopted background values. Observer can use the item to control a current background. Detectors counting measurement ­ a lot of parameters for counting functions measurement. Detectors statistics measurement ­ the same for non-Poisson functions measurement. Tests ­ parameters for Exchange, Detectors, and Statistic tests. Parking ­ the device status up on the parking. Scenario ­ editing the measurement scenarios. Display Enable or disable the output of indices and atmospheric parameters and turbulence profile in the main results window and in graphic window. Five kinds of output parameters exist: Flux ­ show the stellar fluxes in channels. The main results window shows the actual average counts p er millisecond. The graphics shows the plots reflecting the time dep endence of the flux converted to the zero magnitude. For this, the V-magnitude of the star from the input catalogue is used together with its B - V color to convert the V-magnitude into the MASS photometric system [3]. Thus, the graphic curve of fluxes (called "F *") reflects the history of atmospheric transparency during the night and must not (in principle) b e very sensitive to the change of the target star. Index ­ show the normal or differential indices. DESI ­ show the differential exp osure indices. Integral ­ show the integral atmospheric parameters (seeing, isoplanatic angle etc.) Profile ­ show the restored turbulence profile. SaveCFG SubMenu item forces the changes of the working parameters made during the program execution to b e saved in the configuration file.

3.9

Help menu item

Help ­ a brief help on the program usage: actions which are p erformed by the system on selection of menu items.

34


3.10

Results Window content

During the measurements with MASS, the intermediate and the final results are displayed in the results output window (see Sect. 3.1) as a table. The columns normally refer to the MASS channels (A, B, C and D), sometimes to other derived parameters. The leftmost column gives the headings for the table lines, the upp er row - the table column headings. Normally, during the star measurements (after each Base-time), the flux values in [pulses/ms] are displayed for each channel. Then, after the Accumulation Time measurements are completed and the results are averaged, all the derived information is displayed. The content of the output is describ ed b elow. It dep ends on which parameters are selected for display in the section Display of the configuration file. In principle, the output is self-explanatory; nevertheless, the meaning of all displayed parameters is summarized in Table 3.1. Profile measurement Current fluxes are displayed each Base-time; each Accumulation time the average fluxes and indices are given for all channels; differential cross-channels indices (DSI) are displayed for some (normally up to four) selected channel combinations. The turbulence moments computed each base-time are averaged. If not negative, they are converted into atmospheric parameters and shown in the b ottom part of a table - free-atmosphere seeing (FSEE), effective altitude (FHEFF), isoplanatic angle etc. Finally, if the obtained set of average indices allows to restore the turbulence profile, it is 2 displayed in last four lines of the table ­ the altitudes, their resp ective C n integrals, the units -13 m1/3 ), chi-square quality of the restoration, seeing estimate from of the integrals (usually 10 this profile (it is usually close to FSEE). If no restoration is p ossible, the message is displayed in a message window. Flux estimation, Background measurement Only the current average fluxes with their relative errors are displayed. Exchange test No display of output; only the message window is active Detector test The current average fluxes with their relative errors and non-Poisson parameters are displayed Statistic test The current fluxes (CFLUX) are displayed during measurements. The average indices and exp ected indices are displayed after the end of Accumulation Time. The indices are output as for Normal mo de, but the exp ected values (non-zero for indices) are added with names having the `E' prefix. SI-s and ESI-s must b e statistically equal. The cross-channel differential indices should b e close to zero. Naturally, no atmospheric information is displayed.

35


Detector statistic measurements The extended table for channel parameters is displayed which columns show the Control LED light relative level, and fluxes, their relative errors and non-Poisson parameters for each channel. Detector counting measurements The output is similar to that describ ed for the detector statistic measurements mo de, but instead of light level, the high voltage and discrimination level are given. Light level is shown in a separate line. Table 3.1: The dictionary of the MASS output parameters displayed in the results output window

Table columns content:
A, B, C, D AB, AD etc. U Level Light Param FREE err Parameter for a sp ecified channel Parameter for a sp ecified combination of channels High Voltage level (Detector counting characteristics mo de) Discrimination level (­"­) Relative control LED illumination level (detector measurement mo des) Name of the parameter displayed to the right (­"­) Atmospheric parameters for the free atmosphere (ab ove 0.5km) The relative error of the value given in a column to the left

Table rows content:
CFLUX AFLUX err SI DESI DSI FSEE FHEFF ISOPL M2*1e5 TAU Z Cn2 Chi2 Order Light P Current flux in [pulses/ms] The flux averaged over an Accumulation Time The relative errors of values given in a previous line Scintillation index Differential exp osure index Differential (cross-channel) scintillation index Free-atmosphere seeing in [arcsec] Effective altitude of turbulence in [meter] Isoplanatic angle in [arcsec] 2 Second moment of turbulence M 2 = Cn h2 dh in [m4/3 â 105 ] Atmospheric time constant computed from DESI in [ms] Altitude of layers of the restored turbulence profile, [km] 2 Restored profile: integrals of C n in layers in [m1/3 â 10Order ] 2 of the profile restoration presented Order of magnitude of the displayed Cn2 values Relative control LED illumination level (detector test mo des) Non-Poisson parameter

36


Chapter 4

Measurements and results
4.1
4.1.1

Measurements with MASS
The observational pro cedure

After having the system started and passed the tests, the observations may b egin. The File/Select Star menu item (or the Select star button) is activated and the star with a small airmass is selected from one of the top lines of the list (sorted by airmass). It's b etter to select the ob ject with a negative hour angle value of the order of -2 to -1 hours. The parameters of the star are normally recalled by the Show star button. Then the selected modes may b e started manually or automatically via the preset scenario sequence. If clouds app ear, the scenario can b e paused or stopp ed; in case of the full disapp earance of a star, the resulting zero scintillation indices will o ccur and then the program will stop the scenario automatically (if Stop On Error is On in the configuration file). To change the star, the scenario should b e stopp ed and Select Star pro cedure should b e called again. In order to stop the measurements completely, simply make File/Exit: the program will shut the device down and exit. The output files in /usr/share/turbina/out/ should b e copied for safety elsewhere. These are normally the mass-file *.mass, the statistical-moments file *.stm, and (optionally) the countfile *.cnt with the individual millisecond counts from the MASS channels.

4.1.2

Writing a new scenario

Normally, the optimal sequence of mo des is written in turbina.cfg configuration file in the section Operations/Scenario/Scenario 1/2. This sequence may b e mo dified either in the file or in the program (menu item Config/Operations/Scenario) and subsequently saved in configuration file with SaveCFG command. Some actions not tied with the measurements can also b e included in a scenario as commands. Note that the scenarios which manage the mo de(s) started on the command from Sup ervisor are different from those describ ed here and not visible in the Config-menu of the program. The scenario is an expression which involves the symb ols denoting the mo des (or commands) and op erations with them: grouping the sub expressions (parentheses (...) ), grouping the mo des (addition sign +) and rep etition of mo des or sub expressions (multiplication sign * ). The mo de signs are following: B ­ Background measurement 37


N D S X L U Q

­ ­ ­ ­ ­ ­ ­

Profile measurement (normal mo de) Detector test Statistic test Exchange test Detector statistic measurements Detector counting characteristics registration Command: park the device and exit

The example of the scenario: B+5*(2*N)+D+S. Here the sequence b egins with the Background measurement, then five cycles follow which consist of two profile measurements. The scenario is finished with the Detector and Statistic tests evaluation. The parentheses may b e used freely with an arbitrary degree of enclosure.

4.2

Output data in MASS Software

The output of Turbina program op erating the MASS device is directed to an ASCI I file called mass-file. It contains the scop e of all measured "scientific" parameters ­ scintillation indices, atmospheric integral parameters and turbulence profiles ­ together with the accompanying information (software messages and observer's comments) and the device test results. The statistic moments (means, disp ersions and cross-correlations) of the counts in channels and their combinations, used to compute the scintillation indices, are saved in the separate moments-file (*.stm). Finally, the individual counts from the device PMTs may b e stored in a count-file (*.cnt) to allow their external re-pro cessing (if such an output is enabled in the configuration, see 4.2.4). Apart from these main output files, there is a numb er of service files (logging, temp orary information, test-time output etc.) which are not describ ed here. The mass-file, moment-file and count-file contents are describ ed in sections b elow.

4.2.1

Mass-file structure

General principles of organization of the mass-file The mass-file is an ASCI I file which normally has a name representing the UT date of the evening of observations in format YYMMDD.mass, where YY stays for the two-digit year, MM is month (01 ­ 12) and DD is day (01-31). Each line of file (with a single carriage-return character at the end) contains the starting character(s) or prefix and alphanumeric-typ e fields delimited with blanks (spaces, tabs). The lines may b e of the different types; each typ e describ es the data of particular kind and has a fixed asso ciated format sp ecifying the sense and sequence of the fields. The line types are group ed into a few classes by their place in the hierarchy of the data pro cessing pip eline: 1. averaged measurements output with Accumulation-time p erio dicity ­ the values obtained as a result of averaging of a numb er of base-time results; they may include the computed relative errors and other derived parameters 2. circumstance records ­ reflect the change of measurement conditions, target star, comments of observer etc. 38


Each of describ ed classes of output data may b e represented by several types of data lines. The general features of these typ es are following: ­ Each line of a certain typ e is started with a unique prefix ­ a single character which allows to collect the data of particular kind from the mass-file for external pro cessing (i.e. in electronic tables, databases etc.). Thus, the typ e of line (i.e. kind of data) is determined by this prefix (see Sect. 4.2.1). ­ The only prefix which may b e followed by another (second) prefix is a comment-typ e prefix #: e.g. #I. In this case, the rest of line gives the header-line for the data typ e given in the file with a second prefix ( I in example) to describ e explicitly the format of lines of this typ e. All other prefixes are separated from the rest of line by at least one blank character. ­ The second field in the line is a moment in Universal Time in a fixed format YYYY-MM-DD HH:MM:SS which sp ecifies the moment of acquisition of data given in this line. ­ The third and subsequent fields give the data of a given kind. The interpretation of data in mass-file needs some information on the parameters set in the system via Configuration File or directly from the menu of the program. The set of relevant parameters read from the Configuration File (turbina.cfg) is extracted in the so-called preamble given at the b eginning of each mass-file. Also, up on the change of any relevant parameter during the program execution, it is written in a single preamble-type line (see the list b elow). Comments to the UT field in mass-file 1. It is assumed that all information in a single file is related to one night of measurements. The evening date (see ab ove) gives a name for a file. The evening date is assumed to change in the lo cal mid-day. 2. For for averaged data results UT gives the middle-time of resp ective accumulation-time; for circumstance records it is the moment of app earance of a given circumstance. The list of prefixes for the averaged measurements typ es: I­ J,K E­ F­ U­ L­ A­ T­ R­ average scintillation index values with relative errors obtained in Normal mo de ­ reserved average exp ected scintillation index values with relative errors average channel fluxes with relative errors average channel fluxes, relative errors, co efficients of non-Poissonity with asso ciated highvoltage levels and discrimination levels average channel fluxes, relative errors and co efficients of non-Poissonity with asso ciated light intensities a set of atmospheric parameters (seeing, isoplanatic angle etc.) computed from averaged Cn2 turbulence moments with resp ective relative errors 2 2 restored turbulence profile intensities C n (z ) with resp ective altitudes z , 2 values, Cn -derived seeing etc. 2 the differences of observed and restored (by C n ) scintillation indices normalized by the observed indices. Currently not active in a `live' output. Given for all normal and differential indices, but not for DESI. 39


The list of prefixes for the circumstance record typ es: P ­ the preamble record in the blo ck in the b eginning of file for all relevant parameters or originated from the change of resp ective parameter in the program. The format is: SectionName\[SubSectionName\]]ParameterName = value. An example of such a variable parameter is a background in channels. O ­ the target star information: name, sp ectrum, co ordinates, resp ective Weight Function ID M ­ the declaration of the started mo de: identification, parameters etc. > ­ software originated message ab out some event, abnormal state, error # ­ the comment entered by the program or by the observer. This list of typ es is not exhaustive in principle and may b e easily expanded in future versions. The sample output in the mass-file according to the format given ab ove is presented b elow: P 2003-10-08 14:15:57 P 2003-10-08 14:15:57 P 2003-10-08 14:15:57 P 2003-10-08 14:15:57 P 2003-10-08 14:15:57 O 2003-10-08 17:05:56 M 2003-10-08 17:07:35 #F UT F 2003-10-08 17:09:33 ##2003-10-08 17:20:05 M 2003-10-08 18:19:03 > 2003-10-08 18:19:05 > 2003-10-08 18:19:46 M 2003-10-08 18:19:52 #L UT L 2003-10-08 18:20:01 > 2003-10-08 18:20:07 M 2003-10-08 18:50:23 #L UT L 2003-10-08 18:51:23 M 2003-10-08 18:52:23 > 2003-10-08 18:53:13 > 2003-10-08 18:53:34 M 2003-10-08 19:07:34 P 2003-10-08 19:07:39 M 2003-10-08 20:15:26 #I UTbeg I 2003-10-08 20:15:26 #F UT F 2003-10-08 20:15:56 #A UT A 2003-10-08 20:15:56 #T UT General\Program version\Version=2.03 General\Site\SiteName=CTIO General\Site\Longitude=-4 43 15.5 General\Site\Latitude=-30 09 55 Segmentator\Channel A\Outer=1.27 8425 Alp Gru 22 08 14 -46 57 40 B55 1.10 Flux FLUX_A e_FLUX_A FLUX_B e_FLUX_B FLUX_C e_FLUX_C FLUX_D... 32.88 0.004 50.48 0.003 189.4 0.002 324.0 ... User's comment is here ExchangTest IndividTest It's OK ExchangTest It's OK DetectTest Light FLUX_A e_FLUX_A P FLUX_B e_FLUX_B P FLUX_C... 0.20 518.6 0.000 1.073 3213 0.000 1.056 4248... It's OK StatisMeas Light FLUX_A e_FLUX_A P FLUX_B e_FLUX_B P FLUX_C... 0.20 496.6 0.000 1.073 2971 0.000 0.946 3912 ... Exchang Test Individ Test It's OK Measurement aborted! Background Operations\Background measurement\Background=0.751, 1.125... Normal 1.09 SI_A e_SI_A SI_B e_SI_B SI_C e_SI_C ... 0.1533 0.029 0.1100 0.025 0.0597 0.022 ... FLUX_A e_FLUX_A FLUX_B e_FLUX_B FLUX_C e_FLUX_C FLUX_D... 32.91 0.003 50.55 0.002 189.5 0.002 323.4... fSee e_fSee See e_See fM0 e_fM0 M0 ... 0.74 0.030 0.00 0.000 4.41e-13 0.050 0.00e+00 ... Met Nz Chi2 SeeCn z_1 Cn2_1 z_2 Cn2_2 z_3 ... 40


T R T R #

2003-10-08 2003-10-08 2003-10-08 2003-10-08 2003-10-08

20:15:56 L3 3.22 0.75 20:15:56 L -0.012 0.015 20:15:56 X6 4.09 0.73 20:15:56 X -0.028 0.005 20:23:26 Temperature: 14.5

0.5 6.20e-14 2.9 0.007 -0.002 0.5 4.33e-15 1.0 -0.012 0.016

3.17e-13 15.3 0.004 0.009 2.58e-16 2.0 0.009 -0.036

... ... ... ...

4.2.2

Statistic moments file

The statistics moment file (YYMMDD.stm) stores the intermediate data used for the average indices and derived atmospheric parameters calculations. For each base-time (1-second exp osure), the line gives the statistical quantities of the counts in channels. The structure of the file is similar to that to mass-file: the line starts with a prefix (which is fixed to m in stm-file), then go the UT date and time and then mean fluxes and auto- and cross-covariances of the counts in channels, with lags 0, 1 and 2. The last parameter in the line gives a hexadecimal address (offset) of the counts in the binary count-file prefixed by a '@'symb ol. This address app ears only if the counts writing was enabled at the moment of making the measurements.

4.2.3

Relation of prefixes to the MASS op eration mo des

Each mode of MASS can pro duce some data written in the mass-file as lines with particular prefixes. Below we give a summary of the mo des (which can b e started from the menu or from the scenario) and the typ es of output data which are pro duced by these mo des. These typ es are given as lists of prefixes. The first column M gives the symb ol by which the mo de sp ecified in the second column is denoted in scenarios. M N B X D S L U Q O Mo de Normal Background Measurement Exchange test Detector test Statistic test Detector Statistics Counting Characteristics Park and Quit Ob ject airmass check Prefixes in mass-file I, F, A, T, R F ­ L I, E, F L U ­ (O to b e implemented)

Formats of the data output in mass-file and display In this section we give the technical information on the data representation in result of Turbina and in the mass-file. It was intro duced already in Table parameters, b oth measured and set in the system for the measurements, is parameter names may have prefixes and/or suffixes; they are given separately tables. List of formats of MASS output measured parameters Param err C-format Range %*.3f 0..1 err no the main window 3.1. The list of presented. Some in two additional

Comment Relative error of any parameter >0 (length '*' is 5 for display, 7 for 41


FLUX P SI SEE ISOPL HEFF M2 M0 TAU Z CN2 Met ORDER Chi2

%6.*f %5.3f %6.4f %5.2f %5.2f %5.0f %8.2e %8.2e %5.2f %4.1f %8.2e %c %3d %6.2f

0..2e4 0.7..2 1e-3..1 0.1..20 0.1..20 1..3e4 1e-6..1e-4

yes no yes yes yes yes yes

1e-17..1e-10 yes 0.1..20 yes 0.1..30 no 1e-16..1e-12 no 'X','L' -17..-10 0.9..999 no no no

ATMOS and 8 for SCIND). e_ in file. Instant. or average flux [pulse/ms] (precision '*' is <4, computed) Non-Poisson parameter of detector normal or differential scint.index Seeing [arcsec], "Seeing" in display Isoplanatic angle [arcsec] Effective turb.altitude [m] Second turb.moment ("isokinetic") [m^{4/3}], 1E5-scaled in display, Zero turb.moment: full integral [m^{-2/3}], file only Atmospheric time constant [ms] Altitude of the Cn2 profile layer [km] Strength of Cn2 prof. layer [m^{1/3}] ORDER-scaled in display Cn2 profile restoration 'X':fixed, 'L':floating layers, file only Logarithmic Scale-factor of Cn2 (display only) Chi-square of restored Cn2 profile

List of formats of MASS output setting parameters Param U Level Light C-format %4d %3.1f %3.1f Range 500..1500 0.5..1.5 0.0..1.0 err no no no Comment High Voltage [volt] Discrimination level in detector [mv] Control LED intensity level [rel.unit]

List of prefixes Prefix e_ C A D,DE F Parameters having err FLUX FLUX SI SEE, HEFF Comment relative error of parameter in file ("err" in display) Current (instantaneous) flux Average flux Differential indices: cross-aperture and expositional Free atmosphere parameter (integral above 1km), used in file only (FREE column in display)

List of suffixes (file only) Suffux _A,_B,_C,_D _AB,...,_CD _1,...,_6 Parameters FLUX,SI,DESI DSI Z,CN2 Comment Value measured in a channel Value for a pair of channels Layer number

4.2.4

Count-file handling and data re-calculation

The PMT counts of the MASS channels can b e saved for external pro cessing during the scientific measurements or during the device Detector measurements (b oth counting and statistic). If the 42


counts are saved or not dep end on the value of the parameters Operations/Common/SciCountsSave and Operations/Common/TechCountsSave, resp ectively. The counts (detector pulses p er micro-exp osure, usually p er ab out one millisecond) are stored individually for all four MASS channels in a binary count-file which is created with the same base-name as the mass-file (i.e. like YYMMDD.cnt). Its lo cation is the same as that of the mass-file (normally, /out sub directory of Turbina working catalogue). The binary file consists of the records with non-fixed length, since the length of the count series dep ends on the settings in the CFG (BaseTime*1000 and Exposition parameters ratio). Each record has thus the two-numb er descriptor which sp ecifies the reverse-order index of the MASS channel for the following buffer and its length. In order to read this count-file, the separate program cnt2asc is provided with Turbina package. In order to compile it, go to the Turbina source directory and, b eing ro ot, say there: # make utils It is needed to make after Turbina compilation, b ecause the common ob ject mo dules are used. During compilation of cnt2asc, two other utilities atmos, weif are compiled, to o. They serve to restore turbulence profile from mass- and stm- files indep endently of Turbina run, when some parameters of the MASS are needed to change. The reading of the count-file needs the starting address of the first channel buffer to b e known. It is written in hexadecimal form in the mass-file after the @-character (e.g. @1acef240, see mass- and stm- file description) for the base-time originated records. This address has to b e provided, after the count-file name, to the program cnt2asc. The third parameter is the numb er of successive base-time data blo cks to b e read (by default, the single blo ck for each MASS-channel is read). The counts are printed to the standard output as, normally, 4 columns of integer numb ers separated with blanks. The counts from different channels written in one line refer to the same moment of time. The output has to b e redirected to the file for further pro cessing.

43


Chapter 5

Version 2.04 features with respect to 2.03 version
5.1 Changes

To improve functionality of the MASS software, some changes were made during up dating the Version 2.03 to Version 2.04. These changes concern mainly Turbina interaction with Sup erVisor programs and are following -- To provide an externally controlled program exit, a dialog "Save CFG file" at exit was removed. Such a dialog app eared if a background measurement (also saved in turbina.cfg) have b een carried out during observations while no other parameter was changed at all. Thus, the menu item Config/Save CFG has to b e selected now each time when a significant change is intro duced in the configuration via GUI. -- To provide indep endence b etween program start and observation start, critically needed for rob otic observations, device Initialization was excluded from the program start-up sequence. Thus, b efore making any measurement, do not forget to do INITIALIZATION, either manually via GUI menu or with help of SV command INIT, after program start and if a command PARK was given b efore. -- Also, InitialScenario runs each Initialization if the flag ScenarioRun is On, indep endently on a command source (GUI or SV). -- For uniformity, two scenario invoked by SV RUN-commands (see subsection "SVScenario" in turbina.cfg), were renamed: Background into Scenario 1 and Flux into Scenario 2. -- Accordingly, resp ective SV commands RUN BKGR and RUN FLUX were renamed in RUN SCEN1 and RUN SCEN2. -- Overloading of these two scenario was provided with newly intro duced SET SCEN1 and SET SCEN2 commands. -- Since the SV command RUN, RUN SCEN1, RUN SCEN2 initiate a scenario running rather than execution of some sp ecific measurement mo de, they do not return any data, the Turbina current status only.

44


-- Instead, a set of GET commands was extended considerably (see Sec. 2.5) to retrieve the output data of interest. -- Take into account, that reaction of the Turbina program at some SV commands is mo dified due to mentioned changes. Apart of listed ma jor mo difications, a numb er of bugs was fixed as well.

5.2

Further mo difications

Some mo difications, needed for further optimization of MASS software op eration as a comp onent of the MASS + DIMM + Telescop e + Dome + Meteo + ... rob otic system, are foreseen in next Turbina versions. They are not implemented in frame of Version 2.04 b ecause they require a considerable program re-structurization. Short list of such drawbacks, to b e removed in future, is presented b elow. -- In current state, the MASS device must not b e p owered off b etween its parking and initialization, since the communication with the device is installed up on the program startup only. -- Now, the Turbina program op ens output files on its start-up. If Turbina is executed during a few days, output files named by the date of start are app ended with the results of many days. No valid graphics is pro duced in second and further nights. -- Errors with configuration, software and input files, found up on start-up are rep orted in graphic-mo de windows and one-by-one, allowing user to exit the program only. There is no way to see neither all problems together nor their reason while starting Turbina remotely. -- Sometimes, when Turbina is terminated by SV command, one of QT child pro cess don't finish its work. The reason is still uncovered, but this is p otentially dangerous. -- Some of the current state fatal errors (which lead to stopping of the program) can b e handled successfully without observation stop. Also, many errors are not reflected in the output file. The mentioned imp erfections lead to obligatory Turbina restart b efore next night observations.

45