In order to run all experiments and analysis jupyter notebooks, it is necessary to install the following tools:
Download version for your operating system.
- Python 3.9.16 download
- Install CUDA:
Note, for your system to actually use the GPU, it nust have a Compute Capibility >= to 3.0
Install CUDA 11.7 for your OS- Windows:
double-click the executable and follow setup instructions - Linux:
follow the instructions here
- Windows:
- Install python pip modules from
requirements.txt
using command:pip install -r requirements.txt
After the above setup it should be possible to run the scripts.
In order to run all experiments, it is necessary to build datasets from original files.
Necessary data to run the experiments are the following:
- dataset with 9 conditional variables describing the: Mass, Energy, Charge, 3 vectors for momenta and 3 vectors for coordinates
- dataset with images originating from Proton ZDC device
- dataset with images originating from Neutron ZDC device
Original files were generated by the GEANT4.
Instructions on how to generate data are available in here.
The below files explain the order of steps that need to be performed to run the experiments.
The notebook data_filtering.ipynb contains the initial preprocessing and filtering needed for training. It allows you to:
- calculates the photon sum values for images from Proton and Neutron ZDC devices.
- filter the data according to the photon sum values using function
filter_photon_sum()
.
This allows you to create datasets to replicate the results in the thesis. - preprocess the data for the joint model, referred to as padded dataset.
This step adds padding to both images from Proton and Neutron ZDC and concatenates them create image with 2 channels. - plot the distribution of photon values
- calculate quartile values of photon sum distribution
After the following steps you should have the following files:
data_cond_photonsum_proton_X_2312.pkl
data_photonsum_proton_X_2312.pkl
data_proton_neutron_photonsum_proton_18_1970_neutron_18_3249_padding.pkl
data_cond_photonsum_p_18_n_18.pkl
Where X denotes the minimal value for the photon sum value.
The notebook calculating_diversity_for_data.ipynb contains the preprocessing of dataset to calculate diversity of samples explained in Section 8. of the thesis.
You need to use files generated by above script. This is appropriate for both images coming from Proton ZDC device and Padded version of dataset.
After completing the steps you should have the following files:
data_cond_stddev_photonsum_p_X.pkl
. Where X denotes the minimal value for the photon sum value in proton datadata_cond_stddev_photonsum_p_X_n_X.pkl
. Where X denotes the minimal value for the photon sum value in both proton and neutron data.
The notebook calculate_max_coordinates.ipynb contains calclation of min max coordinates in images for both Proton and padded dataset.
After completing the steps you should have the following files:
data_coord_proton_photonsum_proton_1_2312.pkl
. Where X denotes the minimal value for the photon sum value in proton datadata_coord_proton_neutron_photonsum_X.pkl
. Where X denotes the minimal value for the photon sum value in both proton and neutron data.