database plotting

Well, it appears there's no really good way to do this here. This will contain various bits of code used to support the fusor, which presently includes everything from embedded 8 bit uP code to stuff to run under Linux in some HLL (often perl) to interface-specific stuff for commercial hardware, sysadmin tips and setups, and running on whatever machines I have in the tree here. So any one piece might fit some other category too, but...there's no pigeon-holing even computer science without losing the app-specific stuff and inter-relations of it all in a specific usage.
Forum rules
Code sharing for fusor data aq and control software

database plotting

Postby Doug Coulter » Sun Mar 05, 2017 2:57 pm

I use a program to plot data more or less in real time as it enters the fusorpi's database. It doesn't impact the bandwidth too much as it only asks for data "newer than I have already" on each request, so rather than have it be dependent on replication, I go right to the source of the info. Fewer things in series...lower failure rate.
plotrun.zip
Here it is in all its glory.
(6.85 KiB) Downloaded 294 times


This does the unit conversions as the database has just raw data in it, and there are two sources which have different timestamps for the same sample number due to where they were in their own delay loops when the clap happened.
Amazingly, gnuplot, which is what I leverage here, handles that with aplomb, autoscales, does log plots where that's a good idea, and I don't have to re-invent the wheel.

We had some errors earlier with EMI causing the arduinos to reset their timestamps, so I added a "munge time" checkbox here to let us just number them with our best guess about timing. It's not cool, but it's better than just losing the data entirely, and getting that one exactly right, while actually possible due to how they handle their timing, would have taken a heck of a lot more code. This is cowboy land - we just want to get on with the fusion part.
plotrun.png
What it looks like running, this is a real run.


Now in real life it should start to be obvious why I wanted a high powered machine here with 4 monitors (Nvidia NVS-510 for the curious). I have 3 vidcams to watch, this, and the fusor master control GUI. I use the Vivaldi browser with tab stacking for two of the cameras, it's a nice feature to get them into one window with one bookmark. I have enough resources here to run separate browser instances for all 3, but why?
Posting as just me, not as the forum owner. Everything I say is "in my opinion" and YMMV -- which should go for everyone without saying.
User avatar
Doug Coulter
 
Posts: 3515
Joined: Wed Jul 14, 2010 7:05 pm
Location: Floyd county, VA, USA

Return to Fusor support

Who is online

Users browsing this forum: No registered users and 3 guests

cron