reflectorch 1.1.0__tar.gz → 1.2.0__tar.gz

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 (266) hide show
  1. {reflectorch-1.1.0 → reflectorch-1.2.0}/.gitignore +1 -0
  2. {reflectorch-1.1.0 → reflectorch-1.2.0}/MANIFEST.in +2 -0
  3. {reflectorch-1.1.0 → reflectorch-1.2.0}/PKG-INFO +2 -1
  4. reflectorch-1.2.0/exp_data/data_C60.txt +92 -0
  5. reflectorch-1.2.0/exp_data/data_PTCDI-C3.txt +142 -0
  6. {reflectorch-1.1.0 → reflectorch-1.2.0}/pyproject.toml +2 -1
  7. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/__init__.py +0 -6
  8. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/data_generation/__init__.py +0 -6
  9. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/data_generation/dataset.py +0 -6
  10. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/data_generation/likelihoods.py +0 -6
  11. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/data_generation/noise.py +0 -6
  12. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/data_generation/priors/__init__.py +0 -6
  13. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/data_generation/priors/base.py +0 -6
  14. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/data_generation/priors/exp_subprior_sampler.py +0 -6
  15. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/data_generation/priors/independent_priors.py +0 -6
  16. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/data_generation/priors/multilayer_structures.py +0 -6
  17. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/data_generation/priors/no_constraints.py +0 -6
  18. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/data_generation/priors/parametric_subpriors.py +0 -6
  19. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/data_generation/priors/params.py +0 -6
  20. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/data_generation/priors/subprior_sampler.py +0 -6
  21. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/data_generation/priors/utils.py +0 -6
  22. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/data_generation/process_data.py +0 -6
  23. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/data_generation/q_generator.py +0 -6
  24. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/data_generation/reflectivity/__init__.py +13 -9
  25. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/data_generation/reflectivity/abeles.py +6 -5
  26. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/data_generation/reflectivity/kinematical.py +14 -0
  27. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/data_generation/reflectivity/memory_eff.py +13 -0
  28. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/data_generation/reflectivity/smearing.py +2 -2
  29. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/data_generation/scale_curves.py +0 -6
  30. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/data_generation/smearing.py +3 -2
  31. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/data_generation/utils.py +0 -6
  32. reflectorch-1.2.0/reflectorch/extensions/jupyter/__init__.py +6 -0
  33. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/extensions/jupyter/callbacks.py +0 -6
  34. reflectorch-1.2.0/reflectorch/extensions/matplotlib/__init__.py +5 -0
  35. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/extensions/matplotlib/losses.py +0 -6
  36. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/inference/inference_model.py +9 -6
  37. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/ml/__init__.py +0 -7
  38. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/ml/basic_trainer.py +0 -6
  39. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/ml/callbacks.py +0 -6
  40. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/ml/loggers.py +0 -7
  41. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/ml/schedulers.py +0 -6
  42. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/ml/trainers.py +1 -34
  43. reflectorch-1.2.0/reflectorch/ml/utils.py +2 -0
  44. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/models/__init__.py +0 -7
  45. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/models/encoders/__init__.py +0 -8
  46. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/models/encoders/conv_encoder.py +0 -6
  47. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/models/encoders/conv_res_net.py +1 -5
  48. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/models/networks/__init__.py +0 -6
  49. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/paths.py +0 -6
  50. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/runs/__init__.py +2 -6
  51. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/runs/config.py +0 -6
  52. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/runs/slurm_utils.py +0 -6
  53. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/runs/train.py +0 -6
  54. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/runs/utils.py +77 -8
  55. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/utils.py +0 -6
  56. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch.egg-info/PKG-INFO +2 -1
  57. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch.egg-info/SOURCES.txt +2 -1
  58. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch.egg-info/requires.txt +1 -0
  59. reflectorch-1.2.0/tests/unit/__init__.py +0 -0
  60. reflectorch-1.1.0/reflectorch/extensions/__init__.py +0 -6
  61. reflectorch-1.1.0/reflectorch/extensions/jupyter/__init__.py +0 -12
  62. reflectorch-1.1.0/reflectorch/extensions/matplotlib/__init__.py +0 -11
  63. reflectorch-1.1.0/reflectorch/ml/utils.py +0 -9
  64. reflectorch-1.1.0/reflectorch/models/encoders/transformers.py +0 -56
  65. {reflectorch-1.1.0 → reflectorch-1.2.0}/.dockerignore +0 -0
  66. {reflectorch-1.1.0 → reflectorch-1.2.0}/.github/workflows/ci.yml +0 -0
  67. {reflectorch-1.1.0 → reflectorch-1.2.0}/.github/workflows/draft-pdf.yml +0 -0
  68. {reflectorch-1.1.0 → reflectorch-1.2.0}/CODE_OF_CONDUCT.md +0 -0
  69. {reflectorch-1.1.0 → reflectorch-1.2.0}/Dockerfile +0 -0
  70. {reflectorch-1.1.0 → reflectorch-1.2.0}/LICENSE.txt +0 -0
  71. {reflectorch-1.1.0 → reflectorch-1.2.0}/README.md +0 -0
  72. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/c1.yaml +0 -0
  73. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/c1_trained.yaml +0 -0
  74. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/c_L10_d100_s150_r30_ws5_q03_nq256.yaml +0 -0
  75. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/c_L3_d200_s150_r60_ws5_q03_nq128.yaml +0 -0
  76. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/c_L5_d200_s150_r60_ws5_q03_nq256.yaml +0 -0
  77. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/c_absorption.yaml +0 -0
  78. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/c_absorption_L2_d500_s150_is30_r60_ws5_q03_nq256.yaml +0 -0
  79. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/c_absorption_L5_d200_s150_is30_r60_ws5_q03_nq256.yaml +0 -0
  80. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/c_ae.yaml +0 -0
  81. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/c_fno.yaml +0 -0
  82. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/c_model_with_shifts.yaml +0 -0
  83. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/c_repeating_multilayer.yaml +0 -0
  84. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/c_repeating_multilayer_trained1.yaml +0 -0
  85. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/c_test_safetensors.yaml +0 -0
  86. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/l2q109_exp_1.yaml +0 -0
  87. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/l2q256_absorption_1.yaml +0 -0
  88. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/l2q256_exp_2.yaml +0 -0
  89. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/l2q256_exp_3.yaml +0 -0
  90. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/l2q256_exp_3_02.yaml +0 -0
  91. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/l2q256_exp_4.yaml +0 -0
  92. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/l2q256_exp_5.yaml +0 -0
  93. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/l2q256_exp_sm_2.yaml +0 -0
  94. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/l2q256_new_1.yaml +0 -0
  95. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/l2q64_new_sub_1.yaml +0 -0
  96. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/l5q256_new_sub_1.yaml +0 -0
  97. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc-o1.yaml +0 -0
  98. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc-o10.yaml +0 -0
  99. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc-o11.yaml +0 -0
  100. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc-o12.yaml +0 -0
  101. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc-o13.yaml +0 -0
  102. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc-o14.yaml +0 -0
  103. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc-o15.yaml +0 -0
  104. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc-o16.yaml +0 -0
  105. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc-o2.yaml +0 -0
  106. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc-o3.yaml +0 -0
  107. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc-o4.yaml +0 -0
  108. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc-o5.yaml +0 -0
  109. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc-o7.yaml +0 -0
  110. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc-o8.yaml +0 -0
  111. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc-o9.yaml +0 -0
  112. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc1.yaml +0 -0
  113. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc10.yaml +0 -0
  114. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc11.yaml +0 -0
  115. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc12.yaml +0 -0
  116. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc13.yaml +0 -0
  117. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc14.yaml +0 -0
  118. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc15.yaml +0 -0
  119. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc16.yaml +0 -0
  120. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc17.yaml +0 -0
  121. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc18.yaml +0 -0
  122. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc19.yaml +0 -0
  123. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc2.yaml +0 -0
  124. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc20.yaml +0 -0
  125. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc21.yaml +0 -0
  126. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc22.yaml +0 -0
  127. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc23.yaml +0 -0
  128. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc24.yaml +0 -0
  129. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc25.yaml +0 -0
  130. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc26.yaml +0 -0
  131. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc27.yaml +0 -0
  132. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc28.yaml +0 -0
  133. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc29.yaml +0 -0
  134. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc3.yaml +0 -0
  135. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc30.yaml +0 -0
  136. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc31.yaml +0 -0
  137. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc32.yaml +0 -0
  138. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc33.yaml +0 -0
  139. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc34.yaml +0 -0
  140. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc35.yaml +0 -0
  141. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc36.yaml +0 -0
  142. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc37.yaml +0 -0
  143. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc38.yaml +0 -0
  144. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc39.yaml +0 -0
  145. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc4.yaml +0 -0
  146. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc40.yaml +0 -0
  147. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc41.yaml +0 -0
  148. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc42.yaml +0 -0
  149. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc43.yaml +0 -0
  150. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc44.yaml +0 -0
  151. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc45.yaml +0 -0
  152. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc46.yaml +0 -0
  153. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc47.yaml +0 -0
  154. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc48.yaml +0 -0
  155. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc49.yaml +0 -0
  156. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc5.yaml +0 -0
  157. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc50.yaml +0 -0
  158. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc51.yaml +0 -0
  159. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc52.yaml +0 -0
  160. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc53.yaml +0 -0
  161. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc54.yaml +0 -0
  162. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc55.yaml +0 -0
  163. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc56.yaml +0 -0
  164. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc57.yaml +0 -0
  165. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc58.yaml +0 -0
  166. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc59.yaml +0 -0
  167. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc6.yaml +0 -0
  168. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc60.yaml +0 -0
  169. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc61.yaml +0 -0
  170. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc62.yaml +0 -0
  171. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc63.yaml +0 -0
  172. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc64.yaml +0 -0
  173. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc65.yaml +0 -0
  174. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc66.yaml +0 -0
  175. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc67.yaml +0 -0
  176. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc7.yaml +0 -0
  177. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc8.yaml +0 -0
  178. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/mc9.yaml +0 -0
  179. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/multilayer_test_1.yaml +0 -0
  180. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/multilayer_test_1_1.yaml +0 -0
  181. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/multilayer_test_2.yaml +0 -0
  182. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/multilayer_test_2_2.yaml +0 -0
  183. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/multilayer_test_3.yaml +0 -0
  184. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/time_val_exp_L2_q128-015_d500_r60_s25n_bs4_budist_noise-poisson02-sh03-sc002-qs1e3-qn1e3.yaml +0 -0
  185. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/time_val_sim_L5_q256_d300_r60_s25_bs4_budist_noise-poisson02_LONGER.yaml +0 -0
  186. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/val_exp_L2_q128-015_d500_r60_s25n_bs4_budist_noise-poisson02-sh03-sc002-qs1e3-qn1e3.yaml +0 -0
  187. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/val_exp_L2_q128_d300_r60_s25_bs4_budist_noise-poisson02-various-noises.yaml +0 -0
  188. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/val_exp_L2_q128_d300_r60_s25_bs4_budist_noise-poisson02-various-noises2.yaml +0 -0
  189. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/val_exp_L2_q256_d300_r60_s25_bs4_budist_noise-poisson01.yaml +0 -0
  190. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/val_exp_L2_q256_d300_r60_s25_bs4_budist_noise-poisson02.yaml +0 -0
  191. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/val_exp_L2_q256_d300_r60_s25_bs4_budist_noise-poisson03.yaml +0 -0
  192. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/val_exp_L2_q64_d300_r60_s25_bs25_budist_noise-poisson03_scale002.yaml +0 -0
  193. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/val_exp_L2_q64_d300_r60_s25_bs4_blogdist_noise-poisson04.yaml +0 -0
  194. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/val_exp_L2_q64_d300_r60_s25_bs4_budist_noise-poisson04.yaml +0 -0
  195. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/val_multilayer_V1.yaml +0 -0
  196. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/val_multilayer_V2.yaml +0 -0
  197. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/val_sim_FNO_L2_q256_d300_r60_s25_bs4_budist_noise-poisson02.yaml +0 -0
  198. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/val_sim_FNO_L2_q256_d300_r60_s25_bs4_budist_noise-poisson02_V2.yaml +0 -0
  199. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/val_sim_FNO_L2_q256_d300_r60_s25_bs4_budist_noise-poisson02_varyQ.yaml +0 -0
  200. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/val_sim_FNO_L2_q64-512_015-05_d300_r60_s25_bs4_budist_noise-poisson02_varyall.yaml +0 -0
  201. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/val_sim_FNO_L2_q64-512_015-05_d500_r60_s25n_bs4_budist_noise-poisson02_varyall_V2.yaml +0 -0
  202. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/val_sim_L2_q256_d300_r60_s25_br20_bs4_budist_noise-none.yaml +0 -0
  203. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/val_sim_L2_q256_d300_r60_s25_bs25_budist_noise-none.yaml +0 -0
  204. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/val_sim_L2_q256_d300_r60_s25_bs25_budist_noise-poisson02.yaml +0 -0
  205. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/val_sim_L2_q256_d300_r60_s25_bs4_blogdist_noise-poisson02.yaml +0 -0
  206. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/val_sim_L2_q256_d300_r60_s25_bs4_budist_noise-none.yaml +0 -0
  207. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/val_sim_L2_q256_d300_r60_s25_bs4_budist_noise-poisson02-hz512.yaml +0 -0
  208. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/val_sim_L2_q256_d300_r60_s25_bs4_budist_noise-poisson02-rb10.yaml +0 -0
  209. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/val_sim_L2_q256_d300_r60_s25_bs4_budist_noise-poisson02.yaml +0 -0
  210. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/val_sim_L3_q256_d300_r60_s25_bs25_budist_noise-poisson02.yaml +0 -0
  211. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/val_sim_L3_q256_d300_r60_s25_bs4_budist_noise-none.yaml +0 -0
  212. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/val_sim_L3_q256_d300_r60_s25_bs4_budist_noise-poisson02-TRY2.yaml +0 -0
  213. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/val_sim_L3_q256_d300_r60_s25_bs4_budist_noise-poisson02.yaml +0 -0
  214. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/val_sim_L5_q1024_d300_r60_s25_bs4_budist_noise-poisson02.yaml +0 -0
  215. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/val_sim_L5_q256_d300_r60_s25_bs25_budist_noise-poisson02.yaml +0 -0
  216. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/val_sim_L5_q256_d300_r60_s25_bs4_budist_noise-poisson02-Copy1.yaml +0 -0
  217. {reflectorch-1.1.0 → reflectorch-1.2.0}/configs/val_sim_L5_q256_d300_r60_s25_bs4_budist_noise-poisson02_LONGER.yaml +0 -0
  218. {reflectorch-1.1.0 → reflectorch-1.2.0}/debug.py +0 -0
  219. {reflectorch-1.1.0 → reflectorch-1.2.0}/exp_data/33a.dat +0 -0
  220. {reflectorch-1.1.0 → reflectorch-1.2.0}/exp_data/DIP-nSi_34a.dat +0 -0
  221. {reflectorch-1.1.0 → reflectorch-1.2.0}/exp_data/data_C60.pt +0 -0
  222. {reflectorch-1.1.0 → reflectorch-1.2.0}/exp_data/data_PTCDI-C3.pt +0 -0
  223. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/data_generation/priors/multilayer_models.py +0 -0
  224. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/data_generation/priors/parametric_models.py +0 -0
  225. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/data_generation/priors/sampler_strategies.py +0 -0
  226. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/data_generation/priors/scaler_mixin.py +0 -0
  227. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/data_generation/reflectivity/numpy_implementations.py +0 -0
  228. {reflectorch-1.1.0/tests → reflectorch-1.2.0/reflectorch/extensions}/__init__.py +0 -0
  229. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/inference/__init__.py +0 -0
  230. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/inference/multilayer_fitter.py +0 -0
  231. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/inference/multilayer_inference_model.py +0 -0
  232. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/inference/preprocess_exp/__init__.py +0 -0
  233. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/inference/preprocess_exp/attenuation.py +0 -0
  234. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/inference/preprocess_exp/cut_with_q_ratio.py +0 -0
  235. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/inference/preprocess_exp/footprint.py +0 -0
  236. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/inference/preprocess_exp/interpolation.py +0 -0
  237. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/inference/preprocess_exp/normalize.py +0 -0
  238. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/inference/preprocess_exp/preprocess.py +0 -0
  239. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/inference/query_matcher.py +0 -0
  240. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/inference/record_time.py +0 -0
  241. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/inference/sampler_solution.py +0 -0
  242. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/inference/scipy_fitter.py +0 -0
  243. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/inference/torch_fitter.py +0 -0
  244. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/ml/dataloaders.py +0 -0
  245. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/models/activations.py +0 -0
  246. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/models/encoders/fno.py +0 -0
  247. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/models/networks/mlp_networks.py +0 -0
  248. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/models/networks/residual_net.py +0 -0
  249. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/test_config.py +0 -0
  250. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/train.py +0 -0
  251. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch/train_on_cluster.py +0 -0
  252. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch.egg-info/dependency_links.txt +0 -0
  253. {reflectorch-1.1.0 → reflectorch-1.2.0}/reflectorch.egg-info/top_level.txt +0 -0
  254. {reflectorch-1.1.0 → reflectorch-1.2.0}/setup.cfg +0 -0
  255. {reflectorch-1.1.0/tests/unit → reflectorch-1.2.0/tests}/__init__.py +0 -0
  256. {reflectorch-1.1.0 → reflectorch-1.2.0}/tests/conftest.py +0 -0
  257. {reflectorch-1.1.0 → reflectorch-1.2.0}/tests/data/demo_scan.csv +0 -0
  258. {reflectorch-1.1.0 → reflectorch-1.2.0}/tests/fixtures/__init__.py +0 -0
  259. {reflectorch-1.1.0 → reflectorch-1.2.0}/tests/fixtures/data.py +0 -0
  260. {reflectorch-1.1.0 → reflectorch-1.2.0}/tests/unit/test_dataloader.py +0 -0
  261. {reflectorch-1.1.0 → reflectorch-1.2.0}/tests/unit/test_embedding_networks.py +0 -0
  262. {reflectorch-1.1.0 → reflectorch-1.2.0}/tests/unit/test_mlp.py +0 -0
  263. {reflectorch-1.1.0 → reflectorch-1.2.0}/tests/unit/test_preprocessing.py +0 -0
  264. {reflectorch-1.1.0 → reflectorch-1.2.0}/tests/unit/test_prior_sampler.py +0 -0
  265. {reflectorch-1.1.0 → reflectorch-1.2.0}/tests/unit/test_q_generator.py +0 -0
  266. {reflectorch-1.1.0 → reflectorch-1.2.0}/tests/unit/test_reflectivity.py +0 -0
@@ -10,6 +10,7 @@ __pycache__/
10
10
 
11
11
  *.pt
12
12
  *.h5
13
+ *.safetensors
13
14
 
14
15
  # Distribution / packaging
15
16
  .Python
@@ -9,5 +9,7 @@ exclude .github/*
9
9
 
10
10
  include exp_data/data_C60.pt
11
11
  include exp_data/data_PTCDI-C3.pt
12
+ include exp_data/data_C60.txt
13
+ include exp_data/data_PTCDI-C3.txt
12
14
  include exp_data/33a.dat
13
15
  include exp_data/DIP-nSi_34a.dat
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: reflectorch
3
- Version: 1.1.0
3
+ Version: 1.2.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>
@@ -27,6 +27,7 @@ Requires-Dist: click
27
27
  Requires-Dist: matplotlib
28
28
  Requires-Dist: ipywidgets
29
29
  Requires-Dist: huggingface_hub
30
+ Requires-Dist: safetensors
30
31
  Provides-Extra: tests
31
32
  Requires-Dist: pytest; extra == "tests"
32
33
  Requires-Dist: pytest-cov; extra == "tests"
@@ -0,0 +1,92 @@
1
+ # q R(q)
2
+ 1.42368058e-02 9.99013913e-01
3
+ 1.56604844e-02 9.97201582e-01
4
+ 1.70841625e-02 1.00000000e+00
5
+ 1.85078401e-02 9.98838316e-01
6
+ 1.99315182e-02 9.96319110e-01
7
+ 2.13551957e-02 9.92375339e-01
8
+ 2.27788704e-02 9.89743023e-01
9
+ 2.42025465e-02 9.86378958e-01
10
+ 2.56262219e-02 9.75717850e-01
11
+ 2.70498944e-02 9.60515827e-01
12
+ 2.84735682e-02 9.30343836e-01
13
+ 2.98972390e-02 8.36874918e-01
14
+ 3.13209110e-02 5.06307942e-01
15
+ 3.27445821e-02 9.57114507e-02
16
+ 3.41682500e-02 1.72501680e-02
17
+ 3.55919191e-02 2.19172468e-02
18
+ 3.70155849e-02 3.02606295e-02
19
+ 3.84392538e-02 3.46351062e-02
20
+ 3.98629173e-02 3.63926902e-02
21
+ 4.12865797e-02 3.56133498e-02
22
+ 4.27102449e-02 3.31841454e-02
23
+ 4.41339047e-02 3.00055263e-02
24
+ 4.55575631e-02 2.62583437e-02
25
+ 4.69812244e-02 2.23786456e-02
26
+ 4.84048799e-02 1.86479132e-02
27
+ 4.98285341e-02 1.48919751e-02
28
+ 5.12521909e-02 1.15645186e-02
29
+ 5.26046603e-02 8.81495735e-03
30
+ 5.41706729e-02 6.16748023e-03
31
+ 5.54519576e-02 4.41031274e-03
32
+ 5.69467895e-02 2.85552699e-03
33
+ 5.83704338e-02 1.82277111e-03
34
+ 5.97940764e-02 1.09309472e-03
35
+ 6.12177214e-02 6.45209121e-04
36
+ 6.26413603e-02 4.51815994e-04
37
+ 6.40649973e-02 4.05545553e-04
38
+ 6.54886365e-02 4.71986389e-04
39
+ 6.69122696e-02 6.33676016e-04
40
+ 6.83359006e-02 8.24721598e-04
41
+ 6.97595337e-02 1.02122815e-03
42
+ 7.11831605e-02 1.19991309e-03
43
+ 7.26067851e-02 1.37747504e-03
44
+ 7.40304075e-02 1.45628994e-03
45
+ 7.54540277e-02 1.56260066e-03
46
+ 7.68776540e-02 1.56385635e-03
47
+ 7.83012696e-02 1.55499805e-03
48
+ 7.97248827e-02 1.48071534e-03
49
+ 8.11484934e-02 1.37202330e-03
50
+ 8.25721016e-02 1.25561119e-03
51
+ 8.39957073e-02 1.12940707e-03
52
+ 8.54193190e-02 9.70388349e-04
53
+ 8.68429195e-02 8.14503931e-04
54
+ 8.82665174e-02 6.66042995e-04
55
+ 8.96901126e-02 5.22589578e-04
56
+ 9.11137051e-02 3.97105516e-04
57
+ 9.24661205e-02 2.92556151e-04
58
+ 9.40320644e-02 2.05435132e-04
59
+ 9.53844743e-02 1.37877745e-04
60
+ 9.68080554e-02 8.99905383e-05
61
+ 9.82316336e-02 6.01704429e-05
62
+ 9.96552087e-02 4.57869602e-05
63
+ 1.01078781e-01 4.57521348e-05
64
+ 1.02502358e-01 5.87806384e-05
65
+ 1.03925924e-01 7.33169291e-05
66
+ 1.05349487e-01 9.99188747e-05
67
+ 1.06773047e-01 1.24738986e-04
68
+ 1.08196603e-01 1.53505862e-04
69
+ 1.09620156e-01 1.75739919e-04
70
+ 1.11043706e-01 1.95222433e-04
71
+ 1.12467261e-01 2.04343119e-04
72
+ 1.13890803e-01 2.12539731e-04
73
+ 1.15314343e-01 2.14384693e-04
74
+ 1.16737879e-01 2.07431638e-04
75
+ 1.18161411e-01 2.05379924e-04
76
+ 1.19584940e-01 1.91959662e-04
77
+ 1.21008473e-01 1.68736759e-04
78
+ 1.22431995e-01 1.48284283e-04
79
+ 1.23855512e-01 1.36160797e-04
80
+ 1.25279026e-01 1.13203424e-04
81
+ 1.26702536e-01 9.44118517e-05
82
+ 1.28126043e-01 7.29784509e-05
83
+ 1.29549554e-01 5.48038635e-05
84
+ 1.30973052e-01 4.14296076e-05
85
+ 1.32396546e-01 2.71453572e-05
86
+ 1.33820037e-01 1.79044017e-05
87
+ 1.35243523e-01 1.12678662e-05
88
+ 1.36667005e-01 6.18756266e-06
89
+ 1.38090492e-01 6.12377904e-06
90
+ 1.39513965e-01 5.68246646e-06
91
+ 1.40937435e-01 8.06260534e-06
92
+ 1.42432068e-01 9.64781290e-06
@@ -0,0 +1,142 @@
1
+ # q R(q)
2
+ 1.42368058e-02 9.82044589e-01
3
+ 1.56604844e-02 9.83464915e-01
4
+ 1.70841625e-02 9.96593967e-01
5
+ 1.85078401e-02 9.91586687e-01
6
+ 1.99315182e-02 1.00000000e+00
7
+ 2.13551957e-02 9.92022512e-01
8
+ 2.27788704e-02 9.98568937e-01
9
+ 2.42025465e-02 9.87853497e-01
10
+ 2.56262219e-02 9.89907742e-01
11
+ 2.70498944e-02 9.70983733e-01
12
+ 2.84735682e-02 9.46983437e-01
13
+ 2.98972390e-02 8.80801224e-01
14
+ 3.13209110e-02 7.19476528e-01
15
+ 3.27445821e-02 3.67459239e-01
16
+ 3.41682500e-02 1.15510963e-01
17
+ 3.55919191e-02 8.06758266e-02
18
+ 3.70155849e-02 7.01391188e-02
19
+ 3.84392538e-02 6.14631441e-02
20
+ 3.98629173e-02 5.12756187e-02
21
+ 4.12865797e-02 4.27515249e-02
22
+ 4.27102449e-02 3.34815932e-02
23
+ 4.41339047e-02 2.54358846e-02
24
+ 4.55575631e-02 1.83058769e-02
25
+ 4.69812244e-02 1.27533556e-02
26
+ 4.84048799e-02 8.09708921e-03
27
+ 4.98285341e-02 5.06697636e-03
28
+ 5.11810049e-02 2.72937432e-03
29
+ 5.26758419e-02 1.41903158e-03
30
+ 5.40994914e-02 6.12297600e-04
31
+ 5.55231391e-02 3.28475560e-04
32
+ 5.69467895e-02 3.61580064e-04
33
+ 5.83704338e-02 5.49662522e-04
34
+ 5.97940764e-02 7.89839220e-04
35
+ 6.12177214e-02 1.06217044e-03
36
+ 6.26413603e-02 1.31711525e-03
37
+ 6.40649973e-02 1.45729095e-03
38
+ 6.54886365e-02 1.51852702e-03
39
+ 6.69122696e-02 1.56528192e-03
40
+ 6.83359006e-02 1.46318592e-03
41
+ 6.97595337e-02 1.40552582e-03
42
+ 7.11119801e-02 1.17709374e-03
43
+ 7.26067851e-02 1.06406540e-03
44
+ 7.40304075e-02 8.80648522e-04
45
+ 7.54540277e-02 7.17192736e-04
46
+ 7.68776540e-02 5.30855152e-04
47
+ 7.83012696e-02 4.35611063e-04
48
+ 7.97248827e-02 3.24093883e-04
49
+ 8.11484934e-02 2.50403810e-04
50
+ 8.25721016e-02 1.85126238e-04
51
+ 8.39957073e-02 1.61616756e-04
52
+ 8.54193190e-02 1.45902206e-04
53
+ 8.68429195e-02 1.33658480e-04
54
+ 8.82665174e-02 1.38611041e-04
55
+ 8.96901126e-02 1.43406388e-04
56
+ 9.11137051e-02 1.68397288e-04
57
+ 9.25372948e-02 1.61492000e-04
58
+ 9.39608902e-02 1.76953011e-04
59
+ 9.53844743e-02 1.60857424e-04
60
+ 9.68080554e-02 1.75578481e-04
61
+ 9.82316336e-02 1.75937243e-04
62
+ 9.96552087e-02 1.63121564e-04
63
+ 1.01078781e-01 1.62799229e-04
64
+ 1.02502358e-01 1.58590629e-04
65
+ 1.03925924e-01 1.23488110e-04
66
+ 1.05349487e-01 1.19383055e-04
67
+ 1.06773047e-01 1.02566636e-04
68
+ 1.08196603e-01 9.46274959e-05
69
+ 1.09620156e-01 8.68945574e-05
70
+ 1.11043706e-01 7.31960151e-05
71
+ 1.12467261e-01 6.31407527e-05
72
+ 1.13890803e-01 5.88458351e-05
73
+ 1.15314343e-01 5.66354921e-05
74
+ 1.16737879e-01 6.22966808e-05
75
+ 1.18161411e-01 4.75474338e-05
76
+ 1.19584940e-01 5.43744507e-05
77
+ 1.21008473e-01 5.23207207e-05
78
+ 1.22431995e-01 4.75194895e-05
79
+ 1.23855512e-01 4.21378404e-05
80
+ 1.25279026e-01 4.34801989e-05
81
+ 1.26773715e-01 4.97443190e-05
82
+ 1.28126043e-01 4.65206097e-05
83
+ 1.29549554e-01 4.24871806e-05
84
+ 1.30973052e-01 3.74526907e-05
85
+ 1.32396546e-01 3.54344561e-05
86
+ 1.33820037e-01 3.11148876e-05
87
+ 1.35243523e-01 3.28961178e-05
88
+ 1.36667005e-01 2.42064352e-05
89
+ 1.38090492e-01 2.68482573e-05
90
+ 1.39513965e-01 2.75823412e-05
91
+ 1.40937435e-01 2.54965082e-05
92
+ 1.42360900e-01 2.66438782e-05
93
+ 1.43784361e-01 1.94379718e-05
94
+ 1.45207818e-01 2.19970554e-05
95
+ 1.46631270e-01 2.00330537e-05
96
+ 1.48125901e-01 2.11888292e-05
97
+ 1.49478160e-01 2.49936726e-05
98
+ 1.50901599e-01 1.32294175e-05
99
+ 1.52325050e-01 1.49780468e-05
100
+ 1.53748479e-01 1.52103619e-05
101
+ 1.55171904e-01 1.64492640e-05
102
+ 1.56595324e-01 1.20199226e-05
103
+ 1.58018739e-01 1.47993208e-05
104
+ 1.59442149e-01 1.50182341e-05
105
+ 1.60865555e-01 1.34737057e-05
106
+ 1.62288956e-01 1.17739547e-05
107
+ 1.63712351e-01 1.25426001e-05
108
+ 1.65135742e-01 1.13982815e-05
109
+ 1.66559127e-01 9.07494407e-06
110
+ 1.67982508e-01 9.84692108e-06
111
+ 1.69405900e-01 1.17843608e-05
112
+ 1.70829271e-01 8.43073844e-06
113
+ 1.72252636e-01 9.27168515e-06
114
+ 1.73675996e-01 7.55361002e-06
115
+ 1.75099350e-01 1.02610674e-05
116
+ 1.76522699e-01 1.03398905e-05
117
+ 1.77946043e-01 8.49423083e-06
118
+ 1.79369382e-01 7.31384994e-06
119
+ 1.80792715e-01 7.88724994e-06
120
+ 1.82216042e-01 7.19958971e-06
121
+ 1.83639364e-01 5.59079085e-06
122
+ 1.85062680e-01 8.16758282e-06
123
+ 1.86485991e-01 6.11950164e-06
124
+ 1.87909313e-01 5.76729036e-06
125
+ 1.89332612e-01 4.51889607e-06
126
+ 1.90684729e-01 4.93369698e-06
127
+ 1.92179193e-01 7.56833479e-06
128
+ 1.93602475e-01 4.56654050e-06
129
+ 1.95025751e-01 5.55684346e-06
130
+ 1.96449021e-01 4.93589114e-06
131
+ 1.97872285e-01 5.62103336e-06
132
+ 1.99295543e-01 4.86539221e-06
133
+ 2.00718795e-01 4.26255248e-06
134
+ 2.02142041e-01 4.51470999e-06
135
+ 2.03565280e-01 3.64255540e-06
136
+ 2.04988531e-01 4.03464158e-06
137
+ 2.06411758e-01 4.42284629e-06
138
+ 2.07834979e-01 3.84216415e-06
139
+ 2.09258193e-01 3.27088515e-06
140
+ 2.10681401e-01 3.31647258e-06
141
+ 2.12104603e-01 4.03373799e-06
142
+ 2.13456644e-01 3.13870114e-06
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "reflectorch"
7
- version = "1.1.0"
7
+ version = "1.2.0"
8
8
  authors = [
9
9
  {name = "Vladimir Starostin", email="vladimir.starostin@uni-tuebingen.de"},
10
10
  {name = "Valentin Munteanu", email="valentin.munteanu@uni-tuebingen.de"}
@@ -38,6 +38,7 @@ dependencies = [
38
38
  "matplotlib",
39
39
  "ipywidgets",
40
40
  "huggingface_hub",
41
+ "safetensors",
41
42
  ]
42
43
 
43
44
  [project.optional-dependencies]
@@ -1,9 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- #
4
- # This source code is licensed under the GPL license found in the
5
- # LICENSE file in the root directory of this source tree.
6
-
7
1
  from reflectorch.data_generation import *
8
2
  from reflectorch.ml import *
9
3
  from reflectorch.models import *
@@ -1,9 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- #
4
- # This source code is licensed under the GPL license found in the
5
- # LICENSE file in the root directory of this source tree.
6
-
7
1
  from reflectorch.data_generation.dataset import BasicDataset, BATCH_DATA_TYPE
8
2
  from reflectorch.data_generation.priors import (
9
3
  Params,
@@ -1,9 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- #
4
- # This source code is licensed under the GPL license found in the
5
- # LICENSE file in the root directory of this source tree.
6
-
7
1
  from typing import Dict, Union
8
2
  import warnings
9
3
 
@@ -1,9 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- #
4
- # This source code is licensed under the GPL license found in the
5
- # LICENSE file in the root directory of this source tree.
6
-
7
1
  from typing import Union, Tuple
8
2
 
9
3
  import torch
@@ -1,9 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- #
4
- # This source code is licensed under the GPL license found in the
5
- # LICENSE file in the root directory of this source tree.
6
-
7
1
  from typing import Union, Tuple
8
2
  from math import log10
9
3
 
@@ -1,9 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- #
4
- # This source code is licensed under the GPL license found in the
5
- # LICENSE file in the root directory of this source tree.
6
-
7
1
  from reflectorch.data_generation.priors.params import Params
8
2
  from reflectorch.data_generation.priors.base import PriorSampler
9
3
  from reflectorch.data_generation.priors.no_constraints import BasicPriorSampler
@@ -1,9 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- #
4
- # This source code is licensed under the GPL license found in the
5
- # LICENSE file in the root directory of this source tree.
6
-
7
1
  from torch import Tensor
8
2
 
9
3
  from reflectorch.data_generation.priors.params import Params
@@ -1,9 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- #
4
- # This source code is licensed under the GPL license found in the
5
- # LICENSE file in the root directory of this source tree.
6
-
7
1
  from typing import Tuple, Union, List
8
2
 
9
3
  import torch
@@ -1,9 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- #
4
- # This source code is licensed under the GPL license found in the
5
- # LICENSE file in the root directory of this source tree.
6
-
7
1
  from typing import Union, Tuple
8
2
  from math import log
9
3
 
@@ -1,9 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- #
4
- # This source code is licensed under the GPL license found in the
5
- # LICENSE file in the root directory of this source tree.
6
-
7
1
  from typing import Tuple, Dict
8
2
 
9
3
  import numpy as np
@@ -1,9 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- #
4
- # This source code is licensed under the GPL license found in the
5
- # LICENSE file in the root directory of this source tree.
6
-
7
1
  import logging
8
2
  from functools import lru_cache
9
3
  from typing import Tuple
@@ -1,9 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- #
4
- # This source code is licensed under the GPL license found in the
5
- # LICENSE file in the root directory of this source tree.
6
-
7
1
  from typing import Tuple, Dict, Type, List
8
2
 
9
3
  import torch
@@ -1,9 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- #
4
- # This source code is licensed under the GPL license found in the
5
- # LICENSE file in the root directory of this source tree.
6
-
7
1
  from typing import List, Tuple
8
2
 
9
3
  import torch
@@ -1,9 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- #
4
- # This source code is licensed under the GPL license found in the
5
- # LICENSE file in the root directory of this source tree.
6
-
7
1
  from functools import lru_cache
8
2
  from typing import Tuple
9
3
 
@@ -1,9 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- #
4
- # This source code is licensed under the GPL license found in the
5
- # LICENSE file in the root directory of this source tree.
6
-
7
1
  from typing import Tuple
8
2
 
9
3
  import torch
@@ -1,9 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- #
4
- # This source code is licensed under the GPL license found in the
5
- # LICENSE file in the root directory of this source tree.
6
-
7
1
  from typing import Any
8
2
 
9
3
  __all__ = [
@@ -1,9 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- #
4
- # This source code is licensed under the GPL license found in the
5
- # LICENSE file in the root directory of this source tree.
6
-
7
1
  from typing import Tuple, Union
8
2
 
9
3
  import numpy as np
@@ -24,21 +24,25 @@ def reflectivity(
24
24
  log: bool = False,
25
25
  abeles_func=None,
26
26
  ):
27
- """Function which computes the reflectivity from thin film parameters using the Abeles matrix formalism
27
+ """Function which computes the reflectivity curves from thin film parameters.
28
+ By default it uses the fast implementation of the Abeles matrix formalism.
28
29
 
29
30
  Args:
30
- q (Tensor): the momentum transfer (q) values
31
- thickness (Tensor): the layer thicknesses
32
- roughness (Tensor): the interlayer roughnesses
33
- sld (Tensor): the SLDs of the layers
34
- dq (Tensor, optional): the resolution for curve smearing. Defaults to None.
31
+ q (Tensor): tensor of momentum transfer (q) values with shape [batch_size, n_points] or [n_points]
32
+ thickness (Tensor): tensor containing the layer thicknesses (ordered from top to bottom) with shape [batch_size, n_layers]
33
+ roughness (Tensor): tensor containing the interlayer roughnesses (ordered from top to bottom) with shape [batch_size, n_layers + 1]
34
+ sld (Tensor): tensors containing the layer SLDs (real or complex; ordered from top to bottom) with shape [batch_size, n_layers + 1].
35
+ It includes the substrate but excludes the ambient medium which is assumed to have an SLD of 0.
36
+ dq (Tensor, optional): tensor of resolutions used for curve smearing with shape [batch_size, 1].
37
+ Either dq if ``constant_dq`` is ``True`` or dq/q if ``constant_dq`` is ``False``. Defaults to None.
35
38
  gauss_num (int, optional): the number of gaussians for curve smearing. Defaults to 51.
36
- constant_dq (bool, optional): whether the smearing is constant. Defaults to True.
39
+ constant_dq (bool, optional): if ``True`` the smearing is constant (constant dq at each point in the curve)
40
+ otherwise the smearing is linear (constant dq/q at each point in the curve). Defaults to True.
37
41
  log (bool, optional): if True the base 10 logarithm of the reflectivity curves is returned. Defaults to False.
38
- abeles_func (Callable, optional): a function implementing the simulation of the reflectivity curves, if different than the default implementation. Defaults to None.
42
+ abeles_func (Callable, optional): a function implementing the simulation of the reflectivity curves, if different than the default Abeles matrix implementation. Defaults to None.
39
43
 
40
44
  Returns:
41
- Tensor: the computed reflectivity curves
45
+ Tensor: tensor containing the simulated reflectivity curves with shape [batch_size, n_points]
42
46
  """
43
47
  abeles_func = abeles_func or abeles
44
48
  q = torch.atleast_2d(q)
@@ -14,13 +14,14 @@ def abeles(
14
14
  """Simulates reflectivity curves for SLD profiles with box model parameterization using the Abeles matrix method
15
15
 
16
16
  Args:
17
- q (Tensor): q values
18
- thickness (Tensor): layer thicknesses
19
- roughness (Tensor): interlayer roughnesses
20
- sld (Tensor): layer SLDs
17
+ q (Tensor): tensor of momentum transfer (q) values with shape [batch_size, n_points] or [n_points]
18
+ thickness (Tensor): tensor containing the layer thicknesses (ordered from top to bottom) with shape [batch_size, n_layers]
19
+ roughness (Tensor): tensor containing the interlayer roughnesses (ordered from top to bottom) with shape [batch_size, n_layers + 1]
20
+ sld (Tensor): tensors containing the layer SLDs (real or complex; ordered from top to bottom) with shape [batch_size, n_layers + 1].
21
+ It includes the substrate but excludes the ambient medium which is assumed to have an SLD of 0.
21
22
 
22
23
  Returns:
23
- Tensor: simulated reflectivity curves
24
+ Tensor: tensor containing the simulated reflectivity curves with shape [batch_size, n_points]
24
25
  """
25
26
  c_dtype = torch.complex128 if q.dtype is torch.float64 else torch.complex64
26
27
 
@@ -13,6 +13,20 @@ def kinematical_approximation(
13
13
  apply_fresnel: bool = True,
14
14
  log: bool = False,
15
15
  ):
16
+ """Simulates reflectivity curves for SLD profiles with box model parameterization using the kinematical approximation
17
+
18
+ Args:
19
+ q (Tensor): tensor of momentum transfer (q) values with shape [batch_size, n_points] or [n_points]
20
+ thickness (Tensor): tensor containing the layer thicknesses (ordered from top to bottom) with shape [batch_size, n_layers]
21
+ roughness (Tensor): tensor containing the interlayer roughnesses (ordered from top to bottom) with shape [batch_size, n_layers + 1]
22
+ sld (Tensor): tensors containing the layer SLDs (real or complex; ordered from top to bottom) with shape [batch_size, n_layers + 1].
23
+ It includes the substrate but excludes the ambient medium which is assumed to have an SLD of 0.
24
+ apply_fresnel (bool, optional): whether to use the Fresnel coefficient in the computation. Defaults to ``True``.
25
+ log (bool, optional): if True the base 10 logarithm of the reflectivity curves is returned. Defaults to ``False``.
26
+
27
+ Returns:
28
+ Tensor: tensor containing the simulated reflectivity curves with shape [batch_size, n_points]
29
+ """
16
30
  c_dtype = torch.complex128 if q.dtype is torch.float64 else torch.complex64
17
31
 
18
32
  batch_size, num_layers = thickness.shape
@@ -12,6 +12,19 @@ def abeles_memory_eff(
12
12
  roughness: Tensor,
13
13
  sld: Tensor,
14
14
  ):
15
+ """Simulates reflectivity curves for SLD profiles with box model parameterization using a memory-efficient implementation the Abeles matrix method.
16
+ It is computationally slower compared to the implementation in the 'abeles' function.
17
+
18
+ Args:
19
+ q (Tensor): tensor of momentum transfer (q) values with shape [batch_size, n_points] or [n_points]
20
+ thickness (Tensor): tensor containing the layer thicknesses (ordered from top to bottom) with shape [batch_size, n_layers]
21
+ roughness (Tensor): tensor containing the interlayer roughnesses (ordered from top to bottom) with shape [batch_size, n_layers + 1]
22
+ sld (Tensor): tensors containing the layer SLDs (real or complex; ordered from top to bottom) with shape [batch_size, n_layers + 1].
23
+ It includes the substrate but excludes the ambient medium which is assumed to have an SLD of 0.
24
+
25
+ Returns:
26
+ Tensor: tensor containing the simulated reflectivity curves with shape [batch_size, n_points]
27
+ """
15
28
  c_dtype = torch.complex128 if q.dtype is torch.float64 else torch.complex64
16
29
 
17
30
  batch_size, num_layers = thickness.shape
@@ -68,8 +68,8 @@ def _get_q_axes_for_linear_dq(q: Tensor, resolutions: Tensor, gaussnum: int = 51
68
68
  lowq = torch.clamp_min_(q.min(1).values, 1e-6)
69
69
  highq = q.max(1).values
70
70
 
71
- start = torch.log10(lowq) - 6 * resolutions / _FWHM
72
- end = torch.log10(highq * (1 + 6 * resolutions / _FWHM))
71
+ start = torch.log10(lowq)[:, None] - 6 * resolutions / _FWHM
72
+ end = torch.log10(highq[:, None] * (1 + 6 * resolutions / _FWHM))
73
73
 
74
74
  interpnums = torch.abs(
75
75
  (torch.abs(end - start)) / (1.7 * resolutions / _FWHM / gaussgpoint)
@@ -1,9 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- #
4
- # This source code is licensed under the GPL license found in the
5
- # LICENSE file in the root directory of this source tree.
6
-
7
1
  from pathlib import Path
8
2
 
9
3
  import torch
@@ -9,8 +9,9 @@ class Smearing(object):
9
9
  The intensity at a q point will be the average of the intensities of neighbouring q points, weighted by a gaussian profile.
10
10
 
11
11
  Args:
12
- sigma_range (tuple, optional): the range for sampling the standard deviation of the gaussians. Defaults to (1e-4, 5e-3).
13
- constant_dq (bool, optional): whether the smearing is constant for each q point. Defaults to True.
12
+ sigma_range (tuple, optional): the range for sampling the resolutions. Defaults to (1e-4, 5e-3).
13
+ constant_dq (bool, optional): if ``True`` the smearing is constant (the resolution is given by the constant dq at each point in the curve)
14
+ otherwise the smearing is linear (the resolution is given by the constant dq/q at each point in the curve). Defaults to True.
14
15
  gauss_num (int, optional): the number of interpolating gaussian profiles. Defaults to 31.
15
16
  share_smeared (float, optional): the share of curves in the batch for which the resolution smearing is applied. Defaults to 0.2.
16
17
  """
@@ -1,9 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- #
4
- # This source code is licensed under the GPL license found in the
5
- # LICENSE file in the root directory of this source tree.
6
-
7
1
  from typing import List, Union
8
2
  from math import sqrt, pi, log10
9
3
 
@@ -0,0 +1,6 @@
1
+ from .callbacks import JPlotLoss
2
+
3
+
4
+ __all__ = [
5
+ 'JPlotLoss',
6
+ ]
@@ -1,9 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- #
4
- # This source code is licensed under the GPL license found in the
5
- # LICENSE file in the root directory of this source tree.
6
-
7
1
  from IPython.display import clear_output
8
2
 
9
3
  from ...ml import TrainerCallback, Trainer
@@ -0,0 +1,5 @@
1
+ from reflectorch.extensions.matplotlib.losses import plot_losses
2
+
3
+ __all__ = [
4
+ "plot_losses",
5
+ ]
@@ -1,9 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- #
4
- # This source code is licensed under the GPL license found in the
5
- # LICENSE file in the root directory of this source tree.
6
-
7
1
  import matplotlib.pyplot as plt
8
2
 
9
3