httomolibgpu 2.7.1__py3-none-any.whl → 3.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.
- httomolibgpu/misc/corr.py +3 -3
- httomolibgpu/misc/rescale.py +26 -42
- httomolibgpu/misc/supp_func.py +1 -1
- httomolibgpu/recon/algorithm.py +38 -11
- {httomolibgpu-2.7.1.dist-info → httomolibgpu-3.0.dist-info}/METADATA +2 -2
- {httomolibgpu-2.7.1.dist-info → httomolibgpu-3.0.dist-info}/RECORD +9 -9
- {httomolibgpu-2.7.1.dist-info → httomolibgpu-3.0.dist-info}/WHEEL +0 -0
- {httomolibgpu-2.7.1.dist-info → httomolibgpu-3.0.dist-info}/licenses/LICENSE +0 -0
- {httomolibgpu-2.7.1.dist-info → httomolibgpu-3.0.dist-info}/top_level.txt +0 -0
httomolibgpu/misc/corr.py
CHANGED
|
@@ -114,7 +114,7 @@ def median_filter(
|
|
|
114
114
|
|
|
115
115
|
|
|
116
116
|
def remove_outlier(
|
|
117
|
-
data: cp.ndarray, kernel_size: int = 3, dif: float =
|
|
117
|
+
data: cp.ndarray, kernel_size: int = 3, dif: float = 1000
|
|
118
118
|
) -> cp.ndarray:
|
|
119
119
|
"""Selectively applies 3D median filter to a 3D CuPy array to remove outliers. Also called a dezinger.
|
|
120
120
|
For more detailed information, see :ref:`method_outlier_removal`.
|
|
@@ -126,8 +126,8 @@ def remove_outlier(
|
|
|
126
126
|
kernel_size : int, optional
|
|
127
127
|
The size of the filter's kernel (a diameter).
|
|
128
128
|
dif : float, optional
|
|
129
|
-
Expected difference value between outlier value and the
|
|
130
|
-
median value of the
|
|
129
|
+
Expected difference value between the outlier value (central voxel) and the
|
|
130
|
+
median value of the neighbourhood. Lower values lead to median filtering.
|
|
131
131
|
|
|
132
132
|
Returns
|
|
133
133
|
-------
|
httomolibgpu/misc/rescale.py
CHANGED
|
@@ -24,32 +24,32 @@ import numpy as np
|
|
|
24
24
|
from httomolibgpu import cupywrapper
|
|
25
25
|
|
|
26
26
|
cp = cupywrapper.cp
|
|
27
|
-
cupy_run = cupywrapper.cupy_run
|
|
28
27
|
|
|
29
28
|
from typing import Literal, Optional, Tuple, Union
|
|
30
29
|
|
|
31
30
|
from httomolibgpu.misc.supp_func import data_checker
|
|
32
31
|
|
|
32
|
+
|
|
33
33
|
__all__ = [
|
|
34
34
|
"rescale_to_int",
|
|
35
35
|
]
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
def rescale_to_int(
|
|
39
|
-
data:
|
|
39
|
+
data: cp.ndarray,
|
|
40
40
|
perc_range_min: float = 0.0,
|
|
41
41
|
perc_range_max: float = 100.0,
|
|
42
42
|
bits: Literal[8, 16, 32] = 8,
|
|
43
43
|
glob_stats: Optional[Tuple[float, float, float, int]] = None,
|
|
44
|
-
) ->
|
|
44
|
+
) -> cp.ndarray:
|
|
45
45
|
"""
|
|
46
46
|
Rescales the data given as float32 type and converts it into the range of an unsigned integer type
|
|
47
47
|
with the given number of bits. For more detailed information and examples, see :ref:`method_rescale_to_int`.
|
|
48
48
|
|
|
49
49
|
Parameters
|
|
50
50
|
----------
|
|
51
|
-
data :
|
|
52
|
-
Input data as a
|
|
51
|
+
data : cp.ndarray
|
|
52
|
+
Input data as a cupy array
|
|
53
53
|
perc_range_min: float, optional
|
|
54
54
|
The lower cutoff point in the input data, in percent of the data range (defaults to 0).
|
|
55
55
|
The lower bound is computed as min + perc_range_min/100*(max-min)
|
|
@@ -69,7 +69,7 @@ def rescale_to_int(
|
|
|
69
69
|
|
|
70
70
|
Returns
|
|
71
71
|
-------
|
|
72
|
-
|
|
72
|
+
cp.ndarray
|
|
73
73
|
The original data, clipped to the range specified with the perc_range_min and
|
|
74
74
|
perc_range_max, and scaled to the full range of the output integer type
|
|
75
75
|
"""
|
|
@@ -82,18 +82,13 @@ def rescale_to_int(
|
|
|
82
82
|
|
|
83
83
|
data = data_checker(data, verbosity=True, method_name="rescale_to_int")
|
|
84
84
|
|
|
85
|
-
if cupy_run:
|
|
86
|
-
xp = cp.get_array_module(data)
|
|
87
|
-
else:
|
|
88
|
-
import numpy as xp
|
|
89
|
-
|
|
90
85
|
# get the min and max integer values of the output type
|
|
91
|
-
output_min =
|
|
92
|
-
output_max =
|
|
86
|
+
output_min = cp.iinfo(output_dtype).min
|
|
87
|
+
output_max = cp.iinfo(output_dtype).max
|
|
93
88
|
|
|
94
89
|
if not isinstance(glob_stats, tuple):
|
|
95
|
-
min_value = float(
|
|
96
|
-
max_value = float(
|
|
90
|
+
min_value = float(cp.min(data))
|
|
91
|
+
max_value = float(cp.max(data))
|
|
97
92
|
else:
|
|
98
93
|
min_value = glob_stats[0]
|
|
99
94
|
max_value = glob_stats[1]
|
|
@@ -102,32 +97,21 @@ def rescale_to_int(
|
|
|
102
97
|
input_min = (perc_range_min * (range_intensity) / 100) + min_value
|
|
103
98
|
input_max = (perc_range_max * (range_intensity) / 100) + min_value
|
|
104
99
|
|
|
100
|
+
factor = cp.float32(1.0)
|
|
105
101
|
if (input_max - input_min) != 0.0:
|
|
106
|
-
factor =
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
rescale_kernel = cp.ElementwiseKernel(
|
|
122
|
-
"T x, raw T input_min, raw T input_max, raw T factor",
|
|
123
|
-
"O out",
|
|
124
|
-
"""
|
|
125
|
-
T x_clean = isnan(x) || isinf(x) ? T(0) : x;
|
|
126
|
-
T x_clipped = x_clean < input_min ? input_min : (x_clean > input_max ? input_max : x_clean);
|
|
127
|
-
T x_rebased = x_clipped - input_min;
|
|
128
|
-
out = O(x_rebased * factor);
|
|
129
|
-
""",
|
|
130
|
-
"rescale_to_int",
|
|
131
|
-
)
|
|
132
|
-
rescale_kernel(data, input_min, input_max, factor, res)
|
|
102
|
+
factor = cp.float32((output_max - output_min) / (input_max - input_min))
|
|
103
|
+
|
|
104
|
+
res = cp.empty(data.shape, dtype=output_dtype)
|
|
105
|
+
rescale_kernel = cp.ElementwiseKernel(
|
|
106
|
+
"T x, raw T input_min, raw T input_max, raw T factor",
|
|
107
|
+
"O out",
|
|
108
|
+
"""
|
|
109
|
+
T x_clean = isnan(x) || isinf(x) ? T(0) : x;
|
|
110
|
+
T x_clipped = x_clean < input_min ? input_min : (x_clean > input_max ? input_max : x_clean);
|
|
111
|
+
T x_rebased = x_clipped - input_min;
|
|
112
|
+
out = O(x_rebased * factor);
|
|
113
|
+
""",
|
|
114
|
+
"rescale_to_int",
|
|
115
|
+
)
|
|
116
|
+
rescale_kernel(data, input_min, input_max, factor, res)
|
|
133
117
|
return res
|
httomolibgpu/misc/supp_func.py
CHANGED
|
@@ -162,7 +162,7 @@ def data_checker(
|
|
|
162
162
|
) -> bool:
|
|
163
163
|
"""
|
|
164
164
|
Function that performs the variety of checks on input data, in some cases also correct the data and prints warnings.
|
|
165
|
-
Currently it checks for: the presence of infs and nans in data.
|
|
165
|
+
Currently it checks for: the presence of infs and nans in data.
|
|
166
166
|
|
|
167
167
|
Parameters
|
|
168
168
|
----------
|
httomolibgpu/recon/algorithm.py
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
# Created By : Tomography Team at DLS <scientificsoftware@diamond.ac.uk>
|
|
19
19
|
# Changes relative to ToMoBAR 2024.01 version
|
|
20
20
|
# ---------------------------------------------------------------------------
|
|
21
|
-
"""Module for tomographic reconstruction"""
|
|
21
|
+
"""Module for tomographic reconstruction. For more detailed information see :ref:`image_reconstruction_module`"""
|
|
22
22
|
|
|
23
23
|
import numpy as np
|
|
24
24
|
from httomolibgpu import cupywrapper
|
|
@@ -59,6 +59,7 @@ def FBP2d_astra(
|
|
|
59
59
|
data: np.ndarray,
|
|
60
60
|
angles: np.ndarray,
|
|
61
61
|
center: Optional[float] = None,
|
|
62
|
+
detector_pad: int = 0,
|
|
62
63
|
filter_type: str = "ram-lak",
|
|
63
64
|
filter_parameter: Optional[float] = None,
|
|
64
65
|
filter_d: Optional[float] = None,
|
|
@@ -70,8 +71,7 @@ def FBP2d_astra(
|
|
|
70
71
|
"""
|
|
71
72
|
Perform Filtered Backprojection (FBP) reconstruction slice-by-slice (2d) using ASTRA toolbox :cite:`van2016fast` and
|
|
72
73
|
ToMoBAR :cite:`kazantsev2020tomographic` wrappers.
|
|
73
|
-
This is a 2D recon using ASTRA's API for the
|
|
74
|
-
https://astra-toolbox.com/docs/algs/FBP_CUDA.html.
|
|
74
|
+
This is a 2D recon using ASTRA's API for the FBP_CUDA method, see more in :ref:`method_FBP2d_astra`.
|
|
75
75
|
|
|
76
76
|
Parameters
|
|
77
77
|
----------
|
|
@@ -81,6 +81,8 @@ def FBP2d_astra(
|
|
|
81
81
|
An array of angles given in radians.
|
|
82
82
|
center : float, optional
|
|
83
83
|
The center of rotation (CoR).
|
|
84
|
+
detector_pad : int
|
|
85
|
+
Detector width padding with edge values to remove circle/arc type artifacts in the reconstruction.
|
|
84
86
|
filter_type: str
|
|
85
87
|
Type of projection filter, see ASTRA's API for all available options for filters.
|
|
86
88
|
filter_parameter: float, optional
|
|
@@ -112,7 +114,7 @@ def FBP2d_astra(
|
|
|
112
114
|
recon_size = data_shape[2]
|
|
113
115
|
|
|
114
116
|
RecTools = _instantiate_direct_recon2d_class(
|
|
115
|
-
data, angles, center, recon_size, gpu_id
|
|
117
|
+
data, angles, center, detector_pad, recon_size, gpu_id
|
|
116
118
|
)
|
|
117
119
|
|
|
118
120
|
detY_size = data_shape[1]
|
|
@@ -140,6 +142,7 @@ def FBP3d_tomobar(
|
|
|
140
142
|
data: cp.ndarray,
|
|
141
143
|
angles: np.ndarray,
|
|
142
144
|
center: Optional[float] = None,
|
|
145
|
+
detector_pad: int = 0,
|
|
143
146
|
filter_freq_cutoff: float = 0.35,
|
|
144
147
|
recon_size: Optional[int] = None,
|
|
145
148
|
recon_mask_radius: Optional[float] = 0.95,
|
|
@@ -149,7 +152,8 @@ def FBP3d_tomobar(
|
|
|
149
152
|
"""
|
|
150
153
|
Perform Filtered Backprojection (FBP) reconstruction using ASTRA toolbox :cite:`van2016fast` and
|
|
151
154
|
ToMoBAR :cite:`kazantsev2020tomographic` wrappers.
|
|
152
|
-
This is a 3D recon from the CuPy array directly and using a custom built SINC filter for filtration in Fourier space
|
|
155
|
+
This is a 3D recon from the CuPy array directly and using a custom built SINC filter for filtration in Fourier space,
|
|
156
|
+
see more in :ref:`method_FBP3d_tomobar`.
|
|
153
157
|
|
|
154
158
|
Parameters
|
|
155
159
|
----------
|
|
@@ -159,8 +163,10 @@ def FBP3d_tomobar(
|
|
|
159
163
|
An array of angles given in radians.
|
|
160
164
|
center : float, optional
|
|
161
165
|
The center of rotation (CoR).
|
|
166
|
+
detector_pad : int
|
|
167
|
+
Detector width padding with edge values to remove circle/arc type artifacts in the reconstruction.
|
|
162
168
|
filter_freq_cutoff : float
|
|
163
|
-
Cutoff frequency parameter for the SINC filter, the lower values produce better contrast but noisy reconstruction.
|
|
169
|
+
Cutoff frequency parameter for the SINC filter, the lower values may produce better contrast but noisy reconstruction. The filter change will also affect the dynamic range of the reconstructed image.
|
|
164
170
|
recon_size : int, optional
|
|
165
171
|
The [recon_size, recon_size] shape of the reconstructed slice in pixels.
|
|
166
172
|
By default (None), the reconstructed size will be the dimension of the horizontal detector.
|
|
@@ -182,7 +188,7 @@ def FBP3d_tomobar(
|
|
|
182
188
|
data = data_checker(data, verbosity=True, method_name="FBP3d_tomobar")
|
|
183
189
|
|
|
184
190
|
RecToolsCP = _instantiate_direct_recon_class(
|
|
185
|
-
data, angles, center, recon_size, gpu_id
|
|
191
|
+
data, angles, center, detector_pad, recon_size, gpu_id
|
|
186
192
|
)
|
|
187
193
|
|
|
188
194
|
reconstruction = RecToolsCP.FBP(
|
|
@@ -200,6 +206,7 @@ def LPRec3d_tomobar(
|
|
|
200
206
|
data: cp.ndarray,
|
|
201
207
|
angles: np.ndarray,
|
|
202
208
|
center: Optional[float] = None,
|
|
209
|
+
detector_pad: int = 0,
|
|
203
210
|
filter_type: str = "shepp",
|
|
204
211
|
filter_freq_cutoff: float = 1.0,
|
|
205
212
|
recon_size: Optional[int] = None,
|
|
@@ -209,7 +216,7 @@ def LPRec3d_tomobar(
|
|
|
209
216
|
"""
|
|
210
217
|
Fourier direct inversion in 3D on unequally spaced (also called as Log-Polar) grids using
|
|
211
218
|
CuPy array as an input. This implementation follows V. Nikitin's CUDA-C implementation and TomoCuPy package.
|
|
212
|
-
:cite:`andersson2016fast`.
|
|
219
|
+
:cite:`andersson2016fast`, see more in :ref:`method_LPRec3d_tomobar`.
|
|
213
220
|
|
|
214
221
|
Parameters
|
|
215
222
|
----------
|
|
@@ -219,10 +226,12 @@ def LPRec3d_tomobar(
|
|
|
219
226
|
An array of angles given in radians.
|
|
220
227
|
center : float, optional
|
|
221
228
|
The center of rotation (CoR).
|
|
229
|
+
detector_pad : int
|
|
230
|
+
Detector width padding with edge values to remove circle/arc type artifacts in the reconstruction.
|
|
222
231
|
filter_type : str
|
|
223
232
|
Filter type, the accepted strings are: none, ramp, shepp, cosine, cosine2, hamming, hann, parzen.
|
|
224
233
|
filter_freq_cutoff : float
|
|
225
|
-
Cutoff frequency parameter for a filter.
|
|
234
|
+
Cutoff frequency parameter for a filter.
|
|
226
235
|
recon_size : int, optional
|
|
227
236
|
The [recon_size, recon_size] shape of the reconstructed slice in pixels.
|
|
228
237
|
By default (None), the reconstructed size will be the dimension of the horizontal detector.
|
|
@@ -242,7 +251,9 @@ def LPRec3d_tomobar(
|
|
|
242
251
|
|
|
243
252
|
data = data_checker(data, verbosity=True, method_name="LPRec3d_tomobar")
|
|
244
253
|
|
|
245
|
-
RecToolsCP = _instantiate_direct_recon_class(
|
|
254
|
+
RecToolsCP = _instantiate_direct_recon_class(
|
|
255
|
+
data, angles, center, detector_pad, recon_size, 0
|
|
256
|
+
)
|
|
246
257
|
|
|
247
258
|
reconstruction = RecToolsCP.FOURIER_INV(
|
|
248
259
|
_take_neg_log(data) if neglog else data,
|
|
@@ -260,6 +271,7 @@ def SIRT3d_tomobar(
|
|
|
260
271
|
data: cp.ndarray,
|
|
261
272
|
angles: np.ndarray,
|
|
262
273
|
center: Optional[float] = None,
|
|
274
|
+
detector_pad: int = 0,
|
|
263
275
|
recon_size: Optional[int] = None,
|
|
264
276
|
iterations: Optional[int] = 300,
|
|
265
277
|
nonnegativity: Optional[bool] = True,
|
|
@@ -280,6 +292,8 @@ def SIRT3d_tomobar(
|
|
|
280
292
|
An array of angles given in radians.
|
|
281
293
|
center : float, optional
|
|
282
294
|
The center of rotation (CoR).
|
|
295
|
+
detector_pad : int
|
|
296
|
+
Detector width padding with edge values to remove circle/arc type artifacts in the reconstruction.
|
|
283
297
|
recon_size : int, optional
|
|
284
298
|
The [recon_size, recon_size] shape of the reconstructed slice in pixels.
|
|
285
299
|
By default (None), the reconstructed size will be the dimension of the horizontal detector.
|
|
@@ -304,6 +318,7 @@ def SIRT3d_tomobar(
|
|
|
304
318
|
data,
|
|
305
319
|
angles,
|
|
306
320
|
center,
|
|
321
|
+
detector_pad,
|
|
307
322
|
recon_size,
|
|
308
323
|
gpu_id,
|
|
309
324
|
datafidelity="LS",
|
|
@@ -327,6 +342,7 @@ def CGLS3d_tomobar(
|
|
|
327
342
|
data: cp.ndarray,
|
|
328
343
|
angles: np.ndarray,
|
|
329
344
|
center: Optional[float] = None,
|
|
345
|
+
detector_pad: int = 0,
|
|
330
346
|
recon_size: Optional[int] = None,
|
|
331
347
|
iterations: Optional[int] = 20,
|
|
332
348
|
nonnegativity: Optional[bool] = True,
|
|
@@ -347,6 +363,8 @@ def CGLS3d_tomobar(
|
|
|
347
363
|
An array of angles given in radians.
|
|
348
364
|
center : float, optional
|
|
349
365
|
The center of rotation (CoR).
|
|
366
|
+
detector_pad : int
|
|
367
|
+
Detector width padding with edge values to remove circle/arc type artifacts in the reconstruction.
|
|
350
368
|
recon_size : int, optional
|
|
351
369
|
The [recon_size, recon_size] shape of the reconstructed slice in pixels.
|
|
352
370
|
By default (None), the reconstructed size will be the dimension of the horizontal detector.
|
|
@@ -368,7 +386,7 @@ def CGLS3d_tomobar(
|
|
|
368
386
|
data = data_checker(data, verbosity=True, method_name="CGLS3d_tomobar")
|
|
369
387
|
|
|
370
388
|
RecToolsCP = _instantiate_iterative_recon_class(
|
|
371
|
-
data, angles, center, recon_size, gpu_id, datafidelity="LS"
|
|
389
|
+
data, angles, center, detector_pad, recon_size, gpu_id, datafidelity="LS"
|
|
372
390
|
)
|
|
373
391
|
|
|
374
392
|
_data_ = {
|
|
@@ -386,6 +404,7 @@ def _instantiate_direct_recon_class(
|
|
|
386
404
|
data: cp.ndarray,
|
|
387
405
|
angles: np.ndarray,
|
|
388
406
|
center: Optional[float] = None,
|
|
407
|
+
detector_pad: int = 0,
|
|
389
408
|
recon_size: Optional[int] = None,
|
|
390
409
|
gpu_id: int = 0,
|
|
391
410
|
) -> Type:
|
|
@@ -395,6 +414,7 @@ def _instantiate_direct_recon_class(
|
|
|
395
414
|
data (cp.ndarray): data array
|
|
396
415
|
angles (np.ndarray): angles
|
|
397
416
|
center (Optional[float], optional): center of recon. Defaults to None.
|
|
417
|
+
detector_pad (int): Detector width padding. Defaults to 0.
|
|
398
418
|
recon_size (Optional[int], optional): recon_size. Defaults to None.
|
|
399
419
|
gpu_id (int, optional): gpu ID. Defaults to 0.
|
|
400
420
|
|
|
@@ -407,6 +427,7 @@ def _instantiate_direct_recon_class(
|
|
|
407
427
|
recon_size = data.shape[2]
|
|
408
428
|
RecToolsCP = RecToolsDIRCuPy(
|
|
409
429
|
DetectorsDimH=data.shape[2], # Horizontal detector dimension
|
|
430
|
+
DetectorsDimH_pad=detector_pad, # padding for horizontal detector
|
|
410
431
|
DetectorsDimV=data.shape[1], # Vertical detector dimension (3D case)
|
|
411
432
|
CenterRotOffset=data.shape[2] / 2
|
|
412
433
|
- center
|
|
@@ -423,6 +444,7 @@ def _instantiate_direct_recon2d_class(
|
|
|
423
444
|
data: np.ndarray,
|
|
424
445
|
angles: np.ndarray,
|
|
425
446
|
center: Optional[float] = None,
|
|
447
|
+
detector_pad: int = 0,
|
|
426
448
|
recon_size: Optional[int] = None,
|
|
427
449
|
gpu_id: int = 0,
|
|
428
450
|
) -> Type:
|
|
@@ -432,6 +454,7 @@ def _instantiate_direct_recon2d_class(
|
|
|
432
454
|
data (cp.ndarray): data array
|
|
433
455
|
angles (np.ndarray): angles
|
|
434
456
|
center (Optional[float], optional): center of recon. Defaults to None.
|
|
457
|
+
detector_pad (int): Detector width padding. Defaults to 0.
|
|
435
458
|
recon_size (Optional[int], optional): recon_size. Defaults to None.
|
|
436
459
|
gpu_id (int, optional): gpu ID. Defaults to 0.
|
|
437
460
|
|
|
@@ -444,6 +467,7 @@ def _instantiate_direct_recon2d_class(
|
|
|
444
467
|
recon_size = data.shape[2]
|
|
445
468
|
RecTools = RecToolsDIR(
|
|
446
469
|
DetectorsDimH=data.shape[2], # Horizontal detector dimension
|
|
470
|
+
DetectorsDimH_pad=detector_pad, # padding for horizontal detector
|
|
447
471
|
DetectorsDimV=None, # 2d case
|
|
448
472
|
CenterRotOffset=data.shape[2] / 2
|
|
449
473
|
- center
|
|
@@ -459,6 +483,7 @@ def _instantiate_iterative_recon_class(
|
|
|
459
483
|
data: cp.ndarray,
|
|
460
484
|
angles: np.ndarray,
|
|
461
485
|
center: Optional[float] = None,
|
|
486
|
+
detector_pad: int = 0,
|
|
462
487
|
recon_size: Optional[int] = None,
|
|
463
488
|
gpu_id: int = 0,
|
|
464
489
|
datafidelity: str = "LS",
|
|
@@ -469,6 +494,7 @@ def _instantiate_iterative_recon_class(
|
|
|
469
494
|
data (cp.ndarray): data array
|
|
470
495
|
angles (np.ndarray): angles
|
|
471
496
|
center (Optional[float], optional): center of recon. Defaults to None.
|
|
497
|
+
detector_pad (int): Detector width padding. Defaults to 0.
|
|
472
498
|
recon_size (Optional[int], optional): recon_size. Defaults to None.
|
|
473
499
|
datafidelity (str, optional): Data fidelity
|
|
474
500
|
gpu_id (int, optional): gpu ID. Defaults to 0.
|
|
@@ -482,6 +508,7 @@ def _instantiate_iterative_recon_class(
|
|
|
482
508
|
recon_size = data.shape[2]
|
|
483
509
|
RecToolsCP = RecToolsIRCuPy(
|
|
484
510
|
DetectorsDimH=data.shape[2], # Horizontal detector dimension
|
|
511
|
+
DetectorsDimH_pad=detector_pad, # padding for horizontal detector
|
|
485
512
|
DetectorsDimV=data.shape[1], # Vertical detector dimension (3D case)
|
|
486
513
|
CenterRotOffset=data.shape[2] / 2
|
|
487
514
|
- center
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: httomolibgpu
|
|
3
|
-
Version:
|
|
3
|
+
Version: 3.0
|
|
4
4
|
Summary: Commonly used tomography data processing methods at DLS.
|
|
5
5
|
Author-email: Daniil Kazantsev <daniil.kazantsev@diamond.ac.uk>, Yousef Moazzam <yousef.moazzam@diamond.ac.uk>, Naman Gera <naman.gera@diamond.ac.uk>
|
|
6
6
|
License: BSD-3-Clause
|
|
@@ -71,7 +71,7 @@ Conda environment
|
|
|
71
71
|
|
|
72
72
|
$ conda create --name httomolibgpu # create a fresh conda environment
|
|
73
73
|
$ conda activate httomolibgpu # activate the environment
|
|
74
|
-
$ conda install
|
|
74
|
+
$ conda install conda-forge::cupy==12.3.0
|
|
75
75
|
$ pip install httomolibgpu
|
|
76
76
|
|
|
77
77
|
Setup the development environment:
|
|
@@ -9,21 +9,21 @@ httomolibgpu/cuda_kernels/paganin_filter_gen.cu,sha256=REvnVqsg-Frev7S_SBi8jKVFH
|
|
|
9
9
|
httomolibgpu/cuda_kernels/raven_filter.cu,sha256=KX2TM_9tMpvoGCHezDNWYABCnv2cT9mlMo4IhxRUac0,1437
|
|
10
10
|
httomolibgpu/cuda_kernels/remove_nan_inf.cu,sha256=gv0ihkf6A_D_po9x7pmgFsQFhwZ1dB_HYc_0Tu-bpUU,630
|
|
11
11
|
httomolibgpu/misc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
|
-
httomolibgpu/misc/corr.py,sha256=
|
|
12
|
+
httomolibgpu/misc/corr.py,sha256=1tUjwMku-MAPiLaH9IFe3zmF0p6rJFLruoObXSZelXY,4665
|
|
13
13
|
httomolibgpu/misc/denoise.py,sha256=6dpsEjnkew-hG6BxR2crTQLfPLhqs2jvrCiJ3XJolYw,4728
|
|
14
14
|
httomolibgpu/misc/morph.py,sha256=AlLk_kGFHF6vNrdICMpsXmTUDnCc7ey97-_DqwZb3Wc,7475
|
|
15
|
-
httomolibgpu/misc/rescale.py,sha256=
|
|
16
|
-
httomolibgpu/misc/supp_func.py,sha256=
|
|
15
|
+
httomolibgpu/misc/rescale.py,sha256=K4VQ1AdxOAhe8tTSVb9VXVZsjBap5VlOtxHVdf9MU08,4416
|
|
16
|
+
httomolibgpu/misc/supp_func.py,sha256=KkOA_YaZ9AXy9meWk7E-M903XHgXIpnRXh8kWHW0WjI,6227
|
|
17
17
|
httomolibgpu/prep/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
18
18
|
httomolibgpu/prep/alignment.py,sha256=BuFTfLZD5_THQAKP_ikQ3fRE8JpN-JItGllZgrHRU5s,5657
|
|
19
19
|
httomolibgpu/prep/normalize.py,sha256=ozVUAs4UY2DY7MQtJKllUgahp_4wRFKPuc_3iQl6bCE,4879
|
|
20
20
|
httomolibgpu/prep/phase.py,sha256=KyzLJKq6ft1WexvjojpDiVwyCSGkar6DMOQEawW_olo,12043
|
|
21
21
|
httomolibgpu/prep/stripe.py,sha256=-KRZHMSs2xkfCzPQGOl2RbLtV3VAr7tulMui36brdP8,15093
|
|
22
22
|
httomolibgpu/recon/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
23
|
-
httomolibgpu/recon/algorithm.py,sha256=
|
|
23
|
+
httomolibgpu/recon/algorithm.py,sha256=Vl-CAlxSZ3UJSYMDfUBywzlJHb3xA3tE7RV-_w-l5bI,20956
|
|
24
24
|
httomolibgpu/recon/rotation.py,sha256=k_E0lBRprJz6AGclagIkrzk_9dipADxPtL5BxrggSwM,27729
|
|
25
|
-
httomolibgpu-
|
|
26
|
-
httomolibgpu-
|
|
27
|
-
httomolibgpu-
|
|
28
|
-
httomolibgpu-
|
|
29
|
-
httomolibgpu-
|
|
25
|
+
httomolibgpu-3.0.dist-info/licenses/LICENSE,sha256=bXeLsgelPUUXw8HCIYiVC97Dpjhm2nB54m7TACdH8ng,48032
|
|
26
|
+
httomolibgpu-3.0.dist-info/METADATA,sha256=GDiLyQMLfLpvJSBUg9_kt441W8RquF_lnI_oeWesHrA,3379
|
|
27
|
+
httomolibgpu-3.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
28
|
+
httomolibgpu-3.0.dist-info/top_level.txt,sha256=nV0Ty_YvSPVd1O6MNWuIplD0w1nwk5hT76YgBZ-bzUw,13
|
|
29
|
+
httomolibgpu-3.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|