Forums › SA Series Discussions › setting bin size, RBW, frequency span, and center frequency › Reply To: setting bin size, RBW, frequency span, and center frequency
Andrew
Sadak,
There is unfortunately no way to directly pre-calculate beforehand the bin size because we create the window function at the time of saInitiate(). Other analyzers might use fixed windows and zero-padding which would allow you to pre-calculate the bin size beforehand. Depending on the RBW the window might affect the bin size between a factor of 3-6. (ie The bin size is roughly between 3 and 6 times smaller than the RBW), but again, there is no way to fully pre-calculate this value. This is why we provide the bin size with the start frequency, so you can calculate the frequency of any given bin and also target the frequency bin you are interested in with a small amount of arithmetic.
That said… if you require a sweep with a specific bin size spacing, you could convert the sweep the API returns by re-sampling the sweep at the frequencies you want. A very simple algorithm for this would be to simply select the closest bin to the frequency you desire and use this amplitude for your new bin. You would not want to ‘resample’ by a large factor, ideally you are ‘resampling’ by some small fraction to line up the bins on some frequency that is convenient for you. The flattop window would ensure that your peaks would remain. Certain measurements such as channel power might be affected but probably by negligible amounts.
Regards,
A.J.
