Forum
Please or Register to create posts and topics.

Python / "Jupyter Notebook" & "HTTP API" - MWE client example

Page 1 of 2Next

This ipynb Jupyter Notebook shows a minimal working example, a way how I pull spectra data from the "HTTP Server" block for e.g. to use with numpy/scipy/matplotlib

Uploaded files:
  • i1.png
AdminTC and Tom have reacted to this post.
AdminTCTom

Thanks for that very helpful post!

Is there a way to also get the timestamp for each single frequency measured?

If yes, how this can be achieved?

BG Tom

I hope I got your question right, but in the example you already receive the "startTime" and "endTime" along with the "sampleSize" element.

 

Well, that information might help and it might be possible to do some time calculations or estimates at which point of time an RF-measurement was performed.

I am coming from a measurement domain, where always RF measurements are performed at defined frequencies. Once a measurement is completed the next measurement frequency is selected. So it is possible to state a point of time when the measurement at a defined frequency was performed.

In the SA domain things appear different, because over a short time period a waveform of a received RF-signal is digitized and then transformed by FFT into the frequency domain providing amplitude- and phase values of numerous frequency points depending e.g. on the FFT resolution. Saying that, then it can only be stated that the amplitude- and phase values for a dedicated frequency where existing within the time frame where the signal was digitized?

Since we intend to measure with frequency bandwidths of less than 200 MHz the digitization time frame should be rather small.

Possibly the knowledge of this time frame would be accurate enough for our application to merge data by time stamps with an independent sensor during post processing.

Could you pls. state a typical time frame to be considered for a bandwidth of e.g. 160 or 200 MHz?

Sorry for being a bit "off-topic" for this post here.

Yes, this is total off-topic.

Please start a new thread and search the forum first e.g., https://v6-forum.aaronia.de/forum/search/?keywords=Timestamp

Yes I can do so.

One more on-topic question pls..

In the python code shown above in section [3] the line 5 is not completely visible at the right end.

Is there any chance to get the missing line information?

I don't think so since this is just a simple "hack" to show that it works.

With a bit of code knoledge it should be simple to add what is needed to run this code.

True, did not save the code and the line in question is anyway just setting the title of the chart, so nothing fancy going on there. It was just to illustrate the idea of how to interact with the RTSA HTTP.

Is it possible to obtain via the "HTTP Server" block also the real- and imaginary parts or the magnitude- and phase values per frequency point of the power spectrum as indicated below of a.m. example? If yes, how this can be achieved?

You can get the raw IQ data out of the Spectran V6 if you connect the HTTP Server directly to its IQStream output, see https://v6-forum.aaronia.de/wp-content/uploads/asgarosforum/32/RTSA-http-Stream-Server-Endpoints-8.pdf for details on the format and parameters.

This will however limit your frequency range to the realtime bandwidth of the Spectran V6 or less (depending on configured IQ Rate and Span Factor) unless you implement your own control code for sweeping.

Page 1 of 2Next