Main Page   Namespace List   Compound List   File List   Namespace Members   Compound Members   File Members  

scind.hxx File Reference

#include <stdio.h>
#include "iocount.h"

Go to the source code of this file.

Namespaces

namespace  sc


Detailed Description

MASS project: TURBINA module file header file for scind.cpp

The module SCIND implements the calculation of stellar scintillation indices observed in a number of apertures (channels). The correction of observed normalized dispersion of the signal involves the background sky level, non-linearity of the detector and the non-Poisson factor (close to 1) which converts the mean of the detector signal into dispersion (the unity for an ideal detector).

As a result, the normal scintillation index is produced which is free from photonic statistics influences and detector imperfections. The differential indices related to the signals covariance of different channels are also computed. The notions of "aperture" and "channel" are identical here. The computed indices can be accessed, read or written to the disk with a number of additional utilities.

This code originates from the program select.c written by V.Kornilov for DASS project. All the functions and constants which deal with scintillation indices are available in the namespace "sc".

Usage:

For the sake of performance and simplicity, the work-arrays which are used for calculations of indices are allocated only once, by the initiation utility sc::init(). Deallocation is devoted to done(). After init(), all the necessary computations are done by sc::compute() a certain number of times, during which the (instant) indices should be saved to disk by sc::writeidx(). If the value of some parameter of sc::init() has changed (or if even nothing has changed), this function may be called again, one does not need to call done() before. The additional space will be reallocated if needed.

The index storages filled by sc::compute() may be accessed with sc::getidx(). The sequential number of a certain index in accessed array may be obtained with sc::ind_seqnum() from the name of an aperture or of the combination of two apertures. Vice versa, the character name of an index which is accessed as i-th in index storage is returned by sc::apername().

After some accumulation of indices (in local index storages), the indices can be averaged by sc::average(). These average indices can already be used for calculations of atmosphere models and parameters (see at::calcint() and atm::calcn2() in the module ATMOS). Also, they may be saved to disk with sc::writeavgidx().

The counter of accumulated indices must be reset by sc::again() before beginning of the next accumulation time and then the cycle of instantaneous index computations with sc::compute() can be restarted. Alternative to sc::again() is sc::init().

After finishing the job, the memory should be cleaned with sc::done().

Note:
In principle, index averaging may be done in any moment providing thus some on-fly smoothing of data in a time-sliding window. It is possible since the index storages work as some circular buffers, i.e. the rows which are not covered in a current assumulation time still contain information from the previous accumulation time. Empty rows of index storages won't be used, since the internal storage which keeps the measurement mode is reset to "mode=unknown" each time sc::init() is called.
Attention:
Internally in the module, the counts are retained related to the original microexposure time, i.e. reflect the real number of pulses accumulated during the time piece. So are the counts saved in "raw moments" file (sc::writemom()). Meanwhile, the results of sc::getmean(), sc::getsig(), sc::getavgflux(), sc::geter2flux() are already converted into the units of microexposure (normally [ms] as assumed in documentation of functions in sc) which was supplied to sc::compute() and saved internally. Also, the fluxes written by sc::writeavgidx() are also scaled to the microexposure.
Author:
N. Shatsky, Sternberg Institute (kolja@sai.msu.ru)
Version:
1.5: Translation in C++

Generated on Wed Jan 16 00:40:06 2002 for MASS Software by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001