Proton Calorimetry/Meetings/2025/05/02
Minutes for UCL Proton Beam Therapy Group Meetings, 2nd May - Calibration Code Discussion
Present
Joe Bateman, Sonia Escribano, Simon Jolly
Sonia Escribano
- When press measure on GUI this runs executes executeFTDI.sh shell script which creates outputFTDI.txt with directory and date and FTDI_GUI.cpp is modified version of FTDI.cpp
- creates folders: raw, calibration, fitted
- HEX data saved as raw data to Run0xy.txt and also converted to decimal using function below
- function: HEX -> decimal - updates as data is acquired (2 lines if one side of board and 4 lines if dual-sided) so overwrites for each measurements - now this data is calibrated and then this is what displayed in real-time on the GUI
- writeCSV into GUI/average.csv and writeCSV_dual into GUI/average_dual.csv functions (2 and 4 lines respectively) data then error or data a error a data b error b and then it is this data that is displayed on the GUI at the desired frame rate
- If the ftdi_gui.cpp knew what the visualisation rate was - it could produce average.csv at the desired frequency
- This means raw live and calibrate live only have to work at 25 Hz rather than 5 kHz (I.e. only have to apply calibration function) and renders raw live redundant and saves raspberry pi computing space
- However, means if data is acquired faster than visualisation rate of 25 Hz - may be issues with slowing down writing run0xy.txt sine adding complexities and conditionals to loop?
- Fitting is done in calibrate_live.cpp after taking into account number of measurements and integration time and fits after condition met
- Currently ftdi_gui.cpp does not know whether the data is being calibrated or not
- Currently specify in shell script whether we display raw or live data executeftdi knows number of measurements or whether acquisition is still running (via log file button status) and could be trigger for when to dimply live fit? Rather than from calibrate.cpp keeping count
- Add another input variable to ftdi_gui to specify whether you write out the file the gui is going to read from or the calibrated?
- This now means ftdi_gui needs to know about sheet thicknesses
- ftdi_gui should output average.csv at 25 Hz
- Should be optional input variable using getOps to specify speed at which average.csv is outputted from ftdi_gui.csv
- raw_live is now just for taking raw data and sheet information and outputting output.txt and calibrate_live just has to do is this plus calibrate at 25 Hz
- Should include counter in average.csv or for when raw_live and calibrate_live reads it
- See how raw_live responds to just changing ftdi_gui to average at 25 hz
- Then once that works - add in “sleep” to raw_live and see how resources change
- Then make sure there is no code duplicated between raw_live and calibrate_live
- Maybe in future add flag so that raw_live and calibrate_live are the same code, and when flagged applies calibration factor instead and call code output_live
- calibrate_live (part of output_live) should then read in single calibration file per board and then apply calibration to each board
- Joe For tuesday: geant4 simulation of 226 MeV and 245 MeV dose depth curve within stack 50mm absorber