reflectorch 1.2.1__py3-none-any.whl → 1.4.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.

Files changed (41) hide show
  1. reflectorch/data_generation/__init__.py +4 -0
  2. reflectorch/data_generation/dataset.py +27 -7
  3. reflectorch/data_generation/noise.py +115 -9
  4. reflectorch/data_generation/priors/parametric_models.py +91 -16
  5. reflectorch/data_generation/priors/parametric_subpriors.py +28 -7
  6. reflectorch/data_generation/priors/sampler_strategies.py +67 -3
  7. reflectorch/data_generation/q_generator.py +97 -43
  8. reflectorch/data_generation/reflectivity/__init__.py +53 -11
  9. reflectorch/data_generation/reflectivity/kinematical.py +4 -5
  10. reflectorch/data_generation/reflectivity/smearing.py +25 -10
  11. reflectorch/data_generation/reflectivity/smearing_pointwise.py +110 -0
  12. reflectorch/data_generation/smearing.py +42 -11
  13. reflectorch/data_generation/utils.py +93 -18
  14. reflectorch/extensions/refnx/refnx_conversion.py +77 -0
  15. reflectorch/inference/inference_model.py +795 -159
  16. reflectorch/inference/loading_data.py +37 -0
  17. reflectorch/inference/plotting.py +517 -0
  18. reflectorch/inference/preprocess_exp/interpolation.py +5 -2
  19. reflectorch/inference/scipy_fitter.py +98 -7
  20. reflectorch/ml/__init__.py +2 -0
  21. reflectorch/ml/basic_trainer.py +18 -6
  22. reflectorch/ml/callbacks.py +5 -4
  23. reflectorch/ml/loggers.py +25 -0
  24. reflectorch/ml/schedulers.py +116 -0
  25. reflectorch/ml/trainers.py +131 -23
  26. reflectorch/models/__init__.py +2 -1
  27. reflectorch/models/encoders/__init__.py +2 -2
  28. reflectorch/models/encoders/conv_encoder.py +54 -40
  29. reflectorch/models/encoders/fno.py +23 -16
  30. reflectorch/models/encoders/integral_kernel_embedding.py +390 -0
  31. reflectorch/models/networks/__init__.py +2 -0
  32. reflectorch/models/networks/mlp_networks.py +331 -153
  33. reflectorch/models/networks/residual_net.py +31 -5
  34. reflectorch/runs/train.py +0 -1
  35. reflectorch/runs/utils.py +48 -11
  36. reflectorch/utils.py +30 -0
  37. {reflectorch-1.2.1.dist-info → reflectorch-1.4.0.dist-info}/METADATA +20 -17
  38. {reflectorch-1.2.1.dist-info → reflectorch-1.4.0.dist-info}/RECORD +41 -36
  39. {reflectorch-1.2.1.dist-info → reflectorch-1.4.0.dist-info}/WHEEL +1 -1
  40. {reflectorch-1.2.1.dist-info → reflectorch-1.4.0.dist-info/licenses}/LICENSE.txt +0 -0
  41. {reflectorch-1.2.1.dist-info → reflectorch-1.4.0.dist-info}/top_level.txt +0 -0
@@ -18,15 +18,21 @@ class ResidualMLP(nn.Module):
18
18
  repeats_per_block: int = 2,
19
19
  activation: str = 'relu',
20
20
  use_batch_norm: bool = True,
21
+ use_layer_norm: bool = False,
21
22
  dropout_rate: float = 0.0,
22
23
  residual: bool = True,
23
24
  adaptive_activation: bool = False,
24
25
  conditioning: str = 'glu',
26
+ concat_condition_first_layer: bool = True,
27
+ film_with_tanh: bool = False,
25
28
  ):
26
29
  super().__init__()
27
30
 
28
- dim_first_layer = dim_in + dim_condition
31
+ self.concat_condition_first_layer = concat_condition_first_layer
32
+
33
+ dim_first_layer = dim_in + dim_condition if concat_condition_first_layer else dim_in
29
34
  self.first_layer = nn.Linear(dim_first_layer, layer_width)
35
+
30
36
  self.blocks = nn.ModuleList(
31
37
  [
32
38
  ResidualBlock(
@@ -35,24 +41,28 @@ class ResidualMLP(nn.Module):
35
41
  repeats_per_block=repeats_per_block,
36
42
  activation=activation,
37
43
  use_batch_norm=use_batch_norm,
44
+ use_layer_norm=use_layer_norm,
38
45
  dropout_rate=dropout_rate,
39
46
  residual=residual,
40
47
  adaptive_activation=adaptive_activation,
41
48
  conditioning = conditioning,
49
+ film_with_tanh = film_with_tanh,
42
50
  )
43
51
  for _ in range(num_blocks)
44
52
  ]
45
53
  )
54
+
46
55
  self.last_layer = nn.Linear(layer_width, dim_out)
47
56
 
48
57
  def forward(self, x, condition=None):
49
- if condition is None:
50
- x = self.first_layer(x)
51
- else:
58
+ if self.concat_condition_first_layer and condition is not None:
52
59
  x = self.first_layer(torch.cat([x, condition], dim=-1))
60
+ else:
61
+ x = self.first_layer(x)
53
62
 
54
63
  for block in self.blocks:
55
64
  x = block(x, condition=condition)
65
+
56
66
  x = self.last_layer(x)
57
67
 
58
68
  return x
@@ -68,19 +78,23 @@ class ResidualBlock(nn.Module):
68
78
  repeats_per_block: int = 2,
69
79
  activation: str = 'relu',
70
80
  use_batch_norm: bool = False,
81
+ use_layer_norm: bool = False,
71
82
  dropout_rate: float = 0.0,
72
83
  residual: bool = True,
73
84
  adaptive_activation: bool = False,
74
85
  conditioning: str = 'glu',
86
+ film_with_tanh: bool = False,
75
87
  ):
76
88
  super().__init__()
77
89
 
78
90
  self.residual = residual
79
91
  self.repeats_per_block = repeats_per_block
80
92
  self.use_batch_norm = use_batch_norm
93
+ self.use_layer_norm = use_layer_norm
81
94
  self.dropout_rate = dropout_rate
82
95
  self.adaptive_activation = adaptive_activation
83
96
  self.conditioning = conditioning
97
+ self.film_with_tanh = film_with_tanh
84
98
 
85
99
  if not adaptive_activation:
86
100
  self.activation = activation_by_name(activation)()
@@ -92,7 +106,11 @@ class ResidualBlock(nn.Module):
92
106
  if use_batch_norm:
93
107
  self.batch_norm_layers = nn.ModuleList(
94
108
  [nn.BatchNorm1d(layer_width, eps=1e-3) for _ in range(repeats_per_block)]
95
- )
109
+ )
110
+ elif use_layer_norm:
111
+ self.layer_norm_layers = nn.ModuleList(
112
+ [nn.LayerNorm(layer_width) for _ in range(repeats_per_block)]
113
+ )
96
114
 
97
115
  if dim_condition:
98
116
  if conditioning == 'glu':
@@ -113,12 +131,17 @@ class ResidualBlock(nn.Module):
113
131
  for i in range(self.repeats_per_block):
114
132
  if self.use_batch_norm:
115
133
  x = self.batch_norm_layers[i](x)
134
+ elif self.use_layer_norm:
135
+ x = self.layer_norm_layers[i](x)
136
+
116
137
  if not self.adaptive_activation:
117
138
  x = self.activation(x)
118
139
  else:
119
140
  x = self.activation_layers[i](x)
141
+
120
142
  if self.dropout_rate > 0 and i == self.repeats_per_block - 1:
121
143
  x = self.dropout(x)
144
+
122
145
  x = self.linear_layers[i](x)
123
146
 
124
147
  if condition is not None:
@@ -126,6 +149,9 @@ class ResidualBlock(nn.Module):
126
149
  x = F.glu(torch.cat((x, self.condition_layer(condition)), dim=-1), dim=-1)
127
150
  elif self.conditioning == 'film':
128
151
  gamma, beta = torch.chunk(self.condition_layer(condition), chunks=2, dim=-1)
152
+ if self.film_with_tanh:
153
+ tanh = nn.Tanh()
154
+ gamma, beta = tanh(gamma), tanh(beta)
129
155
  x = x * gamma + beta
130
156
 
131
157
  return x0 + x if self.residual else x
reflectorch/runs/train.py CHANGED
@@ -72,7 +72,6 @@ def run_train_on_cluster(config_name: str):
72
72
 
73
73
  def _change_to_test_config(config, batch_size: int, num_iterations: int):
74
74
  config = dict(config)
75
- config['training']['logger']['use_neptune'] = False
76
75
  config['training']['num_iterations'] = num_iterations
77
76
  config['training']['batch_size'] = batch_size
78
77
  config['training']['update_tqdm_freq'] = 1
reflectorch/runs/utils.py CHANGED
@@ -136,7 +136,7 @@ def get_callbacks_from_config(config: dict, folder_paths: dict = None) -> Tuple[
136
136
  if callback:
137
137
  callbacks.append(callback)
138
138
 
139
- if train_conf['logger']['use_neptune']:
139
+ if 'logger' in train_conf.keys():
140
140
  callbacks.append(LogLosses())
141
141
 
142
142
  return tuple(callbacks)
@@ -162,9 +162,9 @@ def get_trainer_from_config(config: dict, folder_paths: dict = None):
162
162
 
163
163
  optim_cls = getattr(torch.optim, train_conf['optimizer'])
164
164
 
165
- logger = None
165
+ logger_conf = train_conf.get('logger', None)
166
+ logger = init_from_conf(logger_conf) if logger_conf and logger_conf.get('cls') else None
166
167
 
167
- train_with_q_input = train_conf.get('train_with_q_input', False)
168
168
  clip_grad_norm_max = train_conf.get('clip_grad_norm_max', None)
169
169
 
170
170
  trainer_cls = globals().get(train_conf['trainer_cls']) if 'trainer_cls' in train_conf else PointEstimatorTrainer
@@ -173,10 +173,13 @@ def get_trainer_from_config(config: dict, folder_paths: dict = None):
173
173
 
174
174
  trainer = trainer_cls(
175
175
  model, dset, train_conf['lr'], train_conf['batch_size'], clip_grad_norm_max=clip_grad_norm_max,
176
- logger=logger, optim_cls=optim_cls, train_with_q_input=train_with_q_input,
176
+ logger=logger, optim_cls=optim_cls,
177
177
  **trainer_kwargs
178
178
  )
179
179
 
180
+ if train_conf.get('train_with_q_input', False) and getattr(trainer, 'train_with_q_input', None) is not None: #only for back-compatibility with configs in older versions
181
+ trainer.train_with_q_input = True
182
+
180
183
  return trainer
181
184
 
182
185
 
@@ -187,7 +190,7 @@ def get_trainer_by_name(config_name, config_dir=None, model_path=None, load_weig
187
190
  Args:
188
191
  config_name (str): name of the configuration file
189
192
  config_dir (str): path of the configuration directory
190
- model_path (str, optional): path to the network weights.
193
+ model_path (str, optional): path to the network weights. The default path is 'saved_models' located in the package directory
191
194
  load_weights (bool, optional): if True the saved network weights are loaded into the network. Defaults to True.
192
195
  inference_device (str, optional): overwrites the device in the configuration file for the purpose of inference on a different device then the training was performed on. Defaults to 'cuda'.
193
196
 
@@ -195,8 +198,7 @@ def get_trainer_by_name(config_name, config_dir=None, model_path=None, load_weig
195
198
  Trainer: the trainer object
196
199
  """
197
200
  config = load_config(config_name, config_dir)
198
- config['model']['network']['pretrained_name'] = None
199
- config['training']['logger']['use_neptune'] = False
201
+ #config['model']['network']['pretrained_name'] = None
200
202
 
201
203
  config['model']['network']['device'] = inference_device
202
204
  config['dset']['prior_sampler']['kwargs']['device'] = inference_device
@@ -219,7 +221,7 @@ def get_trainer_by_name(config_name, config_dir=None, model_path=None, load_weig
219
221
 
220
222
  if str(model_path).endswith('.pt'):
221
223
  try:
222
- state_dict = torch.load(model_path, map_location=inference_device)
224
+ state_dict = torch.load(model_path, map_location=inference_device, weights_only=False)
223
225
  except Exception as err:
224
226
  raise RuntimeError(f'Could not load model from {model_path}') from err
225
227
 
@@ -238,7 +240,7 @@ def get_trainer_by_name(config_name, config_dir=None, model_path=None, load_weig
238
240
  raise RuntimeError('Weigths file with unknown extension')
239
241
 
240
242
  return trainer
241
-
243
+
242
244
  def get_callbacks_by_name(config_name, config_dir=None):
243
245
  """Initializes the trainer callbacks based on a configuration file
244
246
 
@@ -276,7 +278,7 @@ def load_pretrained(model, model_name: str, saved_models_dir: Path):
276
278
  raise FileNotFoundError(f'File {str(model_path)} does not exist.')
277
279
 
278
280
  try:
279
- pretrained = torch.load(model_path)
281
+ pretrained = torch.load(model_path, weights_only=False)
280
282
  except Exception as err:
281
283
  raise RuntimeError(f'Could not load model from {str(model_path)}') from err
282
284
 
@@ -293,6 +295,8 @@ def load_pretrained(model, model_name: str, saved_models_dir: Path):
293
295
  def init_dset(config: dict):
294
296
  """Initializes the dataset / dataloader object"""
295
297
  dset_cls = globals().get(config['cls']) if 'cls' in config else ReflectivityDataLoader
298
+ dset_kwargs = config.get('kwargs', {})
299
+
296
300
  prior_sampler = init_from_conf(config['prior_sampler'])
297
301
  intensity_noise = init_from_conf(config['intensity_noise'])
298
302
  q_generator = init_from_conf(config['q_generator'])
@@ -307,6 +311,7 @@ def init_dset(config: dict):
307
311
  curves_scaler=curves_scaler,
308
312
  smearing=smearing,
309
313
  q_noise=q_noise,
314
+ **dset_kwargs,
310
315
  )
311
316
 
312
317
  return dset
@@ -356,12 +361,44 @@ def convert_pt_to_safetensors(input_dir):
356
361
  continue
357
362
 
358
363
  print(f"Converting {pt_file_path} to .safetensors format.")
359
- data_pt = torch.load(pt_file_path)
364
+ data_pt = torch.load(pt_file_path, weights_only=False)
360
365
  model_state_dict = data_pt["model"]
361
366
  model_state_dict = split_complex_tensors(model_state_dict) #handle tensors with complex dtype which are not natively supported by safetensors
362
367
 
363
368
  safetensors.torch.save_file(tensors=model_state_dict, filename=safetensors_file_path)
364
369
 
370
+ def convert_files_to_safetensors(files):
371
+ """
372
+ Converts specified .pt files to .safetensors format.
373
+
374
+ Args:
375
+ files (str or list of str): Path(s) to .pt files containing model state dictionaries.
376
+ """
377
+ if isinstance(files, str):
378
+ files = [files]
379
+
380
+ for pt_file_path in files:
381
+ if not pt_file_path.endswith('.pt'):
382
+ print(f"Skipping {pt_file_path}: not a .pt file.")
383
+ continue
384
+
385
+ if not os.path.exists(pt_file_path):
386
+ print(f"File {pt_file_path} does not exist.")
387
+ continue
388
+
389
+ safetensors_file_path = pt_file_path[:-3] + '.safetensors'
390
+
391
+ if os.path.exists(safetensors_file_path):
392
+ print(f"Skipping {pt_file_path}: .safetensors version already exists.")
393
+ continue
394
+
395
+ print(f"Converting {pt_file_path} to .safetensors format.")
396
+ data_pt = torch.load(pt_file_path, weights_only=False)
397
+ model_state_dict = data_pt["model"]
398
+ model_state_dict = split_complex_tensors(model_state_dict)
399
+
400
+ safetensors.torch.save_file(tensors=model_state_dict, filename=safetensors_file_path)
401
+
365
402
  def load_state_dict_safetensors(model, filename, device):
366
403
  state_dict = safetensors.torch.load_file(filename=filename, device=device)
367
404
  state_dict = recombine_complex_tensors(state_dict)
reflectorch/utils.py CHANGED
@@ -66,3 +66,33 @@ def energy_to_wavelength(energy: float):
66
66
  def wavelength_to_energy(wavelength: float):
67
67
  """Conversion from photon wavelength (angstroms) to photon energy (eV)"""
68
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,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: reflectorch
3
- Version: 1.2.1
3
+ Version: 1.4.0
4
4
  Summary: A Pytorch-based package for the analysis of reflectometry data
5
5
  Author-email: Vladimir Starostin <vladimir.starostin@uni-tuebingen.de>, Valentin Munteanu <valentin.munteanu@uni-tuebingen.de>
6
6
  Maintainer-email: Valentin Munteanu <valentin.munteanu@uni-tuebingen.de>, Vladimir Starostin <vladimir.starostin@uni-tuebingen.de>, Alexander Hinderhofer <alexander.hinderhofer@uni-tuebingen.de>
@@ -11,32 +11,33 @@ Keywords: reflectometry,machine learning
11
11
  Classifier: Programming Language :: Python :: 3
12
12
  Classifier: Operating System :: OS Independent
13
13
  Classifier: Environment :: GPU :: NVIDIA CUDA
14
- Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
15
14
  Classifier: Development Status :: 4 - Beta
16
15
  Classifier: Topic :: Scientific/Engineering :: Physics
17
16
  Classifier: Intended Audience :: Science/Research
18
17
  Requires-Python: >=3.7
19
18
  Description-Content-Type: text/markdown
20
19
  License-File: LICENSE.txt
21
- Requires-Dist: numpy <2.0,>=1.18.1
22
- Requires-Dist: torch >=1.8.1
20
+ Requires-Dist: numpy
21
+ Requires-Dist: torch>=1.8.1
23
22
  Requires-Dist: scipy
24
23
  Requires-Dist: tqdm
25
24
  Requires-Dist: PyYAML
26
25
  Requires-Dist: click
27
26
  Requires-Dist: matplotlib
28
27
  Requires-Dist: ipywidgets
29
- Requires-Dist: huggingface-hub
28
+ Requires-Dist: huggingface_hub
30
29
  Requires-Dist: safetensors
31
- Provides-Extra: build
32
- Requires-Dist: build ; extra == 'build'
33
- Requires-Dist: twine ; extra == 'build'
34
- Provides-Extra: docs
35
- Requires-Dist: jupyter-book ; extra == 'docs'
36
- Requires-Dist: sphinx ; extra == 'docs'
30
+ Requires-Dist: tensorboard
37
31
  Provides-Extra: tests
38
- Requires-Dist: pytest ; extra == 'tests'
39
- Requires-Dist: pytest-cov ; extra == 'tests'
32
+ Requires-Dist: pytest; extra == "tests"
33
+ Requires-Dist: pytest-cov; extra == "tests"
34
+ Provides-Extra: docs
35
+ Requires-Dist: jupyter-book; extra == "docs"
36
+ Requires-Dist: sphinx; extra == "docs"
37
+ Provides-Extra: build
38
+ Requires-Dist: build; extra == "build"
39
+ Requires-Dist: twine; extra == "build"
40
+ Dynamic: license-file
40
41
 
41
42
  # Reflectorch
42
43
 
@@ -50,7 +51,7 @@ Requires-Dist: pytest-cov ; extra == 'tests'
50
51
  [![Python version](https://img.shields.io/badge/python-3.7%7C3.8%7C3.9%7C3.10%7C3.11%7C3.12-blue.svg)](https://www.python.org/)
51
52
  ![CI workflow status](https://github.com/schreiber-lab/reflectorch/actions/workflows/ci.yml/badge.svg)
52
53
  ![Repos size](https://img.shields.io/github/repo-size/schreiber-lab/reflectorch)
53
- [![CodeFactor](https://www.codefactor.io/repository/github/schreiber-lab/reflectorch/badge)](https://www.codefactor.io/repository/github/schreiber-lab/reflectorch)
54
+ <!-- [![CodeFactor](https://www.codefactor.io/repository/github/schreiber-lab/reflectorch/badge)](https://www.codefactor.io/repository/github/schreiber-lab/reflectorch) -->
54
55
  [![Jupyter Book Documentation](https://jupyterbook.org/badge.svg)](https://jupyterbook.org/)
55
56
  [![Documentation Page](https://img.shields.io/badge/Documentation%20Page-%23FFDD33.svg?style=flat&logo=read-the-docs&logoColor=black)](https://schreiber-lab.github.io/reflectorch/)
56
57
  <!-- [![Code style: Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) -->
@@ -101,9 +102,11 @@ We provide an interactive Google Colab notebook for exploring the basic function
101
102
  [![Hugging Face](https://img.shields.io/badge/Hugging%20Face-%23FFD700.svg?style=flat&logo=huggingface&logoColor=black)](https://huggingface.co/valentinsingularity/reflectivity)
102
103
  Configuration files and the corresponding pretrained model weights are hosted on Huggingface: [https://huggingface.co/valentinsingularity/reflectivity](https://huggingface.co/valentinsingularity/reflectivity).
103
104
 
104
- [![Docker](https://img.shields.io/badge/Docker-2496ED.svg?style=flat&logo=docker&logoColor=white)](https://hub.docker.com/)
105
- Docker images for reflectorch *will* be hosted on Dockerhub.
105
+ <!-- [![Docker](https://img.shields.io/badge/Docker-2496ED.svg?style=flat&logo=docker&logoColor=white)](https://hub.docker.com/)
106
+ Docker images for reflectorch *will* be hosted on Dockerhub. -->
106
107
 
108
+ ## Contributing
109
+ If you'd like to contribute to the package, please see our [Contributing Guidelines](CONTRIBUTING.md) for details.
107
110
 
108
111
  ## Citation
109
112
  If you find our work useful in your research, please cite as follows:
@@ -3,16 +3,16 @@ reflectorch/paths.py,sha256=Z_VRVknkqRn03ULShc8YCp0czqqMJ9w2CRuUi8e2OV0,814
3
3
  reflectorch/test_config.py,sha256=1T7pMJ-WYLEu-4WtYMQxcJrqXvgdpvJ1yi2qINd0kNA,99
4
4
  reflectorch/train.py,sha256=-c8ac1fpjrCiEwnAaXg_rcBNl1stO1V5p5afx_78xHs,87
5
5
  reflectorch/train_on_cluster.py,sha256=aG3_g5_rzL8iL1tvtdY9ueJTo1f2Pn8lGJgudrrRknU,109
6
- reflectorch/utils.py,sha256=ehG5dU02_WIFPIVGPsSjHl3Ji10MQ8-jsCwRkwUO7D4,1993
7
- reflectorch/data_generation/__init__.py,sha256=TcF7kf16GCsQpp6cIXj-s4vb_gjrtv7tgXwLSeI8Xy8,3353
8
- reflectorch/data_generation/dataset.py,sha256=wEHMIzA1XQGQkzkN8WQRNqG53lyzxIVc80nMJKs0mgI,7273
6
+ reflectorch/utils.py,sha256=LotpOM0Goh7OCvWdXqNuLz-HBW1lfQ_PoTknI17ZkIA,3031
7
+ reflectorch/data_generation/__init__.py,sha256=UTa2sO5XWoD3wlpl5pAwfRTy0dLkILxyxRpnx1r6zN4,3465
8
+ reflectorch/data_generation/dataset.py,sha256=f2uYb8j8H88owZJhg9aMP7qen00_o2cXmDvA69yJwr8,8316
9
9
  reflectorch/data_generation/likelihoods.py,sha256=gnqmsEfsZnCC6WuPcIe9rFl4SeiLv_LyNlTVM-5YTE8,2862
10
- reflectorch/data_generation/noise.py,sha256=c4ytClId3t3T5FO8r0NqAVz-x_zYWAJ2VkpxcvssrVY,16159
10
+ reflectorch/data_generation/noise.py,sha256=Ps9lDKUjtjcpUfJ_L9zTmlj88GyicjNs962lLVEg2aI,22090
11
11
  reflectorch/data_generation/process_data.py,sha256=iBvWB4_X5TTIZTacsq9baBZPyGCRyI1G-J3l1BVMuD4,1180
12
- reflectorch/data_generation/q_generator.py,sha256=Etlp_6Tj2it2nK8PQSWgQZBLh8_459P985GrZs9U1lE,8529
12
+ reflectorch/data_generation/q_generator.py,sha256=PX0RbdUC0EAeWYpaxzAddOMvS4fTfAehAEcI_l-GEns,11515
13
13
  reflectorch/data_generation/scale_curves.py,sha256=hNZoGkA9FMdLUarp0fwj5nCDYvpy9NbSiO85_rCaNr8,4084
14
- reflectorch/data_generation/smearing.py,sha256=MfHQ2sa-wPu5stO835m8i1-3NnJYvxS3qpzNs1jXWAE,3109
15
- reflectorch/data_generation/utils.py,sha256=3Di6I5Ihy2rm8NMeCEvIVqH0IXFEX2bcxkHSc6y9WgU,5607
14
+ reflectorch/data_generation/smearing.py,sha256=ZQ4bzHegUOVhNWOTHAi3KfNau85bchp1FX1NV0Kp7s8,4538
15
+ reflectorch/data_generation/utils.py,sha256=x5y6mRSeh57ZqvENkI6kS7NTpRspotSR6a0K0SrvlLg,8549
16
16
  reflectorch/data_generation/priors/__init__.py,sha256=ZUaQUgNR44MQGYcPVJaSzzoE270710RqdKAPcaBNHWo,1941
17
17
  reflectorch/data_generation/priors/base.py,sha256=JNa2A3F4IWaEwV7gyTQjVdCRevUI43UUpTOm1U3XA8k,1705
18
18
  reflectorch/data_generation/priors/exp_subprior_sampler.py,sha256=hjHey_32HGgZ4ojOAhmmx8jcQPCyvcPRgxMlfthSdOo,11551
@@ -20,64 +20,69 @@ reflectorch/data_generation/priors/independent_priors.py,sha256=ZdFCW4Ea6cK9f0Pn
20
20
  reflectorch/data_generation/priors/multilayer_models.py,sha256=lAf-HJPbIDnbD1ecDTvx03TfA4jLN5tTLbwaBCiYgWM,7763
21
21
  reflectorch/data_generation/priors/multilayer_structures.py,sha256=b1LTkzMK_R2hgbAmif96zRRzZRV2V-dD7eSTaNalMU8,3693
22
22
  reflectorch/data_generation/priors/no_constraints.py,sha256=qioTThJ17NixCaMIIf4dusPtvcK_uI2jOoysyXKnkZ4,7292
23
- reflectorch/data_generation/priors/parametric_models.py,sha256=vaAGcm9Ky-coidNliE4R1YvoqCcbNwEwJVCwwmkKI4E,25139
24
- reflectorch/data_generation/priors/parametric_subpriors.py,sha256=mN4MELBOQurNponknB_1n46fiNncXkI5PnnPL3hJee4,14352
23
+ reflectorch/data_generation/priors/parametric_models.py,sha256=TwXRol5zfVVo05FKWMTlVIwIw5P2l7hgCzISG1kVTHw,29330
24
+ reflectorch/data_generation/priors/parametric_subpriors.py,sha256=KPW3Y12A5ba405ofGdGny_FIzoFMd90IkQcvVcYhpxE,15164
25
25
  reflectorch/data_generation/priors/params.py,sha256=JpH-LRxTztc0QP-3QwjLdu0MsVc1rSixtcscYGs_2Ew,8238
26
- reflectorch/data_generation/priors/sampler_strategies.py,sha256=U-v5dXpFLJq939aQKvNl7n1Lih-y97K8WJCXBFRQiA0,13059
26
+ reflectorch/data_generation/priors/sampler_strategies.py,sha256=ls9NRwjIsQJlgqv_m9l9MVm3tu4Ivafq5OzG2Q0sI3w,15791
27
27
  reflectorch/data_generation/priors/scaler_mixin.py,sha256=gI64v2KOZugSJWaLKASR34fn6qVFl-aoeVA1BR5yXNg,2648
28
28
  reflectorch/data_generation/priors/subprior_sampler.py,sha256=TE8DOQhxVr69VmWSjwHyElpgVjOhZKBIPChFWNVYzRc,14769
29
29
  reflectorch/data_generation/priors/utils.py,sha256=bmIZYHq95gG68kETfNH6ygR39oitUEJ0eCO_Fb8maH0,3836
30
- reflectorch/data_generation/reflectivity/__init__.py,sha256=MxVtNqO52iORdual2TtmSRN41TC9VmVSFH5ov-wuAJc,3202
30
+ reflectorch/data_generation/reflectivity/__init__.py,sha256=ryblJgCvnjBVPLpmOVovtZtdkEfJ_H26dqthdHfIqQ4,5209
31
31
  reflectorch/data_generation/reflectivity/abeles.py,sha256=Pcov-m0HImw1DOR57t0OsBOLZs3MA6fk7RePf_VCEZU,3097
32
- reflectorch/data_generation/reflectivity/kinematical.py,sha256=78E128l3DQif_vz2Ae6hjRg-69kRz7cbN0Ak5dOc5PM,2625
32
+ reflectorch/data_generation/reflectivity/kinematical.py,sha256=AKZqdA4dRU6Gvs7sq6ODLToMmImrMZWMCOMrzpoX2D4,2639
33
33
  reflectorch/data_generation/reflectivity/memory_eff.py,sha256=pbsXkcGwDorey6qVx2SlBK6IlzNJY1FeeF84cEJB_hY,4023
34
34
  reflectorch/data_generation/reflectivity/numpy_implementations.py,sha256=QBzn4yVnOdlkHeeR-ZFPS115GnLdO9lMTGO2d3YhG9I,3177
35
- reflectorch/data_generation/reflectivity/smearing.py,sha256=pc95Lig9NIWtHDCKnKbLp7G_kmL7_3YB6ZpDphgC2D8,4001
35
+ reflectorch/data_generation/reflectivity/smearing.py,sha256=qxaEi43Wv9OZHRQr-nQJbtPJEIaXb2NEA1q3evRhCCc,4395
36
+ reflectorch/data_generation/reflectivity/smearing_pointwise.py,sha256=y3iSc0wKh6wF4xzD24Zz2OmerwV8HKQZAg0Y3kpzPuU,3688
36
37
  reflectorch/extensions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
38
  reflectorch/extensions/jupyter/__init__.py,sha256=bs6RQQ8LRcKAJu2I9K8BZEMQSll3kLdirRvxLbgsY9w,72
38
39
  reflectorch/extensions/jupyter/callbacks.py,sha256=K4Z8Mlm_Pa80YDsNOdMZLIJZyVrg09kBVzVdFHKgQFk,1074
39
40
  reflectorch/extensions/matplotlib/__init__.py,sha256=ARmc228xbZUj4fWNq5fVxZ8PN444fjDNxNP4ytVCyfo,104
40
41
  reflectorch/extensions/matplotlib/losses.py,sha256=H2vrjNqzmQ0BP4377uN4uhlH88aS5OAfA7pwRM2WHqA,686
42
+ reflectorch/extensions/refnx/refnx_conversion.py,sha256=XBHT2zL9XOgL5h2Q-_yDJScUBAsBd0xlivXEMeVGmao,3450
41
43
  reflectorch/inference/__init__.py,sha256=i0KNn83XN33mLrV7bpHdLd0SXxuGCKfbQcIoa247Uts,834
42
- reflectorch/inference/inference_model.py,sha256=uxzdL2S01CN6lN737B4x5L_NIFnaCkHrNUQKwh4xNW0,36739
44
+ reflectorch/inference/inference_model.py,sha256=-w9KULRRkVp5PPvrQSWsaQL31PS_T8S70bhII_ZLLQw,69655
45
+ reflectorch/inference/loading_data.py,sha256=7yG13aJDxCCr7DdqADtt66vZJYYX4TZWzqppgOERN-Y,993
43
46
  reflectorch/inference/multilayer_fitter.py,sha256=0CxDpLOEp1terR4N39yFlxhvA8qAbHf_01NbmvYadck,5510
44
47
  reflectorch/inference/multilayer_inference_model.py,sha256=hH_-dJGdMOox8GHXdM_nODXDlNgh_v449xW5FmklRdo,7575
48
+ reflectorch/inference/plotting.py,sha256=dYcSOf47qJ1w0CUE31iuIfom3FWap64HQkPN3LfrDHg,18624
45
49
  reflectorch/inference/query_matcher.py,sha256=Dk49dW0XreeCjufzYBTKchfTdVbG6759ryV6I-wQL60,3387
46
50
  reflectorch/inference/record_time.py,sha256=3er-aoR8Sd_Kc4qNwUmRqkEz4FYhVxdi1ARnBohybzM,1140
47
51
  reflectorch/inference/sampler_solution.py,sha256=DeJM3EXEb6S5EiASj3mmdNI-Y07Cr5UzzA5oq-vEB-Q,2288
48
- reflectorch/inference/scipy_fitter.py,sha256=339M33OdmfgOpifJGLYk4KVcnnNJrY6_aH7Lz6Vtt24,5404
52
+ reflectorch/inference/scipy_fitter.py,sha256=Sq7LPXp3zoBYNkELEOt1DPzUtRLZ0s7Qobsrx0V_ujw,8673
49
53
  reflectorch/inference/torch_fitter.py,sha256=j1NzkzLCmQ4H6LfIi82LsSBmIdunnWzm3kbGx-hqvDs,3391
50
54
  reflectorch/inference/preprocess_exp/__init__.py,sha256=bR6H-xgBD96z4P9P1T2ECnWvalrimdMTfTNArIWPLy0,383
51
55
  reflectorch/inference/preprocess_exp/attenuation.py,sha256=UKDfUjCKKMgAuEs5Ttyo0KEQmpvHZI52UgVflh7T81A,1518
52
56
  reflectorch/inference/preprocess_exp/cut_with_q_ratio.py,sha256=CbtwIw7iJNkoVxqTHKzONBgGFwOsCUyFoTIQ8XMLTfY,1149
53
57
  reflectorch/inference/preprocess_exp/footprint.py,sha256=xc409M5X-QW0Ce_6dEZdj8NkOY1vd0LaGpPQFxiOOR0,2625
54
- reflectorch/inference/preprocess_exp/interpolation.py,sha256=o2v-mlfRYzeaaikeQVeY7EA7j-K42dMfT12oN3mk51k,694
58
+ reflectorch/inference/preprocess_exp/interpolation.py,sha256=zt8vULX-ZkNOkAnm9J3F4Ok5R8C5ieAApP2bCMOPGvU,865
55
59
  reflectorch/inference/preprocess_exp/normalize.py,sha256=09v7nZdtw6SnW_67xFrPnqzOA5AtFBGarjK4Pfn4VoE,695
56
60
  reflectorch/inference/preprocess_exp/preprocess.py,sha256=pyyq8fSvcm1bWAShzGHYnKOc55Rofh4FIw1AC7Smq-U,5111
57
- reflectorch/ml/__init__.py,sha256=TJERkE_itNOH3GwtC-9Xv0rZ70qEkMukFLD1qXsMdOQ,730
58
- reflectorch/ml/basic_trainer.py,sha256=2z_3Iy_9dEgOha8da69RjiMQ_89C2SoJM9omh0WO-ek,9647
59
- reflectorch/ml/callbacks.py,sha256=blZNFubtRQkcx5sQrTNkARiPj75T8VdCn6CYJNN7hKg,2743
61
+ reflectorch/ml/__init__.py,sha256=0LVWweeidkoZLqbDYKi-wx5BvG7DYwsR9IRKM3TZoOM,790
62
+ reflectorch/ml/basic_trainer.py,sha256=GbSs4ie5yzY7nhGiqHO5D4HZCqB-taKenaswf1dIvok,10073
63
+ reflectorch/ml/callbacks.py,sha256=u9jNvxVEIA0a_SpmT-gnP8qoC6-C8p0F4TvIuBQr-ek,2801
60
64
  reflectorch/ml/dataloaders.py,sha256=IvKmsH5gX_b-00KRFeL-x3keEfBcvYkQFWGWd8Caj-I,1073
61
- reflectorch/ml/loggers.py,sha256=oYZskGMbbWfW3sOXOC-4F-DIL-cLhYrRFeggrmPtPGM,743
62
- reflectorch/ml/schedulers.py,sha256=AO-dS1bZgn7p-gGJJhocmL6Vc8XLMwynZxvko4BCEsw,10048
63
- reflectorch/ml/trainers.py,sha256=DXO0_ue3iVQKi8vDttEQZbNLcn3xwkRBIFrw0XTomn4,3643
65
+ reflectorch/ml/loggers.py,sha256=Dvjte9rmDxoA8AB_7cFWWxkvaQBdhn2_ag2jYCM0uSQ,1478
66
+ reflectorch/ml/schedulers.py,sha256=p_Z-TqGsu45KencD_EwX6hGMMsvvTUnQtkwC98kKTDI,14227
67
+ reflectorch/ml/trainers.py,sha256=LCTkvaMHLmhiiBuLOWPna9YKwQNpYo3cdqixsZJWQOw,8633
64
68
  reflectorch/ml/utils.py,sha256=_OKkc6o5od7vnfBNZKWsGApJxA62TrAlLok92s0nG4k,71
65
- reflectorch/models/__init__.py,sha256=vsGXi1BoLVyki_OF_Ezv9GXCpuJ22liGwolVZ0rxyyM,335
69
+ reflectorch/models/__init__.py,sha256=sJk-K0vEDSkN-RA83L6pzhV0luokvcQvHefRCr8QpWM,375
66
70
  reflectorch/models/activations.py,sha256=LDiIxCnLFb8r_TRBZSt6vdOZmexCWAGa5DfE_SotUL8,1431
67
- reflectorch/models/encoders/__init__.py,sha256=X9cHeWjJGVXNFwii9ZJasNbqrV4kt9QyJYPdKfxgp04,443
68
- reflectorch/models/encoders/conv_encoder.py,sha256=Xa9Yo2lDctFWlnz8vIIdzwakcE_cgBR_J92UL59XhbA,7653
71
+ reflectorch/models/encoders/__init__.py,sha256=QI-2CsHZOva3iZcltjfE39U9MVZqLPm0L6VzJz_dXSA,532
72
+ reflectorch/models/encoders/conv_encoder.py,sha256=LLvqnt268VR6C_1UDR24qka_9ijHc1hvvciJaV8AmQo,7910
69
73
  reflectorch/models/encoders/conv_res_net.py,sha256=VP1CCKdNqsva2R4l-IV6d63mQk6bI4Aresfd6b6_YKU,3343
70
- reflectorch/models/encoders/fno.py,sha256=s_S7hnpLE7iGfyvnQ-QvTh0rKO5KFiy5tUYau4sJbvI,4693
71
- reflectorch/models/networks/__init__.py,sha256=zHUvrlb0KVOpRrwVjwjR1g8sVWX6VH80FLGqu4jiux8,291
72
- reflectorch/models/networks/mlp_networks.py,sha256=C7py6qCBVaYYt0FMEf8gbT4lndArKpUYYgTN1001-T8,11614
73
- reflectorch/models/networks/residual_net.py,sha256=msDJaDw7qL9ebEW1Avw6Qw0lgni68AMgF4kXiJKzeaQ,4637
74
+ reflectorch/models/encoders/fno.py,sha256=G1Iav7IYVdvogK40dlKK1zsCTRIkesffrcVTywRZKjI,5115
75
+ reflectorch/models/encoders/integral_kernel_embedding.py,sha256=l_kEdtfb4aqIoN4oD9YrdFlAxHzVlVEEqZ0Ylx57yc4,12528
76
+ reflectorch/models/networks/__init__.py,sha256=QeNcWShZ7i-hoEFOLnOoq7U6WzBoXj7UIHCCJnZ99KA,341
77
+ reflectorch/models/networks/mlp_networks.py,sha256=19LA9w6EiezlLr_bOvsOPkRhomCbm3D4OAu_XmJxhIg,20995
78
+ reflectorch/models/networks/residual_net.py,sha256=oEPJTWjvKO1yniLTT9B54Z_ZbZv4i1uHsP9ongbn-ko,5643
74
79
  reflectorch/runs/__init__.py,sha256=xjuZGjqZuEovlpe9Jj5d8Nn5ii-5jvAYdeHT5oYaYVI,723
75
80
  reflectorch/runs/config.py,sha256=8YtUOXr_DvNvgpu59CNAr3KrQijx1AGDE95gYrsuwsM,804
76
81
  reflectorch/runs/slurm_utils.py,sha256=Zyj4_K5YpiWNJhgpFLWYHsSaaI-mgVEWsN15Gd_BhI0,2600
77
- reflectorch/runs/train.py,sha256=e-Jj0fwYlUB2NLDxCzy0cLsSrJbNqd5pN5T1L7-Eiig,2560
78
- reflectorch/runs/utils.py,sha256=bp3Nwd6pfX5yFlTVX28zDtSTo2gg2JZh9HCpZpvnJWk,12637
79
- reflectorch-1.2.1.dist-info/LICENSE.txt,sha256=2kX9kLKiIRiQRqUXwk3J-Ba3fqmztNu8ORskLBlAuKM,1098
80
- reflectorch-1.2.1.dist-info/METADATA,sha256=ANjKriMGr9vTl5pvhgqpsCL40aZxh1ryKrfy66Eh_wU,7805
81
- reflectorch-1.2.1.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
82
- reflectorch-1.2.1.dist-info/top_level.txt,sha256=2EyIWrt4SeZ3hNadLXvEVpPFhyoZ4An7YflP4y_E3Fc,12
83
- reflectorch-1.2.1.dist-info/RECORD,,
82
+ reflectorch/runs/train.py,sha256=7BLjKjI3H2ZwqMhmlO4ebsz6X804e_O9XU73xKyOJW0,2503
83
+ reflectorch/runs/utils.py,sha256=j6fUDhljJwOU27PQzQXi3EvIJxCF32YPZ7SHm9E0XWw,14165
84
+ reflectorch-1.4.0.dist-info/licenses/LICENSE.txt,sha256=2kX9kLKiIRiQRqUXwk3J-Ba3fqmztNu8ORskLBlAuKM,1098
85
+ reflectorch-1.4.0.dist-info/METADATA,sha256=Shk1WgBBXufoICvf2QIwFOd3IbHKxOx0nVmha71lRd0,7908
86
+ reflectorch-1.4.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
87
+ reflectorch-1.4.0.dist-info/top_level.txt,sha256=2EyIWrt4SeZ3hNadLXvEVpPFhyoZ4An7YflP4y_E3Fc,12
88
+ reflectorch-1.4.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (72.1.0)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5