GUI for data processing of the the Single Photon Counting (SPC) spectrometer at J-KAREN-P facility.
Python packages:
- numpy
- matplotlib
- imageio
- pillow
System tools:
- Python with tkinter support
- gfortran, for compiling
spc.f90
The shot-sheet reader uses Python standard-library modules for .xlsx parsing.
Change into the interface folder and run:
cd /path/to/spc_interface
python spc_gui.pyReplace /path/to/spc_interface with the local path.
- Select multiple background
.tiffiles manually, or select a shot sheet (.xlsx) plus experimentYYYY-MM-DDfolder (which contains SPC.tiffiles) for automatic background-shot selection. Then clickCreate B.tif. The GUI createsBackgroundsinside the experiment folder, moves those files there, and createsB.tif. - Subtract
B.tiffrom the remaining raw.tiffiles in the experiment folder. Output is saved toBackground Subtracted. - Compile the copied
spc.f90to the localspcexecutable. - Run
spconBackground Subtractedand saveSingle Photon Image(SPI). - Plot spectra from
Single Photon Image. The generated PNG spectra are loaded into the preview panel on the right.
Notes:
- Plot output is saved as
.png. - Use
Previous/Nextto preview generated PNG spectra. UseExport current to PDFto save the currently displayed spectrum as a single-page PDF. - Use
Load spectra folderin the preview panel to browse previously generated spectra without running the full workflow. - Automatic background selection reads the first worksheet of the shot sheet:
rows whose
W-PMvalue containsblankortriggerare matched to.tiffiles ending in_Shot_No.tif. If it does not work, try to choose background.tiffiles manually. - Step 1 moves the selected background files into
[experiment folder]/Backgrounds. If you need to keep originals in place, duplicate them before using the GUI.
The original SPC code was developed by Dr. E.G. Hill and Dr. H.F. Lowe at Imperial College London. Thanks to them for the original version and coding foundation.