I'm on this project where we want to do #realtime #radar but are sort of starting with nothing (apart from world-class radar transmitters, receivers and expertise...)

One very smart but non-#software person wrote a bunch of good #signalprocessing #code and some "gets the job done" #gui code

Or it did until we went higher bandwidth

Last week I rewrote all the non-sigproc parts into #pyqt and #pyqtgraph. Today I benchmarked both.

Exactly the same speed....except pyqtgraph is

THREE ORDERS OF MAGNITUDE

faster than #matplotlib

#python peeps, please hear me. mpl has its place and uses. High data rate animated displays is not that place.

It's one of THOSE days

I overslept by an hour. The tuxedo #cat had to use his little paws to roll me out of bed. (He was hungry but worse I was not On Schedule, something he cares about a LOT)

But also I only had to get up early because #IT made some change on my laptop that prevents me from logging in to #wfh

When I got here, I found that a request I put in to unlock an unrelated account on a different network had ALSO not been done. But at least the ticket is closed!

And the thing I have to work on is annoying. A project I definitely want to be on needed a display. I made one in #python #pyqt #pyqtgraph.

Oh, they meant a #web #app. OK, so I redesigned the backend to both would work.

Everyone likes THAT except for some external guy who AFAICT hasn't done any actual work on this project. The only reason his opinion matters is that he's the one actually deploying the app...?

And instead of modifying the code to be how he wants it he wrote a sample app for ME to follow?

And I don't think that's even going to work. #plotly needs a session ID to get persistent zoom and some other things right. This guy's design means everyone has to share a session ID. I explained this to him.

So the outcome of starting from his code is either that I'll be proved wrong or I'll have wasted a day proving HIM wrong. Two wonderful possibilities.

@melissawm @jni @simon_brooke @hynek @napari

I build them for #PyQtGraph. You use the html builder with a little bit of (emphasis on little) custom css and the sphinx pydata theme looks amazing as a docset. I also disabled sidebars which makes for better viewing in dash.

The longest part was going through all the docs to identify areas that were problematic. I would occasionally identify oddities.

I love #pyqtgraph for 2D scientific and #dataviz #graphs in #python. And now I'm starting to really love #vtk for 3D.

https://vtk.org/

It has a lot of the same #science adjacent type plotting. It works well with python. (And there's a #javascript #api but I haven't used it...yet). And it is *extremely fast*.

The only problem is that there's a lot to it and I don't really understand the workflow. (I feel like there's an extra layer. There's a "source", a "mapper", an "actor" and a "renderer". One of those seems superfluous.)

There are a lot of examples on their site and elsewhere. And there's a lot of documentation. But I haven't yet found a good combination tutorial that has worked examples that are also explained.

I really just have to use it more and get it into my head.

Fortunately, I have a weird #math/#geometry/#orbitalmechanics thing I want to try to solve (or at least visualize). Intersections of multiple ellipsoids and cones....

VTK - The Visualization Toolkit

I have known about distutils going away for some time; but yet I somehow still am getting caught flat footed as I didn't realize #PyQtGraph made use of it for some of it's more ... esoteric setup.py commands (yes python setup.py <whatever> has long been deprecated ... I know I know).

Upcoming changes will involve removing PySide2 support (No plans to remove PyQt5 support for the time being).

If you are seeing this, have some #OpenGL programming experience and would like to contribute to #PyQtGraph, please reach out!

@shapr @ibboard #PyQtGraph even has an “examples application” (run by python -m pyqtgraph.examples). Main part of the window is a text area showing the code, (its editable so users can tinker) on the left is a tree view of a bunch of different examples. There is a run button. Overwhelming majorly of the feedback I’ve gotten is how helpful that examples application is. Wish it was a design pattern more prevalent.
@pathunstrom @glyph 💯💯💯
For this reason I added a “used by” section to the #PyQtGraph readme, and when I am contacted outside of GitHub by a user, I encourage them to make a PR adding their project(s) to that section.

Welp. I spent WAAAAYYYYY too long computing zoomed ticks/labels on my custom #python #pyqtgraph polar plots

But at least I'm not doing a tremendously great job and the code is incomprehensible!

To be fair, I looked at some other graphing packages and none of them really worked how you'd expect in all cases.

Desmos has the same behavior as mine as 0,0 crosses over the viewable area.

Both Desmos and another only add ticks in the radial dimension past a certain point.

That seems not helpful, so I'm beating the pros! And I shoved my last remaining error in a try/except. So....done?

#software #engineering

A while ago I created my own polar #graph (θ,r but also built az,el on top of that) inside the excellent #pyqtgraph (#python)

I also implemented a spaced tick computation similar to the one it uses. However, I didn't make it work in zoom for lack of time

I got a bug report about how the ticks/grids/labels "disappear" during zoom (i.e. stay at a larger scale while the zoom goes inside) so I thought I'd just fix that

This turns out to be non-trivial. Or at least I can't think of a simple way to do it

I was getting the xy coords of the corners of the zoombox and computing the θ,r to figure out where I was. That doesn't really work, tho. Imagine the zoom box just to the right of 0,0: θ->0,180. Now imagine it just barely containing 0,0: θ->0,360.

I think I need to measure angles from 0,0 but that means....uh....I need a whiteboard and some rubber duckies. I wish my nerd kids were awake at this hour...

#data #software #engineering #math