licel_wind¶
Class Holding methods to communicate with the Waverider
- class Licel.licel_wind.Waverider(ethernetController)¶
- calcFrequencyIncrement(SamplingRate_HZ: int, fftsize: int) float ¶
return the spectral resolution of the measurement.
- Parameters:
samplingRate_hz (int.) – the waverider ADC sampling rate in hertz.
fftsize (int) – the number of ADC sample that goes into computing a single FFT
- calcLidarRangeResolution(samplingRate_hz: int, fftsize: int) float ¶
return lidar range resolution in meters.
- Parameters:
samplingRate_hz (int.) – the waverider ADC sampling rate in hertz.
fftsize (int) – the number of ADC sample that goes into computing a single FFT
- Returns:
the Lidar range resolution in meters
- Return type:
int.
- calcTimeResolution(sampleRate_HZ: int, fftsize: int) float ¶
return the time resolution of one FFT bin in micro seconds.
the time resolution depend on the number of sample that goes into computing a single fft and the sample rate of the device.
for example a device with 250MHZ sample rate acquire a sample each 4ns let’s assume that we feed 128 samples into a single fft. the calculated time resolution will than be 4ns * 128 = 512ns
- Parameters:
samplingRate_hz (int.) – the waverider ADC sampling rate in hertz.
fftsize (int) – the number of ADC sample that goes into computing a single FFT
- Returns:
the time resoulution in us
- Return type:
int.
- getCAP() str ¶
Query the hardware for it’s capability.
- Returns:
the waverider should return `CAP: Wind `
- Return type:
str
- getCurrentShots() int ¶
get the shots that are currently acquired.
- Returns:
corresponding to the current shots acquired by the waverider.
- Return type:
int
- getData(FFT_Size, numFFT) list[ndarray[uint64], ndarray[uint64]] ¶
The data is retrieved from the Wave Rider via a TCP/IP socket. This function sends a data request command to the Wave Rider. After receiving the expected number of bytes, we extract the timestamp and the data array from the socket buffer and remove the separator padding.
The DC part of the FFT is also overwritten with the next meaningful FFT value.
- Parameters:
FFT_Size (int) – the number of ADC sample that goes into computing a single FFT
numFFT (int) – number of fft to be computed.
- Returns:
The waverider timestamp in milliseconds, and the power spectra data. note that the timestamp correspond to when the data request is received by the waverider.
- Return type:
list[np.ndarray[np.uint64], np.ndarray[np.uint64]]
- getFFTsize() str ¶
get the FFT size. the fft size represents the number of ADC samples that goes into computing a single FFT. FFT size must be set by the user before starting the acquisition.
- Returns:
FFT size, typically a power of 2 between 32 and 1024.
- Return type:
str
- getHWDescr() str ¶
get the Hardware revision.
- Returns:
waverider response containing hardware revision.
- Return type:
str
- getID() str ¶
Query the waverider for it’s identification number.
- Returns:
Firmware revision date, for example `Wind_v2_15.11.2024 `
- Return type:
str
- getMSEC() int ¶
get waverider time since boot in milliseconds.
- Returns:
waverider time since boot in milliseconds.
- Return type:
int.
- getNumFFT() str ¶
get the number of FFT to be computed after each trigger event.
- Returns:
number of fft to be computed.
- Return type:
str
- getRangebins(distance: int, fftSize: int, samplingRate_hz: int) str ¶
return the number of fft that needs to be computed, to acquire data up until the specified range.
- Parameters:
distance – the maximal distance range we want to acquire in meters
samplingRate_hz (int.) – the waverider ADC sampling rate in hertz.
fftsize (int) – the number of ADC sample that goes into computing a single FFT
- Returns:
rounded down number of fft to be computed.
- Return type:
int.
- getRawData() bytearray ¶
The wind will return the following data package: | 8 bytes Header 0x00 00 00 D0 00 0C 00 00 | | 4 bytes Payload Size + 4 Bytes padding | | 8 Bytes Time stamp | | 8 bytes 0x00 zero padding | | Payload 2^15 bytes |
The header and the 4 bytes payload size will be “consumed” by windV2Request all we are left with is (4 bytes payload size padding +
4 bytes timestamp + 4 bytes padding + 8 bytes zero padding +
actual payload (8*2^15) ). 4 + 8 + 8 + 8 * 2^15 = 262164 Bytes
- Returns:
raw power spectra data.
- Return type:
byte array.
- getShotsSettings() str ¶
get the shots that are to be acquired for one acquisition.
- Returns:
number of shots that are to be acquired.
- Return type:
str
- getterCommands = {'reqCAP': 22, 'reqCurrShots': 9, 'reqData': 12, 'reqDataAvailable': 5, 'reqFFTsize': 25, 'reqHWDESC': 21, 'reqIDN': 13, 'reqMAC': 15, 'reqMSEC': 14, 'reqNumFFT': 24, 'reqShots': 6, 'reqStart': 4}¶
map the getter commands with their low level value.
- isDataAvailable() bool ¶
Query the waverider for data availability.
- Returns:
True if data is available.
- Rtype bool:
- possibleFFTSIZE = [32, 64, 128, 256, 512, 1024]¶
list the allowed value for the fft size
- setFFTsize(fftSize: int) str ¶
set the FFT size.
- Parameters:
fftSize (int) – number of ADC samples that goes into computing one fft. should a power of 2 between 32 and 1024.
- Returns:
ethernet controller response, should be
FFTSIZE executed
- setNumFFT(fftNum: int) str ¶
Sets the number of FFT to be computed after each trigger event.
- Parameters:
fftNum (int) – number of fft to be computed.
- Returns:
response from the ethernet controller,
should be NUMFFT <nFFT> executed. :rtype: str
- setShots(shots: int) str ¶
Sets the number of shots to be averaged for one run
- Parameters:
shots (int) – Number of shots to be collected in a single collection.
- Returns:
response from the ethernet controller,
should be: SHOTS <nShots> executed :rtype: str
- setterCommands = {'setFFTsize': 2, 'setNumFFT': 3, 'setShots': 1}¶
map the setter commands with their low level value.
- startAcq() str ¶
start the waverider acquisition.
- Returns:
waverider response, returns
START executed
upon success.- Return type:
str