157 MMessageDialog(
"DAS information",
"The procedure is not yet implemented!!",
" Ok ", NULL);
177 MMessageDialog(
"DAS information",
"The procedure is not yet implemented!!",
" Ok ", NULL);
182 MMessageDialog(
"DAS information",
"The procedure is not yet implemented!!",
" Ok ", NULL);
306 char com[255], str[255], buf[4];
308 char fname[128], dirname[128];
337 sprintf(str,
"*.%s", buf);
340 if(
MDirBrowseExt(
"Select Directory for Listing Files", str, dirname, &prefs))
342 sprintf(com,
"dir %s", dirname);
349 sprintf(str,
"*.%s ", buf);
368 sprintf(str,
"/o:n ");
371 sprintf(str,
"/o:d ");
374 sprintf(str,
"/o:s ");
377 sprintf(str,
"/o:e ");
394 if(
MFileBrowseExt(
"Type Name for the list",
"*.ele", fname, dirname, &prefs))
397 sprintf(str,
"> %s%s", dirname, fname);
412 er = WinExec(str, SW_SHOW);
626 MMessageDialog(
"DAS information",
"The procedure is not yet implemented!!",
" Ok ", NULL);
644 lbl =
MCreateLabel(rowfrm,
"This tool allows for fixing the step\nof an inhomogeneous spectral series\nby using the interpolation procedure\nover the specified\n known points and of the desired order.",
HELV_SMALL);
807 MMessageDialog(
"DAS information",
"The procedure is not yet implemented!!",
" Ok ", NULL);
1025 lbl =
MCreateLabel(rowfrm,
"PUSH the 'Execute' Button\n and\n select the file to put in column format",
HELV_SMALL);
1124 unsigned long info = 0;
1129 fd = fopen(filed,
"a");
1130 if(fd < 0)
return 1;
1133 VRange(
"Export as ASCII", 0);
1138 for(y = 0; y <
IDY; y++)
1140 for(x = 0; x <
IDX; x++)
1144 if(y == 0 && x == 0)
1148 fprintf(fd,
"\n", NULL);
1153 if((y % 40) == 0 && y > 0)
1154 VRange(NULL, (
long) y * 100 / IDY);
1157 fprintf(fd,
"\n", NULL);
1164 ft = open(filed, O_WRONLY |
O_BINARY | O_CREAT | O_APPEND, S_IWRITE);
1165 if(ft < 0)
return(-1);
1173 VRange(
"Export as Binary", 0);
1177 for(x = 0; x <
IDX; x++)
1179 for(y = 0; y <
IDY; y++)
1184 if((x % 40) == 0 && x > 0)
1185 VRange(NULL, (
long) x * 100 / IDX);
1217 unsigned long info = 0;
1227 sprintf(ch,
"%c", filename[1]);
1229 if( strcmp(ch,
":") == 0)
1230 sprintf(fileorigin,
"%s", filename);
1232 sprintf(fileorigin,
"%s%s", dir, filename);
1235 l = strlen(fileorigin);
1236 pdest = _memccpy( filedest, fileorigin,
'.', l );
1243 strcat(filedest,
"Dat");
1244 fn = open(fileorigin, O_RDONLY |
O_BINARY, S_IREAD );
1245 if(fn < 0)
return(-1);
1248 strcat(filedest,
"Bif");
1249 fs = fopen(fileorigin,
"r");
1250 if(fs < 0)
return 1;
1305 eofreach = feof(fs);
1333 char filedatan[64] ;
1334 int k, i, numerofile;
1336 strcpy(buf, dirname);
1341 fs = fopen(buf,
"r");
1342 if(fs < 0)
return 1;
1343 while( !feof( fs ) )
1345 fgets(filedatan, 80, fs);
1353 fs = fopen(buf,
"r");
1354 if(fs < 0)
return 2;
1360 while( !feof( fs ) )
1368 fscanf(fs,
"%s", filedatan);
1373 sprintf(str,
"%d/%d, %s -> %s", k, numerofile, filedatan,
"DAT");
1377 sprintf(str,
"%d/%d, %s -> %s", k, numerofile, filedatan,
"BIF");
1383 D_VRange(str, (
long) k * 100 / numerofile, 0, 222, 235 );
1401 int er = 0, c = 0, d = 0;
1402 char fname[128], dirname[128];
1439 if(
MFileBrowseExt(
"Select File for Binary to ASCII processing",
"*.bif", fname, dirname, &prefs))
1447 if(
MFileBrowseExt(
"Select List of Files for Binary to ASCII processing",
"*.ele", fname, dirname, &prefs))
1456 if(
MDirBrowseExt(
"Select Directory for Binary to ASCII processing",
"*.*", DOAS.
SYSDIR, &prefs))
1473 if(
MFileBrowseExt(
"Select File for ASCII to Binary processing",
"*.dat", fname, dirname, &prefs))
1481 if(
MFileBrowseExt(
"Select List of Files for ASCII to Binary processing",
"*.ele", fname, dirname, &prefs))
1490 if(
MDirBrowseExt(
"Select Directory for ASCII to Binary processing",
"*.*", DOAS.
SYSDIR, &prefs))
1543 MMessageDialog(
"DAS information",
"The procedure is not yet implemented!!",
" Ok ", NULL);
1654 fs = fopen(
"DOAS\\DOAS.cfg",
"w");
1659 MMessageDialog(
"DAS information",
"Problems in opening file",
" Ok ", NULL);
1665 sprintf(str,
"##############################################\n");
1667 sprintf(str,
"# DOAS Config File #\n");
1669 sprintf(str,
"##############################################\n");
1671 sprintf(str,
"#--------------------------------------------#\n");
1673 sprintf(str,
"# PLEASE DO NOT MODIFY #\n");
1675 sprintf(str,
"#--------------------------------------------#\n");
1677 sprintf(str,
"#DOAS System Directory-----------------------#\n");
1679 sprintf(str,
"%s\n", DOAS.
SYSDIR);
1682 sprintf(str,
"#DOAS Results Directory-----------------------#\n");
1684 sprintf(str,
"%s\n", DOAS.
RISDIR);
1689 sprintf(str,
"##############################################\n");
1704 fs = fopen(
"DOAS\\DOAS.cfg",
"r");
1706 if(fs == NULL)
return 1;
1715 fscanf(fs,
"%s\n", &pdoas->
SYSDIR);
1718 fscanf(fs,
"%s\n", &pdoas->
RISDIR);
1737 er = WinExec(str, SW_SHOW);
1833 memset (&fbp, 0,
sizeof (fbp));
1876 sprintf(pdoas->
family,
"Arial");
2057 int idy,
double costx,
double costy,
int min,
int max,
2068 for(j = 0; j < idx ; j++)
2070 X = (int) (ox + (j * costx));
2071 Y = (int) (oy - abs((
int)((double)(plotmat[t * idx + j] - min) / costy)));
2072 X1 = (int) (ox + (j + 1) * costx);
2073 Y1 = (int) (oy - abs((
int)((double)(plotmat[t * idx + j + 1] - min) / costy)));
2089 int i, iinf, isup,c;
2098 iinf = 0; isup = 10;
2101 iinf = 10; isup = 20;
2104 iinf = 20; isup = 30;
2107 iinf = 30; isup = 40;
2110 iinf = 40; isup = 50;
2113 iinf = 50; isup = 60;
2116 iinf = 60; isup = 70;
2119 iinf = 70; isup = 80;
2165 for(i=iinf;i<isup;i++)
2167 sprintf(buff,
"%d", i);
2200 for(i=iinf;i<isup;i++)
2202 sprintf(buff,
"%d", i);
2218 int c = (int) ad, er =0;
2221 char fname[128], dirname[128];
2226 memset (&fbp, 0,
sizeof (fbp));
2243 sprintf(buff,
"1234");
2244 er =
MFileBrowseExt (
"Select Io File",
"*.*", fname, dirname, &fbp);
2338 item =
MMenuAddItem(pd,
"DOAS Processing", NULL, NULL);
2930 itoa(
wl[i], buff, 10);
2958 itoa(
wl[i], buff, 10);
void MEditDisableEditing(MOBJECT edit)
short DB_BG_lblUP[3]
Background Capital Letters Labels Color UP.
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
MOBJECT MCreateTButton(MOBJECT parent, const char *text, MTFont font)
char RISDIR[_MAX_PATH]
DOAS results directory.
void LinkSpectraCB(MOBJECT p, void *od, void *ad)
int IDX
Number of sensible horizontal pixels.
void HlpTopCB(MOBJECT p, void *od, void *ad)
MOBJECT MDCreateDOAS_ProcSh(void)
const char * close_button
void D_PrintBILSPH_BIN(int fd)
Print on file the binary header of the measured spectrum.
short DB_FG_Plbl[3]
Foreground PASSIVE Label Colors.
void MLoopWhileEvents(int discard)
MOBJECT MOptionEditGetList(MOBJECT ce)
int CreateList(MOBJECT ed)
void MMenuBarSetAcc(MOBJECT menu, int acc)
void MObjectSetShadow(MOBJECT obj, int type, int in, int out)
void MShellRealize(MOBJECT obj)
void D_VRange(char *str, int val, int, int g, int b)
Create and display the status bar.
char SYSDIR[_MAX_PATH]
DOAS system directory.
MOBJECT MCreateEdit(MOBJECT parent, const char *text, int len, MTFont font)
void MObjectSetUnsensitive(MOBJECT obj)
void RBFormatCB(MOBJECT p, void *od, void *ad)
void ViewCB(MOBJECT p, void *od, void *ad)
das structure (contain all the previous structures) .
void(* MENU_ITEM_CB)(MENU_ITEM item, MVALUE status, void *ad)
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 .
void MObjectSetResize(MOBJECT obj, int resize_w, int resize_h)
void SunCalcCB(MOBJECT p, void *od, void *ad)
char HOMEDIRECTORY[_MAX_PATH]
short DB_BG_Albl[3]
Background ACTIVE Label Colors.
void MObjectAlign(MOBJECT obj, int h_align, int v_align)
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)
void MTableFormSetColAlign(MOBJECT form, int col, int al)
char DATADIRECTORY[_MAX_PATH]
char * MObjectGetText(MOBJECT obj, char *text)
MOBJECT MCreateClippedEdit(MOBJECT parent, const char *text, int len, int clip_len, MTFont font)
void ColumnFCB(MOBJECT p, void *od, void *ad)
void MObjectSetPopupHelp(MOBJECT obj, const char *str, int delay, int duration)
void ReadIMG(FILE *file, unsigned short *mat, int hp, int vp)
Read ASCII Image (Spectral Data only) .
MOBJECT MCreateOptionEdit(MOBJECT parent, const char *text, int len, int clip_len, int nrow, MTFont font)
void MShellUnrealize(MOBJECT obj)
void MObjectSetText(MOBJECT obj, const char *text)
void ChangeFormatCB(MOBJECT p, void *od, void *ad)
void DOASTogButCB(MOBJECT p, MVALUE od, void *ad)
short DB_BG_RButt[3]
Background Radio Buttons.
void MShellDestroy(MOBJECT obj)
MOBJECT MDCreateBuildList_Sh(int mod)
int MRButtonGetActivationStatus(MOBJECT o)
MOBJECT MCreateTableForm(MOBJECT parent, int n_cols)
File Browser Preferences. Used by the Utility functions MFileBowserExt() and MDirBowserExt().
void IoCreateCB(MOBJECT p, void *od, void *ad)
void MTButtonSetCallback(MOBJECT button, OBJ_VALUE_CB cb, void *data)
MOBJECT MCreatePButton(MOBJECT parent, const char *text, MTFont font)
int ReadHeader_ASCII(int mod, FILE *fd)
Read ASCII Header of the measurement. .
int WriteDataFile(int c, char *filed)
MOBJECT MDCreateDOAS_SetupSh(void)
void MObjectSetFGColorFromParent(MOBJECT obj, int true_false)
void ReadLine(char *buf, int nc, FILE *f)
Read Line on a file Read one record of nc character on the file f.
unsigned short * ImatOrig
void LoadIoCB(MOBJECT p, void *od, void *ad)
void ExitCB(MOBJECT p, void *od, void *ad)
void FixStepCB(MOBJECT p, void *od, void *ad)
void AboutCB(MOBJECT o, void *s, void *v)
Create the About information shell. .
void DOAS_SetupPagedForm(int c, struct doas *pdoas)
MOBJECT MDCreateDiff_Sh(int mod)
void MEditSetActCallback(MOBJECT edit, OBJ_STRING_CB cb, void *data)
MOBJECT MCreateTabbedColForm(MOBJECT parent, int npage, MTFont f)
int ViewPlot(int mod)
Create the plot shell. Procedure that build the plot shell for the data visualization.
unsigned short * DeallocUSMat(unsigned short *mat)
int DatOrBinFormat(int mod, char *dir, char *filename)
const char * MGetCurrentDirectory(void)
MOBJECT Wl[18]
Wavelength Buttons.
void DiffCB(MOBJECT p, void *od, void *ad)
MTFont MLoadFont(const char *family, int h, int bold, int italic)
void delay(unsigned long d)
Pauses for a specified number of milliseconds. .
void CloseMObjCB(MOBJECT p, void *od, void *ad)
MOBJECT MDCreateFixed_Sh(int mod)
void ValidateCB(MOBJECT edit, EDIT_VAL *ev, void *ii)
Text Validation callback Validation callback for the text typed in different text box...
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 MPButtonSetAlignment(MOBJECT p, int align)
int EleDatOrBinFormat(int c, char *dirname, char *fname)
int ReadHeader_BIN(int fd)
read the BINARY header of the stored spectrum
MOBJECT MCreateDrawArea(MOBJECT parent, int width, int height)
MOBJECT MCreateColForm(MOBJECT parent)
int MFileBrowseExt(const char *t, const char *ext, char *fname, char *dname, FB_PREFS *prefs)
void ReadIMG_BIN(int fd, unsigned short *mat, int hp, int vp)
read the BINARY stored spectrum
void MLeftAttach(MOBJECT child, int att_type, int off, MOBJECT obj)
void MObjectRedraw(MOBJECT obj)
short DB_BG_Plbl[3]
Background PASSIVE Label Colors.
pushbutt PushButt
Push buttons.
int IDY
Number of sensible vertical pixels.
void MShellRealizeXY(MOBJECT obj, int x, int y)
void CreateFileListCB(MOBJECT p, void *od, void *ad)
void VitesaCB(MOBJECT p, void *od, void *ad)
const char * bg_image_file
int MDirBrowseExt(const char *t, const char *ext, char *dname, FB_PREFS *prefs)
int DT_ColFormat(void)
Callback for Column format.
int FFTFilter
Fast Fourier Trasform Filter windows.
MOBJECT MCreateShell(const char *title, int flags)
void D_PrintBILSPH(FILE *fff)
Print Header.
void ShStCB(MOBJECT p, void *od, void *ad)
int MMessageDialog(const char *t, const char *msg, const char *btn1, const char *btn2,...)
int DB_CalcFluxI(char *nomefile)
void ResumeCB(MOBJECT p, void *od, void *ad)
short DB_BG[3]
Default Background Color.
void FixedStepCB(MOBJECT p, void *od, void *ad)
MOBJECT MCreateRButton(MOBJECT parent, const char *text, MTFont font)
void MObjectUnmap(MOBJECT obj)
short DB_FG_RButt[3]
Foreground Radio Buttons.
int DB_HelpCB(MOBJECT o, void *od, void *ad)
Help Callback Create the help in the predefined WEB Browser.
void BuildListCB(MOBJECT p, void *od, void *ad)
void LoadIo(int mod, char *fname)
void MSListSetSortCallback(MOBJECT obj, STRCMP_CB cb)
void FluxIndexCB(MOBJECT p, void *od, void *ad)
void MTableFormShowGrid(MOBJECT form)
void DOASSetupCB(MOBJECT p, void *od, void *ad)
void RBEditListCB(MOBJECT p, void *od, void *ad)
void EditorCB(MOBJECT p, void *od, void *ad)
MOBJECT MCreateImagePButton(MOBJECT parent, const char *npf, const char *apf, const char *upf)
int DOAS_LoadConfig(struct doas *pdoas)
C_DEF void VRange(char *str, int val)
void MTableFormSetRowAlign(MOBJECT form, int row, int al)
void(* OBJ_VALUE_CB)(MOBJECT obj, MVALUE value, void *ad)
int LoadDB_DispCoeff(void)
Load dispersion parameters. Procedure that load the dispersion parameters from file {homedir}/DOAS/Di...
void MEditSetFilter(MOBJECT edit, int filter, const char *extra_chars)
void MLabelSetAlignment(MOBJECT p, int align)
int wl[]
WaveLength definition - for SD_Grating.
Bortul Image Library Structure .
int LoadParam(void)
Load the exe parameters. Procedure that load the parameters for CCD, Stepper Motors and Peltier from ...
void MPagedFormSetActivePage(MOBJECT form, int page)
void MFormSetSpacing(MOBJECT p, int offset)
void DOASConfigCB(MOBJECT p, void *od, void *ad)
void MPButtonSetCallback(MOBJECT button, MGUI_CB cb, void *data)
void DOASProcCB(MOBJECT p, void *od, void *ad)
void MObjectSetCompositeWidth(MOBJECT obj, int w)
short DB_UnSelFG[3]
Unselected Buttons Colors.
MOBJECT MDCreateFormat_Sh(int mod)
void DOAS_Plot(int mod, int plottype, MOBJECT obj, char *text, struct doas *pdoas)
MOBJECT MDCreatesh_vitesa(void)
const char * filter_label
MOBJECT MDCreateDOAS_MainSh(struct doas *pdoas)
DOAS shell. Procedure that build the shell for the DOAS main panels.
void FilterCB(MOBJECT p, void *od, void *ad)
MOBJECT MDCreateSolPosCalc(void)
short DB_UnSel[3]
Unselected Buttons Colors.
void ChooseFormatCB(MOBJECT p, void *od, void *ad)
int MSListAddItem(MOBJECT p, const char *item, void *data)
int MTButtonGetActivationStatus(MOBJECT o)
void MButtonSetOnMouseOverForegroundRGB(MOBJECT button, int r, int g, int b)
void MObjectMap(MOBJECT obj)
MOBJECT MCreateMenuBar(MOBJECT parent, MTFont font)
void BrowseCB(MOBJECT p, void *od, void *ad)
MENU_ITEM MMenuAddSeparator(MOBJECT pd)
void PlotDOAS(MOBJECT obj)
void D_SunCalc(void)
Sun Calculator Callback.
void MGUIQuitCB(MOBJECT shell, void *od, void *ad)
Exit MGUI Library. Procedure that close MGUI .
unsigned short * AllocUSMat(int hp, int vp)
void MObjectSetTransparency(MOBJECT obj, CARD8 level)
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
MOBJECT MDCreateColFor_Sh(void)
void MShellSetWMCloseCallback(MOBJECT p, WM_CLOSE_CB cb, void *a_data)
void FilterRawDataCB(MOBJECT p, void *od, void *ad)
void MMenuItemSetAccel(MENU_ITEM item, int acc, const char *at)
int FMMode
File manager Mode (browse files, list of file, directory, drive)
MOBJECT MCreateRowForm(MOBJECT parent)
void PBTempHistoCB(MOBJECT o, void *a, void *v)
void PlotDOAS_Spectra(int mod, MOBJECT obj, unsigned short plotmat[], int idx, int idy, double costx, double costy, int min, int max, int ox, int oy)
void MEditEnableAutoControlColor(MOBJECT edit)
void MTopAttach(MOBJECT child, int att_type, int off, MOBJECT obj)
MOBJECT MCreateTabbedRowForm(MOBJECT parent, int npage, MTFont f)
void IoSetupCB(MOBJECT p, void *od, void *ad)
MOBJECT MCreateMenu(MOBJECT menu, const char *text)
void RBListFileCB(MOBJECT p, void *od, void *ad)
void DB_FilterColumnCB(MOBJECT p, void *od, void *ad)
short DB_FG_lblUP[3]
Foreground Capital Letters Labels Color UP.
void ColumnFormatCB(MOBJECT p, void *od, void *ad)
int WriteDOASConfig(void)