91 for (i=nhidlbef; i < nr - nhidlaft; i++)
99 for (i= nr - nhidlaft; i<nr;i++)
105 NewnR = nr - nhidlaft - nhidlbef;
137 mx = (
unsigned long)
IDX * (
unsigned long)
IDY;
138 BIL.
DPLOT.
ImatGraf = (
unsigned short *) calloc( mx,
sizeof(
unsigned short));
140 BIL.
DPLOT.
ImatOrig = (
unsigned short *) calloc( mx,
sizeof(
unsigned short));
205 static int x1, y1, x2, y2, dx, dy;
206 static int xp1, xp2, xp3, yp1, yp2, yp3,
p, pol;
241 if((pe->
mouse.
state & Button1Mask) && x1 > 0 && f)
335 sprintf(buff,
"DY=%5u", (
int) BIL.
DPLOT.
COSTY);
408 for(y = ys; y<ye; y++)
427 for(x = xs; x < xe; x++)
482 incry = (sy - ey) / 10;
483 for(j = 1; j < 10; j++)
486 Y = sy - ((int)incry * j);
488 Y1 = sy - ((int)incry * j);
494 incrx = (double)(ex - sx) / 16.0;
495 for(j = 1; j < 16; j++)
497 X = sx + 1 + ((int)incrx * j);
499 X1 = sx + 1 + ((int)incrx * j);
518 int xd, i,k, xinf,xsup;
521 double linterinf, lintersup;
529 sprintf(buf,
"%d", xs);
532 sprintf(buf,
"%d", xc);
535 sprintf(buf,
"%d", xe);
542 linterinf = (double)xinf / (k/2);
543 lintersup = (double)xsup / (k/2);
545 for (i = k/2 - 1 ;i> 0; i--)
547 sprintf(buf,
"%.0lf", xc - ((k/2 - i) * linterinf) );
551 for (i = k/2 + 1 ;i< k - 1; i++)
553 sprintf(buf,
"%.0lf", xc + ((i - k/2) * lintersup) );
566 sprintf(buf,
"%d", xc);
578 unsigned int yd, i,k;
580 unsigned int lintery;
582 lintery = yd / (
sizeof BIL.
VFO.
lblY /
sizeof BIL.
VFO.
lblY[0] - 1);
585 for (i =l;i<= h;i+=lintery)
587 sprintf(buf,
"%u", i);
589 sprintf(buf,
"%u", h);
595 double DB_FindMaxMin(
int idx,
int idy,
unsigned int *mx,
unsigned int *mi,
int bp)
598 int x, y, xi = idx , yi = idy;
603 *mx = 0; *mi = 65535;
605 for(y = 0; y < yi; y++)
607 for(x = 3; x < xi; x++)
635 int D_findmaxmin(
unsigned short plotmat[],
int xinf,
int xsup,
int yinf,
int ysup,
int bp )
640 unsigned int low = 65535;
641 unsigned int high= 0;
643 for(t = yinf; t < ysup; t++)
645 for(j = xinf; j < xsup; j++)
651 if(plotmat[t * xsup + j] < low) low = plotmat[t * xsup + j];
652 if(plotmat[t * xsup + j] > high) high = plotmat[t * xsup + j];
657 if(plotmat[t * xsup + j] < low) low = plotmat[t * xsup + j];
658 if(plotmat[t * xsup + j] > high) high = plotmat[t * xsup + j];
670 int idy,
unsigned long pe[],
double costx,
double costy,
int min,
int max,
671 int ox,
int oy,
int bp)
680 for(j = 0; j < idx; j++)
686 X = (int) (ox + (j * costx));
687 Y = (int) (oy - abs((
int)((double)(plotmat[n * idx + j] - min) / costy)));
688 X1 = (int) (ox + (j + 1) * costx);
689 Y1 = (int) (oy - abs((
int)((double)(plotmat[n * idx + j + 1] - min) / costy)));
694 X = (int) (ox + (j * costx));
695 Y = (int) (oy - abs((
int)((double)(plotmat[n * idx + j] - min) / costy)));
696 X1 = (int) (ox + (j + 1) * costx);
697 Y1 = (int) (oy - abs((
int)((double)(plotmat[n * idx + j + 1] - min) / costy)));
703 if (Y <= (
int) mim->
img_h)
797 int idy,
unsigned long pe[],
double costx,
double costy,
int min,
int max,
798 int ox,
int oy,
int bp,
int hlb,
int hla)
803 for(t = hlb ; t < idy - hla ; t++)
809 for(j = 5; j < idx ; j++)
815 X = (int) (ox + (j * costx));
816 Y = (int) (oy - abs((
int)((double)(plotmat[t * idx + j] - min) / costy)));
818 X1 = (int) (ox + (j + 1) * costx);
819 Y1 = (int) (oy - abs((
int)((double)(plotmat[t * idx + j + 1] - min) / costy)));
822 if ((Y <= (
int)mim->
img_h) & (Y > 0))
829 X = (int) (ox + (j * costx));
830 Y = (int) (oy - abs((
int)((double)(plotmat[t * idx + j] - min) / costy)));
832 X1 = (int) (ox + (j + 1) * costx);
833 Y1 = (int) (oy - abs((
int)((double)(plotmat[t * idx + j + 1] - min) / costy)));
836 if ((Y <= (
int)mim->
img_h) & (Y > 0))
851 for(t = 0 ; t <
IDY ; t++)
853 for(j = 0; j <
IDX; j++)
865 for(t = 0 ; t <
IDY ; t++)
867 for(j = 0; j <
IDX; j++)
884 for(t = 0; t <
IDY; t++)
886 for(j = 0; j <
IDX ; j++)
910 MMessageDialog(
"DAS Inf.",
"CCD Array not allocated or empty",
"OK", NULL);
1142 for(y = 0; y < vp; y++)
1144 for(x = 0; x < hp; x++)
1157 for(x = 0; x < hp; x++)
1159 for(y = 0; y < vp; y++)
1160 write(fd, &mat[y * hp + x], 2);
1170 for(x = 0; x < hp; x++)
1172 for(y = 0; y < vp; y++)
1173 read(fd, &mat[y * hp + x], 2);
1178 void WriteIMG(FILE *file,
unsigned short *mat,
int hp,
int vp)
1184 for(y = 0; y < vp; y++)
1186 for(x = 0; x < hp; x++)
1190 if(y == 0 && x == 0)
1194 fprintf(file,
"\n", NULL);
1196 fprintf(file,
"%5u ", mat[y * hp + x]);
1201 fprintf(file,
"\n", NULL);
1206 void ReadIMG(FILE *file,
unsigned short *mat,
int hp,
int vp)
1212 for(y = 0; y < vp; y++)
1214 for(x = 0; x < hp; x++)
1216 fscanf(file,
"%5u ", &mat[y * hp + x]);
1229 for(y = 0; y < vp; y++)
1231 for(x = 0; x < hp; x++)
1289 for(c = 0; c < 256; c++)
1296 for(c = 0; c < 256; c++)
1466 for (i=0; i < n ; i++)
1478 char str[64], buf[16];
1510 sprintf(str,
"%d",
wl[
GRS.
Wl]);
1554 sprintf(str,
"%.3lf",
TExp);
1561 sprintf(str,
"%d",
N_AVG);
1563 sprintf(str,
"%d",
N_RM);
1566 sprintf(str,
"%d",
"1");
1573 sprintf(str,
"%u", (
unsigned int)DIL.
Img.
Mat[Server].
Low);
1576 sprintf(str,
"%d", DC_CCD.
dx);
1579 sprintf(str,
"%d", DC_CCD.
dy);
1644 sprintf(buf,
"r. %3d", i+1);
1664 unsigned char str[128];
1679 sprintf(str,
"%.2lf", BIL.
SPH.
sza);
1682 sprintf(str,
"%.2lf", (
float)BIL.
SPH.
dummy1/100);
1685 sprintf(str,
"%.2lf", (
float)BIL.
SPH.
dummy2/100);
1801 unsigned long info = 0;
1882 unsigned char str[128], temp[12], buf[64];
1883 unsigned char ribuf[255];
1884 int NewnR = 0, l = 0 ;
1942 ribuf[i] = (
unsigned char)ch;
1979 void SwapMatrix(
unsigned short *source,
unsigned short *dest,
int hp,
int vp)
1984 for(t = 0 ; t < vp ; t++)
1986 for(j = 0; j < hp; j++)
1988 dest[t * hp + j] = source[t * hp + j];
1998 unsigned short *mat;
1999 mx = (
unsigned long) hp * (
unsigned long) vp;
2000 mat = (
unsigned short *) calloc( mx,
sizeof(
unsigned short));
2014 mx = (
unsigned long) hp * (
unsigned long) vp;
2015 mat = (
float *) calloc( mx,
sizeof(
float));
2029 mx = (
unsigned long) hp * (
unsigned long) vp;
2030 mat = (
long *) calloc( mx,
sizeof(
long));
2080 fn = open(nomefile, O_RDONLY |
O_BINARY, S_IREAD );
2081 if(fn < 0)
return(-1);
2084 fd = fopen(nomefile,
"r");
2085 if(fd < 0)
return 1;
2091 sprintf(buf,
"PLOTTING File: %s", nomefile);
2175 MMessageDialog(
"DAS PLOT Inf.",
"Unable to allocate memory ...",
"OK", NULL);
2220 DI_ImageProperties(
Server, (
U16)
IDX, (
U16)
IDY, (
U16)IDX, (
U16)IDY, 0, 0, NULL, 1, 100 / IDY, 0);
2245 er = fseek(nf, position, SEEK_SET);
2248 er =
MMessageDialog(
"DAS information",
"Already at the beginning Of File.\n Please use the 'Next' Button ?" ,
"OK", NULL);
2267 er = lseek(nf, position, SEEK_SET);
2270 er =
MMessageDialog(
"DAS information",
"Already at the beginning Of File.\n Please use the 'Next' Button ?" ,
"OK", NULL);
2300 for (i =
ContFP; i>0; i--)
2313 er =
MMessageDialog(
"DAS information",
"End Of File reached.\n Do you want to close the file ?" ,
"Yes",
"No", NULL);
2348 DI_ImageProperties(
Server, (
U16)
IDX, (
U16)
IDY, (
U16)IDX, (
U16)IDY, 0, 0, NULL, 1, 100 / IDY, 0);
2380 for (i =
ContFP; i>0; i--)
2392 er =
MMessageDialog(
"DAS information",
"End Of File reached.\n Do you want to close the file ?" ,
"Yes",
"No", NULL);
2424 DI_ImageProperties(
Server, (
U16)
IDX, (
U16)
IDY, (
U16)IDX, (
U16)IDY, 0, 0, NULL, 1, 100 / IDY, 0);
2712 fs = fopen(fname,
"r");
2774 int c = (int) a_data, er =0;
2777 char fname[128], dirname[128];
2782 memset (&fbp, 0,
sizeof (fbp));
2799 sprintf(buff,
"1234");
2800 er =
MFileBrowseExt (
"Select Io File",
"*.*", fname, dirname, &fbp);
3076 fs = fopen(buff,
"w");
3077 if(fs < 0)
return 1;
3083 for(y = 0; y <
IDY; y++)
3085 for(x = 0; x <
IDX; x++)
3089 if(y == 0 && x == 0)
3093 fprintf(fs,
"\n", NULL);
3099 fprintf(fs,
"\n", NULL);
3129 char buf[MAX_PATH],str[MAX_PATH];
3133 sprintf(filedatan,
"Io_%d.ref",BIL.
SPH.
wavelen);
3135 sprintf(buf,
"\\%s\\%s\\%s",
"DOAS",
"Io",filedatan);
3139 sprintf(buf,
"Do you want to save the Io file as:\n%s ?", str);
3140 er =
MMessageDialog(
"DAS information", buf,
"Yes",
"No",
"Cancel",NULL);
3167 fs = fopen(buff,
"a");
3168 if(fs < 0)
return 1;
3174 sprintf(str,
" Line # %d, saved on file %s .",
IDY/2, buff);
3181 int c = (int) a_data, er = 0;
3211 int c = (int) a_data, er =0;
3214 char fname[128], dirname[128];
3219 memset (&fbp, 0,
sizeof (fbp));
3236 sprintf(buff,
"1234");
3238 er =
MFileBrowseExt (
"Select File for Plotting",
"*.bif", fname, dirname, &fbp);
3240 er =
MFileBrowseExt (
"Select File for Plotting",
"*.dat", fname, dirname, &fbp);
3245 strncpy(buff, fname+l-4, 4);
3246 if( (strcmp(buff,
".dat") == 0) |(strcmp(buff,
".Dat") == 0) )
3248 else if( (strcmp(buff,
".bif") == 0) | (strcmp(buff,
".Bif") == 0) )
3250 else if( (strcmp(buff,
".bhg") == 0) | (strcmp(buff,
".Bhg") == 0) )
3254 MMessageDialog(
"DAS information",
"Unsupported format!!",
" Ok ", NULL);
3323 int c = (int) ad, er = 0;
3324 unsigned int *KDAT = 0;
3335 NFileNameF[0]=
'\0';
3336 memset (&fbp, 0,
sizeof (fbp));
3353 if(strcmp(buff,
"Open")== 0)
3364 strncpy(buff, fname+l-4, 4);
3366 if( (strcmp(buff,
".dat") == 0) |(strcmp(buff,
".Dat") == 0) )
3368 else if( (strcmp(buff,
".bif") == 0) | (strcmp(buff,
".Bif") == 0) )
3370 else if( (strcmp(buff,
".bhg") == 0) | (strcmp(buff,
".Bhg") == 0) )
3374 MMessageDialog(
"DAS information",
"Unsupported format!!",
" Ok ", NULL);
3388 er =
MMessageDialog(
"DAS Information",
"You can NOT save this spectrum with the Automatic File names mode.\nTo set the FREE FILE's NAME, please open DAS CONFIG-->\nOptions Tab-->Page1-->Saving File Names = FREE\n\nDO you want to Open the Config Panel? ",
"Yes",
"No", NULL);
3407 if( strcmp(fext,
"") == 0 )
3410 strcat(NFileNameF,
".bif");
3412 strcat(NFileNameF,
".dat");
3416 if( (strcmp(fext,
".dat") == 0) | (strcmp(fext,
".Dat") == 0) )
3422 er =
MMessageDialog(
"DAS Information",
"The selected file already exists\nDo you want to ",
"Overwrite",
"Append",
"Cancel", NULL);
3429 er =
MMessageDialog(
"DAS Information",
"In wich format do you want to save this file? ",
"DAS Format",
"Column Format" , NULL);
3441 er =
MMessageDialog(
"DAS Information",
"In wich format do you want to save this file? ",
"DAS Format",
"Column Format" , NULL);
3451 else if( (strcmp(fext,
".bif") == 0) | (strcmp(fext,
".Bif") == 0) )
3457 er =
MMessageDialog(
"DAS Information",
"The selected file already exists\nDo you want to ",
"Overwrite",
"Append",
"Cancel", NULL);
3474 sprintf(buff,
"The extension is not recognaized! Please re-type",fext);
3549 int c = (int) a_data;
3600 if(strcmp(buf,
"Empty")==0)
3602 if(
MInputPrompt(
"Set File Name",
"Type the new file name (with or without extension!)", buf, 31,
"Exec",
"Cancel"))
3604 if(strcmp(buf,
"Empty") != 0)
3607 MMessageDialog(
"DAS information",
"Now you can save the spectrum.",
" Ok ", NULL);
3623 if( strcmp(fext,
"") == 0 )
3632 if( (strcmp(fext,
".dat") == 0) | (strcmp(fext,
".Dat") == 0) | (strcmp(fext,
".DAT") == 0) )
3640 else if( (strcmp(fext,
".bif") == 0) | (strcmp(fext,
".Bif") == 0)| (strcmp(fext,
".BIF") == 0) )
3650 sprintf(buf,
"The extension is not recognaized ",fext);
3694 if(strcmp(buf,
"Save As")== 0)
4082 sprintf(buff,
"r. %d", i+1);
4098 for (i=0; i < 16; i++)
4100 sprintf(buff,
"r. %d", i+1);
4623 sprintf(buff,
"Full Range");
4625 sprintf(buff,
"Min/Max");
4760 for (i=0; i<17; i++)
void MObjectSetColor(MOBJECT obj, MTColor bgc, MTColor fgc)
void MMenuItemSetText(MENU_ITEM item, const char *text)
int ReadHeader_ASCII(int mod, FILE *fd)
Read ASCII Header of the measurement. .
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
void WriteIMG(FILE *file, unsigned short *mat, int hp, int vp)
int WriteEquipini(void)
Write equipment.ini file .
int IDX
Number of sensible horizontal pixels.
void CloseFile_BIN(int fd, int hp, int vp)
short DB_FG_Plbl[3]
Foreground PASSIVE Label Colors.
void SwapMatrix(unsigned short *source, unsigned short *dest, int hp, int vp)
Copy the source matrix in the Destination one .
optionini DOption
Options for DAS execution.
void MMenuBarSetAcc(MOBJECT menu, int acc)
int savingmode
Flag to set saving mode: 0=ASCII, 1=Binary.
void MDrawXorLine(MOBJECT p, int x1, int y1, int x2, int y2)
double alititude
Station altitude.
void MObjectSetShadow(MOBJECT obj, int type, int in, int out)
const char * Mir_Code[]
const char array for the realisation of the Mirrors buttons in the Mirror shell
void MenuFileOLP_CB(MOBJECT o, void *id, void *a_data)
MTColor GPAL[MAXIMG][256]
MTColor BPAL[MAXIMG][256]
int ViewPre(FILE *nf, long position)
void MObjectSetUnsensitive(MOBJECT obj)
void DrawXLine(MIMAGE img, int yfix, int xs, int xe, int r, int g, int b)
void MDrawLine(MOBJECT p, int x1, int y1, int x2, int y2, MTColor col)
C_DEF void DI_Regen(int s)
int MObjectGetX(MOBJECT obj)
int ContFP
Counter for File position.
void PBYScale_CB(MOBJECT p, void *od, void *ad)
int Wl
Flag for the units on the X scale plot.
C_DEF double DI_ScanMaxMin(int w, float *mx, float *mi)
int ViewPre_BIN(int nf, long position)
float * AllocFloatMat(int hp, int vp)
das structure (contain all the previous structures) .
MOBJECT MDCreateDASConfig(void)
DAS Config shell. Procedure that build the shell for the DAS Config panels. The DAS Config allow for ...
U32 CCDType
(R/W) Used CCD CCD code definitions
void ReadIMG_BIN(int fd, unsigned short *mat, int hp, int vp)
read the BINARY stored spectrum
void(* MENU_ITEM_CB)(MENU_ITEM item, MVALUE status, void *ad)
int MObjectGetHeight(MOBJECT obj)
void ReadIMG_old(FILE *file, int hp, int vp)
NOT Used .
MOBJECT MCreateLabel(MOBJECT parent, const char *text, MTFont font)
MENU_ITEM MMenuAddItem(MOBJECT pd, const char *item, MENU_ITEM_CB cb, void *ad)
Control Panel and push buttons colors .
double latitude
Station latitude.
unsigned short * AllocUSMat(int hp, int vp)
void MObjectSetResize(MOBJECT obj, int resize_w, int resize_h)
const char * MMenuItemGetText(MENU_ITEM item)
#define DOASMODE
execution for DOAS Processing
double DB_FindMaxMin(int idx, int idy, unsigned int *mx, unsigned int *mi, int bp)
CTYPE void DLL DC_RWData(int LibraryVariable, int rw, void *data, int Camera)
Procedure that allows read/write operation on a variable used into the library.
int FilterData(unsigned short *mat, int horpix, int verpix, int filw, int bp)
int Pos
Mirror Current Position.
flag Flag
Structure for different flags.
int MD_CreateBRowShell(int nrows)
Create windows of buttons. During the plotting of the measurements, create a shell of buttons if the ...
char HOMEDIRECTORY[_MAX_PATH]
int filtertype
type of installed filter module: 0=Simple-SM3, 1=Double-SM3+SM4, 2=simpleplus-SM3+TM) ...
short DB_BG_Albl[3]
Background ACTIVE Label Colors.
#define DBDEMO
execution in demo mode
void MObjectAlign(MOBJECT obj, int h_align, int v_align)
void InitImage(MIMAGE img, int xd, int yd, int rb, int gb, int bb)
int SaveImage(int fmt, int imgw, int imgh, int np)
void ActEditCB(MOBJECT edit, char *text, void *ed)
Text Application callback Apply to the variables the text typed in various text box and validated by ...
MOBJECT MCreateSubMenu(MENU_ITEM item)
#define READ_DATA
Read data.
void PoslblY(unsigned int l, unsigned int h)
void MTableFormSetColAlign(MOBJECT form, int col, int al)
char DATADIRECTORY[_MAX_PATH]
void PlotToolsPBs(MOBJECT o, void *id, void *a_data)
char * MObjectGetText(MOBJECT obj, char *text)
MTColor MObjectBackgroundColor(MOBJECT obj)
spectrumheader SPH
Spectrum Header Structure.
MOBJECT MCreateClippedEdit(MOBJECT parent, const char *text, int len, int clip_len, MTFont font)
MENU_ITEM MMenuAddRadioItem(MOBJECT pd, const char *item, MENU_ITEM_CB cb, void *ad)
char * Fil_Code8H[]
const char array for the realisation of the Filters buttons in the Filter shell
#define PTF_INFO
R/W ptf internal library structure.
int DrawAreaPlotCB(MOBJECT obj, MEvent *pexp, void *a_data)
void DB_AreaInput(MOBJECT obj, MEvent *pe, void *a_data)
void MShellUnrealize(MOBJECT obj)
void DB_Save(char *tit, int mod)
Save the acquired spectrum. Procedure that Save the acquired spectrum.
int PrintObject(MOBJECT obj, int mode, int x, int y)
long REL_FILE_POS[51]
relative File position
void MObjectSetText(MOBJECT obj, const char *text)
void MenuToolsOLP_CB(MOBJECT o, void *id, void *a_data)
int Pos
Filter Wheel current Position.
void ImatInImatGraf(void)
void WriteIMG_BIN(int fd, unsigned short *mat, int hp, int vp)
MENU_ITEM MMenuAddItemObsolete(MOBJECT pd, const char *item, MGUI_CB cb, void *ad)
d_geo DGeo
struct for Station location
int MObjectGetWidth(MOBJECT obj)
void MShellDestroy(MOBJECT obj)
int MRButtonGetActivationStatus(MOBJECT o)
MOBJECT MObjectShell(MOBJECT obj)
void ClosePlotCB(MOBJECT p, void *od, void *ad)
#define LIS_
Lampedusa Island Spectrometer - ENEA.
short unsigned U16
2 byte without sign, range 0-65535
MOBJECT MCreateTableForm(MOBJECT parent, int n_cols)
unsigned int button
button pressed/released (Button1, Button2 or Button3), 0 if no button involved
void D_pbr_CB(MOBJECT p, void *od, void *ad)
int exec
= 0 -> PRG Execution Paused; = 1 -> PRG Execution Resumed
void WriteSelColandSmoothed(int mod, FILE *fd, int selcol)
write selected Column
int Wl
Grating Wavelength.
#define CCD_INFO
R/W ccd internal library structure.
#define TROPOGAS
TROPOspheric Gas Analyzer Spectrometer.
File Browser Preferences. Used by the Utility functions MFileBowserExt() and MDirBowserExt().
void LoadIo(int mod, char *fname)
long AbsFilePos
Absolute File position.
int hlinebefore
Number of HiddenLines before the central line in Plot.
char * Fil_CodeNG[]
const char array for the realisation of the Filters buttons in the Filter shell for GASCODNG2 and NG3...
char s_name[4]
Station name.
unsigned int data[576]
Conversion data buffer 64 samples * 8 channels * 2 bytes.
MOBJECT MCreatePButton(MOBJECT parent, const char *text, MTFont font)
float CCDTemp
Actual CCD Temperature.
void D_PButt_CB(MOBJECT p, void *od, void *ad)
void D_DoLens(MIMAGE lensmim, MOBJECT lensdraw, int lenswx, int lenswy, int lenspix, int sx, int sy)
int avgmode
Flag to set Averaging mode: 0 = Repeat measurements for fixed number, 1 = Repeat measurements for fix...
#define OFFLINEPLOT
execution for archived data visualisation
#define GASCODNG2
GASCODNG 2 (with ATX power supply & HiresIV)
void DB_FilterCB(MOBJECT p, void *od, void *ad)
Filter positioning callback.
void MPopupMenu(MOBJECT pm, int x, int y)
unsigned short * ImatOrig
int HeaderInPlot(void)
Shows the measurements parameters .
void AssZeroMat(int hp, int vp)
unsigned int * mattempbuff
void MImageSetPixelRGB(MIMAGE pmi, int x, int y, int r, int g, int b)
int VBin
CCD Vertical Binning.
char IoFileNeme[_MAX_PATH]
File name for Reference spectrum (Io)
void MEditSetActCallback(MOBJECT edit, OBJ_STRING_CB cb, void *data)
void DB_EqTypePlotCB(MOBJECT o, void *a, void *v)
void PopUp_CB(MOBJECT obj, void *item, void *data)
void PButtSelAll_CB(MOBJECT p, void *od, void *ad)
unsigned short * DeallocUSMat(unsigned short *mat)
double lambda[1055]
Wavelength series.
char CONFIGDIREQUIPMENT[_MAX_PATH]
const char * MGetCurrentDirectory(void)
void delay(unsigned long d)
Pauses for a specified number of milliseconds. .
void PoslblX(MOBJECT lbl, int xs, int xe, int xc)
void ValidateCB(MOBJECT edit, EDIT_VAL *ev, void *ii)
Text Validation callback Validation callback for the text typed in different text box...
void MLabelSetMargin(MOBJECT p, int wm, int hm)
short DB_FG_Albl[3]
Foreground ACTIVE Label Colors.
void MEditSetValCallback(MOBJECT edit, EDIT_VAL_CB cb, void *data)
void MRButtonActivate(MOBJECT o)
char DBFILENAME[_MAX_PATH]
void MMenuItemSetSensitive(MENU_ITEM item)
void MFreeImage(MIMAGE data)
#define GASCODNG3
GASCODNG 3 (with ATX power supply & HiresIV)
void D_PlotAxis(MOBJECT ob, MIMAGE mim, int sx, int sy, int ex, int ey, MTColor col)
long * AllocLongMat(int hp, int vp)
void CloseFile(FILE *fd, int hp, int vp)
int plotYRange
0 –> full range; 1 –> min/max
MOBJECT MCreateDrawArea(MOBJECT parent, int width, int height)
void LogRatioSpectrum(void)
MOBJECT MDCreateFM_Shell(int mod, int fmt)
MOBJECT MCreateColForm(MOBJECT parent)
int MFileBrowseExt(const char *t, const char *ext, char *fname, char *dname, FB_PREFS *prefs)
void MObjectAddEventNotifyCallback(MOBJECT obj, OBJ_EVENT_CB cb, CARD32 event_mask, void *a_data)
void MObjectRedraw(MOBJECT obj)
short DB_BG_Plbl[3]
Background PASSIVE Label Colors.
void DB_DisplayCB(MOBJECT p, void *od, void *ad)
int IDY
Number of sensible vertical pixels.
int Pix2Wl(int mod, int pos, int spix, int epix, struct doas *pd)
#define GASCODNG1
GASCODNG 1 (with ATX power supply & HiresIV)
void MDrawAreaSetExposeCallback(MOBJECT obj, OBJ_EVENT_CB cb, void *ad)
void DestroyArrayObj(MOBJECT obj[], int n)
void MShellRealizeXY(MOBJECT obj, int x, int y)
#define GASCODNG4
GASCODNG 4.
char * Fil_CodeNG1[]
const char array for the realisation of the Filters buttons in the Filter shell for GASCODNG1 instrum...
void MDrawAreaSetInputCallback(MOBJECT obj, OBJ_EVENT_CB cb, void *ad)
const char * bg_image_file
int FFTFilter
Fast Fourier Trasform Filter windows.
MOBJECT MCreateShell(const char *title, int flags)
int hlineafter
Number of HiddenLines after the central line in Plot.
int MMessageDialog(const char *t, const char *msg, const char *btn1, const char *btn2,...)
void D_PlotOneLine(int n, int sel, MOBJECT obj, MOBJECT pb[], MIMAGE mim, unsigned short plotmat[], int idx, int idy, unsigned long pe[], double costx, double costy, int min, int max, int ox, int oy, int bp)
void DB_SpikesCB(MOBJECT p, void *od, void *ad)
void MMenuItemSetUnsensitive(MENU_ITEM item)
int BuildLogRatio(void)
first attempt to apply the DOAS algorithm (..on going!!!)
void ReadIMG(FILE *file, unsigned short *mat, int hp, int vp)
Read ASCII Image (Spectral Data only) .
#define SPATRAM3
SPATRAM3.
short DB_BG[3]
Default Background Color.
unsigned short * ImatGraf
double TExp
CCD Exposure time.
MOBJECT MCreateRButton(MOBJECT parent, const char *text, MTFont font)
void MShellRaise(MOBJECT obj)
void MDrawXorBox(MOBJECT p, int x, int y, int w, int h)
void MObjectUnmap(MOBJECT obj)
int ViewPlot(int mod)
Create the plot shell. Procedure that build the plot shell for the data visualization.
void DrawImg(MIMAGE img, int a, int c, int x, int y)
char * Fil_Code[]
const char array for the realisation of the Filters buttons in the Filter shell
unsigned short * IoMat
Reference spectrum.
void ImatGrafInImat(void)
void D_AssignLabelPlot(void)
void MTableFormSetRowAlign(MOBJECT form, int row, int al)
int MObjectGetY(MOBJECT obj)
int LoadDB_DispCoeff(void)
Load dispersion parameters. Procedure that load the dispersion parameters from file {homedir}/DOAS/Di...
void DB_XUnitsCB(MOBJECT o, void *id, void *a_data)
void MLabelSetAlignment(MOBJECT p, int align)
int wl[]
WaveLength definition - for SD_Grating.
CTYPE int DLL DC_OpenPar(int Platform, int Sensor, int Camera)
Procedure that initializes dcl internal data structure. Procedure that initializes the DC_HP and DC_C...
int MGetScreenWidth(void)
int D_findmaxmin(unsigned short plotmat[], int xinf, int xsup, int yinf, int ysup, int bp)
Bortul Image Library Structure .
void PlotSpectrum(MOBJECT obj, MOBJECT pb[], MIMAGE mim, unsigned short plotmat[], int idx, int idy, unsigned long pe[], double costx, double costy, int min, int max, int ox, int oy, int bp, int hlb, int hla)
void MFormSetSpacing(MOBJECT p, int offset)
double longitude
Station longitude.
void MPButtonSetCallback(MOBJECT button, MGUI_CB cb, void *data)
int measmode
measuring mode: 0 = Single; 1 = Averaged
int MMenuItemSetCheckStatus(MENU_ITEM item, int TrueFalse)
void PopupMenuCB(MOBJECT obj, MEvent *pe, void *pdown)
void MObjectSetCompositeWidth(MOBJECT obj, int w)
char WORKDIRECTORY[_MAX_PATH]
int DB_InitDil(void)
Initialize DIL. Procedure that initialize the DTA Imaging library.
int ReadHeader_BIN(int fd)
read the BINARY header of the stored spectrum
void MShellSetTitle(MOBJECT obj, const char *title)
int Visualizza(int mod, char *nomefile)
short DB_UnSel[3]
Unselected Buttons Colors.
MTColor iPAL[MAXIMG][256]
void MakeItemUnsensitiveCB(MOBJECT obj, void *item, void *udata)
void CalcSpectrumLimits(int mod, int pos, int spix, int epix, int refpix)
MTColor RPAL[MAXIMG][256]
C_DEF int DI_ImageProperties(int srv, U16 dx, U16 dy, U16 wx, U16 wy, U16 ifmt, U16 sts, char *tit, int pix, int pixy, int mode)
C_DEF void DI_FindExtName(char *fullname, char *fext)
void MObjectSetFont(MOBJECT obj, MTFont font, int resize)
CTYPE int DLL DC_LoadCameraConfig(const char *PathName, config *CameraConfig)
Load camera configuration from a specified file.
unsigned int state
buttons and key modifiers mask
void DrawButtons(int nhidlbef, int nhidlaft, int nr)
void MButtonSetOnMouseOverForegroundRGB(MOBJECT button, int r, int g, int b)
char * Fil_CodeTropo[]
const char array for the realisation of the Filters buttons in the Filter shell for TROPOGAS instrume...
void MObjectMap(MOBJECT obj)
MOBJECT MCreateMenuBar(MOBJECT parent, MTFont font)
char * NDFil_Code[]
const char array for the realisation of the Filters buttons in the ND Filter shell ...
int filename
Flag to set file name mode 0=Free choice, 1 = Automatic.
int EqType
Spectrometer Type.
int N_RM
Number of measurements for Averaging mode in fixed exposure time mode.
void D_AssignOrigin(MOBJECT obj)
void D_SunCalc(void)
Sun Calculator Callback.
char CONFIGDIRCOMMON[_MAX_PATH]
int MInputPrompt(const char *t, const char *msg, char *text, int len, const char *ok_btn, const char *canc_btn)
void D_PlotGrid(MOBJECT ob, MIMAGE mim, int sx, int sy, int ex, int ey)
void MFreeColor(MTColor col)
MIMAGE MAllocImage(int img_w, int img_h, int nplanes)
void MObjectSetTransparency(MOBJECT obj, CARD8 level)
float * DeallocFloatMat(float *mat)
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
int BlindPix
Number of blind pixels (usefull for Dark Current)
int N_AVG
Number of measurements for Averaging mode in fixed number of meas. mode.
U32 Platform
(R/W) Platform code Camera platform definitions
void DrawYLine(MIMAGE img, int xfix, int ys, int ye, int r, int g, int b)
C_DEF int DI_FileExist(char *tit)
void MObjectSetSensitive(MOBJECT obj)
int DispBlindPix
Display Blind Pix: 0 = NO, 1 = Yes.
void MObjectDestroy(MOBJECT obj)
MOBJECT MCreateRowForm(MOBJECT parent)
int x
pointer x, y coordinates in event window
int DB_Column(char *sourcefilename)
Column format.
MOBJECT MCreatePopupMenu(MTFont font)
int exemode
Set the Execution MODE (Execution modes)
FilterWheelSt FWS
Filter Wheel.
MOBJECT MCreateMenu(MOBJECT menu, const char *text)
int x_root
coordinates relative to root
int SaveSpectrum(char *buff)
unsigned int Y2Counts(int y)
void MakeItemSensitiveCB(MOBJECT obj, void *item, void *udata)
void D_Print_BIL_H_ASCII(int mod, FILE *fff)
marconi Marconi
CCD Sensor struct.
const char * Mir_CodeTropo[]
const char array for the realisation of the Mirrors buttons in the Mirror shell for TROPOGAS ...
paramini Paramini
structure for the parameters defined in param.ini configuration file
int RemoveSpikes(int mod, unsigned short *mat, int horpix, int verpix, int blindpix)
Removes Spikes on a measure.