This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import odl | |
import numpy as np | |
# Discrete reconstruction space: discretized functions on the rectangle | |
# [-20, 20]^2 with 300 samples per dimension. | |
reco_space = odl.uniform_discr( | |
min_corner=[-1, -1], max_corner=[1, 1], nsamples=[256, 256], | |
dtype='float32') | |
# Make a parallel beam geometry with flat detector |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import odl | |
import numpy as np | |
# Discrete reconstruction space: discretized functions on the rectangle | |
# [-20, 20]^2 with 300 samples per dimension. | |
reco_space = odl.uniform_discr( | |
min_corner=[-1, -1], max_corner=[1, 1], nsamples=[256, 256], | |
dtype='float32') | |
# Make a parallel beam geometry with flat detector |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
277 # Blank image | |
278 1 71 71.0 0.0 p = np.zeros(space.shape) | |
279 | |
280 # Create the pixel grid | |
281 1 318 318.0 0.0 grid_in = space.grid.meshgr | |
id() | |
282 1 26 26.0 0.0 minp = space.grid.min() | |
283 1 18 18.0 0.0 maxp = space.grid.max() | |
284 | |
285 # move points to [-1, 1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
277 # Blank image | |
278 1 71 71.0 0.0 p = np.zeros(space.shape) | |
279 | |
280 # Create the pixel grid | |
281 1 308 308.0 0.0 grid_in = space.grid.meshgr | |
id() | |
282 1 25 25.0 0.0 minp = space.grid.min() | |
283 1 18 18.0 0.0 maxp = space.grid.max() | |
284 | |
285 # move points to [-1, 1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C:\Users\Jonas\Desktop> python -m line_profiler gadgetzan.py.lprof | |
Timer unit: 3.00191e-07 s | |
Total time: 8.63965 s | |
File: d:\github\odl\odl\util\phantom.py | |
Function: _phantom_3d at line 231 | |
Line # Hits Time Per Hit % Time Line Contents | |
============================================================== | |
231 @profile |
NewerOlder