Exemplo n.º 1
0
def test_project():
    assert_allclose(project(read_file("obj.npy"), read_file("angle.npy")), read_file("proj.npy"), rtol=1e-2)
Exemplo n.º 2
0
    except OSError as exc: # Python >2.5
        if exc.errno == errno.EEXIST and os.path.isdir(path):
            pass
        else: raise
'''

print('Creating Object...')
obj = shepp3d((128, 128, 128))
numpy.save('./data/largeTestObj.npy', obj)

print('Creating Angle...')
theta = angles(200)
numpy.save('./data/largeTestTheta.npy', theta)

print('Creating Projection...')
data = project(obj, theta)
numpy.save('./data/largeTestData.npy', data)

print('Creating ospml_hybrid...')
pmlrecon = recon(data, theta, algorithm='ospml_hybrid', num_iter=2)
numpy.save('./data/pml/largeTestRecon_OH.npy', pmlrecon)

print('Creating ospml_quad...')
pmlrecon = recon(data, theta, algorithm='ospml_quad', num_iter=2)
numpy.save('./data/pml/largeTestRecon_OQ.npy', pmlrecon)

print('Creating pml_hybrid...')
pmlrecon = recon(data, theta, algorithm='pml_hybrid', num_iter=2)
numpy.save('./data/pml/largeTestRecon_PH.npy', pmlrecon)

print('Creating pml_quad...')
Exemplo n.º 3
0
 def test_project(self):
     assert_allclose(project(read_file('obj.npy'), read_file('angle.npy')),
                     read_file('proj.npy'),
                     rtol=1e-2)
Exemplo n.º 4
0
def test_project():
    assert_allclose(
        project(read_file('obj.npy'), read_file('angle.npy')),
        read_file('proj.npy'), rtol=1e-2)
Exemplo n.º 5
0
        if exc.errno == errno.EEXIST and os.path.isdir(path):
            pass
        else: raise
'''


print('Creating Object...')
obj=shepp3d((128,128,128))
numpy.save('./data/largeTestObj.npy',obj)

print('Creating Angle...')
theta=angles(200)
numpy.save('./data/largeTestTheta.npy',theta)

print('Creating Projection...')
data=project(obj,theta)
numpy.save('./data/largeTestData.npy',data)

print('Creating ospml_hybrid...')
pmlrecon=recon(data, theta, algorithm='ospml_hybrid', num_iter=2)
numpy.save('./data/pml/largeTestRecon_OH.npy',pmlrecon)

print('Creating ospml_quad...')
pmlrecon=recon(data, theta, algorithm='ospml_quad', num_iter=2)
numpy.save('./data/pml/largeTestRecon_OQ.npy',pmlrecon)

print('Creating pml_hybrid...')
pmlrecon=recon(data, theta, algorithm='pml_hybrid', num_iter=2)
numpy.save('./data/pml/largeTestRecon_PH.npy',pmlrecon)

print('Creating pml_quad...')