Live waterfall view prototype - #297
Open
dannyjacobs wants to merge 6 commits into
Open
Conversation
Contributor
|
It seems this version doesn't include the chart-observe changes, so I only tested the With a signal generator I was able to see a spectrum drawn on the graph. The stats are: ~17fps in, ~8.8 fps out, 30 queued, and dropped was matching the amount drawn. |
Contributor
Author
|
Ack! Thanks for letting me know the main app was not updated. Have fixed
it now. chart-observe now has all live view features.
Live_view.py is just a test program for debugging. Now that I think about
it, it shouldn't be included in the merge. Lets leave it for now until
things are stable on the Pi but remember to blow it away before merging.
…On Fri, Jul 24, 2026 at 8:09 AM NHeier ***@***.***> wrote:
*NHeier* left a comment (astrochart/CHART#297)
<#297 (comment)>
It seems this version doesn't include the chart-observe changes, so I only
tested the live_view.py file.
With a signal generator I was able to see a spectrum drawn on the graph.
The stats are: ~17fps in, ~8.8 fps out, 30 queued, and dropped was matching
the amount drawn.
—
Reply to this email directly, view it on GitHub
<#297?email_source=notifications&email_token=AAAPNV4L43CGRYOH2OZ4DZL5GN33DA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKMBXGEZTKMZYHAYKM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#issuecomment-5071353880>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAPNV234ZGJCVPIMWVOK4T5GN33DAVCNFSNUABFKJSXA33TNF2G64TZHMYTGMRRHEZTCNRRHNEXG43VMU5TIOJUGE2DIMJWGIZKC5QC>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds a prototype waterfall style live view showing the "current" data coming off the SDR. The project was also a test of augmented development using a LLM (Claude Opus 4.2). That is described in more detail below.
Design factors considered include:
This feature is now ready for Beta testing on a RPi. It has been extensively alpha tested on a Macbook Pro and resources monitored to make sure it will probably be ok on a Pi. See the TODO section below for more testing instructions.
I believe this branch to be based on the current released version on the Main branch, but it may be behind one or two fixes.
Live spectrum display and front-end monitor
Adds a live waterfall display to the DAQ GUI. The goal is "see what the
radio sees" — is the LNA on, is there in-band or out-of-band RFI — without
waiting for a sweep to finish. The viewer is fed either by an in-progress
science sweep or by a new standalone diagnostic monitor gnuradio graph.
The display taps the GNU Radio stream before the science integration, so it
updates several times faster than integrated spectra are written to disk, and
its averaging depth is independent of the science scan settings.
Files changed
src/chart/blocks.pydaq/freq_and_time_scan.pyon_tb_readycallback (additive only)daq/live_view.pydaq/chart-observe.pyFeatures added
Flowgraph display branch (
blocks.py). Tees offcomplex_to_mag_squared— upstream of the scienceintegrate_ff— into asecond integrator and a
probe_signal_vf. Exposesget_display_spectrum()and
set_display_int_length(). The science branch and file sink areuntouched; display averaging is set independently of
int_length/nint.runObservationhook (freq_and_time_scan.py). Gains an optionalon_tb_readycallback that hands out the liveTopBlock. Defaults toNone,so the CLI path and existing GUI behaviour are unchanged.
live_view.py(new module).WaterfallPanel— matplotlib waterfall embedded viaFigureCanvasTkAgg,rolling numpy buffer, blit rendering, calibrated frequency axis that retunes
with the data.
LiveViewWorker— runs a lightweightTopBlockat a fixed frequency forstandalone monitoring (supports bias-T/LNA power).
ScienceWorker— wrapsrunObservationplus a display tap.GUI integration (
chart-observe.py).either tab.
LNA power checkbox, kept in sync with the Configuration tab's Bias-T switch
and firing the same warning.
priority and stops the monitor; the monitor is locked out while a sweep runs.
shown both in the top bar (visible from any tab) and on the Display tab, so
monitoring is never mistaken for recording.
Also folds in the team's proposed milestone version (pointing-window
persistence,
altitudePlot,specializedErrors, label and typo cleanups). Thatmerge was clean — no overlap with the changes here.
Design notes
queue.Queuecarrying(centre_freq, spectrum)tuples, with drop-oldest on overflow. The displayis source-agnostic: sweep and monitor feed the same waterfall through the
same path.
producer. A consumer running near the producer rate produces beat-frequency
stalls where a tick finds no new frame; oversampling makes any missed frame
imperceptible.
Figureis built with the object-oriented API, notplt.subplots(). A pyplot-registered figure would be popped up in its ownwindow by
plotObservation'splt.show()and have its canvas reassigned,breaking blit on subsequent runs.
Tests still required
Developed and tested on macOS against a real RTL-SDR. Not yet exercised on a
Raspberry Pi.
Blit cost scaling with figure size was observed on Retina and set aside
as likely Mac-specific — needs confirming on Pi hardware.
Sweep takes the SDR from a running monitor. The equivalent science-only
restart path is confirmed working.
both the Configuration switch and the monitor checkbox.
confirmed for the sweep tap, not yet for the standalone monitor.
Major TODO
Things to watch for:
mamba env create -f chart.yml, thenmamba activate chart. Come to think of it, you may need tosudo apt install mambaMinor TODO
Display features
DB_LO/DB_HI)Status readout
live_view.pyinto theintegrated status line — more diagnostic than frame count
Layout (intended for tuning on the Pi)
SUMMARY_WEIGHT/WATERFALL_WEIGHTSETTINGS_PLACEMENTis"stacked";"side"mirrors the Configuration tab's geography if the team prefers it
786x510Housekeeping
LiveViewWorkerbuilds aTopBlockwith a throwaway tempfile_sinkbecause
TopBlockrequires one — make the sink optional_LIVE_NINT = 700_000(~5 h) to approximate an unboundedrun; a genuine run-forever mode would be cleaner
blocks_vector_to_stream_0inblocks.pyis instantiated but neverconnected (pre-existing dead code, left alone deliberately)
test_display_probe.py,test_queue_display.py,test_science_view.py) become regression testsor get archived
matplotlib.use("TkAgg")ordering is a latent fragility if the importstructure between
chart-observe.pyandlive_view.pychangesCTkSwitch; a knife-switch style widget was theoriginal intent
Use of an LLM
This project was used an opportunity to test the latest Large Language Models. Claude Opus 4.5 was used for search, note taking, code generation and documentation. The problem itself is quite amenable as it is
*In the middle of this project I ran out of "free" Claude credits (the meter is not easy to find). To everyone's amusement I was obliged to purchase a year's subscription to "Pro" level access to complete the project at the cost of ~$200US.
The pattern I followed was to iteratively present a problem, have the model present options, discuss the merits of the solution, and then have the model generate the necessary code. Design factors such as use of a small screen and single board computer, deference to student developers, and the user experience of novice ... users were carried throughout.
All in all I spent about 4 days on the project. This was much faster than it would have been un-aided. However, I would caution against extrapolating this result. For all the reasons I have given above, this project is almost a best-case scenario.
Claude was particularly good for keeping track of todo items. As the discussion evolved some features or minor changes were tabled to be returned to after testing on the Pi. It has done a good job of going back through the long conversation and summarizing these items. I can generate more details on any one of them by requesting them from the model. The above PR was generated by Claude which I then lightly edited, mainly to add instructions for testing on the Pi. I wrote this section the old fashioned way.
I have more to say on the LLM experience but for now will leave a final thought. I have written more in doing this project than I have quite some time.
D. Jacobs
Tempe AZ, 21 July 2026