# AlazarDSPGenerateWindowFunction¶

## Function Syntax¶

RETURN_CODE AlazarDSPGenerateWindowFunction(U32 windowType, float *window, U32 windowLength_samples, U32 paddingLength_samples)

Fills an array with a generated window function and pads it with zeros.

Please note that the windows length can take any integer value. It does not need to meet the alignment requirements that apply to the record length, nor the power-of-two requirement of the FFT length. This can allow users a very high level of control over the effective acquired record length.

For example, if a laser source guarantees 1396 good data points at a particular frequency, the number of samples per record on ATS9360 should be set to 1408 (the next multiple of 128) and the FFT length should be 2048 points. The window function will be generated with a windowLength_samples of 1396, and a paddingLength_samples of 652 (2048 - 1396).

Remark

Using Python, the window array is not allocated first then passed as an output parameter. Instead, it is directly returned from the function as a newly allocated NumPy array.

Return

ApiSuccess upon sucess.

Parameters
• windowType: Type of window to generate. Pass an item from DSP_WINDOW_ITEMS enum.

• window: Array to be filled with the window function. It must be at least windowLength_samples + paddingLength_samples long.

• windowLength_samples: The size of the window to generate.

• paddingLength_samples: The number of samples after the window function to pad with zeros.