nxs-analysis-tools 0.0.36__py3-none-any.whl → 0.0.38__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 nxs-analysis-tools might be problematic. Click here for more details.

_meta/__init__.py CHANGED
@@ -6,5 +6,5 @@ __author__ = 'Steven J. Gomez Alvarado'
6
6
  __email__ = 'stevenjgomez@ucsb.edu'
7
7
  __copyright__ = f"2023, {__author__}"
8
8
  __license__ = 'MIT'
9
- __version__= '0.0.36'
9
+ __version__ = '0.0.38'
10
10
  __repo_url__ = 'https://github.com/stevenjgomez/nxs_analysis_tools'
@@ -16,6 +16,11 @@ import pyfftw
16
16
  from .datareduction import plot_slice, reciprocal_lattice_params, Padder, \
17
17
  array_to_nxdata
18
18
 
19
+ __all__ = ['Symmetrizer2D', 'Symmetrizer3D', 'Puncher', 'Interpolator',
20
+ 'fourier_transform_nxdata', 'Gaussian3DKernel', 'DeltaPDF',
21
+ 'generate_gaussian'
22
+ ]
23
+
19
24
 
20
25
  class Symmetrizer2D:
21
26
  """
@@ -870,9 +875,6 @@ class Gaussian3DKernel(Kernel):
870
875
  The default is [1, 0, 1, 0, 1, 0], corresponding to the Gaussian form:
871
876
  (1 * X^2 + 0 * X * Y + 1 * Y^2 + 0 * Y * Z + 1 * Z^2 + 0 * Z * X).
872
877
 
873
- **kwargs : keyword arguments
874
- Additional keyword arguments passed to the parent class constructor.
875
-
876
878
  Raises
877
879
  ------
878
880
  ValueError
@@ -892,7 +894,7 @@ class Gaussian3DKernel(Kernel):
892
894
  x_dim, y_dim, z_dim = size
893
895
  x = np.linspace(-x_dim, x_dim, int(x_dim) + 1)
894
896
  y = np.linspace(-y_dim, y_dim, int(y_dim) + 1)
895
- z = np.linspacein(-z_dim, z_dim, int(z_dim) + 1)
897
+ z = np.linspace(-z_dim, z_dim, int(z_dim) + 1)
896
898
  X, Y, Z = np.meshgrid(x, y, z)
897
899
  array = np.exp(-(coeffs[0] * X ** 2 +
898
900
  coeffs[1] * X * Y +
@@ -907,7 +909,7 @@ class Gaussian3DKernel(Kernel):
907
909
  self._truncation = np.abs(1. - self._array.sum())
908
910
 
909
911
 
910
- class Interpolator():
912
+ class Interpolator:
911
913
  """
912
914
  A class to perform data interpolation using convolution with a specified
913
915
  kernel.
@@ -996,7 +998,6 @@ class Interpolator():
996
998
  if self.interp_time:
997
999
  print(f"Last interpolation took {self.interp_time / 60:.2f} minutes.")
998
1000
 
999
-
1000
1001
  print("Running interpolation...")
1001
1002
  result = np.real(
1002
1003
  convolve_fft(self.data[self.data.signal].nxdata,
@@ -1027,11 +1028,11 @@ class Interpolator():
1027
1028
  """
1028
1029
  data = self.data
1029
1030
  tukey_H = np.tile(
1030
- scipy.signal.tukey(len(data[data.axes[0]]), alpha=tukey_alphas[0])[:, None, None],
1031
+ scipy.signal.windows.tukey(len(data[data.axes[0]]), alpha=tukey_alphas[0])[:, None, None],
1031
1032
  (1, len(data[data.axes[1]]), len(data[data.axes[2]]))
1032
1033
  )
1033
1034
  tukey_K = np.tile(
1034
- scipy.signal.tukey(len(data[data.axes[1]]), alpha=tukey_alphas[1])[None, :, None],
1035
+ scipy.signal.windows.tukey(len(data[data.axes[1]]), alpha=tukey_alphas[1])[None, :, None],
1035
1036
  (len(data[data.axes[0]]), 1, len(data[data.axes[2]]))
1036
1037
  )
1037
1038
  window = tukey_H * tukey_K
@@ -1040,7 +1041,7 @@ class Interpolator():
1040
1041
  gc.collect()
1041
1042
 
1042
1043
  tukey_L = np.tile(
1043
- scipy.signal.tukey(len(data[data.axes[2]]), alpha=tukey_alphas[2])[None, None, :],
1044
+ scipy.signal.windows.tukey(len(data[data.axes[2]]), alpha=tukey_alphas[2])[None, None, :],
1044
1045
  (len(data[data.axes[0]]), len(data[data.axes[1]]), 1))
1045
1046
  window = window * tukey_L
1046
1047
 
@@ -1069,11 +1070,11 @@ class Interpolator():
1069
1070
  L_ = data[data.axes[2]]
1070
1071
 
1071
1072
  tukey_H = np.tile(
1072
- scipy.signal.tukey(len(data[data.axes[0]]), alpha=tukey_alphas[0])[:, None, None],
1073
+ scipy.signal.windows.tukey(len(data[data.axes[0]]), alpha=tukey_alphas[0])[:, None, None],
1073
1074
  (1, len(data[data.axes[1]]), len(data[data.axes[2]]))
1074
1075
  )
1075
1076
  tukey_K = np.tile(
1076
- scipy.signal.tukey(len(data[data.axes[1]]), alpha=tukey_alphas[1])[None, :, None],
1077
+ scipy.signal.windows.tukey(len(data[data.axes[1]]), alpha=tukey_alphas[1])[None, :, None],
1077
1078
  (len(data[data.axes[0]]), 1, len(data[data.axes[2]]))
1078
1079
  )
1079
1080
  window = tukey_H * tukey_K
@@ -1087,7 +1088,7 @@ class Interpolator():
1087
1088
  np.tile(
1088
1089
  np.concatenate(
1089
1090
  (np.zeros(truncation)[:, None, None],
1090
- scipy.signal.tukey(len(H_) - 2 * truncation,
1091
+ scipy.signal.windows.tukey(len(H_) - 2 * truncation,
1091
1092
  alpha=tukey_alphas[2])[:, None, None],
1092
1093
  np.zeros(truncation)[:, None, None])),
1093
1094
  (1, len(K_), len(L_))
@@ -1101,7 +1102,7 @@ class Interpolator():
1101
1102
  gc.collect()
1102
1103
 
1103
1104
  tukey_L = np.tile(
1104
- scipy.signal.tukey(len(data[data.axes[2]]), alpha=tukey_alphas[3])[None, None, :],
1105
+ scipy.signal.windows.tukey(len(data[data.axes[2]]), alpha=tukey_alphas[3])[None, None, :],
1105
1106
  (len(data[data.axes[0]]), len(data[data.axes[1]]), 1)
1106
1107
  )
1107
1108
  window = window * tukey_L
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nxs-analysis-tools
3
- Version: 0.0.36
3
+ Version: 0.0.38
4
4
  Summary: Reduce and transform nexus format (.nxs) scattering data.
5
5
  Author-email: "Steven J. Gomez Alvarado" <stevenjgomez@ucsb.edu>
6
6
  License: MIT License
@@ -48,6 +48,9 @@ Requires-Dist: ipython>=1.0.0
48
48
  Requires-Dist: pandas>=2.0.2
49
49
  Requires-Dist: nexusformat>=1.0.1
50
50
  Requires-Dist: lmfit>=1.2.1
51
+ Requires-Dist: astropy>=5.3.4
52
+ Requires-Dist: pyfftw>=0.13.1
53
+ Requires-Dist: scipy>=1.14.1
51
54
  Provides-Extra: dev
52
55
  Requires-Dist: build>=0.8.0; extra == "dev"
53
56
  Requires-Dist: furo>=2022.6.21; extra == "dev"
@@ -0,0 +1,11 @@
1
+ _meta/__init__.py,sha256=Fq9YEQTMUYLfpwp34vFDtGaCAlkmx85tKN1ydDrKlhM,352
2
+ nxs_analysis_tools/__init__.py,sha256=bxbTLpIcKasH3fuRZOvJ9zeu7IBBju82mOTgUV4ZqHE,530
3
+ nxs_analysis_tools/chess.py,sha256=GUW08BcDUGD88MPZCl4yJTQp4hwd9tVNTJN_afNSUUo,24339
4
+ nxs_analysis_tools/datareduction.py,sha256=e__mBGZIpJ-_-Dr6-T9hJURJazFnBy3PoWfwRxOra4U,41848
5
+ nxs_analysis_tools/fitting.py,sha256=vPx75lKvm5pWOGBtRtff8k6J5dA6kRk3EJyzxCH5Tyk,8809
6
+ nxs_analysis_tools/pairdistribution.py,sha256=ymJIzXdvg6aZXHF-T63szBeh3XmBbbAvK5eS6s0aqnM,57593
7
+ nxs_analysis_tools-0.0.38.dist-info/LICENSE,sha256=tdnoYVH1-ogW_5-gGs9bK-IkCamH1ATJqrdL37kWTHk,1102
8
+ nxs_analysis_tools-0.0.38.dist-info/METADATA,sha256=10kCoETrsas_HIGd06j8yH1jG4IZ1tns8eOo2Eq_szc,3895
9
+ nxs_analysis_tools-0.0.38.dist-info/WHEEL,sha256=UvcQYKBHoFqaQd6LKyqHw9fxEolWLQnlzP0h_LgJAfI,91
10
+ nxs_analysis_tools-0.0.38.dist-info/top_level.txt,sha256=8U000GNPzo6T6pOMjRdgOSO5heMzLMGjkxa1CDtyMHM,25
11
+ nxs_analysis_tools-0.0.38.dist-info/RECORD,,
@@ -1,11 +0,0 @@
1
- _meta/__init__.py,sha256=MgUQ6hf6wCCPWsne48uNL0cMwcd9-4h5VAzva2i5Y5g,351
2
- nxs_analysis_tools/__init__.py,sha256=bxbTLpIcKasH3fuRZOvJ9zeu7IBBju82mOTgUV4ZqHE,530
3
- nxs_analysis_tools/chess.py,sha256=GUW08BcDUGD88MPZCl4yJTQp4hwd9tVNTJN_afNSUUo,24339
4
- nxs_analysis_tools/datareduction.py,sha256=e__mBGZIpJ-_-Dr6-T9hJURJazFnBy3PoWfwRxOra4U,41848
5
- nxs_analysis_tools/fitting.py,sha256=vPx75lKvm5pWOGBtRtff8k6J5dA6kRk3EJyzxCH5Tyk,8809
6
- nxs_analysis_tools/pairdistribution.py,sha256=SD0X5TXaSkodczi-zS8sp80B8VzFoksxo3GDhqDoR_M,57464
7
- nxs_analysis_tools-0.0.36.dist-info/LICENSE,sha256=tdnoYVH1-ogW_5-gGs9bK-IkCamH1ATJqrdL37kWTHk,1102
8
- nxs_analysis_tools-0.0.36.dist-info/METADATA,sha256=IVmTja2nIobn4AqJOR7COpjHZh6iHFpQq46Nm7Gbrpo,3803
9
- nxs_analysis_tools-0.0.36.dist-info/WHEEL,sha256=UvcQYKBHoFqaQd6LKyqHw9fxEolWLQnlzP0h_LgJAfI,91
10
- nxs_analysis_tools-0.0.36.dist-info/top_level.txt,sha256=8U000GNPzo6T6pOMjRdgOSO5heMzLMGjkxa1CDtyMHM,25
11
- nxs_analysis_tools-0.0.36.dist-info/RECORD,,