GQ Electronics Technical Support Forum Active Users: / Visits Today:
Highest Active Users:
GQ Electronics Technical Support Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 GQ Electronics Forums
 2.GQ Geiger Muller Counter
 Geiger Python script now as GUI version
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

ullix

Germany
1107 Posts

Posted - 04/05/2017 :  09:05:12  Show Profile  Reply with Quote
My Python scripts have matured into a GUI program, version 0.9.00 just uploaded to https://sourceforge.net/projects/geigerlog/ and is available from there.

Image Insert:

239605 bytes

Geiger is a set of Python scripts for use with GQ Electronic's GMC-3xx line of Geiger counters. Beginning with version 0.9 it is a windowed (GUI-) program. It was developed on Linux Ubuntu Mate 16.04 but should also work on Windows and Mac as long as a Python 2.7 with PyQt4 environment is available.

The program allows reading of Geiger counter data, printing to screen and logging to file. Comments can be added to the log file during logging. The history stored on the Geiger counter can be extracted and converted into files that can be printed and analyzed.

From all data - Log data or History data - graphs can be created and shown as Count Rate History versus time. The Count Rate can be shown in units of CPM or CPS or uSv/h. The time can be shown as time-of-day, or time since first record in units of sec, min, hours, days, or auto-selected in auto mode. During logging the graph is live auto-updated. Both graph axes can be in either fixed scale or auto-scaled mode. The graphs can be stretched, shifted, and zoomed for details, and saved as pictures in various formats (png, jpg, tif, svg, ...).

Time ranges can be set to analyze statistical properties of the data set within that range and be plotted within that range. The ranges can be entered manually or by left and right mouse clicks for left (min) and right (max) range limits. All manipulations can be done during ongoing logging without disturbing it.

A log can be collected in the background, while you analyze a history in the foreground.

Geiger functions can be controlled from the program, and changes made without interrupting logging. All communication with the device is checked for errors, which unfortunately do occur occasionally. The program attempts to auto-recover from an error, and continuous if successful, which it is in most cases.

The USB port used and its baudrate for the connection with the device can be auto-discovered.

A genuine recording of Geiger data from an international flight is included, indicating count rate increase with altitude, and reduction of cosmic rays when going from north towards the equator.
Reply #1

ZLM

1261 Posts

Posted - 04/05/2017 :  11:19:11  Show Profile  Reply with Quote
Very good!
Go to Top of Page
Reply #2

flukeguy

USA
13 Posts

Posted - 04/05/2017 :  13:15:25  Show Profile  Reply with Quote
Thanks Ullix for all the time you spent on this. Looks really cool and useful. Do you think there is a way for you to compile all the needed files/programs... into a windows exe file so it would run without installing python runtimes and/or environments for us non programmers?

Thanks again,
--Terry
Go to Top of Page
Reply #3

ullix

Germany
1107 Posts

Posted - 04/08/2017 :  01:36:22  Show Profile  Reply with Quote
@flukeguy: compiling a Python script is not an easy task. As they say for Cython (a compiler for Python): "it compiles almost all existing Python code". This is computer-speak for "you will be spending endless hours on it"! It might improve speed, but speed is not an issue here; even at a 1 sec logging cycle, the code including graphing is >90% idle! The communication with the Geiger counter is actually one of the bottlenecks. So, compiling won't happen.

There are packagers available, which put all things needed to running a script together in one file. This allows to run e.g. my script without having to install the Python environment. Out of the half dozen of such programs, I got one to work on Linux. But this blows the file up from 200kB to 300MB and needs a few other considerations, too.

They are not cross packagers, however, meaning if you want to run a program on Linux it must be packaged on Linux, for Win must be packaged on Win, and for Mac on Mac. And while I have several computers around, none is a Win computer. So, that also won't happen any time soon.

However, the code is open source. If anyone else wants to package it, I offer to put it up together with my scripts.

If a Linux package were of interest, I actually might put this up too. But on Linux it is a lot easier to install the whole Python environment anyway.
Go to Top of Page
Reply #4

Distelzombie

Germany
202 Posts

Posted - 04/09/2017 :  12:48:14  Show Profile  Reply with Quote
How do you package it for windows without the total rewrite I had to do?

GMC-300E+ V4.20 with sbt-11a alpha tube

My statements are "stuff-a-hobbyist-says" and not in any way professional.
Go to Top of Page
Reply #5

ullix

Germany
1107 Posts

Posted - 04/10/2017 :  07:39:15  Show Profile  Reply with Quote
@Distelzombie:
Google e.g. for PyInstaller. The claim is that once you have a script running on system xyz, you can package it on your xyz system and the result will run on anybody's xyz system.

However, if the script does not run on your system, packaging can't do miracles - it will only produce a thing that runs on nobody's system.

Unfortunately, even a well running script does not necessarily run on anyone else's system after packaging, as I experienced on Linux :-/
Go to Top of Page
Reply #6

the_mike

Switzerland
52 Posts

Posted - 04/11/2017 :  03:06:24  Show Profile  Reply with Quote
Hey Ullix

This script is just plane WOW!!! Great work there :-)

but q: installing the needed modules on mint18.1/cinnamon (using ubuntu 16.04 as "basesystem") was a hassle ...and I'm pretty sure i installed much more modules/python-packages than needed)...

Would it be possible to mention in the readme with which packages the needed modules can be installed?

(and/or a .deb-package would be awesome, too...)
Go to Top of Page
Reply #7

ullix

Germany
1107 Posts

Posted - 04/12/2017 :  04:07:11  Show Profile  Reply with Quote
@the_mike:
Thanks; and I tend to agree on the hassle. But I am afraid a deb-package is beyond my pay-grade :-( The modules also might be stored differently between distributions, so, I won't even try to name the *.debs. Listing the modules seem to be all that I can do (from the online install instructions: "modules matplotlib, numpy and PyQt4 in addition to: datetime, getopt, inspect, operator, os, re, serial, signal, struct, sys, time, traceback")

What I tried (and failed) is a Packager. Out of the half dozen, only PyInstaller (h**p://www.pyinstaller.org/) produced an error-free package, which, however, wouldn't run on a different computer :-((. And it created a package of some 800MB (M like Mega) of which 750 MB were unused themes and icons :-(((.

If you feel inclined to try it, I am eager to learn!
Go to Top of Page
Reply #8

Distelzombie

Germany
202 Posts

Posted - 04/14/2017 :  08:05:34  Show Profile  Reply with Quote
I found that you need to shrink your program into one file before you use a packager.

GMC-300E+ V4.20 with sbt-11a alpha tube

My statements are "stuff-a-hobbyist-says" and not in any way professional.
Go to Top of Page
Reply #9

ullix

Germany
1107 Posts

Posted - 04/15/2017 :  00:37:15  Show Profile  Reply with Quote
No, not true. I do have a working bundle, but prolbems remain.

Edited by - ullix on 04/15/2017 00:38:13
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
GQ Electronics Technical Support Forum © Copyright since 2011 Go To Top Of Page
Generated in 0.08 sec. Snitz's Forums 2000