Forums › SA Series Discussions › Noise Bandwidth of Resolution Bandwidth Filter › Reply To: Noise Bandwidth of Resolution Bandwidth Filter
Andrew
Hello David,
I think the biggest issue I see is that since you specified a linear scale output from the API, the sweep is in the units of mV. In the Spike software we specify a log scale output and then convert each sweep bin to mW (power units) before summing them up, and then convert the final result back to dBm. If you want to stay with the linear scale (mV) output from the API, just square each sweep bin before summing.
I will attach a file I have sent others from the Spike software. It has some additional details that are irrelevant here, such as only summing up the power in a range specified by the user, but you will notice the same logic for summing the bins as mW and then dividing by the window bandwidth.
If you aren’t already, you can test the output of your code to the values Spike provides. Assuming similar channel widths, it should match very closely.
Regards,
Andrew
