Skip to content

UCLHp/xrv124

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xrv124

Current Version

A set of scripts for the analysis and visualization of data acquired by the Logos XRV-124 scintillating cone. Analysis includes:

  • Spot shifts (from isocentre in x and y of the BEV coordinates)
  • Spot shifts (3D vector from isocentre in Logos coordinates)
  • Spot sizes (in both BEV and "spot" coordinate systems; see documentation)

See the xrv124/example_results directory for some examples of the data generated by the script. A summary pdf report detailing individual QA tolerance pass/fail results is generated for the monthly QA script.

Usage

To run the monthly QA analysis: python run.py.

You will need the full data set acquired during monthly QA, with beams collected in the order specified in the GANTRY and ENERGY lists defined in config.py. You can find a sample data set on the O drive in my work in progress folder, /Logos XRV124/Sample data/2020 0102/. The script will prompt for the directory containing the data and for which gantry it was acquired on.

If you want to generate an executable, first pip install pyinstaller and then run pyinstaller --onefile run.py. To keep the size of the executable down, make a conda environment with only the libraries given in requirements.txt installed.

For the analysis of a single beam use: python single_spot_script.py.

The script will prompt you for a beam file. You may select any file, but both the entry (.csv) and exit (.txt) spot files must be present in the directory for the analysis to run. The script will output the shifts in BEV coordinates as well as spot sizes.

Limitations / known bugs

With v1.0 there are several limitations:

  • The monthly QA analysis will only run on the full data set. The logos software does not have a way of recognising beam energy, hence if any beam was not captured during the acquisition it would not be possible to match the output files generated with a specific gantry angle and energy.
  • The QA plan has been designed to maximize signal whilst minimising the chance of saturation. If the wrong camera acquisition parameters are used though some spots may saturate which will mean any sigmas calculated, or the determination of spot centres and thus shifts from isocentre, will not be reliable. No warning will be given. If you see any odd results check the max grey value of the images are below 250.

To do

  • Determine appropriate tolerances to be used
  • Create a partial analysis method to be used when spots are missed and either this was not noticed or there was no time to reacquire the data
  • Automatically write subset of results to database
  • Check for image saturation and raise warning messages

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

Copyright (C) 2021 Steven Court

xrv124: analysis of data acquired by the Logos XRV-124 scintillating cone.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.