diffct 1.2.6__tar.gz → 1.2.8__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.
Files changed (33) hide show
  1. {diffct-1.2.6 → diffct-1.2.8}/PKG-INFO +72 -2
  2. {diffct-1.2.6 → diffct-1.2.8}/README.md +71 -1
  3. diffct-1.2.8/diffct/__init__.py +17 -0
  4. {diffct-1.2.6 → diffct-1.2.8}/diffct/differentiable.py +1043 -395
  5. {diffct-1.2.6 → diffct-1.2.8}/examples/fbp_fan.py +73 -63
  6. {diffct-1.2.6 → diffct-1.2.8}/examples/fbp_parallel.py +20 -34
  7. {diffct-1.2.6 → diffct-1.2.8}/examples/fdk_cone.py +71 -66
  8. {diffct-1.2.6 → diffct-1.2.8}/pyproject.toml +2 -3
  9. diffct-1.2.8/pytest.ini +3 -0
  10. diffct-1.2.8/tests/test_cuda_smoke.py +81 -0
  11. diffct-1.2.8/tests/test_weights.py +62 -0
  12. diffct-1.2.6/diffct/__init__.py +0 -2
  13. {diffct-1.2.6 → diffct-1.2.8}/.github/workflows/docs.yml +0 -0
  14. {diffct-1.2.6 → diffct-1.2.8}/.github/workflows/release.yml +0 -0
  15. {diffct-1.2.6 → diffct-1.2.8}/.gitignore +0 -0
  16. {diffct-1.2.6 → diffct-1.2.8}/LICENSE +0 -0
  17. {diffct-1.2.6 → diffct-1.2.8}/docs/Makefile +0 -0
  18. {diffct-1.2.6 → diffct-1.2.8}/docs/source/_static/.gitkeep +0 -0
  19. {diffct-1.2.6 → diffct-1.2.8}/docs/source/api.rst +0 -0
  20. {diffct-1.2.6 → diffct-1.2.8}/docs/source/conf.py +0 -0
  21. {diffct-1.2.6 → diffct-1.2.8}/docs/source/examples.rst +0 -0
  22. {diffct-1.2.6 → diffct-1.2.8}/docs/source/fbp_fan_example.rst +0 -0
  23. {diffct-1.2.6 → diffct-1.2.8}/docs/source/fbp_parallel_example.rst +0 -0
  24. {diffct-1.2.6 → diffct-1.2.8}/docs/source/fdk_cone_example.rst +0 -0
  25. {diffct-1.2.6 → diffct-1.2.8}/docs/source/getting_started.rst +0 -0
  26. {diffct-1.2.6 → diffct-1.2.8}/docs/source/index.rst +0 -0
  27. {diffct-1.2.6 → diffct-1.2.8}/docs/source/iterative_reco_cone_example.rst +0 -0
  28. {diffct-1.2.6 → diffct-1.2.8}/docs/source/iterative_reco_fan_example.rst +0 -0
  29. {diffct-1.2.6 → diffct-1.2.8}/docs/source/iterative_reco_parallel_example.rst +0 -0
  30. {diffct-1.2.6 → diffct-1.2.8}/examples/iterative_reco_cone.py +0 -0
  31. {diffct-1.2.6 → diffct-1.2.8}/examples/iterative_reco_fan.py +0 -0
  32. {diffct-1.2.6 → diffct-1.2.8}/examples/iterative_reco_parallel.py +0 -0
  33. {diffct-1.2.6 → diffct-1.2.8}/requirements.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: diffct
3
- Version: 1.2.6
3
+ Version: 1.2.8
4
4
  Summary: A CUDA-based library for computed tomography (CT) projection and reconstruction with differentiable operators
5
5
  Project-URL: Homepage, https://github.com/sypsyp97/diffct
6
6
  Author-email: Yipeng Sun <yipeng.sun@fau.de>
@@ -28,6 +28,18 @@ A high-performance, CUDA-accelerated library for circular orbits CT reconstructi
28
28
 
29
29
  ⭐ **Please star this project if you find it is useful!**
30
30
 
31
+ ## 🔀 Branches
32
+
33
+ ### Main Branch (Stable)
34
+ This is the **stable version** supporting circular trajectory CT reconstruction.
35
+
36
+ ### Dev Branch (Under Development)
37
+ The `dev` branch includes experimental features:
38
+ - **Random trajectory projection and backprojection operators**
39
+ - **New examples with non-circular trajectories**
40
+
41
+ ⚠️ **Note:** The dev branch is under active development. If you find any bugs, please [raise an issue](https://github.com/sypsyp97/diffct/issues).
42
+
31
43
  ## ✨ Features
32
44
 
33
45
  - **Fast:** CUDA-accelerated projection and backprojection operations
@@ -69,10 +81,68 @@ diffct/
69
81
 
70
82
  ### Installation
71
83
 
84
+ **CUDA 12 (Recommended):**
85
+ ```bash
86
+ # Create and activate conda environment
87
+ conda create -n diffct python=3.12
88
+ conda activate diffct
89
+
90
+ # Install CUDA (here 12.8.1 as example) PyTorch, and Numba
91
+ conda install nvidia/label/cuda-12.8.1::cuda-toolkit
92
+
93
+ # Install Pytorch, you can find the commend here: https://pytorch.org/get-started/locally/
94
+
95
+ # Install Numba with CUDA 12
96
+ pip install numba-cuda[cu12]
97
+
98
+ # Install diffct
99
+ pip install diffct
100
+ ```
101
+
102
+ <details>
103
+ <summary>CUDA 13 Installation</summary>
104
+
105
+ ```bash
106
+ # Create and activate conda environment
107
+ conda create -n diffct python=3.12
108
+ conda activate diffct
109
+
110
+ # Install CUDA (here 13.0.2 as example) PyTorch, and Numba
111
+ conda install nvidia/label/cuda-13.0.2::cuda-toolkit
112
+
113
+ # Install Pytorch, you can find the commend here: https://pytorch.org/get-started/locally/
114
+
115
+ # Install Numba with CUDA 13
116
+ pip install numba-cuda[cu13]
117
+
118
+ # Install diffct
119
+ pip install diffct
120
+ ```
121
+
122
+ </details>
123
+
124
+ <details>
125
+ <summary>CUDA 11 Installation</summary>
126
+
72
127
  ```bash
128
+ # Create and activate conda environment
129
+ conda create -n diffct python=3.12
130
+ conda activate diffct
131
+
132
+ # Install CUDA (here 11.8.0 as example) PyTorch, and Numba
133
+ conda install nvidia/label/cuda-11.8.0::cuda-toolkit
134
+
135
+ # Install Pytorch, you can find the commend here: https://pytorch.org/get-started/locally/
136
+
137
+ # Install Numba with CUDA 11
138
+ pip install numba-cuda[cu11]
139
+
140
+ # Install diffct
73
141
  pip install diffct
74
142
  ```
75
143
 
144
+ </details>
145
+
76
146
  ## 📝 Citation
77
147
 
78
148
  If you use this library in your research, please cite:
@@ -80,7 +150,7 @@ If you use this library in your research, please cite:
80
150
  ```bibtex
81
151
  @software{diffct2025,
82
152
  author = {Yipeng Sun},
83
- title = {diffct: Differentiable Computed Tomography
153
+ title = {diffct: Differentiable Computed Tomography
84
154
  Reconstruction with CUDA},
85
155
  year = 2025,
86
156
  publisher = {Zenodo},
@@ -11,6 +11,18 @@ A high-performance, CUDA-accelerated library for circular orbits CT reconstructi
11
11
 
12
12
  ⭐ **Please star this project if you find it is useful!**
13
13
 
14
+ ## 🔀 Branches
15
+
16
+ ### Main Branch (Stable)
17
+ This is the **stable version** supporting circular trajectory CT reconstruction.
18
+
19
+ ### Dev Branch (Under Development)
20
+ The `dev` branch includes experimental features:
21
+ - **Random trajectory projection and backprojection operators**
22
+ - **New examples with non-circular trajectories**
23
+
24
+ ⚠️ **Note:** The dev branch is under active development. If you find any bugs, please [raise an issue](https://github.com/sypsyp97/diffct/issues).
25
+
14
26
  ## ✨ Features
15
27
 
16
28
  - **Fast:** CUDA-accelerated projection and backprojection operations
@@ -52,10 +64,68 @@ diffct/
52
64
 
53
65
  ### Installation
54
66
 
67
+ **CUDA 12 (Recommended):**
68
+ ```bash
69
+ # Create and activate conda environment
70
+ conda create -n diffct python=3.12
71
+ conda activate diffct
72
+
73
+ # Install CUDA (here 12.8.1 as example) PyTorch, and Numba
74
+ conda install nvidia/label/cuda-12.8.1::cuda-toolkit
75
+
76
+ # Install Pytorch, you can find the commend here: https://pytorch.org/get-started/locally/
77
+
78
+ # Install Numba with CUDA 12
79
+ pip install numba-cuda[cu12]
80
+
81
+ # Install diffct
82
+ pip install diffct
83
+ ```
84
+
85
+ <details>
86
+ <summary>CUDA 13 Installation</summary>
87
+
88
+ ```bash
89
+ # Create and activate conda environment
90
+ conda create -n diffct python=3.12
91
+ conda activate diffct
92
+
93
+ # Install CUDA (here 13.0.2 as example) PyTorch, and Numba
94
+ conda install nvidia/label/cuda-13.0.2::cuda-toolkit
95
+
96
+ # Install Pytorch, you can find the commend here: https://pytorch.org/get-started/locally/
97
+
98
+ # Install Numba with CUDA 13
99
+ pip install numba-cuda[cu13]
100
+
101
+ # Install diffct
102
+ pip install diffct
103
+ ```
104
+
105
+ </details>
106
+
107
+ <details>
108
+ <summary>CUDA 11 Installation</summary>
109
+
55
110
  ```bash
111
+ # Create and activate conda environment
112
+ conda create -n diffct python=3.12
113
+ conda activate diffct
114
+
115
+ # Install CUDA (here 11.8.0 as example) PyTorch, and Numba
116
+ conda install nvidia/label/cuda-11.8.0::cuda-toolkit
117
+
118
+ # Install Pytorch, you can find the commend here: https://pytorch.org/get-started/locally/
119
+
120
+ # Install Numba with CUDA 11
121
+ pip install numba-cuda[cu11]
122
+
123
+ # Install diffct
56
124
  pip install diffct
57
125
  ```
58
126
 
127
+ </details>
128
+
59
129
  ## 📝 Citation
60
130
 
61
131
  If you use this library in your research, please cite:
@@ -63,7 +133,7 @@ If you use this library in your research, please cite:
63
133
  ```bibtex
64
134
  @software{diffct2025,
65
135
  author = {Yipeng Sun},
66
- title = {diffct: Differentiable Computed Tomography
136
+ title = {diffct: Differentiable Computed Tomography
67
137
  Reconstruction with CUDA},
68
138
  year = 2025,
69
139
  publisher = {Zenodo},
@@ -0,0 +1,17 @@
1
+ # diffct/__init__.py
2
+ from .differentiable import (
3
+ ParallelProjectorFunction,
4
+ ParallelBackprojectorFunction,
5
+ FanProjectorFunction,
6
+ FanBackprojectorFunction,
7
+ ConeProjectorFunction,
8
+ ConeBackprojectorFunction,
9
+ detector_coordinates_1d,
10
+ angular_integration_weights,
11
+ fan_cosine_weights,
12
+ cone_cosine_weights,
13
+ parker_weights,
14
+ ramp_filter_1d,
15
+ fan_weighted_backproject,
16
+ cone_weighted_backproject,
17
+ )