565 void MGUIMain(
int argc,
char **argv);
786 void DB_Save(
char *tit,
int mod);
805 int DB_Ask(
char *tit,
char *bmp,
char *label,
char *pre,
int len,
char *pbtype);
907 void PerformMeas(
int mod,
int ar,
double te,
int mt,
int sv,
int pl);
909 int DB_InitAMS(
int nid,
int mod,
int powera,
int stepa,
int slopea,
int speeda,
int powerb,
int stepb,
int slopeb,
int speedb);
950 int DB_StepMotor(
int id,
int motor,
long step,
int dir);
1141 void Message(
char *str,
int er);
1559 void writelogmotor(
int mod,
int id_motore,
int k,
int d,
long steps,
unsigned char ams_id);
1643 void sleep( clock_t wait );
1709 void WriteInit(
const char *sname,
char *dateffn,
char *timebuff);
1801 void delay(
unsigned long d);
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);
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);
1956 void __stdcall
ShowDown(
const char *str,
int port);
1965 void __stdcall
DD_VRange(
const char *str,
int perc,
int Port);
2003 void DB_2DPlot(
char *title,
int x,
int y,
int dx,
int dy,
int mode);
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);
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);
2153 void quickSort(
float numbers[],
int array_size);
2157 void q_sort(
float numbers[],
int left,
int right);
2418 int perc2int(
int mod,
char *
string);
2460 void val2fraz(
int id,
int sn,
int val);
2554 void print2file(FILE *ff,
int x,
int y,
unsigned int m);
2624 void ReadLine(
char *buf,
int nc, FILE *f);
2642 int SD_Position(
int m,
int w,
int f,
double z,
double a);
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);
2751 int ChkDigIO(
unsigned char word,
int bitn);
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);
2905 void LoadIo(
int mod,
char *fname);
2932 int NOVA_Out(
int novatype,
unsigned int DigOut);
2939 int NOVA_In(
int novatype,
unsigned int DigIn);
2985 extern unsigned int data[576];
2989 extern double TPelt;
3074 extern char lfraz[6];
int RefreshDrArea(MOBJECT obj)
Redraw the draw arwa in a 2D Plot window.
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
int SmoothFloatData(float *source, float *destination, int horpix, int verpix, int filw, int bp)
Calc. the smoothed matrix of a float one. .
void E_Plot(void)
Plot Spectrum. Plot Spectrum. All the E_xxxxx() function are used during the execution in PRG mode...
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.
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...
void DAS_Message(char *str, int er)
int N_AVG
Number of measurements for Averaging mode in fixed number of meas. mode.
void E_Average(void)
Averaged Measurements. Procedure for Averaged Measurements. All the E_xxxxx() function are used durin...
int MainCommand
Command switch in main loop.
void FANPeltier(int mod)
FAN ON/OFF .
int SmoothingF(double *tmp, int npix, int pts)
Smoothing of 1D array.
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...
void D_rt(void)
D_readtemp_int callback .
void ExitCB(MOBJECT p, void *od, void *ad)
void CloseColPickCB(MOBJECT obj, void *s, void *v)
Declared but not used.
char env[_MAX_PATH]
Environment path.
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.
int SD_Grating(int ang)
Positioning Grating. The Grating move to the position specified by ang (Wavelength) ...
int SD_Mirror(int where)
Positioning Input Mirror. The Input Mirror reaches the position specified by where.
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's devices.
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...
void DB_RadDrkSourceCB(MOBJECT o, void *a, void *v)
Set the dark source.
void E_Azimuth(void)
Position Azimuth Axis.
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 .
int PRG_Check(int mod, char *prgname)
void HgLamp(int mod)
HG Lamp ON/OFF .
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.
char * NDFil_Code[]
const char array for the realisation of the Filters buttons in the ND Filter shell ...
int BuildLogRatio(void)
first attempt to apply the DOAS algorithm (..on going!!!)
int DB_InitCamera(int mod)
Initialize Camera Parameters. Procedure that initialize the CCD Camera.
int ReadHeaderOnly(FILE *fd)
read the ASCII header of the stored spectrum
void DB_Fil_CB(MOBJECT p, void *od, void *ad)
callback for filter wheel positioning in Filter shell
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
void E_AAPos(void)
alt Az Positioning. Available for SPATRAMPLUS and TROPOGAS (with the AltAzPlatform) ...
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.
void ReadIMG_old(FILE *file, int hp, int vp)
NOT Used .
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...
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.
void MDCreateWaitShell(void)
Create a waiting window .
double TPelt
CCD Temperature.
void gettime(struct time *tp)
get current time
void E_QjScan(void)
Check the full spectral range with QJ ON. All the E_xxxxx() function are used during the execution in...
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. .
void MDCreateMoveGrat(void)
Free Grating positioning. Procedure that build the shell for Free Grating positioning.
void __stdcall DD_VRange(const char *str, int perc, int Port)
long wav[]
Step Number definition - for SD_Grating.
int WlSet
Wavelength position definition - for SD_Grating.
int MDCreateSh_PWD(void)
Password shell. Procedure that build the shell for the System password in order to access the control...
void DB_FilterCB(MOBJECT p, void *od, void *ad)
Filter positioning callback.
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.
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.
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.
void ActMvGratCB(MOBJECT edit, char *text, void *ed)
Move Grating of a free steps number callback. .
int MDCreateSh_NDFil(void)
void E_SetCCDPow(void)
Set CCD Power. Set CCD Power. All the E_xxxxx() function are used during the execution in PRG mode...
void DB_ImgTypeCB(MOBJECT o, void *id, void *a_data)
Set the Image type.
void SZA_FindMin(void)
computation of daily minimum SZA
void D_PrintHMod(FILE *fff)
Print the header in Column format.
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...
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.
void DB_2DPlot(char *title, int x, int y, int dx, int dy, int mode)
2D_Plot panel callback.
int WriteAMSCB(MOBJECT shell, void *od, void *ad)
Write AMS.ini file .
void D_BuildH(int mod, int s)
Build Header of the measurements . .
int WriteColorsCB(MOBJECT o, void *a, void *v)
Write selected color in DASSysColor.INI.
Control Panel and push buttons colors .
int MDCreateSh_Mir(void)
Create the shell for the available Mirror Positions. Procedure that build the shell for the positioni...
#define PRGMAXNUM
Maximum number of PRG File in MASTER or MASTERSZA File.
void WDT_Task_CB(MOBJECT o, void *od, void *ad)
void DB_MirSelButtKB_CB(MOBJECT obj, MKeyEvent *pe, void *a_data)
callback for selsct a specified mirror push button with the keyboard
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
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.
void E_Measure(void)
Perform Measurement. All the E_xxxxx() function are used during the execution in PRG mode...
int HomeNDFiltersFast(void)
(Fastest) ND Fliter wheel in the reference Position. The ND Fliter wheel reaches the reference Positi...
void E_HGratCal(void)
Perform home grating and HG Calibration. All the E_xxxxx() function are used during the execution in ...
structure for FTP setting
void LoadDefaultDPAL(void)
Load Default system colors. Procedure that load the DAS colors if the file {homedir}/config/DASSysCol...
int WriteEquipini(void)
Write equipment.ini file .
int SZAMax
Maximum SZA for performing measurements.
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
void D_Average(int mod)
Performs averaged measurements .
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 'o' with the selected color
int IDX
Number of sensible horizontal pixels.
int SD_Zenith(float ang)
Positioning Zenith. The Zenith reaches the position specified by ang.
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...
void E_SetCCDTemp(void)
Set CCD Temp. Set CCD Temp. All the E_xxxxx() function are used during the execution in PRG mode...
LOG file and time structure.
int SD_FilterW(int filter)
Positioning Filter wheel. The filter wheel move on the filter number specified by filter...
void E_ExtShutOpen(void)
Open External Shutter.
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...
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...
void E_Almucantar(void)
. All the E_xxxxx() function are used during the execution in PRG mode
char * CodeEq2Name(int code)
code Equipment to Name
void DB_LampSelButtMouse_CB(MOBJECT obj, MMouseEvent *pe, void *a_data)
callback for selsct a specified push button with the keyboard
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.
int HomeGratingFast(int mod)
(Fastest) Grating in the reference Position. The Grating reaches the reference Position. Similar to HomeGrating(void), but faster
void Task_LOG(TIMEOUT_ID id, void *data)
LOG Task. Write on the LOG file during DAS execution.
double CalcFluxIndex(unsigned short mis[], int dx, int dy, float te)
calculates the Flux Index of a measurement
geographical coordinate structure .
void E_WAIT(void)
Delay Procedure. sleep the program . All the E_xxxxx() function are used during the execution in PRG ...
void Task_AMSH(TIMEOUT_ID id, void *data)
AMS Home Task. Refresh the temperatures during DAS execution.
int E_Home_SM2(void)
Home for SM2. Set the reference position for Stepper motor 2 (Grating). All the E_xxxxx() function ar...
void MAPDefPixCB(MOBJECT o, void *id, void *a_data)
GetDefPix(mod) Callback At the pression of the 'Execute' 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...
void delay(unsigned long d)
Pauses for a specified number of milliseconds. .
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 ...
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) .
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...
void PeltierPS(int mod)
Peltier Power Supply ON/OFF .
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)
void DB_Save(char *tit, int mod)
Save the acquired spectrum. Procedure that Save the acquired spectrum.
void E_AAMeasure(void)
perform measurements with the Alt Azimuth Platform perform measurements with the Alt Azimuth Platform...
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 .
void MIGEAntiSunTrack(void)
int LoadDB_Options(void)
Load Options. Procedure that load the Options in the file {homedir}/config/Options.INI.
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 ...
void QjLamp(int mod)
QJ Lamp ON/OFF .
int NOVA_In(int novatype, unsigned int DigIn)
Read the NOVA Input port.
void WDT_CB(MOBJECT p, void *od, void *ad)
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...
int SmoothData(unsigned short *source, float *destination, int horpix, int verpix, int filw, int bp)
Calc. the smoothed matrix of an unsigned short one. .
int LoadTruePalette(void)
Load the palette map. Procedure that load the palette map from file {homedir}/Palettes/Danbomap1.map.
void DB_RadioAvgModeCB(MOBJECT o, void *id, void *a_data)
Set the Averaging mode flag.
void MDCreateMoveZenAzimDeg(void)
int MaskedPix[100][6]
Masked pixel's array.
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 .
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 ...
int FilSet
filter wheel position definition - for SD_FilterW
void q_sort(float numbers[], int left, int right)
quick sort of one array
int AssignParam(int mod)
Assign parameters to the CP labels. .
void TaskWDT(TIMEOUT_ID id, void *data)
int wl[]
WaveLength definition - for SD_Grating.
int PID_Calc(int mod, int pow)
void IoCreateCB(MOBJECT p, void *od, void *ad)
void Task_HomeGrat(TIMEOUT_ID id, void *data)
Home grating Task. 5) Check for reached end-run of the stepper motor for the grating ...
int MDCreateSh_Wl(void)
Create the shell for the available Wavelength. Procedure that build the shell for the availables wave...
unsigned int * mattempbuff
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 ...
int SD_PosAADev(double z, double a)
perform the simoultaneous positioning of the AltAzimuth platform z = Zenith Axis a = Grating Position...
int BlindPix
Number of blind pixels (usefull for Dark Current)
int LoadParamLog(void)
Load file for CCD status. Procedure that load the file {homedir}/config/paramlog.ini, for the actual status of the CCD.
void sleep(clock_t wait)
Pauses for a specified number of milliseconds. .
NDFilterWheelSt NDFWS
ND Filter Wheel.
int E_Home_SM3(void)
Home for SM3. Set the reference position for Stepper motor 3 (Filter Wheel). All the E_xxxxx() functi...
void ShiftImg(int hp, int vp)
Used to correct some data files.
void WriteSelColandSmoothed(int mod, FILE *fd, int selcol)
write selected Column
int DB_Ask(char *tit, char *bmp, char *label, char *pre, int len, char *pbtype)
Input Shell Create an input box.
float MIGEActualZenAz(int mode)
convert SUN AZIMUTH and ZENITH angles, to be used with MIGE mode = 0 –> fix azimuth and return azimu...
void DB_KeyComSelButtKB_CB(MOBJECT obj, MKeyEvent *pe, void *a_data)
callback for selsct a specified push button with the keyboard
void D_Saving(void)
Saving image. Procedure for saving the CCD Image Used since version 2.1.0. The coiche between binary ...
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...
void DiffCB(MOBJECT p, void *od, void *ad)
int DB_InitCOM(int comn)
Init selected COM port.
void ShutDOWN(void)
Creates shell for Shutting down the instrument .
int ChkWinInstance(char *buff, MOBJECT obj)
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
int PrgNumInM
Actual number of PRG File in current MASTER or MASTERSZA File.
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. .
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. .
int DB_HelpCB(MOBJECT o, void *od, void *ad)
Help Callback Create the help in the predefined WEB Browser.
const char * DeviceTypeInput[]
const char array for the Device type <-> Input association
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...
void DB_Mir_CB(MOBJECT p, void *od, void *ad)
callback for input mirror positioning in Mirror shell
int SD_Azimuth(float ang, float raz)
Positioning Azimuth. The Zenith reaches the position specified by ang.
void Task_CCD_Temp(TIMEOUT_ID id, void *data)
CCD Temperature Task. Provide the thermoregulation of the CCD sensor during DAS execution.
void D_UndoCB(MOBJECT o, void *a, void *v)
Undo the previous color setting operation.
unsigned short * ImatDark
buffer for the dark image
int DT_CorrHeader()
Used to correct the header in some data files.
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)...
void __stdcall ShowDown(const char *str, int port)
Shows the countdown. Procedure for the visualisation of the countdown.
int HomeAzimFast(void)
Home for Azimuth Axis.
void ColorMapResizeCB(MOBJECT obj, DRAWAREA_PREF *pref, void *a_data)
Declared but not used.
FilterWheelSt FWS
Filter Wheel.
void ReadLine(char *buf, int nc, FILE *f)
Read Line on a file Read one record of nc character on the file f.
int IDY
Number of sensible vertical pixels.
MOBJECT MDCreateExpo(char *tit)
Create Exposure/countdown shell. Procedure that build the Exposure/countdown shell during the calcula...
void WriteIMG_BIN(int fd, unsigned short *mat, int hp, int vp)
int HomeGrating(void)
Grating in the reference Position. The Grating reaches the reference Position.
void E_Zenith(void)
Position Zenith Axis.
int D_Calibra(void)
Spectral Calibration Procedure for the spectral calibration with HG lamp. Shift of HG spectral line a...
void DB_AMSposmode_CB(MOBJECT o, void *a, void *v)
callback selecting the positioning mode for stepper motors ( sequential or simulaneaous) ...
int Total
Progressive acquisition number for file (MAX defined = 50)
void E_Qj_On(void)
Qj ON. QJ - Halogen - lamp ON. All the E_xxxxx() function are used during the execution in PRG mode...
int NOVA_Out(int novatype, unsigned int DigOut)
Write the NOVA Output port.
char * Fil_Code[]
const char array for the realisation of the Filters buttons in the Filter shell
int E_Home_SM6(void)
Home for SM6. Set the reference position for Stepper motor 6 (MIGE Azimuth). All the E_xxxxx() functi...
DrawArea Object's resize data.
int RemoveSpikes(int mod, unsigned short *mat, int horpix, int verpix, int blindpix)
Removes Spikes on a measure.
int Fetch(void)
Reads the key-word in PRG Files .
void DB_DefectPixCorr(void)
Apply thew pixel correction. .
paramini structure . It contains some of the parameters defined in the file PARAM.INI .
void PerformMeas(int mod, int ar, double te, int mt, int sv, int pl)
Perform Averaged or single measurements.
int MirSet
mirror position definition - for SD_Mirror
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.
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/...
void E_Meashor(void)
perform horizontal measurements (3) 1) measurement with external lamp 2) measurement without the exte...
int ViewPlot(int mod)
Create the plot shell. Procedure that build the plot shell for the data visualization.
void E_DirectSun(void)
. All the E_xxxxx() function are used during the execution in PRG mode
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
int ExtShutt(int mod)
change the status of the external shutter change the status of the external shutter (OPEN or CLOSED) ...
id's for different tasks .
structure for MIGE Dwvice .
void E_DFMeasure(void)
Perform Measurement setting the ND Filter Wheel also. All the E_xxxxx() function are used during the ...
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 .
void Status(char *tit)
Writes information's on the Status label .
void SunCalcCB(MOBJECT p, void *od, void *ad)
void E_ExtShutClose(void)
Close External Shutter.
char * ERR_Option(int ercode)
Alerts for OPTION.INI errors Creates a message window reporting the reasons for the error...
void DB_ShutterType_CB(MOBJECT o, void *a, void *v)
callback selecting the type of installed shutter
void E_NDFilter(void)
Set ND Filter. Set ND Filter All the E_xxxxx() function are used during the execution in PRG mode...
char * Fil_Code8H[]
const char array for the realisation of the Filters buttons in the Filter shell
void DDMessage(char *str)
int hertz2int(int mod, char *string)
translate the Hertz speed in AMS digit unit.
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...
void D_CloseVR(MOBJECT p, void *od, void *ad)
Callback closing the status bar.
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
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 ...
int DT_CorrFileEvora(void)
Used to correct some data files.
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...
stepm STEPM
Stepper Motors.
void IoSetupCB(MOBJECT p, void *od, void *ad)
long AbsFilePos
Absolute File position.
unsigned long countsopsh
counting the number of opening shutter
long REL_FILE_POS[51]
relative File position
void HiresPS(int mod)
Hires Power Supply ON/OFF .
void ReadIMG_BIN(int fd, unsigned short *mat, int hp, int vp)
read the BINARY stored spectrum
double AutoRange(int mod)
Calculate the exposure time The optimum exposure time (TExp) is calculated with an initial TExpAR=0...
void Radio(int g)
NOT Used .
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 ...
void DB_WlSelButtKB_CB(MOBJECT obj, MKeyEvent *pe, void *a_data)
callback for selsct a specified wavelength push button with the keyboard
void WriteInit(const char *sname, char *dateffn, char *timebuff)
Init the daily LOG file .
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...
void E_ExtLampOFF(void)
External lamp OFF.
void E_Qj_Off(void)
Qj OFF. QJ - Halogen - lamp OFF. All the E_xxxxx() function are used during the execution in PRG mode...
int LoadDasSysCol(void)
Load system colors. Procedure that load the DAS colors in the file {homedir}/config/DASSysColor.INI.
void MDCreateSh_Plot(void)
Plot shell. Procedure that build the shell for plotting the data.
int MDCreateSh_Fil(void)
Create the shell for the available Filters. Procedure that build the shell for the positioning of the...
void DB_AskCB(MOBJECT p, void *od, void *ad)
Input Shell Callback Callback for the Input Shell.
void DB_MIGEType_CB(MOBJECT o, void *a, void *v)
int DT_ColFormat(void)
Callback for Column format.
void D_PrintBILSPH(FILE *fff)
Print Header.
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 ...
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. .
structure for OMU temperatures .
char * Fil_CodeNG[]
const char array for the realisation of the Filters buttons in the Filter shell for GASCODNG2 and NG3...
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)
int LoadFTPSetting(void)
Load FTP Setting for daily back-up.
int LoadEquipment(void)
Load the type of Equipment. {homedir}/config/param.ini.
int HomeFiltersFast(void)
(Fastest) Fliter wheel in the reference Position. The Fliter wheel reaches the reference Position...
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. .
void DOASSetupCB(MOBJECT p, void *od, void *ad)
char * HomePosition[]
const char array for the realisation of the Filters buttons in the ND Filter shell ...
MOBJECT MDCreate_2DPlot(char *title)
2DPlot Panel. Procedure that build the shell for the plotting of the LOG files.
void ScreenInfoCB(MOBJECT o, void *s, void *v)
void MGUIMain(int argc, char **argv)
MAIN PROGRAM starting point Actions: .
void LoadIo(int mod, char *fname)
void DB_KeyB_CB(MOBJECT p, void *od, void *ad)
Push buttons callback .
int SD_Zenith_H(float ang)
Validation data for the EditField Object.
const char * Mir_Code[]
const char array for the realisation of the Mirrors buttons in the Mirror shell
void Task_LIS_Temp(TIMEOUT_ID id, void *data)
OMU Thermoregulation Task. Provide the thermoregulation of the Optical Mechanical Unit In addition al...
void D_AutoExecution(void)
*.PRG Automatic Execution in Automatic Mode
MOBJECT MDCreate_CP(void)
Create Spectrometer Control Panel. Procedure that build the Control Panel for checking the spectromet...
int DB_CloseCOM(void)
Close the previously opened COM port.
void ShStCB(MOBJECT p, void *od, void *ad)
char * Fil_CodeNG1[]
const char array for the realisation of the Filters buttons in the Filter shell for GASCODNG1 instrum...
void E_AvgCCDHor(void)
Averaged Horizontal Measurements. Procedure for Averaged Measurements with external lamp...
void DB_CloseAsk(MOBJECT p, void *od, void *ad)
Input Shell Callback Callback for the Input Shell destruction.
void AMS_Error(int w)
Alerts for AMS errors Creates a message window reporting the number of the error. ...
void AboutCB(MOBJECT o, void *s, void *v)
Create the About information shell. .
void E_Filter(void)
Filter Wheel positioning. Procedure for Filter Wheel positioning. All the E_xxxxx() function are used...
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...
void GetDateTime(struct date *dp, struct time *tp, struct tm *when)
int DT_LinkSpectra(void)
For the linked spectra (..on going!!!)
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...
int LoadTestPalette(char *nf)
Load a test palette. Procedure that load a test palette.
void D_AverageTFix(void)
NOT Used .
int LoadParam(void)
Load the exe parameters. Procedure that load the parameters for CCD, Stepper Motors and Peltier from ...
void FANECU(int mod)
FAN ON/OFF .
int D_WriteInitLog(char *str)
writes devices errors(AMS, CCD...) on the Devices.log file.
d_geo DGEO
geographical coordinates structure
void LoadDefaultDFONT(void)
Load Default Fonts. Procedure that load the DAS fonts if the file {homedir}/config/DASFonts.ini is not present.
void DB_KeyComSelButtMouse_CB(MOBJECT obj, MMouseEvent *pe, void *a_data)
callback for selsct a specified push button with the keyboard
int ChkConfigInstance(void)
void WriteStatusD(int w)
NOT Used .
int LoadExec(char *fname)
Load file for automatic execution. Procedure that load the file for automatic execution.
void E_HgScan(void)
Check the full spectral range with HG ON. All the E_xxxxx() function are used during the execution in...
void D_SunCalc(void)
Sun Calculator Callback.
long PrgSiz
Length of PRG file (bytes)
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)...
int LoadWlstep(void)
load the file of the wavelength vs steps
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)...
void DB_MIGEopmode_CB(MOBJECT o, void *a, void *v)
callback selecting the operation mode for the AltAzPlatform
void DB_Wl_CB(MOBJECT p, void *od, void *ad)
callback for grating positioning in Wavelength shell
MOBJECT MDCreatesh_vitesa(void)
int DB_InitDil(void)
Initialize DIL. Procedure that initialize the DTA Imaging library.
double TExp
CCD Exposure time [sec].
void E_ExtLampON(void)
External lamp ON.
void D_PrintSpectrum(FILE *fff)
Print Spectrum.
void DB_Do2Undo_Fonts(MTFont dofont, MTFont undofont)
void E_Label(void)
labeling. The text after the key-word is a label. All the E_xxxxx() function are used during the exec...
void FontOBJSelCB(MOBJECT obj, void *a, void *v)
This callback select the object for applying font.
void D_VRange(char *str, int val, int r, int g, int b)
Create and display the status bar.
void E_Hg_Off(void)
HG OFF. Hg lamp OFF. All the E_xxxxx() function are used during the execution in PRG mode...
void D_Plot(void)
ViewPlot callback .
void DB_PlotYAxisCB(MOBJECT o, void *id, void *a_data)
Select the Y axis Unit mode .
char * Program
pointer to PRG file
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.
int TOTTEXP
Total Exposure time in Averaging mode.
int DT_FluxIndex(void)
Callback for Flux Index Calculation.
int MDCreateSh_Home(void)
int DB_InfCB(MOBJECT o, void *od, void *ad)
Inf Callback Create the Inf shell.
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 ...
void DB_Shutter_CB(MOBJECT o, void *a, void *v)
callback selecting if the shutter is installed or not
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.
void E_Meashor2(void)
perform horizontal measurements (2) 1) measurement with external lamp 2) measurement without the exte...
void print2file(FILE *ff, int x, int y, unsigned int m)
Print to file the defective pixel.
int HomeZenithFast(void)
Home for Zenith Axis.
void SwapMatrix(unsigned short *source, unsigned short *dest, int hp, int vp)
Copy the source matrix in the Destination one .
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...
int E_GetCCD(void)
Get CCD. Execute DB_GetCCD. All the E_xxxxx() function are used during the execution in PRG mode...
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...
void E_Lambda(void)
Lambda Reading. When the WAVELEN key-word is encountred in the PRG file, the Wavelength code from PRG...
void LinkSpectraCB(MOBJECT p, void *od, void *ad)
int ReadHeaderOldF(FILE *fd)
read the ASCII header of the stored spectrum (OLD FORMAT - replaced by ReadHeaderOnly(FILE *fd) ...
int SD_NDFilterW(int filter)
Positioning Filter wheel. The filter wheel move on the filter number specified by filter...
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
tools TOOLS
tools structure
int DB_Column(char *sourcefilename)
Column format.
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.
void ShutterOpening(int mod)
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)
void ComErrors(int w)
Alerts for COM errors Creates a message window reporting the number of the error. ...
long * AllocLongMat(int hp, int vp)
void MGUIQuitCB(MOBJECT shell, void *od, void *ad)
Exit MGUI Library. Procedure that close MGUI .
int SM_stepr(int t)
AMS 'steps/round' value return the AMS 'steps/round' value (microstepping) depending on the setted st...
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
void Message(char *str, int er)
Create a message shell for the AMS errors (Debug Use). .
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 ...
int LoadDFONT(void)
Load Fonts. Procedure that load the DAS fonts from {homedir}/config/DASFonts.ini AVAILABLE for Releas...
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. ...
void E_SetCCDOffSet(void)
Set the CCD Offst (only for HIRES-V. All the E_xxxxx() function are used during the execution in PRG ...
int DB_GetCCD(int mod)
Get CCD Image. .
void E_Radio(void)
Radiometric Measurements. Procedure for Radiometric Measurements. All the E_xxxxx() function are used...
void getdate(struct date *tp)
get current date
void FixStepCB(MOBJECT p, void *od, void *ad)
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...
void DB_ChooseButtons(int w)
const char * Wl_Code[]
const char array for the realisation of the wavelength buttons in the wavelength shell ...
void E_Expo(void)
Exposuring. Read the Exposure time from PRG file. All the E_xxxxx() function are used during the exec...
void ResumeCB(MOBJECT p, void *od, void *ad)
void DB_NDFilSelButtKB_CB(MOBJECT obj, MKeyEvent *pe, void *a_data)
callback for select a specified filter push button with the keyboard
void D_Print_BIL_H_ASCII(int mod, FILE *fff)
void E_Mirror(void)
Inpot Mirror positioning. Procedure for Input mirror positioning. All the E_xxxxx() function are used...
int MaskedCol[100][6]
Masked column array.
void ColorMapExposeCB(MOBJECT obj, MEvent *pexp, void *a_data)
Declared but not used.