optoanalysis.Saleae package¶
optoanalysis.Saleae.Saleae module¶
-
optoanalysis.Saleae.Saleae.
get_chunks
(Array, Chunksize)[source]¶ Generator that yields chunks of size ChunkSize
-
optoanalysis.Saleae.Saleae.
interpret_waveform
(fileContent, RelativeChannelNo)[source]¶ Extracts the data for just 1 channel and computes the corresponding time array (in seconds) starting from 0.
Important Note: RelativeChannelNo is NOT the channel number on the Saleae data logger it is the relative number of the channel that was saved. E.g. if you save channels 3, 7 and 10, the corresponding RelativeChannelNos would be 0, 1 and 2.
Parameters: - fileContent : bytes
bytes object containing the data from a .bin file exported from the saleae data logger.
- RelativeChannelNo : int
The relative order/position of the channel number in the saved binary file. See Important Note above!
Returns: - time : ndarray
A generated time array corresponding to the data list
- Data : list
The data from the relative channel requested
- SampleTime : float
The time between samples (in seconds)
-
optoanalysis.Saleae.Saleae.
read_data_from_bin_file
(fileName)[source]¶ Loads the binary data stored in the a binary file and extracts the data for each channel that was saved, along with the sample rate and length of the data array.
Parameters: - fileContent : bytes
bytes object containing the data from a .bin file exported from the saleae data logger.
Returns: - ChannelData : list
List containing a list which contains the data from each channel
- LenOf1Channel : int
The length of the data in each channel
- NumOfChannels : int
The number of channels saved
- SampleTime : float
The time between samples (in seconds)
- SampleRate : float
The sample rate (in Hz)
-
optoanalysis.Saleae.Saleae.
read_data_from_bytes
(fileContent)[source]¶ Takes the binary data stored in the binary string provided and extracts the data for each channel that was saved, along with the sample rate and length of the data array.
Parameters: - fileContent : bytes
bytes object containing the data from a .bin file exported from the saleae data logger.
Returns: - ChannelData : list
List containing a list which contains the data from each channel
- LenOf1Channel : int
The length of the data in each channel
- NumOfChannels : int
The number of channels saved
- SampleTime : float
The time between samples (in seconds)
- SampleRate : float
The sample rate (in Hz)