Repository for machine learning-assisted analysis of Polarized Neutron Reflectometry (PNR) data.
- Clone the repository with
git clone https://github.com/ninarina12/ML_PNR.git
. - Create a conda environment with necessary dependencies using
conda create --name myenv --file env_file.txt
.
- Generate synthetic data by updating
pnr_generate.py
with the appropriate sample parameters and executingmpiexec -n num_process python pnr_generate.py
, withnum_process
being the number of processes on which to run parallel simulations. Example parameters are based on nominal values of measurements in theexperiments
directory. - Visualize properties of the synthetic data directly within the
pnr_properties.ipynb
notebook. - Train and evaluate a machine learning model within the
pnr_vae.ipynb
notebook.
pnr_models.py
contains all network components and architectures.pnr_utils.py
contains various utilities to assist with data import, processing, and plotting.plot_imports.py
contains some typical imports for plotting.
plot_exp.py
can be used to fit and plot experimental data only.