A simple simulation designed to verify the results generated by the main project.
It is a debugging and validation tool for the main application.
In addition to the packages required by the main project, you also need to install:
pip install pyvista tdqm
First, generate a scene file using the main project and prepare the configuration file.
Then run:
python sim.py scene.json config.json
The scene file describes the positions of the scanner’s focal spot and the detectors within the scanning plane. It also includes a sphere that is automatically generated to fit inside the scanning tunnel. This file is generated by the main project and does not need to be edited manually.
The configuration file defines four parameters used to set the spatial dimensions and resolution of the scene.
| parameter | description |
|---|---|
detector_resolution |
Number of pixels per single detector |
detector_length |
The virtual length of the detector if it were a flat plate detector. This corresponds to the total scan length |
roll_axis_resolution |
Number of samples along the roll axis. This value determines the effective scanning speed - higher values provide more precise sampling |
During the simulation, the scene is displayed to the user.
The result is an image showing the projection of the sphere onto the detectors, which is saved as projection.png.