DAS  3.1.6 - 18/09/2017
DAS_Spatram.h
Go to the documentation of this file.
1 #include "DAS_Spatramdef.h"
2 #include "solpos.h"
3 
4 //#include "DOAS.h"
5 
423 /***************************************************/
424 
425 
426 //extern confp CONFP;
427 extern adtester ADTESTER;
428 //extern lis LIS;
429 //extern cpl CPL;
430 //extern pbutt PBUTT;
431 extern paramini PARAM;
432 extern ids IDS;
433 extern FilterWheelSt FWS;
434 extern NDFilterWheelSt NDFWS;
435 extern GratingSt GRS;
436 extern MirrorSt MIS;
437 extern palette DPAL;
438 extern undopal UDPAL;
439 extern dfont DFONT;
440 extern dsave;
441 //extern db_options DB_O;
442 extern stepm STEPM;
443 extern dpwd DPWD;
444 extern mtcl MTCL;
445 //extern marc MARC;
446 extern master ExMast[PRGMAXNUM];
447 extern d_geo DGEO;
448 extern flag FLAG; //flags structure
449 extern tools TOOLS;
450 extern dlog DLOG;
451 extern dftp DFTP;
452 extern dsza SZADelta;
453 extern mige Mige;
454 extern nova NOVA;
455 //extern hrizmeas HMEAS;
456 
457 extern das DAS;
458 
459 
460 int PID_Calc(int mod, int pow);
461 
462 long* AllocLongMat(int hp, int vp);
463 
464 
465 
466 // ************************************************************************
467 // Procedures for the GUI Creations
468 // ************************************************************************
469  MOBJECT MDCreate_CP(void);
476  MOBJECT MDCreateExpo(char *tit);
484  int ViewPlot(int mod);
493  int MDCreateSh_Wl(void);
500  int MDCreateSh_Fil(void);
507 
508  int MDCreateSh_Mir(void);
518 
519  int MDCreateSh_PWD(void);
526  void MDCreateSh_Plot(void);
539  MOBJECT MDCreateDOAS_MainSh(struct doas *pdoas);
545  void MDCreateLISC(int c, int e);
552  void MDCreateMoveGrat(void);
558 
559 MOBJECT MDCreate_2DPlot(char *title);
565 void MGUIMain(int argc, char **argv);
605 
606  void MGUIQuitCB(MOBJECT shell, void *od, void *ad);
612 
613  void MDCreateWaitShell(void);
619 
620 //************************************/
621 // Load Functions
622 //************************************/
623  int LoadDFONT(void);
630  void LoadDefaultDFONT(void);
637  void LoadDefaultDPAL(void);
644  int LoadDasSysCol(void);
651  int LoadDB_Options(void);
658 
659  int LoadGeoCoord(void);
666  int LoadDB_DefectPixel(char *buff);
673  int LoadExec(char *fname);
681  int LoadParamLog(void);
688  int LoadTruePalette(void);
695  int LoadParam(void);
702 
703 
704  int LoadEquipment(void);
710 
711  int LoadTestPalette(char *nf);
717  int LoadDB_DispCoeff(void);
724 
725 /************************************/
726 
727 /************************************/
728 // Danbo Procedures
729 /************************************/
730  int DB_InitCamera(int mod);
773  int DB_InitMotor(int mod);
780  int DB_InitDil(void);
786  void DB_Save(char *tit, int mod);
795  int DB_ReInitCamera(void);
801 
802 
803 /********************************************/
804 // DB_Ask Procedures
805 /********************************************/ int DB_Ask(char *tit,char *bmp, char *label, char *pre, int len, char *pbtype);
811 void DB_AskCB(MOBJECT p, void *od, void *ad);
817 void DB_CloseAsk(MOBJECT p, void *od, void *ad);
823 void DB_Ask_SheelESC(MOBJECT obj, MKeyEvent *pe, void *a_data);
829 /********************************************/
830 
831 void DB_save_img(char *tit, int mod);
842 double DB_ScanMaxMin(int w, float *mx, float *mi, int bp);
849 int DB_InitCOM(int comn);
860 int DB_CloseCOM(void);
864 
865 void DB_KB_ButtonActive(int mod);
874 
875  int DB_GetCCD(int mod);
883 
884 
907 void PerformMeas(int mod, int ar, double te, int mt, int sv, int pl);
908 
909  int DB_InitAMS(int nid, int mod, int powera, int stepa, int slopea, int speeda, int powerb, int stepb, int slopeb, int speedb);
938 
939  void DB_DefectPixCorr(void);
943 
944  void DB_ChooseButtons( int w);
948 /*******************************************************************************/
949 
950  int DB_StepMotor(int id, int motor, long step, int dir);
968 /*******************************************************************************/
969  void DB_SelOutModeCB(MOBJECT o, void *id, void *a_data);
976 
977  void DB_SetCCDTargetTempCB(MOBJECT o, void *id, void *a_data);
984 
985 
986 
987  void DB_SetXUnitsCB(MOBJECT o, void *id, void *a_data);
995 
996  void DB_PlotYAxisCB(MOBJECT o, void *id, void *a_data);
1003  void DB_PlotDisplayCB(MOBJECT o, void *id, void *a_data);
1010 
1011 
1012 //************************************/
1013 // Action on shell callbaks
1014 /************************************/
1015  void DB_Wl_CB(MOBJECT p, void *od, void *ad);
1021  void DB_Mir_CB(MOBJECT p, void *od, void *ad);
1027  void DB_Fil_CB(MOBJECT p, void *od, void *ad);
1033 
1034  void DB_NDFil_CB(MOBJECT p, void *od, void *ad);
1040 
1041  void DB_KeyB_CB(MOBJECT p, void *od, void *ad);
1047  void DB_MirrorImg_CB(MOBJECT o, void *a, void *v);
1051  void DB_MIGEopmode_CB(MOBJECT o, void *a, void *v);
1055  void DB_MIGE_CB(MOBJECT o, void *a, void *v);
1059 
1060  void DB_MIGEType_CB(MOBJECT o, void *a, void *v);
1064  void DB_AMSposmode_CB(MOBJECT o, void *a, void *v);
1068  void DB_AMSProgBar_CB(MOBJECT o, void *a, void *v);
1072  void DB_Shutter_CB(MOBJECT o, void *a, void *v);
1076  void DB_ShutterType_CB(MOBJECT o, void *a, void *v);
1080  void DB_FilterType_CB(MOBJECT o, void *a, void *v);
1084 
1085  void DB_LampSelButtMouse_CB(MOBJECT obj, MMouseEvent *pe, void *a_data);
1089  void DB_KeyComSelButtMouse_CB(MOBJECT obj, MMouseEvent *pe, void *a_data);
1093  void DB_KeyComSelButtKB_CB(MOBJECT obj, MKeyEvent *pe, void *a_data);
1097  void DB_MirSelButtMouse_CB(MOBJECT obj, MMouseEvent *pe, void *a_data);
1101  void DB_MirSelButtKB_CB(MOBJECT obj, MKeyEvent *pe, void *a_data);
1105 
1106 //void DB_Mir_SheelESC(MOBJECT obj, MKeyEvent *pe, void *a_data);
1107  void DB_WlSelButtMouse_CB(MOBJECT obj, MMouseEvent *pe, void *a_data);
1111 
1112  void DB_WlSelButtKB_CB(MOBJECT obj, MKeyEvent *pe, void *a_data);
1116 
1117 
1118 //void DB_Wl_SheelESC(MOBJECT obj, MKeyEvent *pe, void *a_data);
1119  void DB_FilSelButtMouse_CB(MOBJECT obj, MMouseEvent *pe, void *a_data);
1123 
1124  void DB_FilSelButtKB_CB(MOBJECT obj, MKeyEvent *pe, void *a_data);
1128  void DB_NDFilSelButtMouse_CB(MOBJECT obj, MMouseEvent *pe, void *a_data);
1132 
1133  void DB_NDFilSelButtKB_CB(MOBJECT obj, MKeyEvent *pe, void *a_data);
1137 
1138 
1139 //void DB_Fil_SheelESC(MOBJECT obj, MKeyEvent *pe, void *a_data);
1140 /************************************/
1141  void Message(char *str, int er);
1148 
1149 //void ColPickCB(MOBJECT o, void *id, void *a_data);
1150 
1151 //void FontViewCB(MOBJECT o, void *id, void *a_data);
1152  void AboutCB(MOBJECT o, void *s, void *v);
1157  void ActMvGratCB(MOBJECT edit, char *text, void *ed);
1164 
1165 /*******************************************************************************/
1166 /* SD Spectrometer Devices */
1167 int SD_FilterW(int filter);
1185 
1186 
1187 int SD_NDFilterW(int filter);
1205 
1206 int SD_Grating(int ang);
1215 int SD_Mirror(int where);
1224 int SD_Zenith(float ang);
1233 int SD_Azimuth(float ang, float raz);
1243 
1244 void SD_FNTorqueM(int mod);
1248 
1249 int HomeMirror(void);
1257 int HomeGrating(void);
1265 int HomeFilterWheel(void);
1273 
1274 int HomeGratingFast(int mod);
1283 int HomeMirrorFast(void);
1292 int HomeNDFiltersFast(void);
1301 int HomeFiltersFast(void);
1310 
1311 
1312 
1313 /*******************************************************************************/
1314 /*******************************************************************************/
1315 
1316 /*******************************************************************************/
1317 /* Execution Functions */
1318 /* All the E_xxxxx() function are used during the execution in PRG mode */
1319 /*******************************************************************************/ void E_AAPos(void);
1324  void E_IRefSun(void);
1331  void E_Calibra(void);
1338  void E_REM(void);
1344  void E_Dark(void);
1350  void E_AutoRange(void);
1356  void E_Save(void);
1362  void E_Expo(void);
1368  int E_GetCCD(void);
1374  void E_Lambda(void);
1381  void E_WAIT(void);
1387  void E_Label(void);
1393  void E_Filter(void);
1399  void E_Mirror(void);
1405  void E_Measure(void);
1410  void E_Qj_On(void);
1416  void E_Qj_Off(void);
1422  void E_Hg_On(void);
1428  void E_Hg_Off(void);
1434  void E_Radio(void);
1440  void E_Average(void);
1446  void E_AvgCCDHor(void);
1452  int E_Home_SM1(void);
1458  int E_Home_SM2(void);
1464  int E_Home_SM3(void);
1470  int E_Home_SM5(void);
1476  int E_Home_SM6(void);
1482  void E_Plot(void);
1488  void E_SetCCDPow(void);
1494  void E_NDFilter(void);
1500  int E_Home_SM4(void);
1506  void E_DFMeasure(void);
1511  void E_SetCCDOffSet(void);
1516 
1517  void E_QjScan(void);
1522  void E_HgScan(void);
1527 
1528  void E_HGratCal(void);
1533  void E_SetCCDTemp(void);
1539 
1540  void E_SetCCDVBin(void);
1546  void E_Almucantar(void);
1551  void E_DirectSun(void);
1556 
1557 
1558 /**************************************************/
1559  void writelogmotor(int mod, int id_motore, int k, int d, long steps, unsigned char ams_id);
1578 
1579 
1580 
1581 //NOT USED
1582 //void Positioning(MOBJECT p, long tout);
1583  void ComErrors(int w);
1589  void CCD_Error(char *str);
1595 
1596 
1597 //NOT USED
1598 //void DE_Error(int w);
1599  void AMS_Error(int w);
1605 
1606  char *ERR_Option(int ercode);
1612 
1613  char *CodeEq2Name(int code);
1619 
1620 
1621 //void FirstCheckTemp(void);
1622 //void ReadTemp(void);
1623  void gettime(struct time *tp);
1627 
1628  void GetDateTime(struct date *dp,struct time *tp, struct tm *when);
1634 
1635  void getdate(struct date *tp);
1639  void ShutDOWN(void);
1643  void sleep( clock_t wait );
1647 
1648 //int save_img(char *tit, int mod);
1649 
1650 /***************************************************************/
1651 //AMS OPTO
1652  void HgLamp(int mod);
1659  void QjLamp(int mod);
1666  void FANPeltier(int mod);
1673  void Peltier(int mod);
1680 
1681  void HiresPS(int mod);
1688  void PeltierPS(int mod);
1695 
1696 void FANECU(int mod);
1703 
1704 
1705 /***************************************************************/ void Status(char *tit);
1709  void WriteInit(const char *sname, char *dateffn, char *timebuff);
1716 
1717  void WriteStatusD(int w);
1721  int Fetch(void);
1726  double AutoRange(int mod);
1740  void D_rt(void);
1744 
1745  void D_AutoExecution(void);
1749 
1750  int D_InitPC104(void);
1758  int D_Calibra(void);
1764  void D_Average(int mod);
1769  void D_AverageTFix(void);
1773 
1774  void D_Plot(void);
1778  void D_Saving(void);
1786 
1787 //void D_ADTest(void);
1788  int D_WriteInitLog(char *str);
1792  void D_BuildH(int mod, int s);
1801  void delay(unsigned long d);
1805  int HeaderInPlot(void);
1809 
1810 //void allocamat();
1811  void ReadIMG_old(FILE *file, int hp, int vp);
1815 
1816  void ReadIMG(FILE *file, unsigned short *mat, int hp, int vp);
1824 void SwapMatrix(unsigned short *source, unsigned short *dest, int hp, int vp);
1832 void Task_LOG(TIMEOUT_ID id, void *data);
1837  void Task_HomeGrat(TIMEOUT_ID id, void *data);
1842 
1843  void Task_Timer(TIMEOUT_ID id, void *data);
1854 
1855 void Task_AutoEx(TIMEOUT_ID id, void *data);
1859 
1860 
1861 void TaskWDT(TIMEOUT_ID id, void *data);
1862 
1863  void Task_LIS_Temp(TIMEOUT_ID id, void *data);
1869  void Task_CCD_Temp(TIMEOUT_ID id, void *data);
1874  void Task_REFRESH_Temp(TIMEOUT_ID id, void *data);
1879  void Task_AMSH(TIMEOUT_ID id, void *data);
1884 
1885 
1886 //void WriteTitolo(void);
1887 
1888 //int save_img_(char *tit, int mod);
1889 //int JDay(int GG);
1890  void Radio(int g);
1894 
1895 //void Error(int w);
1896  void FormatData(void);
1900 
1901 
1902 
1903 //void WriteTitolo(void);
1904 
1905 int SZACalc(double d_lat, double d_long, double d_tzone, int d_year, int d_daynum, int d_hour, int d_minute, int d_second, float d_temp, float d_press, float d_tilt, float d_aspect);
1926  int SmoothData(unsigned short *source, float *destination, int horpix, int verpix, int filw, int bp);
1937  int SmoothFloatData(float *source, float *destination, int horpix, int verpix, int filw, int bp);
1948  int MD_CreateBRowShell(int nrows);
1956  void __stdcall ShowDown(const char *str, int port);
1963 
1964 
1965 void __stdcall DD_VRange(const char *str, int perc, int Port);
1966 
1967 
1968 /*
1969 mod = 1 --> Assign Header to plot labels
1970 mod = 0 --> Read header only
1971 */ int ReadHeader_ASCII(int mod, FILE *fd);
1979 
1980  int AssignParam(int mod);
1986  int ReadLogFile(int mod, char *dir, char *filename, int nx, int ny, struct omutemp);
1999  MOBJECT MDCreate2DPlot(char *title, int x, int y, int dx, int dy, int mode);
2003  void DB_2DPlot(char *title, int x, int y, int dx, int dy, int mode);
2007  void D_PrintBILSPH_BIN(int fd);
2012  int ReadHeaderOnly(FILE *fd);
2017  int ReadHeaderOldF(FILE *fd);
2022  int ReadHeader_BIN(int fd);
2027  void ReadIMG_BIN(int fd, unsigned short *mat, int hp, int vp);
2035  int SmoothingF(double *tmp, int npix, int pts);
2042  int RemoveSpikes(int mod, unsigned short *mat, int horpix, int verpix, int blindpix);
2051 
2052  int DB_Column(char *sourcefilename);
2057  void D_SunCalc (void);
2061  void WriteSelColandSmoothed(int mod, FILE *fd, int selcol);
2065  void D_PrintHMod(FILE *fff);
2070 
2071 /************ Function in UTIL.C *************/ void D_CloseVR(MOBJECT p, void *od, void *ad);
2075  void D_VRange(char *str, int val, int r, int g, int b);
2084  double CalcFluxIndex( unsigned short mis[], int dx, int dy, float te);
2093  int DB_CalcFluxI(char *nomefile);
2098  int DT_FluxIndex(void);
2102  int DT_ColFormat(void);
2106 
2107  void D_PrintSpectrum(FILE *fff);
2112  void D_PrintBILSPH(FILE *fff);
2117  int DT_CorrHeader();
2121  void ShiftImg(int hp, int vp);
2127  int DT_CorrFileEvora(void);
2131  int DT_LinkSpectra(void);
2135  void MDQuitCB(MOBJECT shell, void *od, void *ad);
2139 
2140 
2141 /***********************************************/
2142  int BuildLogRatio(void);
2146  void D_Positioning(MOBJECT p, int id, long tout);
2153  void quickSort(float numbers[], int array_size);
2157  void q_sort(float numbers[], int left, int right);
2161 
2162  int LoadFTPSetting(void);
2166  int RefreshDrArea(MOBJECT obj);
2170 
2171 
2172 //CBs and procedures for DAS_Spat_Conf.c
2173 /*****************************************************************************/
2174  int WriteColorsCB(MOBJECT o, void *a, void *v);
2178  void ColPickBackForeGCB(MOBJECT o, void *a, void *v);
2185  void DB_Undo2Do_Colors( short undocol[], short docol[]);
2189  void DB_ColorAssign(MOBJECT a[], int numel, short tc[]);
2193  void D_UndoCB(MOBJECT o, void *a, void *v);
2197  void DB_ColorPick(MOBJECT o );
2201  void ColObjCB(MOBJECT o, void *a, void *v);
2205  void DB_ChangeColorCellCB(MOBJECT o, MVALUE o_data, void *a_data);
2209  void DB_Do2Undo_Colors( short docol[], short undocol[]);
2213 
2214  int LoadPaletteCB(MOBJECT o, void *o_data, void *a_data);
2218 
2219  void ColorSaveCB(MOBJECT o, void *o_data, void *a_data);
2223  void ColorFreeCB(MOBJECT o, void *o_data, void *a_data);
2227  void CloseColPickCB(MOBJECT obj, void *s, void *v);
2231  void ColorMapExposeCB(MOBJECT obj, MEvent * pexp, void *a_data);
2235  void ColorMapResizeCB(MOBJECT obj, DRAWAREA_PREF * pref, void *a_data);
2239  void ColorMapInputCB(MOBJECT obj, MEvent * pe, void *a_data);
2243  void ScreenInfoCB(MOBJECT o, void *s, void *v);
2247 
2248 //select Color void DB_CellExposeCB(MOBJECT obj, MEvent * pexp, void *a_data);
2252  void DB_CellResizeCB(MOBJECT obj, DRAWAREA_PREF * pref, void *a_data);
2256 
2257 
2258 /********************* End of COLORS CallBack *****************************/
2259 /***************************************************************************/
2260 /********************* Start of OPTIONS CallBack **************************/
2261  void DB_RadioAvgModeCB(MOBJECT o, void *id, void *a_data);
2268  void DB_RadioPixCorrCB(MOBJECT o, void *id, void *a_data);
2275  void DB_RadioModeSelCB(MOBJECT o, void *id, void *a_data);
2282  void DB_RadioDarkCB(MOBJECT o, void *id, void *a_data);
2289  void DB_RadDrkSourceCB(MOBJECT o, void *a, void *v);
2296  void DB_ImgTypeCB(MOBJECT o, void *id, void *a_data);
2303  void DB_RadioFNSelCB(MOBJECT o, void *id, void *a_data);
2310 
2311 /********************* End of OPTION CallBack *****************************/
2312 /***************************************************************************/
2313 /*****************************************************************************************************/
2314 /************************* da qui in giu' mancano queste funzioni nell'help ***************************/
2315 
2316 /********************* Start of FONTS CallBack ****************************/
2317 void DB_Do2Undo_Fonts( MTFont dofont, MTFont undofont);
2318 void DB_Undo2Do_Fonts( MTFont undofont, MTFont dofont);
2320 void ColorAssignCB(MOBJECT o, void *o_data, void *a_data);
2321 void TextColorAssignCB(MOBJECT o, MVALUE o_data, void *a_data);
2322 
2323 /*****************************************************************************************************/
2324 /************************* da qui in su' mancano queste funzioni nell'help ***************************/
2325 
2326 
2327 /***************************************************************/ void DB_FontAssign(MOBJECT a[], int numel, MTFont fnt);
2331 
2332 /***************************************************************/ void FontOBJSelCB(MOBJECT obj, void *a, void *v);
2336 
2337 /***************************************************************/ void WriteFontCB(MOBJECT obj, void *a, void *v);
2341 
2342 /***************************************************************/ void UndoFCB(MOBJECT obj, void *a, void *v);
2346 
2347 /***************************************************************
2348  *
2349  ***************************************************************/ void SetBoldCB(MOBJECT obj, MVALUE a, void *data);
2353 /***************************************************************
2354  *
2355  ***************************************************************/ void SetItalicCB(MOBJECT obj, MVALUE a, void *data);
2359 /***************************************************************
2360  *
2361  ***************************************************************/ void CloseFontViewCB(MOBJECT p, void *a, void *data);
2365 /***************************************************************
2366  *
2367  ***************************************************************/ void TestFontCB(MOBJECT obj, void *a, void *data);
2371 /***************************************************************
2372  *
2373  ***************************************************************/ void LoadFontCB(MOBJECT obj, void *a, void *data);
2377 /***************************************************************
2378  *
2379  ***************************************************************/ void DrawAreaExpFontCB(MOBJECT obj, MEvent * pe, void *data);
2383 /********************* End of FONTS CallBack *****************************/
2384 /***************************************************************************/
2385 
2386 /********************* Start of OPTIONS EDITS CallBack **************************/
2387  void ValidateCB(MOBJECT edit, EDIT_VAL *ev, void *ii);
2392  void ActEditCB(MOBJECT edit, char *text, void *ed);
2397  void ApplyImgCB(MOBJECT shell, void *od, void *ad);
2402  void CloseConfigCB(MOBJECT shell, void *od, void *ad);
2407  void ConfigCB(MOBJECT p, void *od, void *ad);
2411 
2412 /******************************************************************/
2413 /******************************************************************/
2414 /******************************************************************/
2415 /******** Modules for Stepper motors parameters ********/
2416 /******************************************************************/
2417 /******************************************************************/
2418 int perc2int(int mod, char *string);
2427 double int2perc(int mod, int k);
2436  double int2hertz(int mod, int k);
2443 int hertz2int(int mod, char *string);
2450 
2451 /*****************************************/ void listval2fraz(int mod, int val);
2459 
2460 /*****************************************/ void val2fraz(int id, int sn, int val);
2469 
2470 
2471 /*****************************************/ int fraz2val(int mod, char *val);
2478 
2479 
2480 /*****************************************/ float SMfraz(int t);
2485 /*******************************************************************************/
2486 /*******************************************************************************/
2487 
2488 
2489 /*****************************************/
2490 /*****************************************/
2491 /*****************************************/
2492 
2493  int WriteHardwareiniCB(MOBJECT shell, void *od, void *ad);
2498  int WritewlstepiniCB(MOBJECT shell, void *od, void *ad);
2503  int WriteOptioniniCB(MOBJECT shell, void *od, void *ad);
2508 
2509  int WriteEquipini(void);
2514  int WriteParaminiCB(MOBJECT shell, void *od, void *ad);
2519  int WriteAMSCB(MOBJECT shell, void *od, void *ad);
2524 
2525 //NOT USED
2526 //void CamCloseCB(MOBJECT p, void *od, void *ad);
2527 //void CamActCBI(MOBJECT edit, EDIT_VAL *ev, int w);
2528  void CCDSetupCB(MOBJECT shell, void *od, void *ad);
2533  void PB_H_CB(MOBJECT p, void *od, void *ad);
2537  void ApplyChCB(MOBJECT shell, void *od, void *ad);
2544  void ADTesterCB(MOBJECT shell, void *od, void *ad);
2548 
2549 
2550 
2551 /******************************************************/
2552 /********** Mapping of the CCD defective pixels ******/
2553 /******************************************************/
2554  void print2file(FILE *ff, int x, int y, unsigned int m);
2562 
2563 int GetDefPix(int mod);
2571  void MAPDefPixCB(MOBJECT o, void *id, void *a_data);
2580  void MAPDefPix(int mod);
2589  void UnderOverPixCB(MOBJECT o, void *id, void *a_data);
2599 
2600 /******************************************************/
2601 /********** View-Modify-Reload system files **********/
2602 /******************************************************/ void DB_VMRsfCB(MOBJECT o, void *id, void *a_data);
2610  void ModifyConfFileCB(MOBJECT o, void *id, void *a_data);
2618 /*******************************************************/
2619  void DB_DispBlindPixCB(MOBJECT o, void *id, void *a_data);
2624  void ReadLine(char *buf, int nc, FILE *f);
2632  int DB_HelpCB(MOBJECT o, void *od, void *ad);
2637  int DB_InfCB(MOBJECT o, void *od, void *ad);
2642 int SD_Position(int m, int w, int f, double z, double a);
2651 int SD_PosOMUDev(int m, int w, int f);
2658 int SD_PosAADev(double z, double a);
2664 
2665 void SZA_FindMin(void);
2669 int ExtLamp(int mod);
2676 int ExtShutt(int mod);
2682 void E_AAMeasure(void);
2688 void FlushLine(char *buf, int nc, FILE *f);
2693 void D_VRangeSim(int id, char *str, int val, int r, int g, int b, int x, int y);
2698 void E_Meashor(void);
2705 void E_Meashor2(void);
2711 void E_ExtLampON(void);
2715 void E_ExtLampOFF(void);
2719 void E_ExtShutOpen(void);
2723 void E_ExtShutClose(void);
2727 void E_Zenith(void);
2731 void E_Azimuth(void);
2735  char* EquipCode2Name(int eqcode, char *src, char *dest);
2743 int HomeZenithFast(void);
2747 int HomeAzimFast(void);
2751 int ChkDigIO(unsigned char word, int bitn);
2757 void DB_FilterCB(MOBJECT p, void *od, void *ad);
2761 int LoadWlstep(void);
2765 
2766 
2767 
2768 void NovaTypeCB(MOBJECT p, void *od, void *ad);
2772 
2773  int Lookfor4358(void);
2781 
2782 
2783 /* int LookforWl_X( int x)
2784  function to scan the wl() array in order to identify
2785  the position of the 'x' wavelength
2786  return value:
2787  er = -1 --> value 'x' not encountered
2788  er >= 0 --> value 'x' found at er position
2789 */int LookforWl_X(int x);
2790 
2791 
2792 /* int ChkConfigInstance(void)
2793  Check if the DAS Config Window is already open
2794  return value:
2795  return 0 --> OK open a new das config
2796  return 1 --> Das config window already open
2797 */int ChkConfigInstance(void);
2798 
2799 /* int ChkWinInstance(char *buff, MOBJECT obj)
2800  Check if the 'buff' Window is already open
2801  return value:
2802  return 0 --> OK open a new window
2803  return 1 --> buff window already open
2804 */int ChkWinInstance(char *buff, MOBJECT obj);
2805 
2806  void RunFULL(void);
2833 
2834 /* void DAS_Message(char *str, int er)
2835  \brief Generic DAS message
2836  \return void
2837 */void DAS_Message(char *str, int er);
2838 
2839 /* int PRG_Check(int mod, char *prgname)
2840  \brief Check the PRG syntax
2841  \param mod = 0: procedure called at DAS Boot ( no status message)
2842  \param mod = 1: procedure called from the TOOLS keyboard ( Message dialog displayed)
2843  \param *prgname : buffer containing the name of the prg file
2844  \return
2845 */ int PRG_Check(int mod, char *prgname);
2846 
2847 
2848 void UPS_Status(void);
2849 
2850 
2851 /* float MIGEAz(float p)
2852  \brief Fix the MIGE Azimuth angle
2853  \param p = float value for the desired azimuth angle
2854  \return azimuth angle in the MIGE mechanical limits
2855 */ float MIGEAz(float p);
2856 
2857 /* float MIGEZen(float p)
2858  \brief Fix the MIGE Zenith angle
2859  \param p = float value for the desired zenith angle
2860  \return zenith angle in the MIGE mechanical limits
2861 */float MIGEZen(float p);
2862 float MIGEActualZenAz(int mode);
2868 
2869 void MDCreateMoveZenAzimDeg(void);
2870 
2871 void MIGESunTrack(void);
2872 
2873 void MIGEAntiSunTrack(void);
2874 
2875 int SD_Zenith_H(float ang);
2876 
2877 void ExitCB(MOBJECT p, void *od, void *ad);
2878 void IoSetupCB(MOBJECT p, void *od, void *ad);
2879 void IoCreateCB(MOBJECT p, void *od, void *ad);
2880 void DOASSetupCB(MOBJECT p, void *od, void *ad);
2881 void DOASProcCB(MOBJECT p, void *od, void *ad);
2882 void DiffCB(MOBJECT p, void *od, void *ad);
2883 void FixStepCB(MOBJECT p, void *od, void *ad);
2884 void ViewCB(MOBJECT p, void *od, void *ad);
2885 void SunCalcCB(MOBJECT p, void *od, void *ad);
2886 void ShStCB(MOBJECT p, void *od, void *ad);
2887 void FilterCB(MOBJECT p, void *od, void *ad);
2888 void ColumnFCB(MOBJECT p, void *od, void *ad);
2889 void ResumeCB(MOBJECT p, void *od, void *ad);
2890 void LinkSpectraCB(MOBJECT p, void *od, void *ad);
2891 void PBTempHistoCB(MOBJECT p, void *od, void *ad);
2892 void D_Print_BIL_H_ASCII(int mod, FILE *fff);
2893 int SM_stepr(int t);
2894 void D_FixSZA(void);
2895 int BrowseLog(void);
2896 int MDCreateSh_NDFil(void);
2897 int MDCreateSh_Home(void);
2898 void ShutterOpening(int mod);
2899 void DAS_Error(int c);
2900 void WriteIMG_BIN(int fd, unsigned short *mat, int hp, int vp);
2901 void WriteIMG(FILE *file, unsigned short *mat, int hp, int vp);
2902 int LoadHardware(void);
2903 void Master_Error(int w);
2904 void DB_Pause(void);
2905 void LoadIo(int mod, char *fname);
2906 int LoadGeoDB(void);
2907 void DB_WriteMode(int mod);
2908 void E_ChkExLamp(void);
2909 void DDMessage(char *str);
2910 void WinRes(void);
2911 void DB_EqTypeCB(MOBJECT o, void *a, void *v);
2912 
2913 
2914 //mod = 0 --> Temporized
2915 //mod = 1 --> MASTERSZAM
2916 //Mod = 2 --> SZAMODE
2917 int ChkMaster(int mod);
2918 void DMessage(char *str);
2919 
2920 
2921 
2922 
2923  int SetWorkDirMGUIenv(char *buff);
2931 
2932 int NOVA_Out(int novatype, unsigned int DigOut);
2938 
2939 int NOVA_In(int novatype, unsigned int DigIn);
2945 
2946 
2947 void WDT_CB(MOBJECT p, void *od, void *ad);
2948 
2949 void WDT_Task_CB(MOBJECT o, void *od, void *ad);
2950 
2951 void WDT_func(int mod);
2952 
2953 void SaveCalib(int mod);
2954 
2955 /**************************************************/
2956 /**************************************************/
2957 /**************************************************/
2958 /****** GLOBAL VARIABLES DECLARATIONS ******/
2959 /**************************************************/
2960 /* For the Defective Pixel Correction MAP */
2961 extern int MaskedPix[100][6];
2962 extern int MaskedCol[100][6];
2963 extern int MaskedRow[100][6];
2964 extern int PItem,CItem,RItem;
2965 /**************************************************/
2966 
2967 //Potrei mettere questi FLAG nella struttura FLAG
2968 int HGFlg; //Flag HG: 0=OFF, 1=ON
2969 int QJFlg; //Flag QJ: 0=OFF, 1=ON
2970 int FANFlg; //Flag FAN Peltier: 0=OFF, 1=ON
2971 int PeltFlg;//Flag Peltier: 0=OFF, 1=ON
2972 int TMFlg; //Flag for ND Filter with Torque Motor
2973 
2974 
2975 extern int FlgSM_Stop;
2976 //extern int FlgNoAMS; ///< AMS Existence: 0 = AMS FOUND; 1 = AMS NOT FOUND
2977 extern int Master;
2978 extern int PrgNum;
2979 extern int PrgNumInM;
2980 extern int PrgNumExe;
2981 
2982 extern int Server;
2983 
2984 
2985 extern unsigned int data[576];
2986 extern int MainCommand;
2987 extern double TExp;
2988 extern char *Program;
2989 extern double TPelt;
2990 extern long PrgCnt;
2991 extern long PrgSiz;
2992 extern char ddmmyy[8]; //Data (da sostituire)
2993 extern char ddmmyyf[6]; //Data del file di log (Da sostituire)
2994 extern int Total;
2995 extern int N_AVG;
2996 extern int N_RM;
2997 extern int TOTTEXP;
2998 extern int SZAMax;
2999 extern int IDX;
3000 extern int IDY;
3001 extern int BlindPix;
3002 extern int SaveCnt;
3003 extern int ON_OFFLINEPLOT;
3004 extern unsigned long countsopsh;// count opening shutter
3005 
3006 
3007 extern unsigned int LevelDefPix;
3008 
3009 unsigned int *mattempbuff;
3010 
3011 extern int on;
3012 //extern int Offset[16];///<Offset of the hardware devices
3013 
3014 extern int CCD_SetupFlg;
3015 
3016 extern const char *Wl_Code[];
3017 extern int wl[];
3018 
3019 extern long wav[];
3020 extern int WlSet;
3021 
3022 extern const char *Mir_Code[];
3023 
3024 extern const char *Mir_CodeTropo[];
3025 
3026 
3027 extern const char *DeviceTypeInput[];
3028 extern int MirSet;
3029 
3030 extern char *Fil_Code[];
3031 extern char *NDFil_Code[];
3032 extern char *HomePosition[];
3033 
3034 extern char *Fil_CodeTropo[];
3035 extern char *Fil_Code8H[];
3036  // for the 8 hole filter wheel
3037 extern char *Fil_CodeNG[];
3038 extern char *Fil_CodeNG1[];
3039 
3040 extern int FilSet;
3041 extern int NDFilSet;
3042 
3043 extern MTColor *PLColor[];
3044 
3045 unsigned short *ImatDark;
3046 
3047 
3048 extern long AbsFilePos;
3049 extern int ContFP;
3050 extern long REL_FILE_POS[51];
3051 
3052 MOBJECT _shell000; //Config shell
3054 
3055 extern int PaletteMode;
3056 
3061 
3063 
3065 
3066 MTFont font;// = FIXED_SMALL;
3067 extern int bold ;
3068 extern int italic ;
3069 
3070 extern int FlgBG ;
3071 extern int FlgFG ;
3072 extern int FlgOBJ;
3073 
3074 extern char lfraz[6];
3076 
3077 extern int DD_VRip[16];
3078 extern int DD_VOpen[16];
3079 
3080 extern const char *KeyCode[];
3081 extern int DAS_StartHour;
3082 extern int DAS_StartDOY;
3083 
3084 
void MIGESunTrack(void)
Definition: RTC_Time.c:222
int RefreshDrArea(MOBJECT obj)
Redraw the draw arwa in a 2D Plot window.
Definition: 2DPlot.c:428
void listval2fraz(int mod, int val)
Decimal value to ratio value The decimal value indicating the fractioning of the step is translated i...
void DB_FilSelButtKB_CB(MOBJECT obj, MKeyEvent *pe, void *a_data)
callback for select a specified filter push button with the keyboard
Definition: CreateForms.c:6166
int SmoothFloatData(float *source, float *destination, int horpix, int verpix, int filw, int bp)
Calc. the smoothed matrix of a float one. .
Definition: Save.c:890
void E_Plot(void)
Plot Spectrum. Plot Spectrum. All the E_xxxxx() function are used during the execution in PRG mode...
Definition: Exec.c:237
void E_Calibra(void)
Execute D_Calibra. D_Calibra is a procedure for the spectral calibration with HG lamp. Shift of HG spectral line at 4358.4 on pixel 512 All the E_xxxxx() function are used during the execution in PRG mode.
Definition: Exec.c:330
dsza SZADelta
Definition: DAS_Spat.c:76
void FilterCB(MOBJECT p, void *od, void *ad)
int Lookfor4358(void)
function to scan the wl() array in order to identify the position of the 4358 reference wavelength re...
Definition: Procedures.c:2270
void DAS_Message(char *str, int er)
Definition: Errors.c:74
int N_AVG
Number of measurements for Averaging mode in fixed number of meas. mode.
Definition: DAS_Spat.c:113
void E_Average(void)
Averaged Measurements. Procedure for Averaged Measurements. All the E_xxxxx() function are used durin...
Definition: Exec.c:612
int MainCommand
Command switch in main loop.
Definition: DAS_Spat.c:105
nova NOVA
Definition: DAS_Spat.c:77
void FANPeltier(int mod)
FAN ON/OFF .
Definition: Spat_Device.c:2652
int SmoothingF(double *tmp, int npix, int pts)
Smoothing of 1D array.
Definition: FFT.c:151
void DB_FontAssign(MOBJECT a[], int numel, MTFont fnt)
This callback assign font to the selected object.
void E_Save(void)
Save Image. Procedure for saving image or data. All the E_xxxxx() function are used during the execut...
Definition: Exec.c:355
void D_rt(void)
D_readtemp_int callback .
Definition: Dscad.c:64
void ExitCB(MOBJECT p, void *od, void *ad)
Definition: DOAS_FullProj.c:80
void CloseColPickCB(MOBJECT obj, void *s, void *v)
Declared but not used.
char env[_MAX_PATH]
Environment path.
Definition: DAS_Spatram.h:3075
void val2fraz(int id, int sn, int val)
Decimal value to ratio value Similar to listval2fraz The decimal value indicating the fractioning of ...
int NDFilSet
ND filter wheel position definition - for SD_NDFilterW.
Definition: CreateForms.c:6231
int SD_Grating(int ang)
Positioning Grating. The Grating move to the position specified by ang (Wavelength) ...
Definition: Spat_Device.c:2108
int SD_Mirror(int where)
Positioning Input Mirror. The Input Mirror reaches the position specified by where.
Definition: Spat_Device.c:1898
void UndoFCB(MOBJECT obj, void *a, void *v)
This callback UnDo the font choice (Not implemented yet)
int DB_InitMotor(int mod)
Initialize AMS. Procedure that initialize the parameters for the AMS&#39;s devices.
Definition: Init.c:1584
void DB_FilterType_CB(MOBJECT o, void *a, void *v)
callback selecting the type of installed filter wheel module
void E_Hg_On(void)
HG ON. Hg lamp ON. All the E_xxxxx() function are used during the execution in PRG mode...
Definition: Exec.c:246
void DB_RadDrkSourceCB(MOBJECT o, void *a, void *v)
Set the dark source.
void E_Azimuth(void)
Position Azimuth Axis.
Definition: Exec.c:1473
void DB_AMSProgBar_CB(MOBJECT o, void *a, void *v)
callback selecting if show or not the progress bar for motor positioning
int HeaderInPlot(void)
Shows the measurements parameters .
Definition: Spat_Plot.c:1475
MOBJECT cell_label
Definition: DAS_Spatram.h:3057
int PRG_Check(int mod, char *prgname)
Definition: DAS_Spat.c:531
void HgLamp(int mod)
HG Lamp ON/OFF .
Definition: Spat_Device.c:2673
double int2perc(int mod, int k)
translate the AMS digit unit in text. The power assigned to the motor trough the AMS, is translated in text
void TestFontCB(MOBJECT obj, void *a, void *data)
This callback tries to load the specified font.
int CCD_SetupFlg
Definition: DAS_Spat.c:138
char * NDFil_Code[]
const char array for the realisation of the Filters buttons in the ND Filter shell ...
Definition: DAS_Spat.c:219
int BuildLogRatio(void)
first attempt to apply the DOAS algorithm (..on going!!!)
Definition: DOAS.c:178
MOBJECT r_label
Definition: DAS_Spatram.h:3058
int DB_InitCamera(int mod)
Initialize Camera Parameters. Procedure that initialize the CCD Camera.
Definition: Init.c:170
int ReadHeaderOnly(FILE *fd)
read the ASCII header of the stored spectrum
Definition: Save.c:704
Definition: DOASdef.h:16
void DB_Fil_CB(MOBJECT p, void *od, void *ad)
callback for filter wheel positioning in Filter shell
Definition: CreateForms.c:6120
void D_VRangeSim(int id, char *str, int val, int r, int g, int b, int x, int y)
init progress bar during simultaneous positioning
Definition: Utils.c:258
void E_AAPos(void)
alt Az Positioning. Available for SPATRAMPLUS and TROPOGAS (with the AltAzPlatform) ...
Definition: Exec.c:893
void DB_DispBlindPixCB(MOBJECT o, void *id, void *a_data)
Display Blind Pixel Callback Set if the blind pixels will be displayed or not on the plot window...
void D_PrintBILSPH_BIN(int fd)
Print on file the binary header of the measured spectrum.
Definition: Utils.c:540
void ReadIMG_old(FILE *file, int hp, int vp)
NOT Used .
Definition: Spat_Plot.c:1136
void writelogmotor(int mod, int id_motore, int k, int d, long steps, unsigned char ams_id)
Write Motor Operations on Log File. Write on the SM.LOG file the commands send to the motors...
Definition: Spat_Device.c:48
void MAPDefPix(int mod)
create the Under/Over exposed pixels window At the pression of the button in DAS_Config the appropri...
Status of the ND Filter wheel .
void DB_save_img(char *tit, int mod)
Saving image. Procedure for saving the CCD Image Used until version 2.0.9, Since 2.1.0 D_Saving(void) is used.
Definition: Save.c:580
adtester ADTESTER
Definition: Chktemp.c:20
INT32 MVALUE
Definition: Mguidefs.h:1422
void MDCreateWaitShell(void)
Create a waiting window .
Definition: DAS_Spat.c:2408
double TPelt
CCD Temperature.
void gettime(struct time *tp)
get current time
Definition: Save.c:92
void E_QjScan(void)
Check the full spectral range with QJ ON. All the E_xxxxx() function are used during the execution in...
Definition: Exec.c:1548
void ViewCB(MOBJECT p, void *od, void *ad)
void DB_RadioModeSelCB(MOBJECT o, void *id, void *a_data)
Set the saving mode.
void SD_FNTorqueM(int mod)
Positioning NDFilter. .
Definition: Spat_Device.c:3066
void MDCreateMoveGrat(void)
Free Grating positioning. Procedure that build the shell for Free Grating positioning.
Definition: CreateForms.c:2859
MOBJECT b_sbar
Definition: DAS_Spatram.h:3057
void __stdcall DD_VRange(const char *str, int perc, int Port)
Definition: Utils.c:153
int LoadHardware(void)
Definition: Load.c:1170
long wav[]
Step Number definition - for SD_Grating.
Definition: DAS_Spat.c:195
int WlSet
Wavelength position definition - for SD_Grating.
Definition: DAS_Spat.c:135
int MDCreateSh_PWD(void)
Password shell. Procedure that build the shell for the System password in order to access the control...
Definition: PWD.C:105
void DB_FilterCB(MOBJECT p, void *od, void *ad)
Filter positioning callback.
Definition: Spat_Plot.c:2593
void PBTempHistoCB(MOBJECT p, void *od, void *ad)
int DB_InitAMS(int nid, int mod, int powera, int stepa, int slopea, int speeda, int powerb, int stepb, int slopeb, int speedb)
Init selected AMS.
Definition: Init.c:1391
int HomeFilterWheel(void)
Fliter wheel in the reference Position. The Fliter wheel reaches the reference Position.
double DB_ScanMaxMin(int w, float *mx, float *mi, int bp)
Find Max and Min values for the buffer of order w.
Definition: Procedures.c:1632
double int2hertz(int mod, int k)
Stepper motors parameters structure .
int HomeMirror(void)
Input Mirror in the reference Position. The Input Mirror reaches the reference Position.
Definition: Init.c:685
void ActMvGratCB(MOBJECT edit, char *text, void *ed)
Move Grating of a free steps number callback. .
Definition: CreateForms.c:2691
int MDCreateSh_NDFil(void)
Definition: CreateForms.c:6233
MOBJECT r_sbar
Definition: DAS_Spatram.h:3057
void E_SetCCDPow(void)
Set CCD Power. Set CCD Power. All the E_xxxxx() function are used during the execution in PRG mode...
Definition: Exec.c:411
void DB_ImgTypeCB(MOBJECT o, void *id, void *a_data)
Set the Image type.
void SZA_FindMin(void)
computation of daily minimum SZA
Definition: DAS_Spat.c:2808
void D_PrintHMod(FILE *fff)
Print the header in Column format.
Definition: Save.c:790
void DB_VMRsfCB(MOBJECT o, void *id, void *a_data)
Set the flag for modification or reload of DAS configuration files Set the VMRsf (View Modify Re-load...
master ExMast[PRGMAXNUM]
Definition: DAS_Spat.c:55
das structure (contain all the previous structures) .
void ADTesterCB(MOBJECT shell, void *od, void *ad)
Test Temperature AD Converter callback.
int FlgSM_Stop
Steppers Motor Activity: 0 = Motors moving; 1 = Motors stopped.
Definition: DAS_Spat.c:140
void DB_2DPlot(char *title, int x, int y, int dx, int dy, int mode)
2D_Plot panel callback.
MOBJECT cell_form
Definition: DAS_Spatram.h:3057
int WriteAMSCB(MOBJECT shell, void *od, void *ad)
Write AMS.ini file .
void D_BuildH(int mod, int s)
Build Header of the measurements . .
Definition: Procedures.c:63
int WriteColorsCB(MOBJECT o, void *a, void *v)
Write selected color in DASSysColor.INI.
Control Panel and push buttons colors .
int SaveCnt
Definition: Procedures.c:49
int MDCreateSh_Mir(void)
Create the shell for the available Mirror Positions. Procedure that build the shell for the positioni...
Definition: CreateForms.c:5614
#define PRGMAXNUM
Maximum number of PRG File in MASTER or MASTERSZA File.
void WDT_Task_CB(MOBJECT o, void *od, void *ad)
Definition: DAS_Spat.c:1547
void DB_MirSelButtKB_CB(MOBJECT obj, MKeyEvent *pe, void *a_data)
callback for selsct a specified mirror push button with the keyboard
Definition: CreateForms.c:5748
char lfraz[6]
Definition: DAS_Spat_Conf.c:94
void ColPickBackForeGCB(MOBJECT o, void *a, void *v)
select if the foreground or background color of the selected object will be picked ...
void FormatData(void)
trasform mm/gg/aa in gg/mm/aa
Definition: RTC_Time.c:45
void DB_Undo2Do_Colors(short undocol[], short docol[])
Assign to the DO_Color structure the Color Values of the UNDO_Color Structure.
int ContFP
Counter for File position.
Definition: DAS_Spat.c:123
Union for MGui events.
Definition: Mguidefs.h:828
void E_Measure(void)
Perform Measurement. All the E_xxxxx() function are used during the execution in PRG mode...
Definition: Exec.c:1060
int QJFlg
Definition: DAS_Spatram.h:2969
int HomeNDFiltersFast(void)
(Fastest) ND Fliter wheel in the reference Position. The ND Fliter wheel reaches the reference Positi...
Definition: Init.c:941
void E_HGratCal(void)
Perform home grating and HG Calibration. All the E_xxxxx() function are used during the execution in ...
Definition: Exec.c:1488
void WinRes(void)
Definition: RTC_Time.c:1067
structure for FTP setting
void LoadDefaultDPAL(void)
Load Default system colors. Procedure that load the DAS colors if the file {homedir}/config/DASSysCol...
Definition: Load.c:762
int WriteEquipini(void)
Write equipment.ini file .
int SZAMax
Maximum SZA for performing measurements.
Definition: DAS_Spat.c:116
int perc2int(int mod, char *string)
translate the percent power in AMS digit unit. The percent power assigned to the motor trough the AMS...
char * EquipCode2Name(int eqcode, char *src, char *dest)
translate the Equipment Code in the Equipment Name
void DB_NDFil_CB(MOBJECT p, void *od, void *ad)
callback for filter wheel positioning in Filter shell
Definition: CreateForms.c:6360
void D_Average(int mod)
Performs averaged measurements .
Definition: Procedures.c:2655
int LoadPaletteCB(MOBJECT o, void *o_data, void *a_data)
Callback for LoadTestPalette.
void DB_ChangeColorCellCB(MOBJECT o, MVALUE o_data, void *a_data)
draw the object &#39;o&#39; with the selected color
int IDX
Number of sensible horizontal pixels.
Definition: DAS_Spat.c:118
int SD_Zenith(float ang)
Positioning Zenith. The Zenith reaches the position specified by ang.
Definition: Spat_Device.c:2916
void ColumnFCB(MOBJECT p, void *od, void *ad)
int SetWorkDirMGUIenv(char *buff)
set DAS and MGUI enviroment when the program is launched undirectly (for offlineplot or log or auto o...
Definition: DAS_Spat.c:3353
void E_SetCCDTemp(void)
Set CCD Temp. Set CCD Temp. All the E_xxxxx() function are used during the execution in PRG mode...
Definition: Exec.c:375
LOG file and time structure.
int SD_FilterW(int filter)
Positioning Filter wheel. The filter wheel move on the filter number specified by filter...
Definition: Spat_Device.c:2244
void E_ExtShutOpen(void)
Open External Shutter.
Definition: Exec.c:79
void DB_ColorPick(MOBJECT o)
void TextColorAssignCB(MOBJECT o, MVALUE o_data, void *a_data)
int D_InitPC104(void)
Starting function that calls the driver functions used NOTE: By convention, you should capture the BY...
Definition: Dscad.c:120
void DOASProcCB(MOBJECT p, void *od, void *ad)
int LoadGeoCoord(void)
Load Geographic Coordinate of the station. Procedure that load the Geographic Coordinate of the stati...
Definition: Load.c:1477
void E_Almucantar(void)
. All the E_xxxxx() function are used during the execution in PRG mode
Definition: Exec.c:1680
void Master_Error(int w)
Definition: Errors.c:98
char * CodeEq2Name(int code)
code Equipment to Name
Definition: Load.c:371
void DB_LampSelButtMouse_CB(MOBJECT obj, MMouseEvent *pe, void *a_data)
callback for selsct a specified push button with the keyboard
Definition: CreateForms.c:5041
void DB_CellResizeCB(MOBJECT obj, DRAWAREA_PREF *pref, void *a_data)
display selected Color
void DB_KB_ButtonActive(int mod)
Enable/Disable Push buttons on the Control Panel.
Definition: CreateForms.c:3810
int HomeGratingFast(int mod)
(Fastest) Grating in the reference Position. The Grating reaches the reference Position. Similar to HomeGrating(void), but faster
Definition: Init.c:780
MirrorSt MIS
Mirror.
Definition: DAS_Spat.c:61
void Task_LOG(TIMEOUT_ID id, void *data)
LOG Task. Write on the LOG file during DAS execution.
Definition: RTC_Time.c:246
double CalcFluxIndex(unsigned short mis[], int dx, int dy, float te)
calculates the Flux Index of a measurement
Definition: Utils.c:306
int ChkMaster(int mod)
Definition: DAS_Spat.c:2730
int LoadGeoDB(void)
Definition: Load.c:1432
geographical coordinate structure .
void E_WAIT(void)
Delay Procedure. sleep the program . All the E_xxxxx() function are used during the execution in PRG ...
Definition: Exec.c:731
void Task_AMSH(TIMEOUT_ID id, void *data)
AMS Home Task. Refresh the temperatures during DAS execution.
Definition: Chktemp.c:1047
int E_Home_SM2(void)
Home for SM2. Set the reference position for Stepper motor 2 (Grating). All the E_xxxxx() function ar...
Definition: Exec.c:139
void MAPDefPixCB(MOBJECT o, void *id, void *a_data)
GetDefPix(mod) Callback At the pression of the &#39;Execute&#39; button in the appropriate shell the GetDefPi...
int ExtLamp(int mod)
change the status of the external lamp change the status of the external lamp (ON or OFF) through a r...
Definition: Exec.c:1117
void delay(unsigned long d)
Pauses for a specified number of milliseconds. .
Definition: Dxl.c:1113
structure for deltaSZA Measurements .
void PB_H_CB(MOBJECT p, void *od, void *ad)
Quick Help Callback.
int MD_CreateBRowShell(int nrows)
Create windows of buttons. During the plotting of the measurements, create a shell of buttons if the ...
Definition: Spat_Plot.c:1625
int WritewlstepiniCB(MOBJECT shell, void *od, void *ad)
Write wlstep.ini file .
void ReadIMG(FILE *file, unsigned short *mat, int hp, int vp)
Read ASCII Image (Spectral Data only) .
Definition: Spat_Plot.c:1206
void LoadFontCB(MOBJECT obj, void *a, void *data)
This callback tries to load the specified font.
void RunFULL(void)
DAS Main LOOP for Equipment management This Procedure is called by the MGUIMain function when the exe...
Definition: DAS_Spat.c:2994
void PeltierPS(int mod)
Peltier Power Supply ON/OFF .
Definition: Spat_Device.c:2551
int PaletteMode
Definition: DAS_Spat.c:158
void ApplyImgCB(MOBJECT shell, void *od, void *ad)
Image type Application callback Apply to the CCD buffer the selected type of image (MONO or RGB) ...
void DB_WriteMode(int mod)
Definition: CreateForms.c:6722
void DB_Save(char *tit, int mod)
Save the acquired spectrum. Procedure that Save the acquired spectrum.
Definition: Save.c:552
void E_AAMeasure(void)
perform measurements with the Alt Azimuth Platform perform measurements with the Alt Azimuth Platform...
Definition: Exec.c:997
void WriteFontCB(MOBJECT obj, void *a, void *v)
This callback write on file the selected font (Not implemented yet)
void ColObjCB(MOBJECT o, void *a, void *v)
select the object to consider for color picking
void Peltier(int mod)
Peltier ON/OFF .
Definition: Spat_Device.c:2597
int Server
Definition: DAS_Spat.c:253
int ON_OFFLINEPLOT
Definition: DAS_Spat.c:117
void MIGEAntiSunTrack(void)
Definition: RTC_Time.c:206
int LoadDB_Options(void)
Load Options. Procedure that load the Options in the file {homedir}/config/Options.INI.
Definition: Load.c:390
void DB_RadioFNSelCB(MOBJECT o, void *id, void *a_data)
Set the file name mode.
void DB_MirrorImg_CB(MOBJECT o, void *a, void *v)
callback selecting the activation of the mirroring of the CCD image along the X or Y axis ...
int TMFlg
Definition: DAS_Spatram.h:2972
MOBJECT e_fsize
Definition: DAS_Spatram.h:3064
void QjLamp(int mod)
QJ Lamp ON/OFF .
Definition: Spat_Device.c:2724
int NOVA_In(int novatype, unsigned int DigIn)
Read the NOVA Input port.
Definition: DAS_Spat.c:1306
void WDT_CB(MOBJECT p, void *od, void *ad)
Definition: DAS_Spat.c:1507
void D_Positioning(MOBJECT p, int id, long tout)
Callback for the void D_VRange and display also the status in the corresponding CP labels...
Definition: Dxl.c:607
int SmoothData(unsigned short *source, float *destination, int horpix, int verpix, int filw, int bp)
Calc. the smoothed matrix of an unsigned short one. .
Definition: Save.c:973
MOBJECT g_label
Definition: DAS_Spatram.h:3058
int LoadTruePalette(void)
Load the palette map. Procedure that load the palette map from file {homedir}/Palettes/Danbomap1.map.
Definition: Load.c:948
void DB_RadioAvgModeCB(MOBJECT o, void *id, void *a_data)
Set the Averaging mode flag.
void MDCreateMoveZenAzimDeg(void)
Definition: CreateForms.c:3573
int MaskedPix[100][6]
Masked pixel&#39;s array.
Definition: Load.c:37
void CCDSetupCB(MOBJECT shell, void *od, void *ad)
CCD setup Callback. Execute DCS.exe (DTA Camera Select)
int WriteHardwareiniCB(MOBJECT shell, void *od, void *ad)
Write hardware.ini file .
CARD32 MTColor
Definition: Mguidefs.h:183
int FlgFG
Definition: DAS_Spat_Conf.c:92
void DB_ColorAssign(MOBJECT a[], int numel, short tc[])
Assign to the selected object the chosen color.
void E_Dark(void)
Execute Dark Measurement. Procedure for Dark Measurement. All the E_xxxxx() function are used during ...
Definition: Exec.c:279
int FilSet
filter wheel position definition - for SD_FilterW
Definition: CreateForms.c:5992
paramini PARAM
Param.ini.
Definition: CreateForms.c:90
MTColor label_fgc
Definition: DAS_Spatram.h:3059
void q_sort(float numbers[], int left, int right)
quick sort of one array
int AssignParam(int mod)
Assign parameters to the CP labels. .
Definition: Load.c:990
void TaskWDT(TIMEOUT_ID id, void *data)
Definition: DAS_Spat.c:1767
int wl[]
WaveLength definition - for SD_Grating.
Definition: DAS_Spat.c:182
int DD_VRip[16]
Definition: Utils.c:150
dlog DLOG
Definition: DAS_Spat.c:52
int PID_Calc(int mod, int pow)
Definition: Chktemp.c:78
void IoCreateCB(MOBJECT p, void *od, void *ad)
Definition: DOAS_FullProj.c:90
void Task_HomeGrat(TIMEOUT_ID id, void *data)
Home grating Task. 5) Check for reached end-run of the stepper motor for the grating ...
Definition: RTC_Time.c:980
int MDCreateSh_Wl(void)
Create the shell for the available Wavelength. Procedure that build the shell for the availables wave...
Definition: CreateForms.c:5815
unsigned int * mattempbuff
Definition: DAS_Spatram.h:3009
void Task_Timer(TIMEOUT_ID id, void *data)
Timer Task. Very useful procedure that: 1) Provide to refresh the clock display 2) Check if daylight ...
Definition: RTC_Time.c:1184
dpwd DPWD
Danbo Passw.
Definition: CreateForms.c:79
int SD_PosAADev(double z, double a)
perform the simoultaneous positioning of the AltAzimuth platform z = Zenith Axis a = Grating Position...
Definition: Spat_Device.c:447
int BlindPix
Number of blind pixels (usefull for Dark Current)
Definition: DAS_Spat.c:120
int LoadParamLog(void)
Load file for CCD status. Procedure that load the file {homedir}/config/paramlog.ini, for the actual status of the CCD.
Definition: Load.c:1517
MOBJECT drawa
Definition: DAS_Spatram.h:3053
void sleep(clock_t wait)
Pauses for a specified number of milliseconds. .
Definition: Load.c:1566
NDFilterWheelSt NDFWS
ND Filter Wheel.
Definition: DAS_Spat.c:58
Control Flags.
dfont DFONT
int E_Home_SM3(void)
Home for SM3. Set the reference position for Stepper motor 3 (Filter Wheel). All the E_xxxxx() functi...
Definition: Exec.c:154
void ShiftImg(int hp, int vp)
Used to correct some data files.
Definition: Utils.c:765
void WriteSelColandSmoothed(int mod, FILE *fd, int selcol)
write selected Column
Definition: Save.c:1060
int DB_Ask(char *tit, char *bmp, char *label, char *pre, int len, char *pbtype)
Input Shell Create an input box.
Definition: CreateForms.c:5373
float MIGEActualZenAz(int mode)
convert SUN AZIMUTH and ZENITH angles, to be used with MIGE mode = 0 –> fix azimuth and return azimu...
Definition: Spat_Device.c:2759
int PeltFlg
Definition: DAS_Spatram.h:2971
void DB_KeyComSelButtKB_CB(MOBJECT obj, MKeyEvent *pe, void *a_data)
callback for selsct a specified push button with the keyboard
Definition: CreateForms.c:5152
void D_Saving(void)
Saving image. Procedure for saving the CCD Image Used since version 2.1.0. The coiche between binary ...
Definition: Procedures.c:1369
int DB_ReInitCamera(void)
Re-Initialize Camera Parameters. Procedure that re-initialize the parameters for the CCD Camera...
int E_Home_SM1(void)
Home for SM1. Set the reference position for Stepper motor 1 (Input Mirror). All the E_xxxxx() functi...
Definition: Exec.c:111
void DiffCB(MOBJECT p, void *od, void *ad)
int DB_InitCOM(int comn)
Init selected COM port.
Definition: Init.c:452
void ShutDOWN(void)
Creates shell for Shutting down the instrument .
Definition: CreateForms.c:6903
void UPS_Status(void)
Definition: Save.c:32
int ChkWinInstance(char *buff, MOBJECT obj)
Definition: DAS_Spat.c:2153
int DAS_StartHour
Definition: DAS_Spat.c:106
void ColorMapInputCB(MOBJECT obj, MEvent *pe, void *a_data)
Declared but not used.
void ColorFreeCB(MOBJECT o, void *o_data, void *a_data)
Declared but not used.
void MDQuitCB(MOBJECT shell, void *od, void *ad)
callback for closing a generic MGUI shell
Definition: REQ.C:40
int PrgNumInM
Actual number of PRG File in current MASTER or MASTERSZA File.
Definition: DAS_Spat.c:97
int ReadLogFile(int mod, char *dir, char *filename, int nx, int ny, struct omutemp)
Read DAS LOG File. .
unsigned int data[576]
Conversion data buffer 64 samples * 8 channels * 2 bytes.
int DB_StepMotor(int id, int motor, long step, int dir)
Send steps to the selected stepper motor. .
Definition: Dxl.c:816
int fraz2val(int mod, char *val)
ratio value to decimal value opposite than listval2fraz or val2fraz
int ReadHeader_ASCII(int mod, FILE *fd)
Read ASCII Header of the measurement. .
Definition: Spat_Plot.c:1877
int DB_HelpCB(MOBJECT o, void *od, void *ad)
Help Callback Create the help in the predefined WEB Browser.
Definition: DAS_Spat.c:881
const char * DeviceTypeInput[]
const char array for the Device type <-> Input association
Definition: DAS_Spat.c:247
void MDCreateLISC(int c, int e)
Command KEYBOARD. Procedure that build the shell for the Command KEYBOARD. Used in old versions...
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 ...
void E_REM(void)
Flush string since the Carriege Return. Procedure for flushing the readed string since the Carriege R...
Definition: Exec.c:47
void DB_Mir_CB(MOBJECT p, void *od, void *ad)
callback for input mirror positioning in Mirror shell
Definition: CreateForms.c:5692
int SD_Azimuth(float ang, float raz)
Positioning Azimuth. The Zenith reaches the position specified by ang.
Definition: Spat_Device.c:3110
void Task_CCD_Temp(TIMEOUT_ID id, void *data)
CCD Temperature Task. Provide the thermoregulation of the CCD sensor during DAS execution.
Definition: Chktemp.c:1068
void D_UndoCB(MOBJECT o, void *a, void *v)
Undo the previous color setting operation.
unsigned short * ImatDark
buffer for the dark image
Definition: DAS_Spatram.h:3045
int DT_CorrHeader()
Used to correct the header in some data files.
Definition: Utils.c:662
Control Panel and push buttons fonts .
int E_Home_SM4(void)
Home for SM4. Set the reference position for Stepper motor 4 (Neutral density filter wheel)...
Definition: Exec.c:209
int bold
Definition: DAS_Spat_Conf.c:88
void __stdcall ShowDown(const char *str, int port)
Shows the countdown. Procedure for the visualisation of the countdown.
Definition: Init.c:98
int PrgNum
Definition: DAS_Spat.c:96
int HomeAzimFast(void)
Home for Azimuth Axis.
Definition: Init.c:1229
void ColorMapResizeCB(MOBJECT obj, DRAWAREA_PREF *pref, void *a_data)
Declared but not used.
FilterWheelSt FWS
Filter Wheel.
Definition: DAS_Spat.c:57
void ReadLine(char *buf, int nc, FILE *f)
Read Line on a file Read one record of nc character on the file f.
Definition: Load.c:72
int IDY
Number of sensible vertical pixels.
Definition: DAS_Spat.c:119
MOBJECT MDCreateExpo(char *tit)
Create Exposure/countdown shell. Procedure that build the Exposure/countdown shell during the calcula...
Definition: Init.c:55
void WriteIMG_BIN(int fd, unsigned short *mat, int hp, int vp)
Definition: Spat_Plot.c:1153
int HomeGrating(void)
Grating in the reference Position. The Grating reaches the reference Position.
void E_Zenith(void)
Position Zenith Axis.
Definition: Exec.c:1461
int D_Calibra(void)
Spectral Calibration Procedure for the spectral calibration with HG lamp. Shift of HG spectral line a...
Definition: Procedures.c:2313
void DB_AMSposmode_CB(MOBJECT o, void *a, void *v)
callback selecting the positioning mode for stepper motors ( sequential or simulaneaous) ...
void E_ChkExLamp(void)
Definition: Exec.c:1225
int Total
Progressive acquisition number for file (MAX defined = 50)
Definition: Exec.c:34
void E_Qj_On(void)
Qj ON. QJ - Halogen - lamp ON. All the E_xxxxx() function are used during the execution in PRG mode...
Definition: Exec.c:263
int NOVA_Out(int novatype, unsigned int DigOut)
Write the NOVA Output port.
Definition: DAS_Spat.c:1375
char * Fil_Code[]
const char array for the realisation of the Filters buttons in the Filter shell
Definition: DAS_Spat.c:207
int E_Home_SM6(void)
Home for SM6. Set the reference position for Stepper motor 6 (MIGE Azimuth). All the E_xxxxx() functi...
Definition: Exec.c:182
DrawArea Object&#39;s resize data.
Definition: Mguidefs.h:1122
int RemoveSpikes(int mod, unsigned short *mat, int horpix, int verpix, int blindpix)
Removes Spikes on a measure.
Definition: FFT.c:369
int Fetch(void)
Reads the key-word in PRG Files .
Definition: DAS_Spat.c:298
unsigned int LevelDefPix
Definition: DAS_Spat.c:126
void DB_DefectPixCorr(void)
Apply thew pixel correction. .
Definition: Procedures.c:1568
paramini structure . It contains some of the parameters defined in the file PARAM.INI .
float MIGEAz(float p)
Definition: CreateForms.c:3475
void PerformMeas(int mod, int ar, double te, int mt, int sv, int pl)
Perform Averaged or single measurements.
Definition: Exec.c:463
char ddmmyyf[6]
Definition: RTC_Time.c:39
int MirSet
mirror position definition - for SD_Mirror
Definition: CreateForms.c:5612
void ModifyConfFileCB(MOBJECT o, void *id, void *a_data)
Modification DAS Configuration files Callback Set if the blind pixels will be displayed or not on the...
void ValidateCB(MOBJECT edit, EDIT_VAL *ev, void *ii)
Text Validation callback Validation callback for the text typed in different text box...
void ConfigCB(MOBJECT p, void *od, void *ad)
DAS Configuration shell creation callback.
int N_RM
Number of measurements for Averaging mode in fixed exposure time mode.
Definition: DAS_Spat.c:114
void SetItalicCB(MOBJECT obj, MVALUE a, void *data)
This callback toggles the Italic attribute.
int LoadDB_DefectPixel(char *buff)
Load Defective pixel mask. Procedure that load the Defective pixel mask in the file {homedir}/config/...
Definition: Load.c:182
void E_Meashor(void)
perform horizontal measurements (3) 1) measurement with external lamp 2) measurement without the exte...
Definition: Exec.c:1280
int ViewPlot(int mod)
Create the plot shell. Procedure that build the plot shell for the data visualization.
Definition: Spat_Plot.c:3775
int MTFont
Definition: Mguidefs.h:175
void E_DirectSun(void)
. All the E_xxxxx() function are used during the execution in PRG mode
Definition: Exec.c:1596
void DB_RadioDarkCB(MOBJECT o, void *id, void *a_data)
Set the dark removing from the measurements.
int RItem
number of Pixel, Column, Row Item
Definition: Load.c:40
int ExtShutt(int mod)
change the status of the external shutter change the status of the external shutter (OPEN or CLOSED) ...
Definition: Exec.c:1155
id&#39;s for different tasks .
structure for MIGE Dwvice .
char ddmmyy[8]
Definition: RTC_Time.c:38
void E_DFMeasure(void)
Perform Measurement setting the ND Filter Wheel also. All the E_xxxxx() function are used during the ...
Definition: Exec.c:911
void DB_SelOutModeCB(MOBJECT o, void *id, void *a_data)
Select the Output for the Temperature AD Converter .
void ColorSaveCB(MOBJECT o, void *o_data, void *a_data)
Declared but not used.
void DB_PlotDisplayCB(MOBJECT o, void *id, void *a_data)
Select if the PLOT will be displayed after the measurement .
int Master
Definition: DAS_Spat.c:100
void Status(char *tit)
Writes information&#39;s on the Status label .
Definition: Load.c:1556
MTFont font
Definition: DAS_Spatram.h:3066
void SunCalcCB(MOBJECT p, void *od, void *ad)
int sel_cell
Definition: DAS_Spatram.h:3060
void E_ExtShutClose(void)
Close External Shutter.
Definition: Exec.c:91
MOBJECT _shell000
Definition: DAS_Spatram.h:3052
char * ERR_Option(int ercode)
Alerts for OPTION.INI errors Creates a message window reporting the reasons for the error...
Definition: Load.c:325
void DB_ShutterType_CB(MOBJECT o, void *a, void *v)
callback selecting the type of installed shutter
int b_c
Definition: DAS_Spatram.h:3060
NOVA7892 structure .
void E_NDFilter(void)
Set ND Filter. Set ND Filter All the E_xxxxx() function are used during the execution in PRG mode...
Definition: Exec.c:429
char * Fil_Code8H[]
const char array for the realisation of the Filters buttons in the Filter shell
Definition: DAS_Spat.c:204
void DDMessage(char *str)
Definition: REQ.C:13
Definition: Dildef.h:240
int hertz2int(int mod, char *string)
translate the Hertz speed in AMS digit unit.
void SaveCalib(int mod)
Definition: Procedures.c:2130
void DB_Undo2Do_Fonts(MTFont undofont, MTFont dofont)
void E_IRefSun(void)
Io Measured near the sun. This procedure carries out a measurements for the reference spectrum used i...
Definition: Exec.c:845
void D_CloseVR(MOBJECT p, void *od, void *ad)
Callback closing the status bar.
Definition: Utils.c:140
int WriteOptioniniCB(MOBJECT shell, void *od, void *ad)
Write Options.ini file .
int ReadHeader_BIN(int fd)
read the BINARY header of the stored spectrum
Definition: Spat_Plot.c:1798
void DB_RadioPixCorrCB(MOBJECT o, void *id, void *a_data)
Set the image Correction flag.
const char * Mir_CodeTropo[]
const char array for the realisation of the Mirrors buttons in the Mirror shell for TROPOGAS ...
Definition: DAS_Spat.c:234
int DT_CorrFileEvora(void)
Used to correct some data files.
Definition: Utils.c:786
void DB_SetXUnitsCB(MOBJECT o, void *id, void *a_data)
Select the X axis Unit mode .
void E_AutoRange(void)
Autoranging. Procedure for Autoranging. All the E_xxxxx() function are used during the execution in P...
Definition: Exec.c:342
stepm STEPM
Stepper Motors.
Definition: DAS_Spat.c:50
void IoSetupCB(MOBJECT p, void *od, void *ad)
Definition: DOAS_FullProj.c:86
long AbsFilePos
Absolute File position.
Definition: DAS_Spat.c:122
unsigned long countsopsh
counting the number of opening shutter
Definition: DAS_Spat.c:133
long REL_FILE_POS[51]
relative File position
Definition: DAS_Spat.c:124
void DAS_Error(int c)
Definition: Errors.c:124
void HiresPS(int mod)
Hires Power Supply ON/OFF .
Definition: Spat_Device.c:2532
void ReadIMG_BIN(int fd, unsigned short *mat, int hp, int vp)
read the BINARY stored spectrum
Definition: Spat_Plot.c:1166
int r_c
Definition: DAS_Spatram.h:3060
double AutoRange(int mod)
Calculate the exposure time The optimum exposure time (TExp) is calculated with an initial TExpAR=0...
Definition: Procedures.c:899
void Radio(int g)
NOT Used .
Definition: Exec.c:650
tools buttons . Push buttons for various tools .
void DB_WlSelButtMouse_CB(MOBJECT obj, MMouseEvent *pe, void *a_data)
callback changing the bakground color of the push button passing the mouse over it ...
Definition: CreateForms.c:5905
void DB_WlSelButtKB_CB(MOBJECT obj, MKeyEvent *pe, void *a_data)
callback for selsct a specified wavelength push button with the keyboard
Definition: CreateForms.c:5927
void WriteInit(const char *sname, char *dateffn, char *timebuff)
Init the daily LOG file .
Definition: RTC_Time.c:158
void DB_SetCCDTargetTempCB(MOBJECT o, void *id, void *a_data)
Select the CCD temperature mode .
char * Fil_CodeTropo[]
const char array for the realisation of the Filters buttons in the Filter shell for TROPOGAS instrume...
Definition: DAS_Spat.c:210
void E_ExtLampOFF(void)
External lamp OFF.
Definition: Exec.c:66
void E_Qj_Off(void)
Qj OFF. QJ - Halogen - lamp OFF. All the E_xxxxx() function are used during the execution in PRG mode...
Definition: Exec.c:271
int LoadDasSysCol(void)
Load system colors. Procedure that load the DAS colors in the file {homedir}/config/DASSysColor.INI.
Definition: Load.c:811
unsigned char Port
const char * KeyCode[]
Definition: DAS_Spat.c:164
void MDCreateSh_Plot(void)
Plot shell. Procedure that build the shell for plotting the data.
long PrgCnt
For PRG File.
Definition: DAS_Spat.c:93
int MDCreateSh_Fil(void)
Create the shell for the available Filters. Procedure that build the shell for the positioning of the...
Definition: CreateForms.c:5994
void DB_AskCB(MOBJECT p, void *od, void *ad)
Input Shell Callback Callback for the Input Shell.
Definition: CreateForms.c:5462
void DB_MIGEType_CB(MOBJECT o, void *a, void *v)
int DT_ColFormat(void)
Callback for Column format.
Definition: Utils.c:431
MOBJECT g_sbar
Definition: DAS_Spatram.h:3057
#define _MAX_PATH
Definition: Dildef.h:202
void D_PrintBILSPH(FILE *fff)
Print Header.
Definition: Utils.c:581
void DB_MirSelButtMouse_CB(MOBJECT obj, MMouseEvent *pe, void *a_data)
callback changing the bakground color of the push button passing the mouse over it ...
Definition: CreateForms.c:5708
MOBJECT MDCreate2DPlot(char *title, int x, int y, int dx, int dy, int mode)
create the 2D_Plot panel via the MDCreate_2DPlot.
void Task_AutoEx(TIMEOUT_ID id, void *data)
Automatic Execution Task. .
Definition: RTC_Time.c:963
structure for OMU temperatures .
Definition: bildef.h:97
char * Fil_CodeNG[]
const char array for the realisation of the Filters buttons in the Filter shell for GASCODNG2 and NG3...
Definition: DAS_Spat.c:216
void quickSort(float numbers[], int array_size)
callback for q_sort()
int HomeMirrorFast(void)
(Fastest) Mirror in the reference Position. The Mirror reaches the reference Position. Similar to HomeMirror(void), but faster
int DB_CalcFluxI(char *nomefile)
Definition: Utils.c:328
MTColor cell_color
Definition: DAS_Spatram.h:3059
int LoadFTPSetting(void)
Load FTP Setting for daily back-up.
Definition: Load.c:286
int LoadEquipment(void)
Load the type of Equipment. {homedir}/config/param.ini.
Definition: Load.c:1089
int HomeFiltersFast(void)
(Fastest) Fliter wheel in the reference Position. The Fliter wheel reaches the reference Position...
Definition: Init.c:853
int SZACalc(double d_lat, double d_long, double d_tzone, int d_year, int d_daynum, int d_hour, int d_minute, int d_second, float d_temp, float d_press, float d_tilt, float d_aspect)
Calc. Solar angles and radiatives quantities. .
Definition: CalcSZA.c:89
int FlgBG
Definition: DAS_Spat_Conf.c:91
void DOASSetupCB(MOBJECT p, void *od, void *ad)
Definition: DOAS_FullProj.c:94
MOBJECT frm3_dr1
Definition: DAS_Spatram.h:3058
char * HomePosition[]
const char array for the realisation of the Filters buttons in the ND Filter shell ...
Definition: DAS_Spat.c:227
MOBJECT MDCreate_2DPlot(char *title)
2DPlot Panel. Procedure that build the shell for the plotting of the LOG files.
Definition: 2DPlot.c:473
int CItem
Definition: Load.c:40
void ScreenInfoCB(MOBJECT o, void *s, void *v)
void MGUIMain(int argc, char **argv)
MAIN PROGRAM starting point Actions: .
Definition: DAS_Spat.c:3546
void LoadIo(int mod, char *fname)
Definition: Spat_Plot.c:2678
structure for AD Tester
int PItem
Definition: Load.c:40
void DB_KeyB_CB(MOBJECT p, void *od, void *ad)
Push buttons callback .
Definition: CreateForms.c:4693
int SD_Zenith_H(float ang)
Definition: Spat_Device.c:2816
Validation data for the EditField Object.
Definition: Mguidefs.h:1387
const char * Mir_Code[]
const char array for the realisation of the Mirrors buttons in the Mirror shell
Definition: DAS_Spat.c:231
void Task_LIS_Temp(TIMEOUT_ID id, void *data)
OMU Thermoregulation Task. Provide the thermoregulation of the Optical Mechanical Unit In addition al...
Definition: Chktemp.c:873
void D_FixSZA(void)
Definition: RTC_Time.c:467
static double p
Definition: SOLPOS.C:131
void D_AutoExecution(void)
*.PRG Automatic Execution in Automatic Mode
Definition: RTC_Time.c:560
MOBJECT cell_drawa
Definition: DAS_Spatram.h:3058
MOBJECT MDCreate_CP(void)
Create Spectrometer Control Panel. Procedure that build the Control Panel for checking the spectromet...
Definition: CreateForms.c:1143
int DB_CloseCOM(void)
Close the previously opened COM port.
Definition: Init.c:460
void ShStCB(MOBJECT p, void *od, void *ad)
mtcl MTCL
MTColor.
Definition: 2DPlot.c:30
char * Fil_CodeNG1[]
const char array for the realisation of the Filters buttons in the Filter shell for GASCODNG1 instrum...
Definition: DAS_Spat.c:213
void E_AvgCCDHor(void)
Averaged Horizontal Measurements. Procedure for Averaged Measurements with external lamp...
Definition: Exec.c:538
int italic
Definition: DAS_Spat_Conf.c:89
void DB_CloseAsk(MOBJECT p, void *od, void *ad)
Input Shell Callback Callback for the Input Shell destruction.
Definition: CreateForms.c:5483
void AMS_Error(int w)
Alerts for AMS errors Creates a message window reporting the number of the error. ...
Definition: Errors.c:254
void AboutCB(MOBJECT o, void *s, void *v)
Create the About information shell. .
Definition: About.c:39
void E_Filter(void)
Filter Wheel positioning. Procedure for Filter Wheel positioning. All the E_xxxxx() function are used...
Definition: Exec.c:761
void DrawAreaExpFontCB(MOBJECT obj, MEvent *pe, void *data)
This callback draws strings using the selected font.
void SetBoldCB(MOBJECT obj, MVALUE a, void *data)
This callback toggles the Bold attribute.
int LoadDB_DispCoeff(void)
Load dispersion parameters. Procedure that load the dispersion parameters from file {homedir}/DOAS/Di...
Definition: Load.c:234
int FlgOBJ
Definition: DAS_Spat_Conf.c:93
void DMessage(char *str)
void GetDateTime(struct date *dp, struct time *tp, struct tm *when)
Definition: Save.c:43
int DT_LinkSpectra(void)
For the linked spectra (..on going!!!)
Definition: Utils.c:915
void CloseFontViewCB(MOBJECT p, void *a, void *data)
This callback Unloads the latest loaded font and destroys the dialog.
int WriteParaminiCB(MOBJECT shell, void *od, void *ad)
Write Param.ini file .
int SD_PosOMUDev(int m, int w, int f)
perform the simoultaneous positioning of the Spectrometer Devices in the OMU Unit m = mirror w = wave...
Definition: Spat_Device.c:747
int LoadTestPalette(char *nf)
Load a test palette. Procedure that load a test palette.
Definition: Load.c:908
void D_AverageTFix(void)
NOT Used .
Definition: Procedures.c:2597
int LoadParam(void)
Load the exe parameters. Procedure that load the parameters for CCD, Stepper Motors and Peltier from ...
Definition: Load.c:1215
void FANECU(int mod)
FAN ON/OFF .
Definition: Spat_Device.c:2619
int D_WriteInitLog(char *str)
writes devices errors(AMS, CCD...) on the Devices.log file.
Definition: Save.c:144
d_geo DGEO
geographical coordinates structure
Definition: CreateForms.c:92
void LoadDefaultDFONT(void)
Load Default Fonts. Procedure that load the DAS fonts if the file {homedir}/config/DASFonts.ini is not present.
Definition: Load.c:757
void DB_KeyComSelButtMouse_CB(MOBJECT obj, MMouseEvent *pe, void *a_data)
callback for selsct a specified push button with the keyboard
Definition: CreateForms.c:5072
int ChkConfigInstance(void)
Definition: DAS_Spat.c:2128
void WriteStatusD(int w)
NOT Used .
Definition: RTC_Time.c:1331
float MIGEZen(float p)
Definition: CreateForms.c:3419
int DD_VOpen[16]
Definition: Utils.c:151
MTColor * PLColor[]
Definition: DAS_Spat.c:251
int LoadExec(char *fname)
Load file for automatic execution. Procedure that load the file for automatic execution.
Definition: Load.c:1534
void E_HgScan(void)
Check the full spectral range with HG ON. All the E_xxxxx() function are used during the execution in...
Definition: Exec.c:1504
void D_SunCalc(void)
Sun Calculator Callback.
CARD32 TIMEOUT_ID
Definition: Mguidefs.h:1421
long PrgSiz
Length of PRG file (bytes)
Definition: DAS_Spat.c:94
int SD_Position(int m, int w, int f, double z, double a)
perform the simoultaneous positioning of the Spectrometer Devices m = mirror w = wavelength (Grating)...
Definition: Spat_Device.c:1243
int LoadWlstep(void)
load the file of the wavelength vs steps
Definition: DAS_Spat.c:258
void FlushLine(char *buf, int nc, FILE *f)
Flush line of file f read a maximum of nc character since when the read char is different from ch(10)...
Definition: Load.c:54
void DB_MIGEopmode_CB(MOBJECT o, void *a, void *v)
callback selecting the operation mode for the AltAzPlatform
int g_c
Definition: DAS_Spatram.h:3060
void DB_Wl_CB(MOBJECT p, void *od, void *ad)
callback for grating positioning in Wavelength shell
Definition: CreateForms.c:5891
MOBJECT MDCreatesh_vitesa(void)
Definition: ViTES_1.c:295
int DB_InitDil(void)
Initialize DIL. Procedure that initialize the DTA Imaging library.
Definition: Init.c:112
double TExp
CCD Exposure time [sec].
Definition: DAS_Spat.c:130
void E_ExtLampON(void)
External lamp ON.
Definition: Exec.c:54
void D_PrintSpectrum(FILE *fff)
Print Spectrum.
Definition: Utils.c:517
int BrowseLog(void)
void DB_Do2Undo_Fonts(MTFont dofont, MTFont undofont)
void * MOBJECT
Definition: Mguidefs.h:192
Definition: Dildef.h:234
MOBJECT e_fname
Definition: DAS_Spatram.h:3064
dftp DFTP
Definition: DAS_Spat_Conf.c:49
void E_Label(void)
labeling. The text after the key-word is a label. All the E_xxxxx() function are used during the exec...
Definition: Exec.c:745
void FontOBJSelCB(MOBJECT obj, void *a, void *v)
This callback select the object for applying font.
MOBJECT b_label
Definition: DAS_Spatram.h:3058
Status of the Mirror .
void D_VRange(char *str, int val, int r, int g, int b)
Create and display the status bar.
Definition: Utils.c:206
void E_Hg_Off(void)
HG OFF. Hg lamp OFF. All the E_xxxxx() function are used during the execution in PRG mode...
Definition: Exec.c:255
void D_Plot(void)
ViewPlot callback .
Definition: Procedures.c:192
void DB_PlotYAxisCB(MOBJECT o, void *id, void *a_data)
Select the Y axis Unit mode .
char * Program
pointer to PRG file
Definition: DAS_Spat.c:90
void ColorAssignCB(MOBJECT o, void *o_data, void *a_data)
int GetDefPix(int mod)
Maps the defective pixel.
MOBJECT MDCreateDOAS_MainSh(struct doas *pdoas)
DOAS shell. Procedure that build the shell for the DOAS main panels.
int MaskedRow[100][6]
Masked rows array.
Definition: Load.c:39
int TOTTEXP
Total Exposure time in Averaging mode.
Definition: DAS_Spat.c:115
int DT_FluxIndex(void)
Callback for Flux Index Calculation.
Definition: Utils.c:499
int MDCreateSh_Home(void)
Definition: CreateForms.c:6662
das DAS
DAS structure.
Definition: Chktemp.c:26
int DB_InfCB(MOBJECT o, void *od, void *ad)
Inf Callback Create the Inf shell.
Definition: DAS_Spat.c:915
void NovaTypeCB(MOBJECT p, void *od, void *ad)
Callback for NOVA selection.
void DB_Do2Undo_Colors(short docol[], short undocol[])
void DB_FilSelButtMouse_CB(MOBJECT obj, MMouseEvent *pe, void *a_data)
callback changing the bakground color of the push button passing the mouse over it ...
Definition: CreateForms.c:6144
void DB_Shutter_CB(MOBJECT o, void *a, void *v)
callback selecting if the shutter is installed or not
GratingSt GRS
Grating.
Definition: CreateForms.c:82
void DB_MIGE_CB(MOBJECT o, void *a, void *v)
callback selecting the operation mode for the AltAzPlatform
void Task_REFRESH_Temp(TIMEOUT_ID id, void *data)
Temperatures Task. Refresh the temperatures during DAS execution.
Definition: Chktemp.c:1579
mige Mige
void E_Meashor2(void)
perform horizontal measurements (2) 1) measurement with external lamp 2) measurement without the exte...
Definition: Exec.c:1370
void print2file(FILE *ff, int x, int y, unsigned int m)
Print to file the defective pixel.
void WDT_func(int mod)
Definition: DAS_Spat.c:1572
int HomeZenithFast(void)
Home for Zenith Axis.
Definition: Init.c:1143
void SwapMatrix(unsigned short *source, unsigned short *dest, int hp, int vp)
Copy the source matrix in the Destination one .
Definition: Spat_Plot.c:1979
int HGFlg
Definition: DAS_Spatram.h:2968
void ApplyChCB(MOBJECT shell, void *od, void *ad)
Apply changes in DAS Config callback.
void E_SetCCDVBin(void)
Set CCD Vert Binn. Set CCD Vert Binn. All the E_xxxxx() function are used during the execution in PRG...
Definition: Exec.c:446
dsave
void DB_Pause(void)
Definition: CreateForms.c:3766
int E_GetCCD(void)
Get CCD. Execute DB_GetCCD. All the E_xxxxx() function are used during the execution in PRG mode...
Definition: Exec.c:705
master structure .
void UnderOverPixCB(MOBJECT o, void *id, void *a_data)
Under/Over exposed pixels Callback At the pression of the button in DAS_Config the appropriate shell...
int E_Home_SM5(void)
Home for SM5. Set the reference position for Stepper motor 5 (MIGE Zenith). All the E_xxxxx() functio...
Definition: Exec.c:168
void E_Lambda(void)
Lambda Reading. When the WAVELEN key-word is encountred in the PRG file, the Wavelength code from PRG...
Definition: Exec.c:718
void LinkSpectraCB(MOBJECT p, void *od, void *ad)
palette DPAL
Definition: 2DPlot.c:27
int ReadHeaderOldF(FILE *fd)
read the ASCII header of the stored spectrum (OLD FORMAT - replaced by ReadHeaderOnly(FILE *fd) ...
Definition: Save.c:751
int SD_NDFilterW(int filter)
Positioning Filter wheel. The filter wheel move on the filter number specified by filter...
Definition: Spat_Device.c:2354
Status of the Filter wheel .
int ChkDigIO(unsigned char word, int bitn)
check for digital I/O Status
float SMfraz(int t)
denominator value of the stepping ratio
Definition: Spat_Device.c:129
tools TOOLS
tools structure
Definition: CreateForms.c:81
int DB_Column(char *sourcefilename)
Column format.
Definition: Save.c:1109
void CloseConfigCB(MOBJECT shell, void *od, void *ad)
Close DAS-Config callback close the DAS_Config window. If the testing of the ADConverter is running i...
System password structure .
int on
PRG execution control variabile.
Definition: DAS_Spat.c:109
void ShutterOpening(int mod)
Definition: Procedures.c:1685
void DB_EqTypeCB(MOBJECT o, void *a, void *v)
UNDO Control Panel and push buttons colors .
void WriteIMG(FILE *file, unsigned short *mat, int hp, int vp)
Definition: Spat_Plot.c:1178
void ComErrors(int w)
Alerts for COM errors Creates a message window reporting the number of the error. ...
Definition: Errors.c:164
long * AllocLongMat(int hp, int vp)
Definition: Spat_Plot.c:2024
void MGUIQuitCB(MOBJECT shell, void *od, void *ad)
Exit MGUI Library. Procedure that close MGUI .
Definition: DAS_Spat.c:728
Status of the Grating .
int SM_stepr(int t)
AMS &#39;steps/round&#39; value return the AMS &#39;steps/round&#39; value (microstepping) depending on the setted st...
Definition: Spat_Device.c:209
MOBJECT MDCreateDASConfig(void)
DAS Config shell. Procedure that build the shell for the DAS Config panels. The DAS Config allow for ...
int PrgNumExe
number of PRG file in execution
Definition: DAS_Spat.c:98
void Message(char *str, int er)
Create a message shell for the AMS errors (Debug Use). .
Definition: Dxl.c:1085
void DB_NDFilSelButtMouse_CB(MOBJECT obj, MMouseEvent *pe, void *a_data)
callback changing the bakground color of the push button passing the mouse over it ...
Definition: CreateForms.c:6382
int LoadDFONT(void)
Load Fonts. Procedure that load the DAS fonts from {homedir}/config/DASFonts.ini AVAILABLE for Releas...
Definition: Load.c:752
Types, structures and defines used in DAS Program.
void CCD_Error(char *str)
Alerts for CCD errors Creates a message window reporting the number of the error. ...
Definition: Errors.c:279
void E_SetCCDOffSet(void)
Set the CCD Offst (only for HIRES-V. All the E_xxxxx() function are used during the execution in PRG ...
Definition: Exec.c:394
int DB_GetCCD(int mod)
Get CCD Image. .
Definition: Procedures.c:1749
void E_Radio(void)
Radiometric Measurements. Procedure for Radiometric Measurements. All the E_xxxxx() function are used...
Definition: Exec.c:684
void getdate(struct date *tp)
get current date
Definition: Save.c:131
MTColor drawarea_bgc
Definition: DAS_Spatram.h:3062
void FixStepCB(MOBJECT p, void *od, void *ad)
int sel_x
Definition: DAS_Spatram.h:3060
void DB_Ask_SheelESC(MOBJECT obj, MKeyEvent *pe, void *a_data)
Input Shell Callback Callback for the Input Shell destruction at the pression of the ESC key...
Definition: CreateForms.c:5496
void DB_ChooseButtons(int w)
Definition: CreateForms.c:2560
const char * Wl_Code[]
const char array for the realisation of the wavelength buttons in the wavelength shell ...
int undofont
void E_Expo(void)
Exposuring. Read the Exposure time from PRG file. All the E_xxxxx() function are used during the exec...
Definition: Exec.c:365
void ResumeCB(MOBJECT p, void *od, void *ad)
flag FLAG
flags structure
Definition: CreateForms.c:84
int FANFlg
Definition: DAS_Spatram.h:2970
void DB_NDFilSelButtKB_CB(MOBJECT obj, MKeyEvent *pe, void *a_data)
callback for select a specified filter push button with the keyboard
Definition: CreateForms.c:6404
void D_Print_BIL_H_ASCII(int mod, FILE *fff)
Definition: Utils.c:621
int LookforWl_X(int x)
Definition: Procedures.c:2295
void E_Mirror(void)
Inpot Mirror positioning. Procedure for Input mirror positioning. All the E_xxxxx() function are used...
Definition: Exec.c:773
int sel_y
Definition: DAS_Spatram.h:3060
int DAS_StartDOY
Definition: DAS_Spat.c:107
undopal UDPAL
Definition: DAS_Spat_Conf.c:34
int MaskedCol[100][6]
Masked column array.
Definition: Load.c:38
void ColorMapExposeCB(MOBJECT obj, MEvent *pexp, void *a_data)
Declared but not used.
ids IDS
ID tasks.
Definition: DAS_Spat.c:54
______________________________________________________________________________________
Generated on Mon Sep 18 2017 11:44:08 for DAS - Rel. 3.1.6 - 18/09/2017.