The waveform generated by TDIFlyGB often needs to be placed into an array representing the analyzed frequency band. This is handled by fill_fftseries()
|
self.xp.clip(start_idx[None, :, None] + self.xp.arange(self.Nsparse)[None, None, :], StartBound, EndBound) - StartBound |
This involves repeated assignments of the boundary elements. Unfortunately, the numpy standard states:
For advanced assignments, there is in general no guarantee for the iteration order. This means that if an element is set more than once, it is not possible to predict the final result.
On my machine, the repeated assigned element in template_filled ends up taking the last corresponding element of data. This does not cause problem for the first element, but if the last element of data falls to the right side of template_filled, then last element of template_filled is incorrectly assigned that value (Causing a sharp drop in figure below).
This phenomenon may not lead to catastrophic errors in parameter estimation because the waveform at the boundary is weak enough. However, the user had better pay attention to this point, especially when the peak lies on the boundary of the analyzed band.
The waveform generated by
TDIFlyGBoften needs to be placed into an array representing the analyzed frequency band. This is handled byfill_fftseries()Triangle-Simulator/Triangle/TDIFly.py
Line 435 in bfaf43f
This involves repeated assignments of the boundary elements. Unfortunately, the
numpystandard states:On my machine, the repeated assigned element in
template_filledends up taking the last corresponding element ofdata. This does not cause problem for the first element, but if the last element ofdatafalls to the right side oftemplate_filled, then last element oftemplate_filledis incorrectly assigned that value (Causing a sharp drop in figure below).This phenomenon may not lead to catastrophic errors in parameter estimation because the waveform at the boundary is weak enough. However, the user had better pay attention to this point, especially when the peak lies on the boundary of the analyzed band.