User Tools

Site Tools


start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
start [2019/01/26 20:04]
admin [Off line analisys]
start [2019/01/26 21:06] (current)
admin [Off line analisys]
Line 352: Line 352:
   * QLSA_Set_Start_Time;   * QLSA_Set_Start_Time;
  
-In order to analyzed data stored in a file, we need to know the number of channels used during acquisition and the acquisition frequency. More importantly, the number of channles is part of QLSA initialization. +In order to analyze data stored in a file, we need to know the number of channels used during acquisition and the acquisition frequency. More importantly, the number of channles is part of QLSA initialization. 
 If data have been stored using QLSA_Start_Save_Set (see above) the number of channels and the acquisition frequency are stored in the file with extension ".spe". With these premises, we can discuss the role and operation of all the functions devoted to playback. If data have been stored using QLSA_Start_Save_Set (see above) the number of channels and the acquisition frequency are stored in the file with extension ".spe". With these premises, we can discuss the role and operation of all the functions devoted to playback.
 +
 +===QLSA_Fopen_Rec===
 +The function QLSA_Fopen_Rec is used before a call to QLSA_Init to retrive information about the stored data. 
 +
 +QLSA_Fopen_Rec is defined as follows:
 +
 +<code C>
 +int QLSA_Fopen_Rec(char * fname);
 +</code>
 +
 +  * filename is a pointer to a char[] that contains the complete name (including the path and the extension) of the file ".spe" created with a call to QLSA_Start_Save_Rec. Information about the saved data are retrived and stored internally (number of channels, acquisition frequency, overall duration of the acquisition). Functions QLSA_Get_Ch_Num, QLSA_Get_Frequency, QLSA_Get_Recorded_Time are used to access these data for QLSA engine initialization and for spectral analisys setting. 
 +
 +
 +===QLSA_Fopen_Rec===
 +The function QLSA_Fopen_Rec is used before a call to QLSA_Init to retrive information about the stored data. 
 +
 +QLSA_Fopen_Rec is defined as follows:
 +
 +<code C>
 +int QLSA_Fopen_Rec(char * fname);
 +</code>
 +
 +  * filename is a pointer to a char[] that contains the complete name (including the path and the extension) of the file ".spe" created with a call to QLSA_Start_Save_Rec. Information about the saved data are retrived and stored internally (number of channels, acquisition frequency, overall duration of the acquisition). Functions QLSA_Get_Ch_Num, QLSA_Get_Frequency, QLSA_Get_Recorded_Time are used to access these data for QLSA engine initialization and for spectral analisys setting. 
 +
 +
 +=== QLSA_Get_Recorded_Time===
 +
 +QLSA_Get_Recorded_Time is defined as follows:
 +
 +<code C>
 +int QLSA_Get_Recorded_Time( double* recordtime)
 +</code>
 +
 +  * recordtime is a poimnter to a double that will contain the overall duration (in seconds) of the recorded data . 
 +
 +A call to QLSA_Get_Recorded_Time makes sense only if the recorded data set has been open (a call to QLSA_Fopen_Rec was succesfull). At the present stage of the release, no safeguard is in place against incorrect use of QLSA_Get_Recorded_Time (the function always returns 0). 
 +
 +===QLSA_Get_Ch_Num===
 +
 +QLSA_Get_Ch_Num is defined as follows:
 +
 +<code C>
 +int QLSA_Get_Ch_Num(int * channum);
 +</code>
 +
 +  * channum is a poimnter to an integer that will contain the number of channels used in data acquisition. 
 +
 +A call to QLSA_Get_Ch_Num makes sense only if the recorded data set has been open (a call to QLSA_Fopen_Rec was succesfull). At the present stage of the release, no safeguard are in place against incorrect use of QLSA_Get_Ch_Num (the function always returns 0). 
 +
 +
 +===QLSA_Get_Frequency===
 +
 +QLSA_Get_Frequencyis defined as follows:
 +
 +<code C>
 +int QLSA_Get_Frequency(double * frequency);
 +</code>
 +
 +  * frequency is a poimnter to a double that will contain the acquisition frequency used in data acquisition 
 +A call to QLSA_Get_Frequency makes sense only if the recorded data set has been open (a call to QLSA_Fopen_Rec was succesfull). At the present stage of the release, no safeguard are in place against incorrect use of QLSA_Get_Frequency (the function always returns 0). 
 +
 +
 +===QLSA_Set_Start_Time===
 +
 +QLSA_Set_Start_Time is used to move the internal data pointer for data retrival and analysis to any position withing the entire duration of the recording. Typically, this is used to start the analysis from times other than time 0 (the beginning of the file). The user specifies the desired starting point in seconds, and the function provides to move the pointer to the closest position maintaining data consistency as far as data interleaving is concerned).
 +
 +QLSA_Set_Start_Time is defined as follows:
 +
 +<code C>
 +int QLSA_Set_Start_Time (double time_start);
 +</code>
 +
 +  * time_start  is a double that containing  the desired start time in seconds. A call to QLSA_Set_Start_Time  makes sense only if the recorded data set is open (a call to QLSA_Fopen_Rec was succesfull). At the present stage of the release, the function only cheks that the specified time is within 0 and the maximum time (the function returns -1 if the specified time is oustide this interval, 0 otherwise). 
 +
 +
 +=== QLSA_Transfer_From_File ===
 +
 +QLSA_Transfer_From_File is used to move data from file to the QLSA engine. 
 +
 +QLSA_Transfer_From_File is defined as follows:
 +
 +<code C>
 +int QLSA_Transfer_From_File(int recnum)
 +</code>
 +
 +  * recnum is the number of records to be sent to the QLSA engine. The length of each record is that specified in QLSA_Init. The function returns when all records have been transferred or when the end-of-file (EOF) is reached. A call to QLSA_Transfer_From_File makes sense only if the recorded data set is open (a call to QLSA_Fopen_Rec was succesfull) and a QLSA is started (a call to QLSA_Init is succesfull). At the present stage of the release, the function does not check for incorrect use. Assuming no other problem is present, the function returns 0 if all the specified records have been transferred, a positive number (number of records that were not transferred) if EOF is reached. 
 +
 +=== QLSA_Fclose_Rec ===
 +
 +QLSA_Fclose_Rec closes the files with the recorded data. 
 +
 +QLSA_Fclose_Rec is defined as follows:
 +
 +<code C>
 +int QLSA_Fclose_Rec (void)
 +</code>
  
  
start.1548533081.txt.gz ยท Last modified: 2019/01/26 20:04 by admin