INTRODUCTION

BASIC CONCEPTS

BASIC PRINCIPLES OF WORK

AUXILIARY FILES

DATA FORMATS

1. Format of the previous versions and converter format.

2. Format of a storage of one scan.

3. Format of a storage of group of scans.

TOOLBAR

MENU FUNCTUINS

SOME FUNCTIONS

File=>Set InitDir

Scan=>Modification=>Eq. Null

Scan=>Modification=>Min rel.Csun (Copy rel.Csun)

Scan=>Modification=>Line tail

Scan=>Correction=>Change of amplif

Scan=>Correction=>Wide Gauss

Scan=>Correction=>Center Vscan

Scan=>Correction=>Calibr *

Calc=>Gauss Flux

View=>Scans Group

View=>Set View

Spec.Func

LINKING LIBRARIES

Srtucture SF_INIT

Functuin InitSDllMenu

Function SelectDllFunction

ChoosedScan Utility


INTRODUCTION

Nowadays the interactive systems of data processing are basic for the observers. The increasing of an amount of the treated information hampers the process of interactive processing. It is related with an increasing of the time expenditures on a complete operation cycle, and with the frequent repeating of basic processing operations. The automatic processing cannot completely improve this situation because of impossibility of monitoring of the work results and difficulties of automatic determination of data quality criterion.

In the program Work Scan an attempt to connect virtues of interactive and automatic systems of data processing is made.

The program Work Scan is realized in the C++ language under OS Win32. It is intended for data processing and for graphic representation of an array of one-dimensional arrays (scans). This program is developed in Group of Solar Researches on ÐÀÒÀÍ-600. Therefore some functions of data processing and also some fields of data structures are specific to processing the Solar data.


BASIC CONCEPTS

At creation of the system for data processing a following concepts were included:

•	Presence of the graphic interface;

•	Possibility of a loading of any amount of scans from obtained observations data;

•	Possibility of interactive processing of any scan, any group of scans, all scans from loaded;

•	Possibility of preservation of any work results;

•	Possibility of preservation of outcomes in a well-known format of data storage;

•	Reversibility of operations of processing;

•	Possibility of representation on a screen, getting of the hard copy and output in well-known graphic formats of outcomes of the process of handling;

•	Openness for adding new functions of processing.


BASIC PRINCIPLES OF WORK

The data processing Work Scan program is realized under Win32 environment in the C++ language with a support Drag&Drop for data loading. The storage of data in the program is realized by a two-through passage queue of dynamically created structures. Each structure contains observational data at one frequency (in a common case two data arrays) and the necessary information for their processing. For each data array (DATA) a working array (WORK) with a copy of these data is created . All functions of processing are made with the WORK data arrays (array should be visible, i.e. it is checked in the menu View=>Set View). Before any modification of the DATA array the program shows a warning window with possibility to cancel the operation. Besides the queue, in the program the list of all its data structures is created. During processing, it enables to move not only between adjacent structures (scans) of the queue by pressing the buttons ⇐ and ⇒, but also provides a possibility directly to go to any selected scan from the list by double- click on left mouse button.

The main program window

When working with the Work Scan program it is possible to show any selected scan, its part or selected group of scans in the graphics window. (in a common case "scan" consists of two data sequences, representing means of circular polarization R and L of the radio emission. Each of them, in turn, is represented by two arrays [DATA, WORK]). At the left and right axes a scales for different polarizations will be displayed.

If cursor is in the graphics window, when clicking on left mouse button, in a status bar are shown the following parameters: a number of the data point under cursor, the coordinate of the cursor from the center of the array (if for the Sun (Moon)- relative to its center) in terms of horizontal scale and the vertical coordinate of the cursor in terms of vertical scales.

By moving the horizontal cursor in the graphics window, when pressing the right mouse button, it is possible to select a part of the scan for more detailed representation. When selected, in a status bar the size of the selected part of the scan will be shown.

When processing one scan "the button of a state of operation with group" should be toggled to "One". To operate with a group of scans, or with all scans "the button of a state of operation with group" should be toggled to "All" . Selection of group of scans is made through the View=>Group scan menu function. Repeated choice of the given function cancels a choice of group. All operations with group are being performed with the arrays of identical dimension and identical step between data points. If the loaded data (the scans) have different dimensions of the arrays or have different steps between data points, with the help of the Transform menu functions they can be resulted in identical dimension and step.

Main functions of processing, realized in the program are:

•	Displaying of a scan(s) or it (them) fragment(s) in arbitrary combinations and scales;

•	Correction of various (not fatal) defects of data

•	Convolution with various smoothing filters;

•	Centering a scan by a derivative on edges of the Sun (Moon);

•	Centering scans obtained at a different times and with a different steps between pixels;

•	Calculating of the lower enveloping curve or an average scan from observations data for a few days;

•	Simple mathematical operations with scans (addition and multiplication by a constant);

•	Calculating of series of parameters for local sources (LS) of radio emission of active regions (AR), such as an one-dimensional coordinate, a flux of the radio emission, a size of the source, by using the method of the gauss analysis for the separation of radio sources of AR to components, appropriate separate LS of radio emission.

Any image represented on the screen during processing can be sent to the printer or saved on the disk in a WMF (Windows Metafile) format or black-and-white PS (Post Script) format.


AUXILIARY FILES

When operating, Work Scan uses the following auxiliary files:

sh-fits.cfg, gvi_soho.dat, tab_sun.dat. The data files should be in the same directory with the main program.

sh-fits.cfg - the The file is describing parameters of the beam pattern and antenna. It is an ASCII file, which has the following structure: Frq 	Koeff 	Tqsun 	Theta 	Tann, where

Frq - Frequency in [GHz],

Koeff - The factor for translation of antenna temperatures to radio fluxes,

Tqsun - Brightness temperature of the quiet Sun at the given frequency in [To]

Theta - Half-width of the beam,

Tann - Antenna noise temperature in [K].

gvi_soho.dat - The template file with fields of format of files for a storage the group of scans. It is possible to add here additional fields and to change values of existing fields up to the line beginning with a * symbol .

tab_sun.dat - The ASCII file having the following structure: Wls	Fqsun	Koeff, where

Wls - Wavelength in [sm],

Fqsun - Full flux of the quiet Sun in solar flux units [s.f.u.],

Koeff - Ratio between the vertical size of the beam and the Sun's angular size.


DATA FORMATS

Work Scan supports three data formats. All formats are similar or completely conform to the FITS standard. Two various approaches to the structure of input data are realized:

•	All the data are in one FITS-file (extension - BINARY TABLE).

•	Each scan (in a common case has two polarizations) is stored in the separate file. One can load the file consisting of list of names of input data files.

1. Format of the previous versions and converter format.

2. Format of a storage of one scan.

3. Format of a storage of group of scans.


1.A format of the previous versions and converter format.

It is a format for a storage of one scan in a separate file. It does not conform to the FITS- standard, but is similar by the structure. I.e. it has a FITS-like header followed by data. Work Scan does not output the data in this format. The structure of the file is described below.

SIMPLE  =              F /	FILE DOES NOT CONFORM TO FITS STANDARD

BITPIX  =             16 /	INTEGER WITH '(I2)' FORMAT

NAXIS   =              1 /	NUMBER OF DATA AXES

NAXIS1  =          short /	LENGTH OF DATA AXIS 1

PMCSUN  =          float /	POST MERIDIUM CENTER

DATE-OBS= 'dd/mm/gggg' /

TIME-OBS= 'hh:mm:ss.sss' / UT

OBJECT  = 'Object' /

TELESCOP= 'Telescope' /

ORIGIN  = 'Origin' /

RADIUS  =          short /	OPTICAL SOLAR RADIUS (ARCSECOND)

AZIMUTH =          float /	Azimuth of observ.

ALTITUDE=          float /	Altitude of source

ANGLE   =          float /	Angle of decl.

CDELT1  =          float /	ARCSEC

N_POLAR =              2 /	NUMBER OF POLARIZATIONS [1 or 2]

CALIBR  =              0 /	FLAG OF CALIBRATION [ 0-NO 1-YES ]

FLAG_IV =              1 /	IF 1 => R,L; IF 0 => I,V

COMMENT TQSUN - TEMPERATURE OF A SURFACE OF THE QUIET SUN AGREED WITH THE COMMENT FORM OF THE DIAGRAM OF A ANTENNA AND KOEF. OF TRANSITION TO FLUX END

OBS-FREQ=          float / GHz

THETA-DG=          float / DIMENSION OF DIAGRAMM (ARCSECOND)

TQSUN   =          short / Ta[K]

FLUX_L  =          float / KOEF. Ta[K] -> FLUX[S.F.U.]

END

POLARIZ =              1 / IF 1 - (R or R+L), IF 0- (L or R_L)

BSCALE  =          float /

BZERO   =          float /

END

data set\r\n

POLARIZ =              0 / IF 1 - (R or R+L), IF 0- (L or R_L)

BSCALE  =          float /

BZERO   =          float /

END

data set\r\n

Describing of separate fields:

BITPIX - An allowed values of the field are 16 and 64. If the value of the field is equal 16, record type of data is short (under system Intel x86); if the value of the field is equal 64, record type of data is short (as ASCII, under number is assigned 8 bytes)

PMCSUN - Central point of the array(s) measured in units of data points counted from the beginning of the data array.

N_POLAR - if the value of the field is equal 1, from the input file, first file will be read out only. Second file is optional.


2.A format of a storage of one scan.

The given format conforms to the FITS standard. It is a basic format of the program. The file of the format has the following structure of header:

SIMPLE  =              T  / FILE DOES CONFORM TO FITS STANDARD

BITPIX  =             64  / INTEGER WITH '(I8)' FORMAT

NAXIS   =              2  / NUMBER OF DATA AXES

NAXIS1  =          short  / LENGTH OF DATA AXIS 1

NAXIS2  =              2  / LENGTH OF DATA AXIS 2

PMCSUN  =          float  / POST MERIDIUM CENTER

DATE-OBS= 'gggg/mm/dd'  /

TIME-OBS= 'hh:mm:ss.sss'  / UT

OBJECT  = 'Object'  /

TELESCOP= 'Telescope'  /

ORIGIN  = 'Origin'  /

RADIUS  =          short  / OPTICAL SOLAR RADIUS (ARCSECOND)

AZIMUTH =          float  / Azimuth of observ.

ALTITUDE=          float  / Altitude of source

ANGLE   =          float  / Angle of decl.

CDELT1  =          float  / ARCSEC

POLARSET=              1  / SET1: IF 1 (R or R+L), IF 0 (L or R-L)

CALIBR  =              0  / FLAG OF CALIBRATION [ 0-NO 1-YES ]

FLAG_IV =              1  / IF 1 => R,L; IF 0 => I,V

COMMENT TQSUN - TEMPERATURE OF A SURFACE OF THE QUIET SUN AGREED WITH THE

COMMENT FORM OF THE DIAGRAM OF A ANTENNA AND KOEF. OF TRANSITION TO FLUX

OBS-FREQ=          float  / GHz

THETA-DG=          float  / DIMENSION OF DIAGRAMM (ARCSECOND)

TQSUN   =          short  / Ta[K]

FLUX_L  =          float  / KOEF. Ta[K] -> Intensity[Jy/arc.sec.]

BSCALE1 =          float  /

BZERO1  =          float  /

BSCALE2 =          float  /

BZERO2  =          float  /

END

Describing of separate fields:

BITPIX - An allowed values for the field are 16 and 64. If the value of the field is equal 16 type of data record is short (binary); if the value of the field is equal 64 type of data record is short (ASCII, under number is assigned 8 bytes)

PMCSUN - Central point of array(s) in units of data points counted from a beginning of an array.

POLARSET - The field is describing the polarization of first file.


3.A format of a storage of group of scans.

The format is an extension of the FITS-format (BINARY TABLE). It is for a storage of group of scans in one file. In the given format one can save not only any group of scans, but also any chosen part of scan(s).

The file has the following structure of header:

SIMPLE  =                    T /

BITPIX  =                   16 /

NAXIS   =                    0 /

EXTEND  =                    T /

COMENT This table contains the set (TFIELDS) of 1-dimensional (TFORM#

COMENT and TDIM#) full disk scans of the Sun at microwaves (TTYPE#)

COMENT ........

HISTORY   This FITS file was created by the 'Work Scan' task.

END

XTENSION= 'BINTABLE'           /

BITPIX  =                    8 /

NAXIS   =                    2 /

NAXIS1  =                 long /

NAXIS2  =                    1 /

PCOUNT  =                    0 /

GCOUNT  =                    1 /

TFIELDS =                short /

EXTNAME = 'SELECTED SOLAR RADIO SCANS' /

EXTVER  =                    1 /

DATE    = 'dd/mm/gg'           /

ORIGIN  = 'Origin' /

TELESCOP= 'Telescope' /

INSTRUME= 'Instrument' /

DATE_OBS= 'gggg-mm-ddThh:mm:ss.sss' /

SCI_OBJ = 'SYNOPTIC GROUND BASED DATA FOR SOHO' /

SCI_SPEC= 'MICROWAVE OBSERVATIONS' /

OBJECT  = 'Object' /

AZIMUTH =                float /

ALTITUDE=                float /

CENTRE_X=                float /

XSCALE  =                float /

ANGLE   =                float /

SOLAR_R =                float /

BUNIT   = 'JY/ARCSEC'          /

TFORMi  = 'shortI'               /

TDIMi   = '(shortI)'             /

TTYPEi  = 'FREQUENCY    float GHZ xxx' / xxx - (R or L or R+L or R-L)

TSCALi  =                float /

TZEROi  =                float /

END

CENTRE_X - Central point of array in units of abscissa values (from the beginning of the scan)


TOOLBAR

The toolbar contains the following control elements:

Loading of input data file

Saving of DATA array(s)

Saving of WORK array(s)

Choice of work with a group ("One", "All")

Passage to the previous scan

Displaying of whole scan

Passage to the next scan

Printing the contents of the graphics window

Running the batch command list

In the toolbar are visible active buttons only.


MENU FUNCTIONS

The main menu of the program consists of the following fields:

[ File | Scan | Transform | Calc | View | Spec.Func | Help |	Cancel ]

A complete list of menu functions is described below.

File

Open	Opens the "File Open" dialog box which is set to view files with the .*hd and *.fit extensions. Loading a new data.

Close	Closes the current document. Deletes all data from memory.

Append...	Opens the "File Open" dialog box. The data from the file being opened will be appended to the data loaded before.

Save Data	Automatically saves DATA arrays into the input files (except BINATY TABLE)

Save Wrk	Opens the Save File As... dialog box. You can choose a new name and a destination directory for the file. You can save the WORK arrays in selected format

Wrksh to PIRAT	Transforms and saves the data in a format of the "PIRAT" program

Print...	Prints a contents of the graphics window.

Export...	Opens a dialog box asking for the resolution (width and height in pixels) in saving the current page into a file in WMF or PS format.

Set InitDir	Opens the dialog box for modifying an initial settings of the program.

Run file.exe	Runs the external program.

Scan

Data->Wrksh	Copies the contents of the DATA array into the WORK array.

Wrksh->Data	Copies the contents of the WORK array into the DATA array.

Modification	Popup menu commands

Data—Wrksh	Subtracts WORK from DATA.

Wrksh*N	Multiplies the chosen part of curve (the WORK array) by the given constant N.

Wrksh+N	Adds the constant N to the chosen part of the curve (the WORK array).

Line	Approxes the chosen part of the WORK array by line.

Eq. Null	Substitution of array cells not equal to zero on zero depending on value of a flag

ABS(Wrksh)	Calculates the module from the elements of a chosen part of WORK array.

Derive	Calculates a derivative from the chosen part of the DATA array.

Polarization	Calculates a local degree of polarization (P= V/I * 100 %).

I,V<=>R,L	Transformation of polarizations.

Ta[K]=>Flux	Multiplication of the WORK array by factor of translation Ta to fluxes.

Min rel.Csun	Calculation of a minimum from the elements symmetric relative to center of the WORK array.

Copy rel.Csun	Copying a chosen part of the WORK array relative to center of the array.

Line tail	Subtracts a constant component from the WORK array.

Correction 	Popup menu commands

Ephemeride	Modification of ephemerides of loaded data.

Change of amplif	Automatic correction of the amplification coefficient.

RL Cross-Talk	Correction of parasitic cross-talk signal.

Tail of curve	Substitution of n (first or last) WORK of array cells by the value of n-nth (or N-n-th) array cell.

Overturn	Overturns a chosen part of the curve relative to line connecting its extreme points.

Move L from R	Shift one polarization scan relative other (horizontally) on a given number of data points.

Auto move L R	Automatic shift one polarization scan relative other (horizontally).

Wide Gauss	Approximation of the wide component of the beam by a gaussian function.

Center Vscan	Calculation of the center of the Sun (Moon) by the derivatives at the edges of the object.

Calibr Quite Tb	Calibration of a scan by tabulated values Ta.

Calibr Flux	Calibration of a scan by an integrated flux.

Calibr Bl.body	Calibration of a scan by gauge step.

Smooth 	Popup menu commands

Gauss	Convolves the chosen part of the scan with a Gaussian function. The process can be used for smoothing of the signal

Median	Applies a median filter of the specified width to a chosen part of the WORK array . Median filtering is effective in removing "salt and pepper" noise, (isolated high or low values)..

Cube Spline	Spline approximation of a chosen part of the scan.

Comm.List	Creation of the list of frequently used operations for the batch running.

Delete	Deleting the active scan.

Transform

Move Scan	Shift of the active scan relative to others (the command allowed only in group of scans).

Equal Length	Reduction of all the scans to the equal dimension (minimum) of arrays.

Equal Step	Reduction of all the scans to the equal step between points (minimum) and to the equal dimension of arrays.

Scan sub scan	Subtracts one scan (date) from others (dates).

Center Sun	Calculating of central values of scans and reduction of scans to the equal dimension.

Group scan min	Calculation of a lower enveloping for the group of scans.

Group scan aver	Calculation of an average scan from group of scans.

Calc

Full Flux	Calculation of the full flux of a chosen part of the scan.

Gauss Flux	Gaussian analysis of a chosen part of the WORK array.

Correlation	Evaluation of a coefficient of correlation between chosen parts of different scans.

Sigma	Evaluation AMD of a variance of a chosen part of an array.

Surf3D	Derives a matrix for a representation of a group of scans (Surf, Contour).

View

Digit Frame	Shows/hides axes tick labels.

Choice Scale	Opens a dialog box for specifying the part of scan to be displayed (for processing).

Equal Scale	Equalizes scales for both polarizations.

Choice Path	Opens the window showing a selected part of the scan comparising with the whole scan.

Scans Group	Opens a dialog box for selecting a group of scans.

View Group	Opens a dialog box for setting parameters of representation of a group of scans.

Full scan	Displays the whole scan(s).

Set View	Opens a dialog box to set basic features of the graphics window.

Scan header	Opens a window showing a header of an active scan.

Gauss Param	Opens an edit window with parameters of Gaussian functions (after the gauss analysis).

Del Gauss	Deleting an auxiliary arrays of the gauss-analysis.

Spec.Func	Popup menu functions (is initialized by DLL)

Help

Main help	Call of HELP-file on the program Work Scan

About...

Cancel	Cancels a last function with locking of messages.


SOME FUNCTIONS

File=>Set InitDir

Opens the dialog box for modifying an initial settings of Work Scan program.

A common appearance of the window and description of fields is following.

The path to files with full fluxes and times of their evaluatings is used at calibration of Solar scans by using the Scan=>Correction=>CalibrFlux menu command.

Scan=>Modification=>Eq. Null

If the flag is equal 1, the function all units of a selected site of the array, smaller zero, substitutes on zero. If the flag is equal 0, on zero array cells of large zero are substituted.

Scan=>Modification=>Min rel.Csun (Copy rel.Csun)

Both functions will work with pairs of array elements which are symmetric relative to the central value (field PMCSUN or CENTRE_X in data files).

The function Min rel.Csun replaces the elements of the displayed part of the array by a minimum value obtained by a comparison of these elements with symmetric ones.

The function Copy rel.Csun copies a displayed part of the array into a symmetric part of the array.

Scan=>Modification=>Line tail

The function requests the parameter which has to be equal to one of the following values:

0 - The value of a constant component is being calculated as average for ten first and ten last array cells;

1 - The value of a constant component is being calculated as an average for ten last array cells;

2 - The value of a constant component is being calculated as an average for ten first array cells;

3 - The value of a constant component is being calculated as an average for central ten elements of the displayed part of the scan

Scan=>Correction=>Change of amplif

Function for an automatic correction of an amplification coefficients

After call of the function it is necessary to point by a cursor (by double click of the left mouse button) a point of switching of amplification on the displayed part of the scan.

The function calculates a factor of a modification of an amplification and multiplies by it all the array cells from the right of the indicated point of switching. The evaluation of factor is carried out from the linear approximation of a part of the curve by five points near the point of switching

Scan=>Correction=>Wide Gauss

The function replaces the WORK array by the Gaussian function by calculating its parameters from parts being symmetric relative to the center of the Sun (Moon) and outstanding from it on 1.2 and 1.5 of the radius. It is used for removing a wide component of the signal.

Scan=>Correction=>Center Vscan

Iterative computation of the position of the center of the Sun (Moon) of the active scan. When working with group of scans the function assigns a found value to all scans in the group. The evaluation is carried out from a condition of equality of derivatives on edges of the Sun(Moon) .

Scan=>Correction=>Calibr *

Calibr Quiet Tb After call of function it is necessary to specify by double click on left mouse button the point on the scan with the tabulated value of the temperature.

Calibr Flux The function is hard adhered to a data format (frequencies) of integrated fluxes of the Toyokava Solar Observatory. For its work it is necessary to create in the basic directory [see File=>Set InitDir] subdirectories with names <a year (example 1990)> into which a files with the monthly flux data with the names < a month (3letters) year (2numerals) .eno (example aug92.eno) > should be placed.

Format of flux data files

Number 	flux1	flux2	flux3	flux4

Calibr Bl.body Before running the function it is necessary to display (in a large scale) a part of the scan with a gauge stair . The function requests a value of temperature of a gauge stair.

In the fifth column of the sh-fits.cfg file a correct values of antenna noise temperature should be placed.

Calc=>Gauss Flux

The function approxes a chosen part of the scan by a set of Gaussian functions. At call it opens a dialog box requesting three parameters.

The function is created on the basis of the programs and algorithm developed by Ivanov L.N.

View=>Scans Group

Selecting of the group of the scans for displaying and processing. At the call the function opens the following dialog box.

View=>Set View

Opens a dialog box for specifying of basic settings of the graphics window.

A common appearance of the window and description of fields is following.

	Edit windows - if the first symbol is % the program images default headers of Figure and axes. Contents of edit windows are displayed also as specified by default . Frq List - imaging wave lengths in the list when operate with the group Date List- imaging the dates in the list when operate with group Date Wls - imaging the dates and wavelengths in the list View Scale - shows axes tick labels View list - shows the list when operate with group Color on/off - colour displaying of scans on/off List (in/out) - imaging of the list inside or outside of Figure of scans Center Sun - imaging of a position of an optical center and edges of the Sun (Moon) View wrk-gauss - imaging of a difference between a scan and Gaussian function at the gauss analysis
Show scans

Intensity Data - imaging of the DATA array of the first polarization (R, R + L)

Intensity worksheet - imaging of the WORK array of the first polarization (R, R + L)

Polarization Data - imaging of the DATA array of the second polarization (L, R-L)

Polarization worksheet - imaging of the WORK array of the second polarization (L, R-L)

View < All > Message - displaying a warning messages when operate with group.

Spec.Func

The Popup menu is being initialized at linking of dynamic libraries of functions which are located in the subdirectory STARTUP. The interface of linking of libraries is described in details at the item LINKED LIBRARIES. Currently there is in the subdirectory the smoothfn.dll dynamic library containing functions of account of a nonlinear background noise developed by Shergin V.S. and Eruhimov B.L.


LINKING LIBRARIES

When operate, Work Scan uses the functions from dynamic libraries in subdirectory STARTUP through the elements the Spec.Func menu. User can make own functions for data processing and link them to the program by creating the dynamic linked library and placing it into the subdirectory STARTUP. For the linking of libraries to the program, Work Scan uses a structure SF_INIT and calls of functions: InitSDllMenu, SelectDllFunction.

Structure SF_INIT

struct SF_INIT

{

int Npix;	// total amount of WORK array cells
int nbeg;	// the number of an initial cell of a selected part of the WORK array
int nend;	// the number of the last cell of a selected part of the WORK array
int FlagDialog;	// the flag of initialization of the dialog box (at call of the function it is equal TRUE)
char *Object;	// the pointer to the string containing an object of observation (source name)
char *DateObs;	// the pointer to the string containing date of observation
char *TimeObs;	// the pointer to the string containing time of observation
float Frq;	// frequency of observation
float noise;	// a given level of noise
float xdel;	// a step between points of the WORK array
float *data;	// the address of an initial cell of a chosen part of the WORK array
HWND hWnd;	// the identifier of the main window of the program
int wParam;	// the identifier of a selected menu item of the Spec.Func menu
LPSTR txt;	// the pointer to the text array (at entrance to the function is equal NULL)
char TitleEd[64];	// a string for initialization of title of the edit window (is empty)
};

If at an exit from functions of dynamic library the pointer txt is not equal NULL, the edit window with a title TitleEd and containing the buffer's container is being created. After that the buffer txt is deleted.

Function InitSDllMenu

void InitSDllMenu (HMENU Menu, int Num); - function of initialization of the Spec.Func menu. Is called at Work Scan program start when linking of dynamic library. Has the following parameters: Menu - pointer on the Spec.Func menu, Num - number necessary at creation of menu identifiers.

Example of function:

void InitSDllMenu(HMENU Menu, int Num)

{

 HMENU menu=CreatePopupMenu();

 AppendMenu(menu,MF_STRING|MF_ENABLED,Num+ID_MENU1,"My Func1");

 AppendMenu(menu,MF_STRING|MF_ENABLED,Num+ID_MENU2,"My Func2");

 AppendMenu(Menu,MF_POPUP|MF_ENABLED,(UINT)menu,"MyDllFunc");

}

Values of own identifiers (ID_MENU1 and etc.) owe is in gap from 1 up to 99.

Function SelectDllFunction

void SelectDllFunction (HINSTANCE hInst, struct SF_INIT * MyData); - function of call of function for processing the data corresponding to the selected item of the Spec.Func menu. Has the following parameters: hInst - identifier of the Work Scan module, MyData - pointer on a SF_INIT structure .

Example of function:

void SelectDllFunction(HINSTANCE hInst, struct SF_INIT *MyData)

{

 int Nn,kk;

 float *data;

 Nn=MyData->nend-MyData->nbeg;

 kk=MyData->FlagDialog;

 data=MyData->data;

 if(kk)

  {

   DialogBox(...);

   MyData->FlagDialog=FALSE;

  }

 if(MyData->txt==NULL)

  {

   MyData->txt=new(char[1024]);

   strcpy(MyData->TitleEd,’’My Work’’);

  }

 kk=MyData->wParam;

 switch(kk)

  {

   case ID_MENU1: MyFunc1(data, Nn);break;

   case ID_MENU2: MyFunc2(MyData);break;

  }

}


ChoosedScan Utility

The utility (Choosed Scan) allows to select a series of scans from the set of files with single scans, by any combination of the following features (Source name, Date of observation, Time of observation, Frequency of observation), for a later load them into the program Work Scan.

Common appearance of the window of the program:

The main window of the program consists of three lists (Headers, Temp, Save List)

Headers - The list containing the names of the header files. With selection of the list item an amount of data files contained in the given header file is displayed in a status bar. By double click on left mouse button one can fill the Temp list by data file names contained in the given header file.

Temp - Working list of names of data files selected with the help of functions of the program. At selection of the list item the parameters of the selected file (Source name, frequency, date and time of observation) are displayed in a status bar. By double click by mouse on the selected file it is being copied in the Save List list.

Save List - the list containing names of selected files. An outcome of the program is the header file containing names of files of the given list. By double click of the mouse the selected file can be deleted from the list.

Brief description of functions of the menu items:

File

Open	Loading of files contained in a selected directory.

Close	Deleting all the data from the program.

Save List	Saving the list of selected files.

Work

Clear Tmp	Clearing of contents of the Temp list

Clear Save	Clearing of contents of the Save List list

Tmp->Save	Copying of contents of the Temp list in the Save List list

The functions of sampling of data are carried out with the help of following items of the toolbar: lists List1, List2 and button (Global/Local).

When the button is toggled to Global, the lists List1 and List2 are sampling from all files loaded into the program. When the button is toggled to Local, they sample only from contents of the Temp list.

List1 - Contains the following fields:

All - Fills the Temp list by names of all files loaded into the program.

Frequency - Fills the List2 list by available frequencies

Object - Fills the List2 by available source names

Observ.Date - Fills the List2 by available dates of observations

Observ.Time - Fills the List2 by available times of observations

List2 - At a choice of the list item, it leaves in the Temp list only the names of files satisfying the selected element.