Enhancing Neutron Scattering Experimentation
A Data Science and Machine Learning Approach to Predict Background Scattering
1
14-03-2024
Petroula Karacosta
X-ray and Neutron Scattering Group, NBI
Master’s Thesis:
Using McStas Union components to simulate a magnet sample environment & predicting background with machine learning
2
Kim Lefmann
Professor
NBI
Mads Bertelsen
Computational Neutron Scattering Scientist
ESS, DMSC
Alex Holmes
Scientific Engineer
ESS
What’s Neutron Scattering?
3
The ID of a Neutron
Interaction with matter
4
Spin | Charge | Magnetic Moment | Particle | Wave |
1/2 | 0 | -1.9130 eℏ/2mp | Yes | Yes |
Absorption
Scattering
Bragg’s Law
Debye-Scherrer Cones
In Crystals
In Crystal Powders
European Spallation Source - BIFROST Spectrometer
5
Sample
Environment
Creating synthetic data
6
Simulating the Sample Environment
7
Monte Carlo Neutron Ray-Tracing Simulation Package
McStas Union
Assign physical properties to desired geometries
Simulating the Sample Environment
8
Simulating the Sample Environment
9
10
11
What problem do we need to solve?
12
Background Scattering
13
Background Scattering
14
Example: La2-xSrxCuO4, λ=1.47 Å
15
Produced over 24000 sets of synthetic data based on 7 parameters:
16
17
What’s the best way
to predict background?
18
Starting with a Random Forest:
19
1. Dimensionality Reduction
20
High dimensionality: 807 features
PCA: 81 features
1. Dimensionality Reduction
21
High dimensionality: 807 features
PCA: 81 features
2. Information vs Complexity in target values
22
5 bins per degree: 800 targets
MAE: 0.161
1 bin per degree: 160 targets
MAE: 0.111
Normalised Intensity within 10o - 170o
2. Information vs Complexity in target values
23
5 bins per degree: 800 targets
MAE: 0.161
1 bin per degree: 160 targets
MAE: 0.111
Normalised Intensity within 10o - 170o
3. Bias Exploration: Measurements of pure background
24
0% Background Measurements
MAE: 0.105
50% Background Measurements
MAE: 0.129
100% Background Measurements
MAE: 0.121
3. Bias Exploration: Measurements of pure background
25
0% Background Measurements
MAE: 0.105
50% Background Measurements
MAE: 0.129
100% Background Measurements
MAE: 0.121
3. Bias Exploration: Measurements of pure background
26
0% Background Measurements
MAE: 0.105
50% Background Measurements
MAE: 0.129
100% Background Measurements
MAE: 0.121
Why though?
First results
27
Random Forest vs Gradient Boost
28
Simulation
Predicted Background
Predicted Sample
Still a work in progress…
Nonetheless…
29
First step in background prediction in neutron scattering data
Thank you!
Questions?
30