This program reads a stream of data from the PC sound card and picks out pulses, the pulses are subsequently filtered and written to a JSON file in a special format called NPESv2-JSON. A live histogram and counts per second can be viewed in the browser tabs.
The current version of Impulse is also compatible with Atom-Nano and GS-Max devices with USB serial communication. When used in serial device mode the already completed spectrum is retrieved from the device and the program performs the display monitor function only.
Download and install the latest version of Python from the official site, consider upgrading if you are on an old version ... www.python.org
Download Impulse from the Github repository here https://github.com/ssesselmann/impulse
Unzip the package to the preferred location on your drive
Open your terminal to the command line and navigate to the folder ~/impulse-main
Impulse requires some additional python libraries installed, so copy and paste the following into your terminal;
Windows
pip install -r requirements.txt
Mac
pip3 install -r requirements_mac.txt
Linux
pip install -r requirements.txt
Now run the program by typing
python code/impulse.py
mac users may have to type
python3 code/impulse.py
Fingers crossed your default browser should open up and show tab 1
Look for any error messages in the terminal. A common problem is a missing library, if so try installing it separatelly.
pip install ??????
Always exit the program from tab 4 by clicking the exit button (important)
When it's all working you can access the program in your browser at;
- creating a settings database in sqlite3
- Obtaining an indexed table of audio devices
- Selecting Audio input device
- Reading the audio stream and finding pulses
- Function to find the average sample vanues in a list of n pulses
- Function to normalise a pulse
- Function to save the normalised pulse as a csv file (needs changing to JSON)
- Browser layout with tabs
- Tab for editing settings and capturing pulse shape
- Graph to display captured pulse
- Function to calculate pulse distortion
- Function to read data stream, find pulses and append counts to histogram
- Function to save histogram in JSON format
- Tab for displaying pulse height histogram and filter settings
- Assigned program name "impulse"
- Tidy up and move all styling to assets/styles.css
- Added function to show spectrum in log scale
- Added polynomial pulse height calibration and save calibration data
- Completed method for subtracting a background spectrum
- Added 482 isotope peak libraries in json format
- Program now auto detects negative pulse direction and inverts samples
- Modified devise list to only show input devices
- Wrapped shape function in a try: except: in case no audio device is available.
- Fixed an issue where the x axis changed scale when comparison was switched on.
- Added peakfinder function with resolution notation (Bug prevents notation showing in log scale)
- Added new function and chart to display distortion curve (useful)
- Added tab3 with counts per second histogram, data saves to json file
- Improved layout compatibility with smaller screens.
- Added user manual to tab 4
- Added gaussian correlation trace to spectrum with sadjustable sigma
- Tidied up appearance and moved the polynomial function, added text for gaussian correlation on tab4
- Fixed fatal bug related to gaussian slider and saves slider position to settings
- Fixed problem with calibration (8 March 2023 14:19 AET)
- Fixed fatal indentation error (9 March 2023 10:38 AET)
- Put back stop button on tab 2 (9 March 2023 19.52 AET)
- Added option for switching theme between fun/boring (9 March 2023 23:06 AET)
- Fixed bug in pulsecatcher.py and distortionchecker.py, pulse peak in wrong position (10 March 2023 17:00 AET)
- Added news and updates field on tab1
- removed duplicate pulse height calculation on pulsecatcher.py (10 March 2023 12:43 AET)
- Rearranged settings and added pulse length in time (12 March 2023 14:00)
- Fixed bug relating to count rates below 1 second (13 March 2023 10:30 AET)
- Changed count rate histogram to line plot with markers and 10 sec rolling average (14 March 2023 17.39 AET)
- Added function on tab-4 for exporting histogram file as csv
- Added pink theme
- Added drop down menu for comparison spectra and isotope spectra
- Added soundbyte button which plays a chord for any spectrum
- Changes soundbyte to play gaussian correlation instead of full histogram (cleaner sound)
- Added a threshold line to the pulse shape chart
- Fixed bug with start/stop buttons causing run to stop when switching tabs.
- Fixed y axis autorange when running difference spectrum
- Added warning for long dead time and options for shorter pulse length
- Added function to update calibration on prerecorded spectrum
- Added option to stop after n seconds
- Added tab4 with 3D Histogram
- Minor changes to layout + remove one dependancy
- Fixed Start and Stop buttons using threading to interrupt loop
- Major update for use with GS-MAX
- Bug fix - Start button fixed
- Added user table to local database for later use in publishing spectra
- Build functionality for right channel recording and coincidence counting
- Build interval histogram with Dead time calculation
- Show Subtraction in spectrum name
- Add functionality for publishing spectra to and reading spectra from an online database.
If anyone has requests for additional features please contact me via the "Contact us" link at gammaspectacular.com
Steven Sesselmann
Gammaspectacular.com