Giter Club home page Giter Club logo

opengammaproject / gamma-mca Goto Github PK

View Code? Open in Web Editor NEW
33.0 33.0 8.0 30.17 MB

☢️📊 Progressive Web App MCA for gamma spectroscopy including file and live plot support via a serial interface.

Home Page: https://spectrum.nuclearphoenix.xyz

License: GNU General Public License v3.0

JavaScript 2.52% HTML 24.45% TypeScript 71.80% Python 0.19% SCSS 1.03%
arduino bootstrap font-awesome gamma-ray-spectrometry gamma-spectroscopy multi-channel-analyzer particle-physics physics plotly progressive-web-app pwa radiation spectroscopy typescript web web-application web-serial-api

gamma-mca's People

Contributors

dependabot[bot] avatar imgbotapp avatar nuclearphoenixx avatar slimonslimon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gamma-mca's Issues

cps rate may be affected by render time with many points on "Show Evolution" plot

With a large number of accumulated points, for example ~ 1 million on my low-end PC, it takes a long time to render the time series plot. The displayed "cps" number may be relative to active plotting time and not wall-clock time, so the first reported value for cps immediately after closing the time series graph to return to the spectrum graph may be very large, for example 10x or more larger than the typical value.
Subsequent display of the time series plot shows this spuriously large number as a real data point, while it may be an artifact of available CPU time and not a deviation in true count rate. This could be some unavoidable consequence of the code being a browser plugin (?) The two high outlier data points visible in the plot below were caused by this effect. It does not occur in a plot if the "Show Evolution" button is never used.
GammMCA-LargePeaks-2024-01-09_16-08-45

Franta

Dobrý den,
při volbě set mode geiger jsou na seriový port zasílány jen samé 0.
Při volbě energy je vše v pořádku.
děkuji

GammaMCA app stops after 74.7M counts. Time or counts limit?

First; great project, and I don't know if this is an issue or simply working as intended.

I built OpenGammaDetector PCB Rev 4.0, changing the layout to remove the two inner ground-plane layers, and cut off the mechanical-support-only part of the PCB to reduce cost. Even on a 2-layer PCB, the circuit seems to work, testing with one SiPM at Vbias = 29.1 V using a random chunk of plastic scintillator. I adjusted the threshold pot R8 for what looked reasonable on the scope. I dragged and dropped the code file https://github.com/OpenGammaProject/Open-Gamma-Detector/blob/main/software/ogd_pico-4.0.3.uf2 onto the Pico.

I do not yet have a I2C display attached to the board, but at first impression the hardware and Pico code works perfectly. It is connected via USB to a Mint Linux box running Gamma MCA Version 2023-12-30 with all controls in the "Settings" tab left at default; I did not enable a time limit to acquisition. I did not do any calibration. I put a chunk of ore on the scintillator and saw a count rate near 2800 cps, sometimes exceeding 3000. I left it to run 9 hours overnight.
In the morning I could see from the activity LED on the board that it was still counting, but the app reported count rate was 0 cps, showing Spectrum: 74781924 cts 09:22:27 so I wonder, did it stop accumulating due to some memory limit in the app? I don't even know what to expect from a plastic scintillator material, I'm told it is not useful for spectroscopy, but I suppose the spectrum looks plausible. Also shown is a short run with 547 cps count rate, using a 0.25 uCi Cs-137 source.
I was able to save the data, clear the spectrum, click "Record" and the app works OK again, showing the expected count rate.
2024-01-09_GammaMCA_07-56-15
2024-01-08_GammaMCA_CS137
20240108_GammaRev4-TopView

Question: Control Open Gamma Detector via console in Gamma MCA

Using serial console in Gamma MCA, connecting to the serial interface of the Open Gamma Detector is not working for me.
Pico shows up correctly in the Port menu and spectrum recording also works just fine via the serial interface of Gamma MCA.
Of course, connecting to the serial interface of Open Gamma Detector via Arduino IDE works.
Am I missing something here?
Many thanks in advance!

Can not load CSV anymore

Hi
A new version installed today (2023/07/23) and I am not able to load a CSV file. I use the semicolon as the delimiter in the file and have set the semicolon as delimiter in the settings of the program.

I recorded a short spectrum, saved it as histogram and found that the saved file does not use delimiters, but separates the entries by new line charcters. So I replaced the semicolons in my spectrum file with new line characters and the import worked.
Is there a setting that I missed when importing semicolon-delimited CSV files?

Simple standalone executable

Hallo Phoenix 1747

i would like to ask ,is there any Possibility to create a real OFFLINE APP which could be executed as .EXE. The Gamma MCA (and also the i would say OFFLINE Subfunction) is coupled on Restrictions concerning Browser Version and Types. So if you not fulfill all Requirements very exactly you have unfortunately no Chance for a good read out of the USB connected Hardware. I have a MAC OS Chrome 103 Version which should normally support your MCA .......but it doesent (some Zertificat Troubles from Chrome)

Thank you

Steffen

Custom IsoList JS Injection

Just found out that you can inject HTML and JS into the website using malicious custom isotope lists that contain code in the JSON data. This means that any custom list could hijack Gamma MCA with little to no user input aside from actually confirming the URL.

These two lines especially use the innerHTML property without cleaning or checking any input:

https://github.com/Open-Gamma-Project/Gamma-MCA/blob/049c8d5df6793e0d0af6b23c6e04527bccdd922f/assets/js/main.js#L562
https://github.com/Open-Gamma-Project/Gamma-MCA/blob/049c8d5df6793e0d0af6b23c6e04527bccdd922f/assets/js/main.js#L567

I made a quick JSON list that injects such code to test and confirm it:

https://gist.github.com/Phoenix1747/6f400c583c2fe607281dd700c72dcb93

Serial histogram mode: inaccurate cps

When using the "histogram" mode for serial devices sometimes the received count rate drops to 0 until the next refresh. If you increase the plot refresh time, then this effect will be averaged out and approach about 70-80% of the actual count rate.

It looks like possibly every 2-3 refreshes, there are no received counts and therefore the cps drops to 0 too. It is somewhat random, though. Maybe this is a problem with the Open Gamma Detectors I am using here. It would be extremely helpful if someone can reproduce this issue on their side as well. 👍

I don't know why this happens, using the default "chron mode" everything is fine. This might also be a problem with the Web Serial API if the received data is too large, but I don't think so, honestly. Maybe it's also a problem with the serial options. But probably it's just something in the code...

Plot not updating when using serial stream in Histogram Mode

Hi,

Firstly, I want to extend my congratulations on the exceptional work done here. This tool serves as a fantastic interface for open-source or DIY gamma spectrometers.

I have tested the Chrome-based version of the software and found it performs efficiently in chronological mode. However, I encountered an issue in histogram mode: the plot fails to refresh with the arrival of new data.

I've provided the settings I'm utilizing below. Notably, the serial data stream is accurately displayed in the console.

gammaMCA_settings

As a tester, I am using an esp32 with the following code (Arduino IDE 2.2.1):

uint16_t spectrum_1[256];
String spectrumStr;

void setup() {
  Serial.begin(9600);
  for (uint16_t i = 0; i < 256; i++) {
    spectrum_1[i] = 1;
  }

}

void loop() {
  spectrumStr = "";
  for (uint16_t i = 0; i < 256; i++) {
    //Serial.print(spectrum_1[i]); Serial.print(";");
    spectrumStr += "1";
    spectrumStr += ";";
  }
  Serial.println(spectrumStr);
  delay(3000);
}

The stream of 1s is correctly shown in the console, but the plot and cts do not reflect this. What am I missing?

Thanks for your support,
Andrea

Geiger mode only zeros

Hello,
when selecting set mode geiger, only 0 are sent to the serial port.
When choosing energy, everything is fine.
Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.