cdump / radiacode

Library for RadiaCode-101
MIT License
108 stars 20 forks source link

radiacode-examples/show-spectrum.py PyYAML dependency and documentation. #21

Closed mkgin closed 9 months ago

mkgin commented 10 months ago

I started playing with radiacode-examples in a clean python virtual environment today

After installing, it works ok for me via USB (linux), Radiacode FW 4.7.

This demo looks nice but it depends on PyYAML. (I needed to install it manually)

Also, the "--noreset" option could be mentioned in the documentation. Just in case someone had been interested in spectrum data collected over the last few hours :smile: ... Maybe "--noreset" could be default behavior and a option to "--reset"

cdump commented 10 months ago

I've fixed missing deps in v0.3.0 Let's discuss --noreset defaults with author of this script @GuenterQuast

ckuethe commented 10 months ago

I'm of the mind that a tool called "show" should not do any kind of "change", "update", "modify", "clear", "reset" ... operation without explicit intent.

In radiacode_poll.py, I grab the current spectrum when the program starts and use that at the baseline for subsequent accumulation. That's sufficient to allow me to show the accumulation during the sampling interval without changing the state in memory.

mkgin commented 10 months ago

I'm of the mind that a tool called "show" should not do any kind of "change", "update", "modify", "clear", "reset" ... operation without explicit intent.

In radiacode_poll.py, I grab the current spectrum when the program starts and use that at the baseline for subsequent accumulation. That's sufficient to allow me to show the accumulation during the sampling interval without changing the state in memory.

I've seen radiacode-tools. The Sandia labs Intercal SW looks interesting, you sent a patch there for the xml. I'm using Linux_ and iOS daily... Windows only when absolutely necessary). My Radiacode 102 arrived yesterday :-) so far I have been using the webserver example to download a CSV and then display with gnuplot. (I use Linux and iOS daily... windows only when absolutely necessary... ).

A bit off topic already but, being able to export enough spectrum data to xml for the Sandia labs SW would be a simple example. I am a bit busy this week, but could spend some time on it before the end of the year.

ckuethe commented 10 months ago

Gettin' a little off topic now, but today's project is to make something that renders spectrograms using matplotlib and all the pretty palettes it supports.

Anyhoo, cdump's radiacode library is amazeballs.

GuenterQuast commented 10 months ago

Thanks for taking care of the firmware adjustments !

Concerning the defaults in show_spectrum.py: I agree that as part of this repository, resetting the device by default is confusing. (I developed the script for data acquisition in physics lab courses, where starting under "clean" conditions is appropriate). I'll provide a version with more reasonable defaults soon.

mkgin commented 9 months ago

Thanks!