Gamma MCA web app

PRA, BeqMoni, Theremino, Fitzpeaks and beyond!
Post Reply
User avatar
NuclearPhoenix
Posts: 72
Joined: 15 Aug 2022, 19:24
Location: Austria
Contact:

Gamma MCA web app

Post by NuclearPhoenix » 04 Feb 2023, 02:40

Hi everyone,

since there is quite some talking about software going on here lately, I thought, I'd introduce my own gamma spectroscopy software: Gamma MCA. It's a web application under this URL: https://spectrum.nuclearphoenix.xyz

As a quick heads-up it's not another sound card spectrometry program, it's a bit different in this regard ;)
It's also completely open source on GitHub and therefore obviously free to use and download.

Especially in the last couple of weeks I have made some progress with new features and old fixes, but I've been maintaining a thread in a german-speaking radiation forum with all the changes beginning from the start almost exactly 1 year ago. If you're interested, you can have a look at the evolution of the program there (lots of screenshots). Other than that, I'm obviously also looking for feedback from you guys here!

Web App?
Gamma MCA is a so-called progressive web app. It is extremely light-weight and you can open it in any up-to-date browser without needing to install anything. If you are reading this, you most likely already meet all the requirements to use it. And don't worry, you can use it offline as soon as you have visited the page once.

A progressive web app can be a normal website, like when you open it in your browser. But it can also be used without any internet connection at all once downloaded (i.e. page visited). On top of that, you don't have to open your browser every time to use it. If you're using a Chromium-based browser, you can install the app to your system and use it just like any other native program! You can even bind the application as default file handler for XML, JSON, CSV or TXT files.

File control tab
  • You can open most CSV/TXT files, more exotic files like TKA and most-importantly JSON and XML files. The last two can contain more data like combining all the spectra, calibration data and sample info.
  • JSON, XML and CSV files can be also exported.
  • The XML files are compatible with the files from BecqMoni 2011 and newer, the JSON files are also compatible with Steven's impulse software.
  • The JSON files are automatically validated for file errors.
  • If you're importing a CSV that is not a histogram, but more of a chronological list of pulses (e.g. if you append energies to a file one after another as they come in), you can also change to this mode.
  • The background energy spectrum will be automatically subtracted from the energy spectrum.
file-tab.PNG
file-tab.PNG (71.57 KiB) Viewed 2499 times
Serial connection tab
  • Connect to a serial device (MCA like the Nuclear Pioneer MCA or my Open Gamma Detector) that is outputting pre-binned energy pulses. This is something I have yet to see in any gamma spectroscopy program. Most of the time it's sound card based or via proprietary drivers and software. Maybe I have missed something, though, so please let me know!
  • Your MCA can regularly output a full pulse-height histogram or each pulse as they occur (similar to the file settings above).
  • You can set a time limit after which Gamma MCA will automatically halt the recording.
  • Built-in serial console to control your device.
serial-tab.PNG
serial-tab.PNG (79.16 KiB) Viewed 2499 times
Calibration tab
  • At the moment only quadratic or cubic polynomial calibration. There will be n-poly calibration in the future.
  • You can import and export specific calibration files. If you imported a JSON or XML file with calibration data, it will be set automatically.
  • You can delete the calibration and calibrate by selecting points from the plot and assigning them their corresponding energy.
  • There is also a calibration chart if you want to visualize that aspect of the data. This makes debugging your calibration and finding non-linear regions much easier.
calibration-tab.PNG
calibration-tab.PNG (86.18 KiB) Viewed 2499 times
Sample info tab
  • This tab is heavily inspired by BecqMoni's sample info section.
  • All of these are imported and exported with the JSON/XML files.
sample-tab.PNG
sample-tab.PNG (77.43 KiB) Viewed 2499 times
Settings
  • Here you can find a full list of common gamma-ray energies and their corresponding isotopes. You can click through the table and the lines will show in the plot. The list is taken from the theremino MCA with some minor modifications, but you can supply your own list.
settings-tab1.PNG
settings-tab1.PNG (68.7 KiB) Viewed 2499 times
  • The settings tab lets you change everything related to the plot, the serial connection, file import and peak detection.
settings-tab2.PNG
settings-tab2.PNG (69.11 KiB) Viewed 2499 times
Plot control toolbar
It's located just below the plot window, as you probably already saw in the previous images. Here are the features from left to right:
  • Hard-reset the plot.
  • Change between the linear and log x- and y-axis.
  • Apply a simple moving average with a custom length (changes the smoothing).
  • Choose between histogram and line plot types.
  • Switch the y-axis between total counts and counts per second.
  • Toggle between different peak finder modes. This will enable the Gaussian correlation filter from PRA, with optional lines at the corresponding peak energies or the nearest isotopes thanks to the isotope list.
  • Show the nearest isotopes at the mouse cursor location when hovering over the plot.
You can also export images of your plot or even full-fledged interactive plots via the controls in the top right corner of the plot window. The interactive plots are exported as a stand-alone HTML file that can be embedded into other websites or opened in your browser. These will export your plot as-is, i.e. with the SMA, peak finder or any isotope lines that you chose to enable.

That's pretty much all the important features of the software. If you want to give it a try, feel free to give me some feedback and suggestions! At the moment, there is also a poll about some new features on GitHub. Looking forward to some replies from you ;)

User avatar
Svilen
Posts: 180
Joined: 23 Sep 2016, 04:25
Location: Germany
Contact:

Re: Gamma MCA web app

Post by Svilen » 04 Feb 2023, 05:11

Another great job done, thanks for sharing. Gut gemacht, Matthias!
Svilen

User avatar
NuclearPhoenix
Posts: 72
Joined: 15 Aug 2022, 19:24
Location: Austria
Contact:

Re: Gamma MCA web app

Post by NuclearPhoenix » 12 Feb 2023, 07:46

Thanks Svilen!

Just pushed an update for Gamma MCA that enabled WebUSB as a fallback to WebSerial if that's not available in your browser. As a result of that, you can now use the app on mobile devices (e.g., Chrome for Android) with FTDI USB-to-serial converters. It's probably not a 100% stable yet, so I'm also looking for feedback and testers ;))

User avatar
NuclearPhoenix
Posts: 72
Joined: 15 Aug 2022, 19:24
Location: Austria
Contact:

Re: Gamma MCA web app

Post by NuclearPhoenix » 05 Mar 2023, 03:40

I'm not sure if it's worth cross-posting the Gamma MCA changelog from my German forum posts into the English thread here, because it doesn't look like there is much interest. Anyways, I'll post it once and if I get some reaction (LOL), I'll keep it up whenever there are major changes.

Changelog:
  • The "Line Plot" type is now only drawn as a continuous line. The color filling towards the x-axis is reserved for the histogram.
  • The "Save" buttons for files are also enabled if you open the program from a file (PWA).
  • If a calibration is available, it will also be applied automatically when the file is loaded.
  • If the measured activity is below 1 cps, the plot automatically switches to counts per minute.
  • The scaling of the axis units has been improved (e.g. before: "10k keV" --> now: "10,000 keV").
  • The isotope list can be sorted by both energy and mass number. (It's also much more readable now: https://gist.github.com/Phoenix1747/755 ... 954b405d4e)
  • The peak finder automatically calculates the energy resolution for found peaks. It is displayed for each peak by default. This can be deactivated in the settings.
  • In connection with this, the marking style of the peaks has been changed (see images). If you don't want that, you can simply switch back to the old style in the settings.
    gamma_mca_spectrum.png
    gamma_mca_spectrum.png (73.61 KiB) Viewed 2458 times
    Webaufnahme_3-3-2023_133649_127.0.0.1.jpg
    Webaufnahme_3-3-2023_133649_127.0.0.1.jpg (19.93 KiB) Viewed 2458 times
  • With the "Box Select" tool, you can select a ROI in the plot. Simple statistics are then displayed at the top right.
    Screenshot (47).png
    Webaufnahme_3-3-2023_133737_127.0.0.1.jpg
  • The overall plot style has been slightly changed: all lines are now a little thicker.
  • The "Peak Width" setting in the Peakfinder has been removed, connected peaks are automatically recognized better.
  • A few bug fixes, mostly related to settings.
I also added a time evolution chart for the measured activity (i.e. the counts per second). Here is an example for that:
gamma_mca_calibration.png
gamma_mca_calibration.png (90.02 KiB) Viewed 2458 times
If something doesn't work for you, it's probably not a bad idea to reset your settings after this update. :)

RobertD
Posts: 49
Joined: 09 Jan 2023, 22:41
Location: Germany / Bavaria
Contact:

Re: Gamma MCA web app

Post by RobertD » 05 Mar 2023, 05:25

Big improvements, Matthias. Thanks for the new features.
I just gave it a shot with two spectra I took with my Capescint CsI(Tl) probe. One is just my Cs-137 check source and the other one is a small piece of rock containing Pitchblende. I found it two weeks ago at Woelsendorf/Bavaria.
Your new isotope detection and FWHM measurements are working like a charm.
Attachments
gamma_mca_spectrum_pitchblende.png
gamma_mca_spectrum_pitchblende.png (52.04 KiB) Viewed 2455 times
gamma_mca_spectrum_cs137.png
gamma_mca_spectrum_cs137.png (38.77 KiB) Viewed 2455 times
Robert

User avatar
Sesselmann
Posts: 1188
Joined: 27 Apr 2015, 11:40
Location: Sydney
Contact:

Re: Gamma MCA web app

Post by Sesselmann » 06 Mar 2023, 08:24

Matthias,

Well done on producing a nice looking webb app. Would be nice if it also worked with sound cards, it should be possible as browsers can have microphone access. Platform independent browser based MCA software looks like it will be the future. It is completely sensible to run it from a web server and eliminate installation for the end user.

I see you have also added gaussian correlation to the chart which is nice, it is also on my list of things to add to impulse.

Steven

User avatar
NuclearPhoenix
Posts: 72
Joined: 15 Aug 2022, 19:24
Location: Austria
Contact:

Re: Gamma MCA web app

Post by NuclearPhoenix » 06 Mar 2023, 09:31

Steven,

Yes, of course that would be possible. I don't know the exact APIs for that, but I'm positive you could get enough access to the microphone stream to do stuff like sound card spectrometry.

However, when I started the project, I set myself a clear limit. There are already so many great programs for sound card spectrometry, I honestly think redundancy in this area is just a waste of time frankly. They've all been around much longer than my software, and there are often whole teams behind them and people who know the subject much better than me. Instead, I prefer to focus on what not so many programs can do with my limited time. Also I have absolutely no possibility to test that even if I implemented something like this, which would make it a bit of a nightmare to develop.

User avatar
Sesselmann
Posts: 1188
Joined: 27 Apr 2015, 11:40
Location: Sydney
Contact:

Re: Gamma MCA web app

Post by Sesselmann » 06 Mar 2023, 09:50

Matthias,

Just a little history on the subject..

Marek Dolleiser at University of Sydney (now retired) was the first person to develop a sound card spectrometry program and I was the first person to build the hardware, this was back in 2010 just before the nuclear accident in Fukushima. Suddenly there was an explosion of interest in radiation detection and some guy in Japan colaborated with Marek and developed Beqmoni, this was followed by Nick Dolezal who developed geigerbot and Safecast, then there was also a team of amateurs in Italy who bought one of my GS units and developed Theremino. These were all one man amateur efforts and were all provided for free.

On the contrary expensive hardware MCA's with proprietory software and crazy unique connectors have a history going back to the 1950's and were traditionally large American corporations with lucrative DOD contracts.

If you want to try developing a sound card input for your software I would be happy to send you a GS-PRO-V5 for free.

Steven

User avatar
NuclearPhoenix
Posts: 72
Joined: 15 Aug 2022, 19:24
Location: Austria
Contact:

Re: Gamma MCA web app

Post by NuclearPhoenix » 07 Mar 2023, 01:37

Steven,

I see, thanks for the explanation. I completely forgot for a moment that software like Interspec cannot do sound card spectrometry.

Thanks for your offer, I might come back to it when things calm down here. For now, I have to admit I'm still hesitant if that's really the right way to go, if everyone is already happy with the theremino MCA or BecqMoni, especially with the new version that is being very actively maintained now. I'm also feeling like there is a dire need for more standardization in this field -- instead of everyone working on their own one-man project with their own input/output data format and capabilities it would be nice to see a bit of a more universal approach, even if that sounds pretty vague right now. But that's a completely different discussion.

In the mean time, if someone wants to implement and maintain soundcard support for Gamma MCA, I'd be happy to have a look at it. Feel free to reach out to me if you want to do something like this.

User avatar
NuclearPhoenix
Posts: 72
Joined: 15 Aug 2022, 19:24
Location: Austria
Contact:

Re: Gamma MCA web app

Post by NuclearPhoenix » 01 Jun 2023, 01:45

Look at that beautiful dark mode 8)
dark1.png
dark2.png
dark2.png (88.71 KiB) Viewed 2318 times
dark3.png
dark3.png (90.21 KiB) Viewed 2318 times

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest