Forums › SA Series Discussions › SA44B SA44 › Reply To: SA44B SA44
Andrew
- This reply was modified 5 years, 7 months ago by
Andrew.
tyang,
1) This will be difficult to measure. This number will include USB transfers, hardware acquisition speed, as well as buffering and processing latencies in the API. For certain modes like real-time, we only provide sweeps at specific intervals which means the latency for a specific event can be anything up to that interval. That being said, latencies are likely in the 16-100ms range depending on the measurement.
2) In your code I do not see a channel power measurement. Each call to saGetRealTimeFrame returns one sweep and one persistence frame (to create the persistence display). For your purposes you can ignore the frame and just focus on the sweep. You are indexing just a single value in the sweep. The channel power measurement in Spike is an integration over a portion of the sweep based on your settings. There will be additional math to calculate a channel power value on a sweep returned from the API.
We have a couple of resources that can help you get started. The equations for calculating it are in the blog post. I have also attached a file that contains some code snippets from Spike that calculate channel power. You will not be able to compile this code, but it will illustrate the operations involved and you should be able to write your own implementation using it.
https://productbundlesdemo.kinsta.cloud/news/what-is-channel-power-and-occupied-bandwidth/
Regards,
Andrew
