IMPULSE version announcements

PRA, BeqMoni, Theremino, Fitzpeaks and beyond!
User avatar
Sesselmann
Posts: 1292
Joined: 27 Apr 2015, 11:40
Location: Sydney
Contact:

Re: IMPULSE version announcements

Post by Sesselmann » 14 Dec 2024, 21:19

Comments on Rob's settings.

We can see here that Rob's combination of sample rate and sample length is not optimal, because he is not capturing the lowest and highest point of the pulse.
Cropped pulse
Cropped pulse
Impulse uses the same algorithm as PRA for capturing the pulse height and it has proven to work extremely well, indistinguishable from systems costing ten times more.

1) A frame of say 11 audio samples is read from the audio stream
2) Is the 6th. sample the peak value and also above the threshold?

example: ....2,3,1,5,2,3,[0,0,1,2,3,4,3,2,1,1,1],1,2,3,2,4,2,...

3) If NO move the frame one sample to the right, if YES capture the pulse
4) Normalise the pulse - this means factoring the samples such that [s + s + s + s +s ....] = 0
5) Calculate pulse distortion and compare it to the mean
6) If distortion exceeds the tolerance, simply drop the pulse otherwise;
5) Take the biggest sample value minus the lowest sample value to get pulse height in arbitrary units.
Pulse height calculation
Pulse height calculation
This image illustrates best what's going on.

So to achieve good pulse height resolution you want to make sure you consistently catch the high and low points.

Think of the high tension wire going to the detector in terms of a spring and the energy of the PMT pulse as deflecting the spring.
We are mainly interested in how much the spring deflects.

Impulse gives you several parameters to achieve optimum results.

1) Sample rate - faster sample rate provides a smoother curve
2) Sample size - typically proportional to sample rate, make sure you see the critical part of the pulse.
3) Pulses to sample - How many samples to catch before calculating the mean pulse shape
4) Buffer size - use a larger buffer size for higher sample rates.
5) Peak shifter - shifting the peak to the left or the right can make it easier to get both the peak and the trough into the frame.

Finally we want to know how much distortion we have in our system, so we run the distortion curve on a number of samples.

This function gets a bunch of pulses as determined by "Pulses to Sample" and orders the result in order of distortion, lowest to highest.

Hope this explanation is clear and understandable.

Steven

Rob Tayloe
Posts: 148
Joined: 10 Nov 2020, 12:00
Contact:

Re: IMPULSE version announcements

Post by Rob Tayloe » 15 Dec 2024, 01:55

Steven,
Thank you for your reply to my feedback and for the additional explanation. I struggled with PRA until your excellent tutorial videos provided more illumination.

It is easy enough for me to turn wifi off when gathering spectral data and I check your forum often enough that I will keep up on the latest iteration of Impulse. It is interesting that the browser dictates many display features; I believe that the laptop that I was using had Brave as the default browser. Is there another browser that you would suggest (e.g. Chrome)?

I am happy to share spectra, but I feel it necessary to process the data before uploading / sharing. In my case processing would entail fitting an energy calibration and seeing that the labels and axes are correct.

Personally, I find that more examples and guidance in setting up the software to be useful. If there is a way to highlight regions of interest, I would be very interested in learning an efficient method. I have been on a path of discovery of a number of inefficient methods and have achieved some nearly meaningless spectra displays.

Thanks again for your efforts

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

Re: IMPULSE version announcements

Post by Sesselmann » 15 Dec 2024, 09:58

Rob,

That's actually the way impulse spectrum sharing is intended to work. First you record a spectrum that you are happy with, then you calibrate it and finally click Publish to make it public. The published file is a json file and contains the polynomial function so other users can see the calibrated spectrum.

All your published files are visible to you on the My Details tab, here you can also delete a file if you accidentally uploaded a file and want to remove it.

PS: I will remove the automatic version checking in the next version and replace it with a simle link.

Steven


My Details
My Details

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

Re: IMPULSE version announcements

Post by Sesselmann » 19 Dec 2024, 11:53

Impulse v2.2.4 for grown ups !

Now that impulse functionality is 99% complete I have spent the best party of a week giving it a more professional look. Sorry to those of you who liked my silly themes, but the bananas, underwater, pink and orange themes have now gone.

To keep it manageable I have kept it to two themes, dark and light. I have done my best to make the screens work on small laptop and larger desktop screens.

Like an opamp I can take positive and negative feedback 😊

Mac and Windows versions here:
https://github.com/ssesselmann/impulse/releases
Impulse light and dark theme
Impulse light and dark theme

Rob Tayloe
Posts: 148
Joined: 10 Nov 2020, 12:00
Contact:

Re: IMPULSE version announcements

Post by Rob Tayloe » 19 Dec 2024, 14:18

Steven,
I downloaded the latest version of Impulse (2-2-4) and started fooling with it. As before I am using a Laptop with a hi-def screen running Windows 11. A number of screen grab images will follow. The first image shows the basic set-up; in this instance I am using a GS-USB-Pro V5 with the LaBr (1"x1" crystal) that you built for me a few years back. During my early experimentation I connected an oscilloscope to the bnc signal port on the GS-USB-Pro; the signal is shown in the attached image.
pic1.JPG
pic2.jpg

Rob Tayloe
Posts: 148
Joined: 10 Nov 2020, 12:00
Contact:

Re: IMPULSE version announcements

Post by Rob Tayloe » 19 Dec 2024, 14:36

The next image shows the second tab (starting from the left side at one :) ) Thank you for making the change to the style sheet so the headers are visible. I have chosen the max values as there seemed little advantage to selecting lesser values; the full max and min height of the pulse is captured.

Next I began acquiring a spectrum from Cs-137. I don't fully understand the notion of bin size; I do equate the term "bin" with "channels" as used in "old school" gamma spec work. And the bin size of 1 spread the spectrum out more; mostly I am only using the first 2000 channels. I do get some counts in higher channels with an overnight run with K-40. I make use of the browser refresh button after each run; this seems to cause the file name to appear in the csv block. I also increased the max allowable counts and time by a factor of 100. Typically for my energy cals I just want well formed peaks. As my earlier discussions have indicated I typically acquire many more than 5 peaks upon which to do an energy calibration. I use my spreadsheet to perform a least squares fit to these peaks. The spreadsheet can be found under detectors and the SrI discussion I initiated.

I did try to highlight the 660 keV photopeak from the Cs-137 source; the resultant image of the expanded region is shown. I attempted to make use of the gaussian function, but the lowest positive setting overwhelmed the photopeak. Not sure what to make of this.

I also acquired a spectrum from Co-60 as shown. Another screen grab shows the folders where the json files are stored and the download folder where I keep the csv and screen capture files. Lastly I am presenting the command window generated upon the start of Impulse. There appears to be a python error, perhaps not significant, in the last line. And the stuff in the user appdata folders is typically hidden unless one choses to reveal the hidden folders [this was when I was trying to learn more about the plasma css file. I finally gave up with that.]
pic3.jpg
pic4.jpg
pic5.jpg
pic6.jpg
pic7.jpg
pic8.jpg
pic9.jpg

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

Re: IMPULSE version announcements

Post by Sesselmann » 19 Dec 2024, 15:42

Rob,

Thanks for screenshots..., looks good, still a great detector!

I can already see a few issues in Impulse that need fixing, and I am on to it..

Steven

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

Re: IMPULSE version announcements

Post by Sesselmann » 19 Dec 2024, 16:02

Rob,

Strange how the distortion curve on yours has wrapped onto a new row ?

I tried replicating it on my Mac and also the PC but it doesn't wrap on mine, maybe a different browser?

Steven
Moved box
Moved box

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

Re: IMPULSE version announcements

Post by Sesselmann » 28 Dec 2024, 18:41

Christmas update 🎄

Today I pushed the impulse 2.2.6 update.

The focus of this update was to improve the calibration and isotope flag function.

The main changes are as follows.
  • Isotope pulldown selection now updates dynamically when you open the browser page, it automatically finds all json files in ~/data_directory_2.0/i/tbl/... and allows you to select any list.
  • You can now create your own isotope lists or edit the existing lists in /i/.tbl/ , just make sure you follow the same json pattern (no comma before the last bracket).
  • I added a new button called re-calibrate, this button allows you to update the calibration and spectrum notes of a previously recorded file. In the earlier versions calibration had to be set before the recording had been started, but now it can be set after the recording has stopped.
  • I also made adjustments to the peak width function, it now includes isotopes that fall within the set bin/channel width. The maximum is currently 15, which means it selects 7 channels either side of the peak.
  • I also re-arranged the buttons to make the layout more intuitive.
What may be less exciting is that I spent hours looking for a bug that caused the program to freeze without any error message, finally I just left it to have a cup of coffee, and when I got back after my break, the spectrum was on the screen, but this time mirror image. It turned out the my three polynomial coefficient list [1,2,3] was flipped [3,2,1] when written to json, which caused the calculation to take an exponentially long time. easy fixed in python with this command: coefficients[::-1]

Anyway, here it is: https://github.com/ssesselmann/impulse/releases

Best wishes for new year....🍾

Steven
Attachments
Impulse calibration changes
Impulse calibration changes

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

Re: IMPULSE version announcements

Post by Sesselmann » 17 Jan 2025, 07:34

Happy New Year,

Obviously you people have been enjoying Christmas and New Year, because no one reported a critical bug in v2.2.6 🙄

I made a last minute change which one should never do, and it caused a problem with the filename, so the spectrum file would not save (sorry if anyone lost some hair 🤬 over this).

This bug has been fixed in v2.2.7 😇

Please report all bugs, I will endeavour to fix and release new versions when required, my email is in the program.


Steven

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest