reflectorch 1.3.0__py3-none-any.whl → 1.5.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of reflectorch might be problematic. Click here for more details.
- reflectorch/__init__.py +17 -17
- reflectorch/data_generation/__init__.py +128 -126
- reflectorch/data_generation/dataset.py +210 -210
- reflectorch/data_generation/likelihoods.py +80 -80
- reflectorch/data_generation/noise.py +470 -470
- reflectorch/data_generation/priors/__init__.py +60 -60
- reflectorch/data_generation/priors/base.py +55 -55
- reflectorch/data_generation/priors/exp_subprior_sampler.py +298 -298
- reflectorch/data_generation/priors/independent_priors.py +195 -195
- reflectorch/data_generation/priors/multilayer_models.py +311 -311
- reflectorch/data_generation/priors/multilayer_structures.py +104 -104
- reflectorch/data_generation/priors/no_constraints.py +206 -206
- reflectorch/data_generation/priors/parametric_models.py +841 -841
- reflectorch/data_generation/priors/parametric_subpriors.py +369 -369
- reflectorch/data_generation/priors/params.py +252 -252
- reflectorch/data_generation/priors/sampler_strategies.py +369 -369
- reflectorch/data_generation/priors/scaler_mixin.py +65 -65
- reflectorch/data_generation/priors/subprior_sampler.py +371 -371
- reflectorch/data_generation/priors/utils.py +118 -118
- reflectorch/data_generation/process_data.py +41 -41
- reflectorch/data_generation/q_generator.py +280 -246
- reflectorch/data_generation/reflectivity/__init__.py +102 -102
- reflectorch/data_generation/reflectivity/abeles.py +97 -97
- reflectorch/data_generation/reflectivity/kinematical.py +70 -70
- reflectorch/data_generation/reflectivity/memory_eff.py +105 -105
- reflectorch/data_generation/reflectivity/numpy_implementations.py +120 -120
- reflectorch/data_generation/reflectivity/smearing.py +138 -138
- reflectorch/data_generation/reflectivity/smearing_pointwise.py +109 -109
- reflectorch/data_generation/scale_curves.py +112 -112
- reflectorch/data_generation/smearing.py +98 -98
- reflectorch/data_generation/utils.py +223 -222
- reflectorch/extensions/jupyter/__init__.py +11 -6
- reflectorch/extensions/jupyter/api.py +85 -0
- reflectorch/extensions/jupyter/callbacks.py +34 -34
- reflectorch/extensions/jupyter/components.py +758 -0
- reflectorch/extensions/jupyter/custom_select.py +268 -0
- reflectorch/extensions/jupyter/log_widget.py +241 -0
- reflectorch/extensions/jupyter/model_selection.py +495 -0
- reflectorch/extensions/jupyter/plotly_plot_manager.py +329 -0
- reflectorch/extensions/jupyter/widget.py +625 -0
- reflectorch/extensions/matplotlib/__init__.py +5 -5
- reflectorch/extensions/matplotlib/losses.py +32 -32
- reflectorch/extensions/refnx/refnx_conversion.py +76 -76
- reflectorch/inference/__init__.py +28 -24
- reflectorch/inference/inference_model.py +847 -851
- reflectorch/inference/input_interface.py +239 -0
- reflectorch/inference/loading_data.py +37 -0
- reflectorch/inference/multilayer_fitter.py +171 -171
- reflectorch/inference/multilayer_inference_model.py +193 -193
- reflectorch/inference/plotting.py +524 -98
- reflectorch/inference/preprocess_exp/__init__.py +6 -6
- reflectorch/inference/preprocess_exp/attenuation.py +36 -36
- reflectorch/inference/preprocess_exp/cut_with_q_ratio.py +31 -31
- reflectorch/inference/preprocess_exp/footprint.py +81 -81
- reflectorch/inference/preprocess_exp/interpolation.py +19 -16
- reflectorch/inference/preprocess_exp/normalize.py +21 -21
- reflectorch/inference/preprocess_exp/preprocess.py +121 -121
- reflectorch/inference/query_matcher.py +81 -81
- reflectorch/inference/record_time.py +43 -43
- reflectorch/inference/sampler_solution.py +56 -56
- reflectorch/inference/scipy_fitter.py +272 -248
- reflectorch/inference/torch_fitter.py +87 -87
- reflectorch/ml/__init__.py +32 -32
- reflectorch/ml/basic_trainer.py +292 -292
- reflectorch/ml/callbacks.py +80 -80
- reflectorch/ml/dataloaders.py +26 -26
- reflectorch/ml/loggers.py +55 -55
- reflectorch/ml/schedulers.py +355 -355
- reflectorch/ml/trainers.py +200 -191
- reflectorch/ml/utils.py +2 -2
- reflectorch/models/__init__.py +15 -14
- reflectorch/models/activations.py +50 -50
- reflectorch/models/encoders/__init__.py +19 -17
- reflectorch/models/encoders/conv_encoder.py +218 -218
- reflectorch/models/encoders/conv_res_net.py +115 -115
- reflectorch/models/encoders/fno.py +133 -133
- reflectorch/models/encoders/integral_kernel_embedding.py +390 -0
- reflectorch/models/networks/__init__.py +14 -14
- reflectorch/models/networks/mlp_networks.py +434 -428
- reflectorch/models/networks/residual_net.py +156 -156
- reflectorch/paths.py +29 -27
- reflectorch/runs/__init__.py +31 -31
- reflectorch/runs/config.py +25 -25
- reflectorch/runs/slurm_utils.py +93 -93
- reflectorch/runs/train.py +78 -78
- reflectorch/runs/utils.py +404 -401
- reflectorch/test_config.py +4 -4
- reflectorch/train.py +4 -4
- reflectorch/train_on_cluster.py +4 -4
- reflectorch/utils.py +98 -68
- {reflectorch-1.3.0.dist-info → reflectorch-1.5.0.dist-info}/METADATA +129 -125
- reflectorch-1.5.0.dist-info/RECORD +96 -0
- {reflectorch-1.3.0.dist-info → reflectorch-1.5.0.dist-info}/WHEEL +1 -1
- {reflectorch-1.3.0.dist-info → reflectorch-1.5.0.dist-info}/licenses/LICENSE.txt +20 -20
- reflectorch-1.3.0.dist-info/RECORD +0 -86
- {reflectorch-1.3.0.dist-info → reflectorch-1.5.0.dist-info}/top_level.txt +0 -0
reflectorch/test_config.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from reflectorch.runs import run_test_config
|
|
2
|
-
|
|
3
|
-
if __name__ == '__main__':
|
|
4
|
-
run_test_config()
|
|
1
|
+
from reflectorch.runs import run_test_config
|
|
2
|
+
|
|
3
|
+
if __name__ == '__main__':
|
|
4
|
+
run_test_config()
|
reflectorch/train.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from reflectorch.runs import run_train
|
|
2
|
-
|
|
3
|
-
if __name__ == '__main__':
|
|
4
|
-
run_train()
|
|
1
|
+
from reflectorch.runs import run_train
|
|
2
|
+
|
|
3
|
+
if __name__ == '__main__':
|
|
4
|
+
run_train()
|
reflectorch/train_on_cluster.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from reflectorch.runs import run_train_on_cluster
|
|
2
|
-
|
|
3
|
-
if __name__ == '__main__':
|
|
4
|
-
run_train_on_cluster()
|
|
1
|
+
from reflectorch.runs import run_train_on_cluster
|
|
2
|
+
|
|
3
|
+
if __name__ == '__main__':
|
|
4
|
+
run_train_on_cluster()
|
reflectorch/utils.py
CHANGED
|
@@ -1,68 +1,98 @@
|
|
|
1
|
-
import numpy as np
|
|
2
|
-
from numpy import ndarray
|
|
3
|
-
|
|
4
|
-
from torch import Tensor, tensor
|
|
5
|
-
|
|
6
|
-
__all__ = [
|
|
7
|
-
'to_np',
|
|
8
|
-
'to_t',
|
|
9
|
-
'angle_to_q',
|
|
10
|
-
'q_to_angle',
|
|
11
|
-
'energy_to_wavelength',
|
|
12
|
-
'wavelength_to_energy',
|
|
13
|
-
]
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
def to_np(arr):
|
|
17
|
-
"""Converts Pytorch tensor or Python list to Numpy array
|
|
18
|
-
|
|
19
|
-
Args:
|
|
20
|
-
arr (torch.Tensor or list): Input Pytorch tensor or Python list
|
|
21
|
-
|
|
22
|
-
Returns:
|
|
23
|
-
numpy.ndarray: Converted Numpy array
|
|
24
|
-
"""
|
|
25
|
-
|
|
26
|
-
if isinstance(arr, Tensor):
|
|
27
|
-
return arr.detach().cpu().numpy()
|
|
28
|
-
return np.asarray(arr)
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
def to_t(arr, device=None, dtype=None):
|
|
32
|
-
"""Converts Numpy array or Python list to Pytorch tensor
|
|
33
|
-
|
|
34
|
-
Args:
|
|
35
|
-
arr (numpy.ndarray or list): Input
|
|
36
|
-
device (torch.device or str, optional): device for the tensor ('cpu', 'cuda')
|
|
37
|
-
dtype (torch.dtype, optional): data type of the tensor (e.g. torch.float32)
|
|
38
|
-
|
|
39
|
-
Returns:
|
|
40
|
-
torch.Tensor: converted Pytorch tensor
|
|
41
|
-
"""
|
|
42
|
-
|
|
43
|
-
if not isinstance(arr, Tensor):
|
|
44
|
-
return tensor(arr, device=device, dtype=dtype)
|
|
45
|
-
return arr
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
# taken from mlreflect package
|
|
49
|
-
# mlreflect/xrrloader/dataloader/transform.py
|
|
50
|
-
|
|
51
|
-
def angle_to_q(scattering_angle: ndarray or float, wavelength: float):
|
|
52
|
-
"""Conversion from full scattering angle (degrees) to scattering vector (inverse angstroms)"""
|
|
53
|
-
return 4 * np.pi / wavelength * np.sin(scattering_angle / 2 * np.pi / 180)
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
def q_to_angle(q: ndarray or float, wavelength: float):
|
|
57
|
-
"""Conversion from scattering vector (inverse angstroms) to full scattering angle (degrees)"""
|
|
58
|
-
return 2 * np.arcsin(q * wavelength / (4 * np.pi)) / np.pi * 180
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
def energy_to_wavelength(energy: float):
|
|
62
|
-
"""Conversion from photon energy (eV) to photon wavelength (angstroms)"""
|
|
63
|
-
return 1.2398 / energy * 1e4
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
def wavelength_to_energy(wavelength: float):
|
|
67
|
-
"""Conversion from photon wavelength (angstroms) to photon energy (eV)"""
|
|
68
|
-
return 1.2398 / wavelength * 1e4
|
|
1
|
+
import numpy as np
|
|
2
|
+
from numpy import ndarray
|
|
3
|
+
|
|
4
|
+
from torch import Tensor, tensor
|
|
5
|
+
|
|
6
|
+
__all__ = [
|
|
7
|
+
'to_np',
|
|
8
|
+
'to_t',
|
|
9
|
+
'angle_to_q',
|
|
10
|
+
'q_to_angle',
|
|
11
|
+
'energy_to_wavelength',
|
|
12
|
+
'wavelength_to_energy',
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def to_np(arr):
|
|
17
|
+
"""Converts Pytorch tensor or Python list to Numpy array
|
|
18
|
+
|
|
19
|
+
Args:
|
|
20
|
+
arr (torch.Tensor or list): Input Pytorch tensor or Python list
|
|
21
|
+
|
|
22
|
+
Returns:
|
|
23
|
+
numpy.ndarray: Converted Numpy array
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
if isinstance(arr, Tensor):
|
|
27
|
+
return arr.detach().cpu().numpy()
|
|
28
|
+
return np.asarray(arr)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def to_t(arr, device=None, dtype=None):
|
|
32
|
+
"""Converts Numpy array or Python list to Pytorch tensor
|
|
33
|
+
|
|
34
|
+
Args:
|
|
35
|
+
arr (numpy.ndarray or list): Input
|
|
36
|
+
device (torch.device or str, optional): device for the tensor ('cpu', 'cuda')
|
|
37
|
+
dtype (torch.dtype, optional): data type of the tensor (e.g. torch.float32)
|
|
38
|
+
|
|
39
|
+
Returns:
|
|
40
|
+
torch.Tensor: converted Pytorch tensor
|
|
41
|
+
"""
|
|
42
|
+
|
|
43
|
+
if not isinstance(arr, Tensor):
|
|
44
|
+
return tensor(arr, device=device, dtype=dtype)
|
|
45
|
+
return arr
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
# taken from mlreflect package
|
|
49
|
+
# mlreflect/xrrloader/dataloader/transform.py
|
|
50
|
+
|
|
51
|
+
def angle_to_q(scattering_angle: ndarray or float, wavelength: float):
|
|
52
|
+
"""Conversion from full scattering angle (degrees) to scattering vector (inverse angstroms)"""
|
|
53
|
+
return 4 * np.pi / wavelength * np.sin(scattering_angle / 2 * np.pi / 180)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def q_to_angle(q: ndarray or float, wavelength: float):
|
|
57
|
+
"""Conversion from scattering vector (inverse angstroms) to full scattering angle (degrees)"""
|
|
58
|
+
return 2 * np.arcsin(q * wavelength / (4 * np.pi)) / np.pi * 180
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def energy_to_wavelength(energy: float):
|
|
62
|
+
"""Conversion from photon energy (eV) to photon wavelength (angstroms)"""
|
|
63
|
+
return 1.2398 / energy * 1e4
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def wavelength_to_energy(wavelength: float):
|
|
67
|
+
"""Conversion from photon wavelength (angstroms) to photon energy (eV)"""
|
|
68
|
+
return 1.2398 / wavelength * 1e4
|
|
69
|
+
|
|
70
|
+
def get_filtering_mask(Q, R, dR, threshold=0.3, consecutive=3,
|
|
71
|
+
remove_singles=True, remove_consecutives=True,
|
|
72
|
+
q_start_trunc=0.1):
|
|
73
|
+
Q, R, dR = Q.copy(), R.copy(), dR.copy()
|
|
74
|
+
rel_error = np.abs(dR / R)
|
|
75
|
+
|
|
76
|
+
# Mask for singles
|
|
77
|
+
mask_singles = (rel_error >= threshold) if remove_singles else np.zeros_like(Q, dtype=bool)
|
|
78
|
+
|
|
79
|
+
# Mask for truncation
|
|
80
|
+
mask_consecutive = np.zeros_like(Q, dtype=bool)
|
|
81
|
+
if remove_consecutives:
|
|
82
|
+
count = 0
|
|
83
|
+
cutoff_idx = None
|
|
84
|
+
for i in range(len(Q)):
|
|
85
|
+
if Q[i] < q_start_trunc:
|
|
86
|
+
continue
|
|
87
|
+
if rel_error[i] >= threshold:
|
|
88
|
+
count += 1
|
|
89
|
+
if count >= consecutive:
|
|
90
|
+
cutoff_idx = i - consecutive + 1
|
|
91
|
+
break
|
|
92
|
+
else:
|
|
93
|
+
count = 0
|
|
94
|
+
if cutoff_idx is not None:
|
|
95
|
+
mask_consecutive[cutoff_idx:] = True
|
|
96
|
+
|
|
97
|
+
final_mask = mask_singles | mask_consecutive
|
|
98
|
+
return ~final_mask
|
|
@@ -1,125 +1,129 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: reflectorch
|
|
3
|
-
Version: 1.
|
|
4
|
-
Summary: A Pytorch-based package for the analysis of reflectometry data
|
|
5
|
-
Author-email: Vladimir Starostin <vladimir.starostin@uni-tuebingen.de>, Valentin Munteanu <valentin.munteanu@uni-tuebingen.de>
|
|
6
|
-
Maintainer-email: Valentin Munteanu <valentin.munteanu@uni-tuebingen.de>, Vladimir Starostin <vladimir.starostin@uni-tuebingen.de>, Alexander Hinderhofer <alexander.hinderhofer@uni-tuebingen.de>
|
|
7
|
-
License
|
|
8
|
-
Project-URL: Source, https://github.com/schreiber-lab/reflectorch/
|
|
9
|
-
Project-URL: Issues, https://github.com/schreiber-lab/reflectorch/issues
|
|
10
|
-
Project-URL: Documentation, https://schreiber-lab.github.io/reflectorch/
|
|
11
|
-
Keywords: reflectometry,machine learning
|
|
12
|
-
Classifier: Programming Language :: Python :: 3
|
|
13
|
-
Classifier: Operating System :: OS Independent
|
|
14
|
-
Classifier: Environment :: GPU :: NVIDIA CUDA
|
|
15
|
-
Classifier: Development Status :: 4 - Beta
|
|
16
|
-
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
17
|
-
Classifier: Intended Audience :: Science/Research
|
|
18
|
-
Requires-Python: >=3.7
|
|
19
|
-
Description-Content-Type: text/markdown
|
|
20
|
-
License-File: LICENSE.txt
|
|
21
|
-
Requires-Dist: numpy
|
|
22
|
-
Requires-Dist: torch>=1.8.1
|
|
23
|
-
Requires-Dist: scipy
|
|
24
|
-
Requires-Dist: tqdm
|
|
25
|
-
Requires-Dist: PyYAML
|
|
26
|
-
Requires-Dist: click
|
|
27
|
-
Requires-Dist: matplotlib
|
|
28
|
-
Requires-Dist: ipywidgets
|
|
29
|
-
Requires-Dist:
|
|
30
|
-
Requires-Dist:
|
|
31
|
-
Requires-Dist:
|
|
32
|
-
|
|
33
|
-
Requires-Dist:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
Requires-Dist:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
Requires-Dist:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
[](https://pytorch.org/)
|
|
48
|
+
[](https://numpy.org/)
|
|
49
|
+
[](https://scipy.org/)
|
|
50
|
+
[](https://matplotlib.org/)
|
|
51
|
+
[](https://yaml.org/)
|
|
52
|
+
[](https://huggingface.co/valentinsingularity/reflectivity)
|
|
53
|
+
|
|
54
|
+
[](https://www.python.org/)
|
|
55
|
+

|
|
56
|
+

|
|
57
|
+
<!-- [](https://www.codefactor.io/repository/github/schreiber-lab/reflectorch) -->
|
|
58
|
+
[](https://jupyterbook.org/)
|
|
59
|
+
[](https://schreiber-lab.github.io/reflectorch/)
|
|
60
|
+
<!-- [](https://github.com/astral-sh/ruff) -->
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
**Reflectorch** is a machine learning Python package for the analysis of X-ray and neutron reflectometry data, written by [Vladimir Starostin](https://github.com/StarostinV/) & [Valentin Munteanu](https://github.com/valentinsingularity) at the University of Tübingen. It provides functionality for the fast simulation of reflectometry curves on the GPU, customizable setup of the physical parameterization model and neural network architecture via YAML configuration files, and prior-aware training of neural networks as described in our paper [Neural network analysis of neutron and X-ray reflectivity data incorporating prior knowledge](https://doi.org/10.1107/S1600576724002115).
|
|
64
|
+
|
|
65
|
+
## Installation
|
|
66
|
+
|
|
67
|
+
**Reflectorch** can be installed from [](https://pypi.org/project/reflectorch/) via ``pip``:
|
|
68
|
+
|
|
69
|
+
<!-- or from [](https://anaconda.org/conda-forge/reflectorch/) via ``conda``: -->
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
pip install reflectorch
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
<!-- or
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
conda install -c conda-forge reflectorch
|
|
79
|
+
``` -->
|
|
80
|
+
|
|
81
|
+
Alternatively, one can clone the entire Github repository and install the package in editable mode:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
git clone https://github.com/schreiber-lab/reflectorch.git
|
|
85
|
+
pip install -e .
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
For development purposes, the package can be installed together with the optional dependencies for building the distribution, testing and documentation:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
git clone https://github.com/schreiber-lab/reflectorch.git
|
|
92
|
+
pip install -e .[tests,docs,build]
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Users with Nvidia **GPU**s need to additionally install **Pytorch with CUDA support** corresponding to their hardware and operating system according to the instructions from the [Pytorch website](https://pytorch.org/get-started/locally/)
|
|
96
|
+
|
|
97
|
+
## Get started
|
|
98
|
+
|
|
99
|
+
[](https://schreiber-lab.github.io/reflectorch/)
|
|
100
|
+
The full documentation of the package, containing tutorials and the API reference, was built with [Jupyter Book](https://jupyterbook.org/) and [Sphinx](https://www.sphinx-doc.org) and it is hosted at the address: [https://schreiber-lab.github.io/reflectorch/](https://schreiber-lab.github.io/reflectorch/).
|
|
101
|
+
|
|
102
|
+
[](https://colab.research.google.com/drive/1rf_M8S_5kYvUoK0-9-AYal_fO3oFl7ck?usp=sharing)
|
|
103
|
+
We provide an interactive Google Colab notebook for exploring the basic functionality of the package: [](https://colab.research.google.com/drive/1rf_M8S_5kYvUoK0-9-AYal_fO3oFl7ck?usp=sharing)<br>
|
|
104
|
+
|
|
105
|
+
[](https://huggingface.co/valentinsingularity/reflectivity)
|
|
106
|
+
Configuration files and the corresponding pretrained model weights are hosted on Huggingface: [https://huggingface.co/valentinsingularity/reflectivity](https://huggingface.co/valentinsingularity/reflectivity).
|
|
107
|
+
|
|
108
|
+
<!-- [](https://hub.docker.com/)
|
|
109
|
+
Docker images for reflectorch *will* be hosted on Dockerhub. -->
|
|
110
|
+
|
|
111
|
+
## Contributing
|
|
112
|
+
If you'd like to contribute to the package, please see our [Contributing Guidelines](CONTRIBUTING.md) for details.
|
|
113
|
+
|
|
114
|
+
## Citation
|
|
115
|
+
If you find our work useful in your research, please cite as follows:
|
|
116
|
+
```
|
|
117
|
+
@Article{Munteanu2024,
|
|
118
|
+
author = {Munteanu, Valentin and Starostin, Vladimir and Greco, Alessandro and Pithan, Linus and Gerlach, Alexander and Hinderhofer, Alexander and Kowarik, Stefan and Schreiber, Frank},
|
|
119
|
+
journal = {Journal of Applied Crystallography},
|
|
120
|
+
title = {Neural network analysis of neutron and X-ray reflectivity data incorporating prior knowledge},
|
|
121
|
+
year = {2024},
|
|
122
|
+
issn = {1600-5767},
|
|
123
|
+
month = mar,
|
|
124
|
+
number = {2},
|
|
125
|
+
volume = {57},
|
|
126
|
+
doi = {10.1107/s1600576724002115},
|
|
127
|
+
publisher = {International Union of Crystallography (IUCr)},
|
|
128
|
+
}
|
|
129
|
+
```
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
reflectorch/__init__.py,sha256=ToKb_CG_NaXEefe5S-8fFbcqMIdm_rBhVuO-u3JyxJw,719
|
|
2
|
+
reflectorch/paths.py,sha256=EzoTP9DaX0GGeyEURob-jskcmCa6CSDX9KVN8Jy8NmQ,850
|
|
3
|
+
reflectorch/test_config.py,sha256=PMZZ63xfJqam-sYqo8upPhzKopIN5WoixJIC96TfoF8,95
|
|
4
|
+
reflectorch/train.py,sha256=uXdkotviIvwlAoPBzuxh1iyVc9NA0By1QYRN6UQnFcM,83
|
|
5
|
+
reflectorch/train_on_cluster.py,sha256=shX30us8rHGiR6eA0hMQMiGxw3MUi_U02_7_u6TLVXo,105
|
|
6
|
+
reflectorch/utils.py,sha256=LotOZiQKtNKnrpvQjbbIbLyxI9Y4JgAFrWf4xrD-QTE,2934
|
|
7
|
+
reflectorch/data_generation/__init__.py,sha256=-lPv-ZOy8qxyLT74fT-LuC1B72TuWMssIG6BKyDAk-I,3337
|
|
8
|
+
reflectorch/data_generation/dataset.py,sha256=keGWDdywuZor6VRJM5d61dKRjgFqkHMjMT_JqBB8BGQ,8106
|
|
9
|
+
reflectorch/data_generation/likelihoods.py,sha256=--D2YKszG5-RdV4l0SURx9l-CJjpF_Rk3xdhFG9vyag,2782
|
|
10
|
+
reflectorch/data_generation/noise.py,sha256=5eMFwr4DqLt-Sshjw-OO3iDfvuxPa0tLV1b5Se2dGio,21620
|
|
11
|
+
reflectorch/data_generation/process_data.py,sha256=t8FLv0GDjjFqaxYoj1QdrxW6vUZNRqcepZZT5smGysM,1139
|
|
12
|
+
reflectorch/data_generation/q_generator.py,sha256=HTEY46_snGM_Sbt4wMNqmuI4cEpvZr_i9jgiT0OhYwY,11235
|
|
13
|
+
reflectorch/data_generation/scale_curves.py,sha256=7ikSw9kRVgB-SwVEAiyfQ-rvYFifLMQ-2S7mBylbI5g,3972
|
|
14
|
+
reflectorch/data_generation/smearing.py,sha256=gZLud3PH31c6kjyvJm6b4mwqQq0et0Clp7M5roHfDOM,4440
|
|
15
|
+
reflectorch/data_generation/utils.py,sha256=QwPFJzoGWwHk1daSbJRKREI5O9Fy6_jUmmqwTCVKX08,8326
|
|
16
|
+
reflectorch/data_generation/priors/__init__.py,sha256=7FhuQfhGhF4C0ufeBbk-XmFTs15yIjl2ciDIWrOFxZg,1881
|
|
17
|
+
reflectorch/data_generation/priors/base.py,sha256=GTbGKO7Ia_X0jDHlDkUVfA-tTtCreHVEiizUJP_3eeQ,1650
|
|
18
|
+
reflectorch/data_generation/priors/exp_subprior_sampler.py,sha256=nb0XFlTOulOWaVlohnfWrl-N06KcQZqlMZ-8qOiiijU,11253
|
|
19
|
+
reflectorch/data_generation/priors/independent_priors.py,sha256=-p5xJBc6_yA329kqLU5eAcuAXUqAycEeALwdqVDMrcY,7046
|
|
20
|
+
reflectorch/data_generation/priors/multilayer_models.py,sha256=V2hIMQCStCf5dYypJI_ooC9j8wRf42tx62fm802mqTA,7452
|
|
21
|
+
reflectorch/data_generation/priors/multilayer_structures.py,sha256=-orvgXlCphDIPKcNJ_ZsNFGzBTiAl7WdpXwckgTpsw0,3589
|
|
22
|
+
reflectorch/data_generation/priors/no_constraints.py,sha256=j_iP3btlZf3OWPFFaa4-a7DgOBYDTUiy1ccfipbHSIE,7086
|
|
23
|
+
reflectorch/data_generation/priors/parametric_models.py,sha256=BueD8uEcHI2a4v7pJAwTD0Ef6qIJijk6rzLCgPUJjWg,28489
|
|
24
|
+
reflectorch/data_generation/priors/parametric_subpriors.py,sha256=8ZedTWkuMq0D-W3DXcVkgeWBXq7cg-qhBxigT4sIwD0,14795
|
|
25
|
+
reflectorch/data_generation/priors/params.py,sha256=JmGmpXbbTxeL7BGenSkP7Adv1SEylK43BbDFcEQbFPI,7986
|
|
26
|
+
reflectorch/data_generation/priors/sampler_strategies.py,sha256=jKQDmkD0uR2ssiLSWroHgvVwJW0QG5qt69mBqO3vAVo,15422
|
|
27
|
+
reflectorch/data_generation/priors/scaler_mixin.py,sha256=fADYX2d2V4VJsBd135D-GokPeahmvFVpLBjdg8ioIHM,2583
|
|
28
|
+
reflectorch/data_generation/priors/subprior_sampler.py,sha256=ZH8BuuefidlNhJCPi-ZzEddhXfP8itnG_sjbJrB7trM,14398
|
|
29
|
+
reflectorch/data_generation/priors/utils.py,sha256=mBlPj6JI1TKfZdgKJe4QEoDp57BcAImp_brqAJAi6J4,3718
|
|
30
|
+
reflectorch/data_generation/reflectivity/__init__.py,sha256=JgHSMswGNJhW4mgKbFjfxzj014dhOSGUa7YMWOf5IBA,5107
|
|
31
|
+
reflectorch/data_generation/reflectivity/abeles.py,sha256=wmYbDCcKFLnXcGO45vv-Ti_7HuudG5n3nC9k5EX665o,3000
|
|
32
|
+
reflectorch/data_generation/reflectivity/kinematical.py,sha256=flHC2KcTGcvrb3OweJTDV3p5jCeBqBQSPLkAHpBAy6w,2569
|
|
33
|
+
reflectorch/data_generation/reflectivity/memory_eff.py,sha256=q-B-eSM0c7EqqGYY1pjanG-ms-YuWGlGAHNWP8lgufU,3918
|
|
34
|
+
reflectorch/data_generation/reflectivity/numpy_implementations.py,sha256=s-ISJ-KmxAMEWLfnzmBC7cAEoO6sO6nhB--sgLJbq90,3057
|
|
35
|
+
reflectorch/data_generation/reflectivity/smearing.py,sha256=5IOvVHwb1e47xhVFruJTHH2UQ8pePm2A18y1bcg52rU,4257
|
|
36
|
+
reflectorch/data_generation/reflectivity/smearing_pointwise.py,sha256=pKgpCWmR58u0huxCFo8TG1jXODSe4CUjiytF6obk5LA,3579
|
|
37
|
+
reflectorch/extensions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
38
|
+
reflectorch/extensions/jupyter/__init__.py,sha256=6DduXHy70uDMppuy0-GcfYl3npOdydnORKMn0eZl-sA,272
|
|
39
|
+
reflectorch/extensions/jupyter/api.py,sha256=5Ul3bVA0IG7xMaF2dGB8VDycWaPZ33sxzXOZP23syLQ,2785
|
|
40
|
+
reflectorch/extensions/jupyter/callbacks.py,sha256=5UVWzM4SVtl9MtbbQrtyCzqP7lskzt35Nb2SuOgaD5U,1040
|
|
41
|
+
reflectorch/extensions/jupyter/components.py,sha256=hJZZ0i5stJ2GupRlNQ0wK4IYS0FWkJpvX4hMCZsJeek,32739
|
|
42
|
+
reflectorch/extensions/jupyter/custom_select.py,sha256=7OgXOfM1yLQ27a49TL_Ad0ARu3HIUJmuA1OxrLfS4Ag,9384
|
|
43
|
+
reflectorch/extensions/jupyter/log_widget.py,sha256=dVhhbe3IMMH4YGj_CyzkWtCew_bF8Ae9xyckUtg9eFE,7103
|
|
44
|
+
reflectorch/extensions/jupyter/model_selection.py,sha256=N2es1v7UhcwRSqpswNx-wkwnKs1flstwX6WD-Q0kyXQ,20985
|
|
45
|
+
reflectorch/extensions/jupyter/plotly_plot_manager.py,sha256=LPyxWFApT8GVR8mrO9jMLv3I57BwIecfYxhOMU1R28Y,10451
|
|
46
|
+
reflectorch/extensions/jupyter/widget.py,sha256=UHfE8cz75ydZosVwhlFIrJYmZcu-uoBSpj1z0jTBQfA,27559
|
|
47
|
+
reflectorch/extensions/matplotlib/__init__.py,sha256=8fZ6o75GkIGboNSZtchT20kXv-7X8Ms7vU5nFLbfSuE,99
|
|
48
|
+
reflectorch/extensions/matplotlib/losses.py,sha256=bHUHiJz191lDbh2bT15IGN0UY0c6Cis74xm-iqjv8aU,654
|
|
49
|
+
reflectorch/extensions/refnx/refnx_conversion.py,sha256=Wmw8lUnl_g_0yWyOl_xb55oSC7b6Ynt7a1h20PmiAAQ,3374
|
|
50
|
+
reflectorch/inference/__init__.py,sha256=BJ8pckpDg2UEJlwim6sM36mAo2vAwAKu99r8lW7kglQ,931
|
|
51
|
+
reflectorch/inference/inference_model.py,sha256=bNTg23mA6g5qEdMDoAr-xM0W079_HDGdd4OFNyOyu9U,48951
|
|
52
|
+
reflectorch/inference/input_interface.py,sha256=u-8MnZzypnG6tkiKAXe8B3ASq8pkCzKSMg6FVbv5ZhI,15017
|
|
53
|
+
reflectorch/inference/loading_data.py,sha256=7OfZCcurKH27B8ouWbtHs7sIHIfxGTIcMsyn73qtVk0,957
|
|
54
|
+
reflectorch/inference/multilayer_fitter.py,sha256=JijcK7xi-Tvg3ci_eJSnTk3Q0sZChw3BLPDVNmVFE9g,5339
|
|
55
|
+
reflectorch/inference/multilayer_inference_model.py,sha256=OYkPMy_h8kD_GSy_Rh1VL6xZA287i1c91ViYzX8_648,7382
|
|
56
|
+
reflectorch/inference/plotting.py,sha256=hSuFEbdeccY9tDgFLCQzpIVKMc2afCVm9jnFM4Itzko,18508
|
|
57
|
+
reflectorch/inference/query_matcher.py,sha256=JZSROkxufCQXEYP8ud9jY8NIRqENQW3vSVMvqkOIv0Q,3306
|
|
58
|
+
reflectorch/inference/record_time.py,sha256=JZuro9cA01bkf_O--LUtlPuJaQNHmcR0zn5UGCSHTlU,1097
|
|
59
|
+
reflectorch/inference/sampler_solution.py,sha256=2j6ySoJmBHNmm5FfePcoG0JmnhALsduGccJ5KA0GjIM,2232
|
|
60
|
+
reflectorch/inference/scipy_fitter.py,sha256=MXJkzDAzR0r2dgv7D-b_inLmuYaR7w43TcIpQiQOFLs,8836
|
|
61
|
+
reflectorch/inference/torch_fitter.py,sha256=CvU9Ar-_K2_tOJ6t2p2tfhpJYi3dH3Sm__DIk4xmuiM,3304
|
|
62
|
+
reflectorch/inference/preprocess_exp/__init__.py,sha256=AVt2NLx48iciKJZ_yb7Gsyse1Y-VTzZMsaZ4p0x9SPU,377
|
|
63
|
+
reflectorch/inference/preprocess_exp/attenuation.py,sha256=3F1PmaUbknUrvE0CoE-3WMNN1Qi1SlYsgjJ0-uhuE2o,1482
|
|
64
|
+
reflectorch/inference/preprocess_exp/cut_with_q_ratio.py,sha256=SWDhzfqAm76PEYwkR5T4Zf-UMHMD39QeCiyAXiHAVRg,1118
|
|
65
|
+
reflectorch/inference/preprocess_exp/footprint.py,sha256=onky-083gJBYg_U7K7jnAW3V81E66NSHznCEHhTEtUc,2544
|
|
66
|
+
reflectorch/inference/preprocess_exp/interpolation.py,sha256=TCKD_OeZ1KWgN5Z3YiZvO3nHiKb-XToZMMiLAnJTfQs,846
|
|
67
|
+
reflectorch/inference/preprocess_exp/normalize.py,sha256=DIYMf-njaVy2rE1ss26yuX2ieKZz49LB8_ZhxJhS_gw,674
|
|
68
|
+
reflectorch/inference/preprocess_exp/preprocess.py,sha256=9CaTVfUrK-znB1ITrMQskgBInPnVHbTAdPxj_XchPJk,4990
|
|
69
|
+
reflectorch/ml/__init__.py,sha256=nhc8hixolD4XcWXTcihrGDvE-zWLuA3itkvdxXuWmH8,758
|
|
70
|
+
reflectorch/ml/basic_trainer.py,sha256=MvMUbffRGOLfijGdm2zq_D77PrY-oqJA5sU-ooGQwpk,9781
|
|
71
|
+
reflectorch/ml/callbacks.py,sha256=C0UPq0U3XOP2XkG1beUX2iRyIti5oM3POR34wQ1O5Kg,2721
|
|
72
|
+
reflectorch/ml/dataloaders.py,sha256=E-YEA98MjuG6zYelBSBbresIxIiS89QmMXFyKtOvaIs,1047
|
|
73
|
+
reflectorch/ml/loggers.py,sha256=8o8or4rk7N2EJzwBUvZorPI-_9R5MBI1s-uJXBiWU3U,1423
|
|
74
|
+
reflectorch/ml/schedulers.py,sha256=rzNul6RxNVx6SI3ilR_m4vBIDcNrQkOn_gfX4Hirahc,13872
|
|
75
|
+
reflectorch/ml/trainers.py,sha256=kvzc9rNCUcN2ekX2vIIbaARubGGM34y3qUfefDuw0nQ,8433
|
|
76
|
+
reflectorch/ml/utils.py,sha256=ZW-5n5Gowcjeb-s7NBL9vFPEhwpjQ8s2ZmpxQILJeNA,69
|
|
77
|
+
reflectorch/models/__init__.py,sha256=3y9MKJwFNCu5mR0IodwhLQVHitHZMGqaJvk88HTp_wk,360
|
|
78
|
+
reflectorch/models/activations.py,sha256=5rmzcQuRTQLOeNDrogZ04gZHM5leKF8NGkAeU0lfC1I,1381
|
|
79
|
+
reflectorch/models/encoders/__init__.py,sha256=r2CyjLOFyH_2upcdOB1wQRLFbaVu7nHYGiv0TmHcwSQ,513
|
|
80
|
+
reflectorch/models/encoders/conv_encoder.py,sha256=UaeW06h6Ix3vyO0CAYA_boqb45p9jHANZPS3sdXSS5w,7692
|
|
81
|
+
reflectorch/models/encoders/conv_res_net.py,sha256=-Rh9qw73UdsO4l9pHuZ8V_dJAy0WFJDk6ZVE7mQc4s0,3228
|
|
82
|
+
reflectorch/models/encoders/fno.py,sha256=9EHKxQPGzECFbjIukatPexMWSIEq3r5x-CR-pBXoMOw,4982
|
|
83
|
+
reflectorch/models/encoders/integral_kernel_embedding.py,sha256=EIMqLV5U0fj5tvTNAV1-SwbJ1S-ZZ5Qfmx1y75q4snw,12139
|
|
84
|
+
reflectorch/models/networks/__init__.py,sha256=QgBZvT_OmPG2TAqs0f7MEGVWLvUb1AY6rLSFiW4vxTI,327
|
|
85
|
+
reflectorch/models/networks/mlp_networks.py,sha256=KmPJ2ej5Z7gFBTODD71ac1DuRYBMGfkqlYRcB46DBMQ,20561
|
|
86
|
+
reflectorch/models/networks/residual_net.py,sha256=ycFwHfuhzvBxfOFuhdVw3-QGFJ6NmkdhcK-4rdfc7fE,5487
|
|
87
|
+
reflectorch/runs/__init__.py,sha256=ajeKxZS9GSaDJ_xsec2cWckU0sJ2q1vus5ADt0WxiIY,692
|
|
88
|
+
reflectorch/runs/config.py,sha256=IqbPcy0TI6sYnS8xzHV_9PykaBv6j0jM4MHxPbotCtM,779
|
|
89
|
+
reflectorch/runs/slurm_utils.py,sha256=mHSYG-ach89KfJkJA12RP5X4qVClO7cwEmVF-4Yyzig,2507
|
|
90
|
+
reflectorch/runs/train.py,sha256=-2J7WciYoT_VQht2spLCuj-wr1fmai8FjRZ6L5uiiYM,2425
|
|
91
|
+
reflectorch/runs/utils.py,sha256=NxIuk5NKVdy48n4SiKS6k-6yTrmz0Hf3dJ95csH2DoM,13761
|
|
92
|
+
reflectorch-1.5.0.dist-info/licenses/LICENSE.txt,sha256=15ifhAJdVMTuFJJF2BYPSr-2ZiyeoZnxZurpz9twZQc,1078
|
|
93
|
+
reflectorch-1.5.0.dist-info/METADATA,sha256=LG0GCqX0_fWqqFJJ258dsc6xjDXdGTOLod3Vbz-Gmk4,7842
|
|
94
|
+
reflectorch-1.5.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
95
|
+
reflectorch-1.5.0.dist-info/top_level.txt,sha256=2EyIWrt4SeZ3hNadLXvEVpPFhyoZ4An7YflP4y_E3Fc,12
|
|
96
|
+
reflectorch-1.5.0.dist-info/RECORD,,
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2024 Reflectorch Developers
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Reflectorch Developers
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
SOFTWARE.
|