g_dat_types.h

Go to the documentation of this file.
00001 /* Gxsm - Gnome X Scanning Microscopy
00002  * universal STM/AFM/SARLS/SPALEED/... controlling and
00003  * data analysis software
00004  * 
00005  * Copyright (C) 1999,2000,2001,2002,2003 Percy Zahl
00006  *
00007  * Authors: Percy Zahl <zahl@users.sf.net>
00008  * additional features: Andreas Klust <klust@users.sf.net>
00009  * WWW Home: http://gxsm.sf.net
00010  *
00011  * This program is free software; you can redistribute it and/or modify
00012  * it under the terms of the GNU General Public License as published by
00013  * the Free Software Foundation; either version 2 of the License, or
00014  * (at your option) any later version.
00015  *
00016  * This program is distributed in the hope that it will be useful,
00017  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  * GNU General Public License for more details.
00020  *
00021  * You should have received a copy of the GNU General Public License
00022  * along with this program; if not, write to the Free Software
00023  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
00024  */
00025 
00026 /* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 8 c-style: "K&R" -*- */
00027 
00028 #ifndef __G_DAT_TYPES_H
00029 #define __G_DAT_TYPES_H
00030 
00031 // "C" headers
00032 #include <cstring>
00033 
00034 // system headers
00035 #include <unistd.h>
00036 
00037 
00038 
00039 
00040 /* historical compatibility Stuff follows... */
00041 
00042 #ifndef BOOL
00043   #define BOOL int
00044 #endif
00045 #ifndef FALSE
00046   #define FALSE 0
00047 #endif
00048 #ifndef TRUE
00049   #define TRUE 1
00050 #endif
00051 
00052 
00053 /******* globale Macros ***********/
00054 
00055 #ifndef Min
00056 #define Min(a,b) (((a)<(b))?((a)):((b)))
00057 #endif
00058 
00059 #ifndef Max
00060 #define Max(a,b) (((a)>(b))?((a)):((b)))
00061 #endif
00062 
00063 #ifndef max
00064 #define max(a,b) Max((a),(b))
00065 #endif
00066 
00067 #ifndef min
00068 #define min(a,b) Min((a),(b))
00069 #endif
00070 
00071 
00072 typedef struct{
00073   short * data;
00074   long LineNum;
00075   long nx;
00076   long ny;
00077   long dx;
00078   long dy;
00079   int View;
00080 } GRARGS;
00081 
00082 /* für d2d Import */
00083 
00084 /*
00085  * Strukturen zur Daten-Kompatibilität mit spa4.exe 
00086  * ==================================================
00087  */
00088 
00089 typedef struct {
00090   double X,Y,X1,X2,Y1,Y2,dx,dy;        /* 0x0000 - 0x0040 */
00091   double Xo,Yo,GateTime,XYdist,CpsHigh;
00092   double CpsLow,Alpha;
00093   double usr1;                         /* 16*8 = 0x0080 */   
00094   unsigned char  CReg1,CReg2,CReg3,CReg4;
00095   unsigned char  CReg5,CReg6,CReg7,CReg8; /* +8 = 0x0088 */
00096   short  Scanmarker,Points;            /* + 4   = 0x008c */
00097   double Energy,Focus1,Current;
00098   double usr2,usr3,usr4;
00099   double focus2,extractor;
00100   double dummy3;                       /* +9*8  = 0x00d4  */
00101   char dummyAA, dummyBB;
00102   char dateofscan[20];
00103   char comment[100];
00104   char __space[100];
00105   /*  double scanfield[SIZE_D1D]; */          /* 0x015e: array[min1d..max1d] of double; ( -2 .. 2002 ) */
00106 } D1D_SPA_DAT;
00107 
00108 typedef struct {
00109   double X,Y,X1,X2,Y1,Y2,dx,dy;          // im prinzip frei
00110   double Xo,Yo,GateTime,XYdist,CpsHigh;  //
00111   double CpsLow,Alpha;                   //
00112   double usr1;                           // IFaktor,IntInt :frei
00113   unsigned char CReg1,CReg2,CReg3,CReg4; // BYTE
00114   unsigned char CReg5,CReg6,CReg7,CReg8; // BYTE
00115   double Energy,Focus1,Current;          // DOUBLE
00116   double usr2,usr3,usr4;                 // TotalInt,IntRadius,PeakBottom :frei
00117   double focus2,extractor;               //
00118   double dum6;                           //
00119   short  Scanmarker,PointsX,PointsY;     // Integer
00120   char   dateofscan[20];                 // String[20]
00121   char   comment[100];                   // String[100]
00122 } D2D_SPA_DAT;
00123 
00124 
00125 /**************************************************************************
00126 * EXPLANATION of SCAN1D and SCAN2D IDENTIFIERS (defined at typedefs.tpu)  *
00127 *                                                                         *
00128 * scanfield[min1d..max1d] : measuring channels for 1-dim. measurements    *
00129 *                           (only for scan1d)                             *
00130 * X,Y                     : current sweep position for SetVolt            *
00131 * X1,Y1 /  X2,Y2          : starting and end point of measurement         *
00132 * dx,dy                   : width of measuring steps                      *
00133 * Xo,Yo                   : zeropoint of measuring                        *
00134 * GateTime                : GateTime for each channel measured            *
00135 * XYdist                  : Length of Scan in VOLT (unit for all values)  *
00136 * CpsHigh                 : maximum scaling border for intensity          *
00137 * CpsLow                  : minimum scaling border for intensity          *
00138 * Alpha                   : angle between scaling direction               *
00139 *                           and direction of x-deflection                 *
00140 * IFaktor                 : scaling faktor for current expansion during   *
00141 *                           HighCScan (not used yet)                      *
00142 * IntInt                  : integral spot intensity measured by           *
00143 *                           CentralIntensity                              *
00144 * scanmarker              : current scan position                         *
00145 * points                  : number of measured channels                   *
00146 * points2                 : yet always equal points (only for scan2d)     *
00147 * energy                  : electron energy of scan                       *
00148 * fokus                   : focus adjust of scan (not expl.used yet)      *
00149 * current                 : primary current of measurement                *
00150 * TotalInt                : total integral spot intensity                 *
00151 *                           (refer to CentralIntensity)                   *
00152 * IntRadius               : integration radius used at CentralIntensity   *
00153 * PeakBottom              : background intensity used at CentralIntensity *
00154 * dateofscan              : date of measurement                           *
00155 * comment                 : free (used length is limited to 70 characters)*
00156 * field2d[0..points]^[0..points] :                                        *
00157 *                           measuring channels for 2-dim. measurements    *
00158 *                           points may run from 1 to max2d                *
00159 *                           (only for scan2d)                             *
00160 **************************************************************************/
00161 
00162 #ifdef NO_BATCH_INCLUDE
00163 
00164 #define OS2HEADERSIZE 9102
00165 #define DUMMYSIZE 960
00166 
00167 #define VoltAnz  256    /* Achtung Änderungen machen File I/O unmöglich */
00168 
00169 typedef struct{
00170   unsigned char  hours;
00171   unsigned char  minutes;
00172   unsigned char  seconds;
00173   unsigned char  hundredths;
00174   unsigned char  day;
00175   unsigned char  month;
00176   unsigned short year;
00177   short          timezone;
00178   unsigned char  weekday;
00179 } DATETIME;
00180 
00181 
00182 typedef enum {TopoGraphic, ConstZ, MultiVolt,Spectroscopy, TimeScanMode, ScanTyp5, ScanTyp6 } SCANMODE;
00183 
00184 typedef enum {STM_1,STM_2,STM_3,STM_4,STM_5,STM_6} INSTRUMENT;
00185 
00186 
00187 typedef enum {DisLine, DisGrey, DisDual, DisMulti} DISPMODE;
00188 
00189 typedef struct _header {
00190   SCANMODE ScMode;        /*  Typ des Scans */
00191   unsigned short   NumOfVolts;    /* Anzahl der gescanten Spannungen, eigtl. Voltanz */
00192   long    nx[VoltAnz];    /*  Anzahl der Meßpunkte einer Zeile */
00193   long    ny[VoltAnz];    /*  Anzahl der Meßzeilen */
00194   long    dx[VoltAnz];    /*  Abstand zweier x - Meßpunkte in DA - Einheiten */
00195   long    dy[VoltAnz];    /*  Abstand zweier y - Meßpunkte */
00196   long    x_Offset[VoltAnz];       /*  Offset in x [DA] */
00197   long    y_Offset[VoltAnz];       /*  Offset in y [DA] */
00198   short   VoltScanStart[VoltAnz];  /*  Anfang und */
00199   short   VoltScanEnd[VoltAnz];    /*    Ende des Spec - Scans */
00200   short   CurVolt[VoltAnz];        /*  Biasspannung  [mV], Voltscan */
00201   short   NumOfTopAve;    /*  Anzahl der AD- Messungen, die gemittelt werden */
00202   short   NumOfSpecAve;   /*  Anzahl der AD- Messungen, die gemittelt werden */
00203   long    HV_MinVolt;     /*  minimale Spannung [mV] des HV - Verstärkers */
00204   long    HV_MaxVolt;     /*  maximale Spannung [mV] des HV - Verstärkers */
00205   long    MinDA;          /*  minimaler DA - Wert; */
00206   long    MaxDA;          /*  maximaler DA - Wert; */
00207   double   DAtoAng_X;     /*  Umrechnung DA -> Angstroem */
00208   double   DAtoAng_Y;     /*  für X, Y, Z */
00209   double   DAtoAng_Z;     /*    */
00210   long    forw_delay;     /* Software forward Delay zwischen zwei Messungen */
00211   long    back_delay;     /* Software backward Delay zwischen zwei Messungen */
00212   double   greyfac;       /*  Skalierung der Grauwerte für Darstellung */
00213   double   linefac;       /*  Skalierung der Linien für Darstellung */
00214   short   Rotation;       /*  Winkel [Grad] des Scans, gegen x */
00215   short   direction;      /*  Scanrichtung : 1 = Vorwärts, -1 = Rückwärts */
00216   INSTRUMENT  Instrument;         /*  STM1 = 0  STM2 = 1 ... */
00217   DATETIME StartTime;     /*  Datum , Uhrzeit, bei Scanstart */
00218   DATETIME EndTime;       /*  Datum , Uhrzeit  bei Scanende */
00219   char    UserName[40];   /*  Name des Benutzers */
00220   char    comment[256];   /*  Kommentar zum Scan */
00221   double   VDriftX;       /*  DriftGeschwindigkeit beim Scan */
00222   double   VDriftY;
00223   short   BackInter;      /*  Intervalle beim autom. zurückziehen */
00224   double   BackTime;      /*  Zeit, die zurückgezogen bleibt */
00225   short   MinAbhebDA;     /*   Referenzstrom beim Zurückziehen */
00226   short   RefSpanDA;      /*  Sollstrom am externen Eingang der Regelung */
00227   unsigned short          Kennung;       /*  Kennung: sinnvolle Werte */
00228   short   GateOutTime;
00229   char    dummy [DUMMYSIZE];      /*    Noch Platz */
00230   double   SpecDAtoVolt;   /*  Umrechnung DA zu RampenVolt */
00231   double   SpecADtoNanAmp; /*    "       AD in Nano- Ampere */
00232   short   NumOfSpecVolts; /*  wieviel Spannungsschritte auf der Rampe */
00233   short   SpecXDist;      /*  Abstand von Spectroskopie Pkt in X */
00234   short   SpecYDist;      /*            "                   In Y */
00235   double   brightfac;     /*  Nulloffset für Graudarstellung    */
00236 } HEADER;
00237 
00238 #endif
00239 
00240 
00241 typedef struct {
00242   int *Daten;
00243   int anz;
00244   int maxlincol;
00245   int yOff;
00246   int astep;
00247 } GRAFARGS;
00248 
00249 #endif
00250 
00251 
00252 

Generated on Sat Apr 1 09:04:25 2006 for GXSM by  doxygen 1.4.6