Giter VIP home page Giter VIP logo

tomopy's Introduction

TomoPy is an open-source Python package for tomographic data processing and image reconstruction.

Read the Docs

Coveralls

Code Climate

Anaconda downloads

Use on Binder

Features

  • Image reconstruction algorithms for tomography.
  • Various filters, ring removal algorithms, phase retrieval algorithms.
  • Forward projection operator for absorption and wave propagation.

Installation

Have Conda installed first, then open a terminal or a command prompt window and run:

conda install -c conda-forge tomopy

Warning

TomoPy will drop support for Python 2 before 1 January 2020. For more information, visit https://python3statement.org/.

Try Now

Some Example Jupyter notebooks will run in your browser using binder.

Contribute

License

The project is licensed under the BSD-3 license.

tomopy's People

Contributors

carterbox avatar csparker247 avatar dakefeng avatar data-exchange avatar decarlof avatar dgursoy avatar djvine avatar dkazanc avatar dmpelt avatar dreycenfoiles avatar ericthemagician avatar gromitsun avatar habi avatar jrmadsen avatar kmader avatar kyueaes avatar lbluque avatar michael-sutherland avatar nghia-vo avatar nikitinvv avatar oleksandr-pavlyk avatar prjemian avatar samtygier-stfc avatar skylarjhdownes avatar swelborn avatar tacaswell avatar tmunson avatar ttgmichael avatar williamjudge94 avatar zronaghi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tomopy's Issues

running tomopy on machines with limited RAM

via e-mail from Matt (Matthew Giarra [[email protected]])

One issue that I haven't figure out how to solve myself is that our machine runs out of memory when trying to reconstruct all ~1000 slices from an image set. We could just buy more memory, but I think it would also be useful to be able to run the code on regular consumer machines with less memory (8-16 GB). I guess the software fix for this "issue" would be to read sections of the HDF file one at a time and then write slices out individually, rather than storing everything in memory and then writing it all out at the end of processing. All of this reading/writing would probably be slower than just loading everything in at once, but I think it's ok to sacrifice some speed in exchange for compatibility with lower-memory machines.

Do you know if this is already implemented in the code somewhere, and I just haven't figured out how to implement it? If it's not already implemented, is this something that you guys are working on?

Thanks again for your continued help :)

Boost compile error with Clang 3.4 on Mac OS

clang -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/include -I/Users/dgursoy/Projects/tomopy/tomopy/algorithms/recon/gridrec -I/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c tomopy/algorithms/recon/gridrec/grid.cpp -o build/temp.macosx-10.9-x86_64-2.7/tomopy/algorithms/recon/gridrec/grid.o
clang -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/include -I/Users/dgursoy/Projects/tomopy/tomopy/algorithms/recon/gridrec -I/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c tomopy/algorithms/recon/gridrec/MessageQueue.cpp -o build/temp.macosx-10.9-x86_64-2.7/tomopy/algorithms/recon/gridrec/MessageQueue.o
In file included from tomopy/algorithms/recon/gridrec/MessageQueue.cpp:6:
In file included from /usr/local/include/boost/thread.hpp:17:
In file included from /usr/local/include/boost/thread/once.hpp:20:
In file included from /usr/local/include/boost/thread/pthread/once_atomic.hpp:20:
In file included from /usr/local/include/boost/atomic.hpp:12:
In file included from /usr/local/include/boost/atomic/atomic.hpp:17:
In file included from /usr/local/include/boost/atomic/detail/platform.hpp:22:
/usr/local/include/boost/atomic/detail/gcc-atomic.hpp:961:64: error: no matching constructor for initialization of 'storage_type'
      (aka 'boost::atomics::detail::storage128_type')
    explicit base_atomic(value_type const& v) BOOST_NOEXCEPT : v_(0)
                                                               ^  ~
/usr/local/include/boost/atomic/detail/gcc-atomic.hpp:932:28: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'int' to
      'const boost::atomics::detail::storage128_type' for 1st argument
struct BOOST_ALIGNMENT(16) storage128_type
                           ^
/usr/local/include/boost/atomic/detail/gcc-atomic.hpp:932:28: note: candidate constructor (the implicit default constructor) not viable: requires 0 arguments, but 1 was
      provided
/usr/local/include/boost/atomic/detail/gcc-atomic.hpp:968:22: error: no viable conversion from 'int' to 'storage_type' (aka 'boost::atomics::detail::storage128_type')
        storage_type tmp = 0;
                     ^     ~
/usr/local/include/boost/atomic/detail/gcc-atomic.hpp:932:28: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'int' to
      'const boost::atomics::detail::storage128_type &' for 1st argument
struct BOOST_ALIGNMENT(16) storage128_type
                           ^
/usr/local/include/boost/atomic/detail/gcc-atomic.hpp:983:22: error: no viable conversion from 'int' to 'storage_type' (aka 'boost::atomics::detail::storage128_type')
        storage_type tmp = 0;
                     ^     ~
/usr/local/include/boost/atomic/detail/gcc-atomic.hpp:932:28: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'int' to
      'const boost::atomics::detail::storage128_type &' for 1st argument
struct BOOST_ALIGNMENT(16) storage128_type
                           ^
/usr/local/include/boost/atomic/detail/gcc-atomic.hpp:997:22: error: no viable conversion from 'int' to 'storage_type' (aka 'boost::atomics::detail::storage128_type')
        storage_type expected_s = 0, desired_s = 0;
                     ^            ~
/usr/local/include/boost/atomic/detail/gcc-atomic.hpp:932:28: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'int' to
      'const boost::atomics::detail::storage128_type &' for 1st argument
struct BOOST_ALIGNMENT(16) storage128_type
                           ^
/usr/local/include/boost/atomic/detail/gcc-atomic.hpp:997:38: error: no viable conversion from 'int' to 'storage_type' (aka 'boost::atomics::detail::storage128_type')
        storage_type expected_s = 0, desired_s = 0;
                                     ^           ~
/usr/local/include/boost/atomic/detail/gcc-atomic.hpp:932:28: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'int' to
      'const boost::atomics::detail::storage128_type &' for 1st argument
struct BOOST_ALIGNMENT(16) storage128_type
                           ^
/usr/local/include/boost/atomic/detail/gcc-atomic.hpp:1013:22: error: no viable conversion from 'int' to 'storage_type' (aka 'boost::atomics::detail::storage128_type')
        storage_type expected_s = 0, desired_s = 0;
                     ^            ~
/usr/local/include/boost/atomic/detail/gcc-atomic.hpp:932:28: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'int' to
      'const boost::atomics::detail::storage128_type &' for 1st argument
struct BOOST_ALIGNMENT(16) storage128_type
                           ^
/usr/local/include/boost/atomic/detail/gcc-atomic.hpp:1013:38: error: no viable conversion from 'int' to 'storage_type' (aka 'boost::atomics::detail::storage128_type')
        storage_type expected_s = 0, desired_s = 0;
                                     ^           ~
/usr/local/include/boost/atomic/detail/gcc-atomic.hpp:932:28: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'int' to
      'const boost::atomics::detail::storage128_type &' for 1st argument
struct BOOST_ALIGNMENT(16) storage128_type
                           ^
7 errors generated.
error: command 'clang' failed with exit status 1

demo.py hangs after fresh install

Install of tomopy on usr32idc@txmtwo:/local/degursoy/tomopy hangs while running a reconstruction at the normalization step.

I did a fresh tomopy install from source as
usr32idc@txmtwo:/local/decarlo and to confirm is not something specific to txmtwo as
decarlo@luna:/local/decarlo
on both machines passed the python -c "import tomopy" test, still demo.py hangs at the normalization step:

2014-04-15 23:56:04,627 - tomopy - WARNING - ๏ฟฝ[33massumed 180-degree rotation [ok]๏ฟฝ[0m
2014-04-15 23:56:04,681 - tomopy - DEBUG - ๏ฟฝ[35mdata shape: [360, 16, 1280]๏ฟฝ[0m

suggest some changes in current release

at 2-BM beamline following changes are made to the standard release

zinger_removal: change from 1D to 2D median filter
normalize: change value range checking (ln 75 - 77)
diagnose_center: have toimage mode='F'

tools/fftw.py: have symmetric scaling factor to both forward and inverse Fourier transforms. when Paganin phase retrieval to images of large image size current non-scaled Fourier transforms causes value overflow of 32-bit floating numbers so wrong phase retrieval and tomographic reconstruction outputs.

class XTomoDataset: add file_name private variable; this allows derived folders automatically created based on the input data folder

xtomo_io:
xtomo_writer: change overwrite option; when overwrite=True, existing files with same names of the output files will be overwritten. currently when overwrite=True the existing folder is deleted and recreated. one additional optional argument, say 'delete', can be added to allow users to delete the folder before writing operation.

setting the number of processes to use

Hi there,
I am struggling with the new release - 0.1.1, is there an example workflow for how to use it? It seems to be quite different to the previous version.

At some stage, I would like to be able to restrict the number of processes a tomopy program uses. I see that the distribute_jobs takes the number of cores as a keyword argument. However, this is not used where distribute_jobs is called. Is that feature not plumbed in?

Regards
magnus

OSError: libprep.so: cannot open shared object file: No such file or directory

This error occurs when python is installed in a directory the username trying to install tomopy does not have write permission.

This is what happens:
pj0200% pwd
/local/decarlo/

pj0200% git clone https://github.com/tomopy/tomopy.git tomopy_repo_tomopy
pj0200% ln -s tomopy_repo_tomopy/ tomopy

pj0200% ls -l
lrwxrwxrwx 1 decarlo xsdxmi 18 Jan 17 13:33 tomopy -> tomopy_repo_tomopy/
drwxr-xr-x 9 decarlo xsdxmi 4096 Jan 17 13:37 tomopy_repo_tomopy/

pj0200% cd tomopy
pj0200% python install.py --boost --fftw /local/decarlo/tomopy/lib

Determining system setup
-> changing to work directory...
/tmp/tmpnN2KOl
-> determining platform... Linux /

Installing FFTW
-> downloading
-> expanding tarfile
-> configuring
-> making
-> installing

Installing Boost C++
-> downloading
-> expanding tarfile
-> configuring
-> making
-> installing

Installation successful!!!

Before you start installing TomoPy, don't forget to:

1) Set LD_LIBRARY_PATH permanently in your shell to: /local/decarlo/tomopy/lib/lib
   hint: setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/local/decarlo/tomopy/lib/lib

2) Set C_INCLUDE_PATH permanently in your shell to: /local/decarlo/tomopy/lib/include
   hint: setenv C_INCLUDE_PATH ${C_INCLUDE_PATH}:/local/decarlo/tomopy/lib/include

pj0200% env
LD_LIBRARY_PATH=/local/decarlo/tomopy/lib/lib
C_INCLUDE_PATH=/local/decarlo/tomopy/lib/include

pj0200% python -c "import tomopy"
Traceback (most recent call last):
File "", line 1, in
File "tomopy/init.py", line 22, in
import xtomo.xtomo_preprocess
File "tomopy/xtomo/xtomo_preprocess.py", line 14, in
from tomopy.algorithms.preprocess.apply_padding import apply_padding
File "tomopy/algorithms/preprocess/apply_padding.py", line 14, in
libprep = ctypes.CDLL(libpath)
File "/APSshare/epd/rh6-x86_64/lib/python2.7/ctypes/init.py", line 353, in init
self._handle = _dlopen(self._name, mode)
OSError: /local/decarlo/tomopy_repo_tomopy/tomopy/lib/libprep.so: cannot open shared object file: No such file or directory

Solution/Work around:

pj0200% pwd
/local/decarlo/tomopy
pj0200% python setup.py build
pj0200% mkdir /local/decarlo/tomopy/tomopy/lib
pj0200% cp build/lib.linux-x86_64-2.7/tomopy/lib/*.so /local/decarlo/tomopy/tomopy/lib/
pj0200% python -c "import tomopy"
OK!

then to run tomopy from a different directory:
pj0200% python setup.py install --user

Is possible to find something easier/simpler?

CTYPES problem on mac os x 10.9.5

I got most of the way through installing tomopy on a mac running 10.9.5, including installing Canopy python, fftw and boost myself (with a path of my choice). However, when I then tried to install tomopy, it told me I needed CTYPES. I was not able to install this with Canopy, so I tried to install it myself with this:

pip install -f http://downloads.sourceforge.net/project/ctypes/ctypes/1.0.2/ctypes-1.0.2.tar.gz -U ctypes
This, however, failed with errors related to:
build/temp.macosx-10.6-x86_64-2.7/libffi/include/ffi.h:161:3: error: unknown type name 'ffi_abi' (AND 'ffi_sarg' and 'ffi_arg' [abbreviated output]
ALSO: source/ctypes.h:71:2: error: unknown type name 'ffi_closure'
ffi_closure pcl; / the C callable */
At this point I gave up, not knowing what I might do to fix the problems...

Installation on Windows 7

Hi,
Do you have instructions for installing tomopy on Windows 7 machine? I have tried manually installing boost and fftw and running
python setup.py install
using Python 2.7.9 but I keep getting an error:

tomopy/tools/fftw.cpp(3) : fatal error C1083: Cannot open include file: 'fftw3.h': No such file or directory

Thank you.
Mirna Lerotic

multipricessing fail when process large amount of data

Tomopy 0.0.2 works well when the number of slice is less than 1000, but when it is larger, I got the error message:

2014-03-19 10:41:23,593 - tomopy - INFO - logger file [ok]
2014-03-19 10:41:23,625 - tomopy - INFO - file check: /home/jce/tomopytest/tomopy-0.0.2/Meilan_data/proj_101.hdf [ok]
2014-03-19 10:41:23,668 - tomopy - WARNING - /exchange/theta [failed]
2014-03-19 10:42:29,311 - tomopy - INFO - read data from file [ok]
2014-03-19 10:42:29,674 - tomopy - INFO - read data_white from file [ok]
2014-03-19 10:42:30,016 - tomopy - INFO - read data_dark from file [ok]
2014-03-19 10:42:30,017 - tomopy - WARNING - assign 180-degree rotation [ok]
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/multiprocessing/queues.py", line 266, in _feed
    send(obj)
SystemError: NULL result without error in PyObject_Call

My workstation configuration is:
Intel Xeon E5 2603 _2
Memory: 16GB_4

XTomoDataset instance has no attribute 'remove_gaussian_background'

I'm pretty new to python, new to Canopy and I've managed to get tomopy installed (finally!) and I'm getting this error when I run the same script that I ran while I was on the system at APS 2BM. Any suggestions?

77     d.gridrec()
 78 

---> 79 d.remove_gaussian_background(sigma=15)
80 tomopy.xtomo_writer(d.data_recon[np.int(margin_slices/2):(SliceEnd-SliceStart-np.int(margin_slices/2)),:,:], output_file, axis=0,x_start=SliceStart+np.int(margin_slices/2),overwrite = True)
81 d.FLAG_THETA = False

AttributeError: XTomoDataset instance has no attribute 'remove_gaussian_background'

I'm also getting a warning:
"dark-field assumed as zeros [ok]"
even though when I inspect the dark array it is 6 x 150 x 2016 and has non-zero values when displayed.

Gridrec results inconsistent with legacy version.

I used the data.h5 in demo of legacy version to perform the following test.

In [5]: import tomopy
In [6]: data, white, dark = tomopy.read_aps_2bm("data.h5") 
In [7]: norm_data = tomopy.normalize(data, white, dark)
In [8]: corr_norm_data = tomopy.correct_air(norm_data)
In [9]: retr_data = tomopy.retrieve_phase(corr_norm_data)
In [10]: corr_retr_data = tomopy.correct_air(retr_data )  
In [11]: import numpy as np
In [12]: theta = np.linspace(0, np.pi, data.shape[0])
In [13]: recon = tomopy.gridrec( corr_retr_data , theta)
In [15]: tomopy.Writer(recon, fname="tmp2/gr.tiff").tiff()

This test is based on 0.1.1 version. But I don't think the latest release changed the algorithm.
Here is the result:
image

The outside structure should be a complete circle. And it should be white.
Did I do something wrong? Thanks.

-Wstrict-prototypes

cc1plus: warning: command line option โ€˜-Wstrict-prototypesโ€™ is valid for C/ObjC but not for C++
tomopy/algorithms/recon/gridrec/filters.cpp:37:1: warning: deprecated conversion from string constant to โ€˜char*โ€™ [-Wwrite-strings]

I'm getting those two messages printed many times before the installation fails with this message:

error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

How do I fix this?

install.py fails on test Linux system

testing the install process on a fresh Linux system (one that has not been used before for tomopy) and fail happens when testing "--version" option to c compiler.

os: Linux Mint (Debian Ubuntu derivative)

como:/tmp/tomopy> uname -a
Linux como 3.8.0-33-generic #48-Ubuntu SMP Wed Oct 23 09:16:58 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Here's the error:

como:/tmp/tomopy>      python install.py $SANDBOX --boost --fftw

Determining system setup
 -> changing to work directory... 
    /tmp/tmpyrXxhb
 -> determining platform...  Linux / 
Traceback (most recent call last):
  File "install.py", line 136, in <module>
    p = subprocess.Popen(shlex.split(fc + ' --version'), stdout=subprocess.PIPE)
  File "/home/prjemian/Apps/epd/rh5-x86_64/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/home/prjemian/Apps/epd/rh5-x86_64/lib/python2.7/subprocess.py", line 1249, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Problem on OSX

Hi,

I'm trying to install tomopy on OSX.
I've used pip to install numpy 1.8.2.

The output from tomopy setup is:
udo python setup.py
Traceback (most recent call last):
File "setup.py", line 25, in
raise pkg_resources.DistributionNotFound, msg
pkg_resources.DistributionNotFound: Python package requirement not satisfied: numpy>=1.8.0
suggest using this command:
pip install -U numpy

I don't have stale versions of numpy sitting around. Just the current version.
Any thoughts?

David

installation failed with boost c++

Hello, While running install.py, I got an error message in boost c++ installation.
My os is MacOS 10.9.4, Xcode is 5.1.1.
python, on terminal

python -V -> Python 2.7.5
on Application folder, Python 2.7.8

Any suggestions? Thanks.

sudo python install.py --boost --fftw
Password:

Determining system setup
-> changing to work directory...
/tmp/tmpRfLnV1
-> determining platform... Darwin / MacOS 10.9.4
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1

Installing FFTW
-> downloading
-> expanding tarfile
-> configuring
-> making
-> installing

Installing Boost C++
-> downloading
-> expanding tarfile
-> configuring
-> making
Installation failed.

Cannot install Boost (and fftw?)

I am trying to install tomopy on OSX, 10.9.5 with epd python:
15dhcp226:local ilavsky$ which python
/Library/Frameworks/Python.framework/Versions/Current/bin/python
15dhcp226:local ilavsky$ python
Enthought Python Distribution -- www.enthought.com
Version: 7.3-2 (32-bit)


support packages (boost/fftw) installation fails. Not sure why. Here is record. Same thing running as regular (local) user or privileged user:

15dhcp226:local ilavsky$ python install.py --boost
Determining system setup
-> changing to work directory...
/var/folders/p2/rkhxhw_d0f7gyp7f_9k_vzzc0000rs/T/tmp7uoeIX
-> determining platform... Darwin / MacOS 10.9.5
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1

Installing Boost C++
-> downloading
-> expanding tarfile
-> configuring
-> making
Installation failed.


Seems make fails on boost
here is partial grab from log_make for boost around first error message:
.
.
.
darwin.compile.c++ bin.v2/libs/atomic/build/darwin-4.2.1/release/threading-multi/lockpool.o
In file included from libs/atomic/src/lockpool.cpp:3:
In file included from ./boost/atomic.hpp:12:
In file included from ./boost/atomic/atomic.hpp:17:
In file included from ./boost/atomic/detail/platform.hpp:22:
./boost/atomic/detail/gcc-atomic.hpp:961:64: error: no matching constructor for initialization of 'storage_type' (aka 'boost::atomics::detail::storage128_type')
explicit base_atomic(value_type const& v) BOOST_NOEXCEPT : v_(0)
^ ~
./boost/atomic/detail/gcc-atomic.hpp:932:28: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'int' to 'const boost::atomics::detail::storage128_type' for 1st argument
struct BOOST_ALIGNMENT(16) storage128_type
^
./boost/atomic/detail/gcc-atomic.hpp:932:28: note: candidate constructor (the implicit default constructor) not viable: requires 0 arguments, but 1 was provided
./boost/atomic/detail/gcc-atomic.hpp:968:22: error: no viable conversion from 'int' to 'storage_type' (aka 'boost::atomics::detail::storage128_type')
storage_type tmp = 0;
^ ~


Any feedback on what is missing/failing?

Thanks...

install.py fails on urlopen (fixed)

Hello,
When running install.py, I get an error associated with urlopen:

Traceback (most recent call last):
  File "install.py", line 330, in <module>
    main()
  File "install.py", line 301, in main
    install_boost(prefix)
  File "install.py", line 155, in install_boost
    download_expand_tarball('Boost C++', BOOST_URL, BOOST_SHA1)
  File "install.py", line 125, in download_expand_tarball
    open(ext_file, 'wb').write(urlopen(URL).read())
NameError: global name 'urlopen' is not defined

I solved this by modifying line 124 of install.py:

original:

open(ext_file, 'wb').write(urlopen(URL).read())

new

 open(ext_file, 'wb').write(urllib.urlopen(URL).read())

And I imported urllib in the script header:

import urllib

After that, the install goes smoothly.

System details:
Apple Mac Pro Quad-Core Intel Xeon (arch = i386)
OS 10.9.2
Python 2.7.6 installed via homebrew

Thanks,
Matt

OverflowError in remove_background

Hello,
Could someone teach me how to call "remove_background"?
I was able to call remove_backgound with following calls, when I was running the tomopy last release (May 2014), and the data_exchanger cloned in last summer:

d = tomopy.xtomo_dataset(log='debug')
d.dataset(data, white, dark, theta)
d.zinger_removal(median_width=10)
d.normalize()
d.stripe_removal(sigma=0.4) 
d.optimize_center()

d.gridrec()
d.remove_background()

Recently, I would like to use the tilte_correct feature and cloned both tomopy (on Mar 19, 2015) and data_exchanger (on April 3, 2015), and run the same script above, and I got "OverflowError, array too large" (copied in following). Was it because I did not call the remove_background correctly? Or because some environment setting wrong on my computer system?

Thanks!
Rong


OverflowError Traceback (most recent call last)
/home/rh66/workspace/tomo/siegmund/test_new_tomopy.py in ()
91
92 if name == "main":
---> 93 main()
94

/home/rh66/workspace/tomo/siegmund/test_new_tomopy.py in main()
64 #d.center=99.5
65 d.gridrec()
---> 66 d.remove_background()
67
68

/nfs/opt/python2.7/packages/tomopy/xtomo/xtomo_postprocess.pyc in _remove_background(self, num_cores, chunk_size, overwrite)
102 _axis = 0 # Slice axis
103 data_recon = distribute_jobs(self.data_recon, _func, _args, _axis,
--> 104 num_cores, chunk_size)
105
106 # Update provenance.

/nfs/opt/python2.7/packages/tomopy/tools/multiprocess_shared.pyc in distribute_jobs(data, func, args, axis, num_cores, chunk_size)
92 arg += [(range(ind_start, ind_end), data.shape, args)]
93
---> 94 shared_arr = mp.Array(ctypes.c_float, data.size) # takes time
95 arr = tonumpyarray(shared_arr, data.shape)
96 arr[:] = data

/opt/rh/python27/root/usr/lib64/python2.7/multiprocessing/init.pyc in Array(typecode_or_type, size_or_initializer, *_kwds)
258 '''
259 from multiprocessing.sharedctypes import Array
--> 260 return Array(typecode_or_type, size_or_initializer, *_kwds)
261
262 #

/opt/rh/python27/root/usr/lib64/python2.7/multiprocessing/sharedctypes.pyc in Array(typecode_or_type, size_or_initializer, **kwds)
113 if kwds:
114 raise ValueError('unrecognized keyword argument(s): %s' % kwds.keys())
--> 115 obj = RawArray(typecode_or_type, size_or_initializer)
116 if lock is False:
117 return obj

/opt/rh/python27/root/usr/lib64/python2.7/multiprocessing/sharedctypes.pyc in RawArray(typecode_or_type, size_or_initializer)
80 type_ = typecode_to_type.get(typecode_or_type, typecode_or_type)
81 if isinstance(size_or_initializer, (int, long)):
---> 82 type_ = type_ * size_or_initializer
83 obj = new_value(type)
84 ctypes.memset(ctypes.addressof(obj), 0, ctypes.sizeof(obj))

OverflowError: array too large

Installation problem on skimage requirement

if skimage package requirement is not satisfied: skimage>=0.10
suggestion is to use this command:
pip install -U skimage --user
but what is the name of this package? skimage or scikit-image?
the second works:
pip install -U scikit-image --user

So a work around for now is:
change the setup.py install_requires replacing
'skimage>=0.10'
with
'scikit-image>=0.9',

but needs to be fixed

SOME issues on Paganin phase retrieval filter

  1. fftw_2d scaling is incorrect. the scale factor should be sqrt(dim_x*dim_y) on both forward and backward transform.
  2. the Paganin filtered result should be scaled with another factor 1/max(H)
  3. wavelength definition can use 12.39842/energy (keV)
  4. removeRings does not show difference in results when sigma is within a range.

missing import urllib in released install.py

Francesco emailed:

I noticed an error in the released install.py from https://github.com/tomopy/tomopy/releases
it misses the urllib import.
so when you run python install.py --boost --fftw
you get an error (NameError: global name 'urlopen' is not defined)

adding
from urllib import urlopen
fixes the problem

this is correct in the tomopy repository but I think people will download the release not the repository

add requirement for numpydoc package

these warnings now

[jemian@gov,240,docs]$ make clean html
rm -rf build/*
sphinx-build -b html -d build/doctrees   source build/html
Making output directory...
Running Sphinx v1.2.2
loading pickled environment... not yet created
loading intersphinx inventory from http://docs.python.org/objects.inv...
building [html]: targets for 22 source files that are out of date
updating environment: 22 added, 0 changed, 0 removed
reading sources... [100%] resources/tomopy.tools.fftw                                                                                                                                                                   
/home/oxygen18/JEMIAN/Documents/eclipse/tomopy/docs/source/resources/tomopy.dataio.reader.rst:19: WARNING: toctree references unknown document u'resources/tomopy.dataio.reader.Session.adaptive_segment'
/home/oxygen18/JEMIAN/Documents/eclipse/tomopy/docs/source/resources/tomopy.dataio.reader.rst:19: WARNING: toctree references unknown document u'resources/tomopy.dataio.reader.Session.apply_padding'
/home/oxygen18/JEMIAN/Documents/eclipse/tomopy/docs/source/resources/tomopy.dataio.reader.rst:19: WARNING: toctree references unknown document u'resources/tomopy.dataio.reader.Session.art'
/home/oxygen18/JEMIAN/Documents/eclipse/tomopy/docs/source/resources/tomopy.dataio.reader.rst:19: WARNING: toctree references unknown document u'resources/tomopy.dataio.reader.Session.correct_drift'
/home/oxygen18/JEMIAN/Documents/eclipse/tomopy/docs/source/resources/tomopy.dataio.reader.rst:19: WARNING: toctree references unknown document u'resources/tomopy.dataio.reader.Session.data_to_hdf5'
/home/oxygen18/JEMIAN/Documents/eclipse/tomopy/docs/source/resources/tomopy.dataio.reader.rst:19: WARNING: toctree references unknown document u'resources/tomopy.dataio.reader.Session.data_to_tiff'
/home/oxygen18/JEMIAN/Documents/eclipse/tomopy/docs/source/resources/tomopy.dataio.reader.rst:19: WARNING: toctree references unknown document u'resources/tomopy.dataio.reader.Session.dataset'
/home/oxygen18/JEMIAN/Documents/eclipse/tomopy/docs/source/resources/tomopy.dataio.reader.rst:19: WARNING: toctree references unknown document u'resources/tomopy.dataio.reader.Session.diagnose_center'
/home/oxygen18/JEMIAN/Documents/eclipse/tomopy/docs/source/resources/tomopy.dataio.reader.rst:19: WARNING: toctree references unknown document u'resources/tomopy.dataio.reader.Session.downsample2d'
/home/oxygen18/JEMIAN/Documents/eclipse/tomopy/docs/source/resources/tomopy.dataio.reader.rst:19: WARNING: toctree references unknown document u'resources/tomopy.dataio.reader.Session.downsample3d'
/home/oxygen18/JEMIAN/Documents/eclipse/tomopy/docs/source/resources/tomopy.dataio.reader.rst:19: WARNING: toctree references unknown document u'resources/tomopy.dataio.reader.Session.gridrec'
/home/oxygen18/JEMIAN/Documents/eclipse/tomopy/docs/source/resources/tomopy.dataio.reader.rst:19: WARNING: toctree references unknown document u'resources/tomopy.dataio.reader.Session.median_filter'
/home/oxygen18/JEMIAN/Documents/eclipse/tomopy/docs/source/resources/tomopy.dataio.reader.rst:19: WARNING: toctree references unknown document u'resources/tomopy.dataio.reader.Session.mlem'
/home/oxygen18/JEMIAN/Documents/eclipse/tomopy/docs/source/resources/tomopy.dataio.reader.rst:19: WARNING: toctree references unknown document u'resources/tomopy.dataio.reader.Session.mlem_multilevel'
/home/oxygen18/JEMIAN/Documents/eclipse/tomopy/docs/source/resources/tomopy.dataio.reader.rst:19: WARNING: toctree references unknown document u'resources/tomopy.dataio.reader.Session.normalize'
/home/oxygen18/JEMIAN/Documents/eclipse/tomopy/docs/source/resources/tomopy.dataio.reader.rst:19: WARNING: toctree references unknown document u'resources/tomopy.dataio.reader.Session.optimize_center'
/home/oxygen18/JEMIAN/Documents/eclipse/tomopy/docs/source/resources/tomopy.dataio.reader.rst:19: WARNING: toctree references unknown document u'resources/tomopy.dataio.reader.Session.phase_retrieval'
/home/oxygen18/JEMIAN/Documents/eclipse/tomopy/docs/source/resources/tomopy.dataio.reader.rst:19: WARNING: toctree references unknown document u'resources/tomopy.dataio.reader.Session.read'
/home/oxygen18/JEMIAN/Documents/eclipse/tomopy/docs/source/resources/tomopy.dataio.reader.rst:19: WARNING: toctree references unknown document u'resources/tomopy.dataio.reader.Session.recon_to_hdf5'
/home/oxygen18/JEMIAN/Documents/eclipse/tomopy/docs/source/resources/tomopy.dataio.reader.rst:19: WARNING: toctree references unknown document u'resources/tomopy.dataio.reader.Session.recon_to_tiff'
/home/oxygen18/JEMIAN/Documents/eclipse/tomopy/docs/source/resources/tomopy.dataio.reader.rst:19: WARNING: toctree references unknown document u'resources/tomopy.dataio.reader.Session.region_segment'
/home/oxygen18/JEMIAN/Documents/eclipse/tomopy/docs/source/resources/tomopy.dataio.reader.rst:19: WARNING: toctree references unknown document u'resources/tomopy.dataio.reader.Session.remove_background'
/home/oxygen18/JEMIAN/Documents/eclipse/tomopy/docs/source/resources/tomopy.dataio.reader.rst:19: WARNING: toctree references unknown document u'resources/tomopy.dataio.reader.Session.stripe_removal'
/home/oxygen18/JEMIAN/Documents/eclipse/tomopy/docs/source/resources/tomopy.dataio.reader.rst:19: WARNING: toctree references unknown document u'resources/tomopy.dataio.reader.Session.threshold_segment'
/home/oxygen18/JEMIAN/Documents/eclipse/tomopy/docs/source/resources/tomopy.dataio.reader.rst:19: WARNING: toctree references unknown document u'resources/tomopy.dataio.reader.Session.upsample2d'
/home/oxygen18/JEMIAN/Documents/eclipse/tomopy/docs/source/resources/tomopy.dataio.reader.rst:19: WARNING: toctree references unknown document u'resources/tomopy.dataio.reader.Session.upsample3d'
/home/oxygen18/JEMIAN/Documents/eclipse/tomopy/docs/source/resources/tomopy.dataio.reader.rst:19: WARNING: toctree references unknown document u'resources/tomopy.dataio.reader.Session.zinger_removal'
/home/oxygen18/JEMIAN/Documents/eclipse/tomopy/docs/source/resources/tomopy.recon.gridrec.rst:19: WARNING: toctree references unknown document u'resources/tomopy.recon.gridrec.Gridrec.reconstruct'
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] resources/tomopy.tools.fftw                                                                                                                                                                    
None:None: WARNING: toctree contains reference to nonexisting document u'resources/tomopy.recon.gridrec.Gridrec.reconstruct'
None:None: WARNING: toctree contains reference to nonexisting document u'resources/tomopy.dataio.reader.Session.adaptive_segment'

Egg install fails to find libs on Mac.

I am trying to install tomopy (master version from github) in my mac 10.8.5. It looks everything runs well during the installation. I followed the instruction from http://tomopy.github.io/tomopy/. However, when I tested it, I got the following error. I can find 'libboost_thread.dylib' in LD_LIBRARY_PATH folder.

Li-mac:TomoPy Li$ echo "LD_LIBRARY_PATH = $LD_LIBRARY_PATH"
LD_LIBRARY_PATH = :/Users/Li/Research/X-ray/Research_work/XRF/TomoPy/lib
Li-mac:TomoPy Li$ echo "C_INCLUDE_PATH = $C_INCLUDE_PATH"
C_INCLUDE_PATH = :/Users/Li/Research/X-ray/Research_work/XRF/TomoPy/include
Li-mac:TomoPy Li$ echo "PYTHONPATH = $PYTHONPATH"
PYTHONPATH = :/Users/Li/anaconda/lib/python2.7/site-packages:/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages:/Users/Li/Research/X-ray/Research_work/XRF/TomoPy/lib/python2.7/site-packages/
Li-mac:TomoPy Li$ python -c "import tomopy"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/Li/Research/X-ray/Research_work/XRF/TomoPy/lib/python2.7/site-packages/tomopy-0.0.3-py2.7-macosx-10.5-x86_64.egg/tomopy/__init__.py", line 19, in <module>
    import xtomo.xtomo_recon
  File "/Users/Li/Research/X-ray/Research_work/XRF/TomoPy/lib/python2.7/site-packages/tomopy-0.0.3-py2.7-macosx-10.5-x86_64.egg/tomopy/xtomo/xtomo_recon.py", line 16, in <module>
    from tomopy.algorithms.recon.art import art
  File "/Users/Li/Research/X-ray/Research_work/XRF/TomoPy/lib/python2.7/site-packages/tomopy-0.0.3-py2.7-macosx-10.5-x86_64.egg/tomopy/algorithms/recon/art.py", line 11, in <module>
    librecon = ctypes.CDLL(libpath)
  File "/Users/Li/anaconda/lib/python2.7/ctypes/__init__.py", line 365, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: dlopen(/Users/Li/Research/X-ray/Research_work/XRF/TomoPy/lib/python2.7/site-packages/tomopy-0.0.3-py2.7-macosx-10.5-x86_64.egg/tomopy/lib/librecon.so, 6): Library not loaded: libboost_thread.dylib
  Referenced from: /Users/Li/Research/X-ray/Research_work/XRF/TomoPy/lib/python2.7/site-packages/tomopy-0.0.3-py2.7-macosx-10.5-x86_64.egg/tomopy/lib/librecon.so
  Reason: image not found

NaN values at data import.

Automatically assign numeric values to NaN values in imported datasets. It's particularly important when loading APS fluorescence datasets that may have many NaN values.

Py Demo Fail

This is the output I get when running the demo. The images... they are mostly blank with some really fuzzy and misaligned stuff. You can't see the fuzzy stuff when I convert to jpeg from tiff.
test_00008

2014-12-05 17:54:19,929 - tomopy - WARNING - assumed 180-degree rotation [ok]
2014-12-05 17:54:19,929 - tomopy - DEBUG - data shape: [360, 16, 1280]
2014-12-05 17:54:20,132 - tomopy - DEBUG - normalize: cutoff: None
2014-12-05 17:54:20,132 - tomopy - DEBUG - normalize: negvals: 1
2014-12-05 17:54:20,132 - tomopy - INFO - normalize [ok]
2014-12-05 17:54:20,168 - tomopy - DEBUG - correct_drift: air_pixels: 20
2014-12-05 17:54:20,168 - tomopy - INFO - correct_drift [ok]
2014-12-05 17:54:23,100 - tomopy - DEBUG - phase_retrieval: pixel_size: 0.0001
2014-12-05 17:54:23,100 - tomopy - DEBUG - phase_retrieval: dist: 50
2014-12-05 17:54:23,100 - tomopy - DEBUG - phase_retrieval: energy: 20
2014-12-05 17:54:23,100 - tomopy - DEBUG - phase_retrieval: alpha: 0.0001
2014-12-05 17:54:23,100 - tomopy - DEBUG - phase_retrieval: padding: True
2014-12-05 17:54:23,100 - tomopy - INFO - phase_retrieval [ok]
2014-12-05 17:54:23,133 - tomopy - DEBUG - correct_drift: air_pixels: 20
2014-12-05 17:54:23,133 - tomopy - INFO - correct_drift [ok]
2014-12-05 17:54:38,855 - tomopy - INFO - gridrec [ok]

Installation problem

[email protected]

Dear Sir or Madam

I am trying to install tomopy on my mac which is running osx 10.9.5
I have install boost and fftw using home-brew in my machine before
I have setup the environment variable for them as you say on the instructions
However when I try to install the package I get the following error
n.o build/temp.macosx-10.6-x86_64-2.7/tomopy/algorithms/recon/gridrec/tomoReconPy.o -L -o build/lib.macosx-10.6-x86_64-2.7/tomopy/lib/librecon.so -lfftw3f -lboost_thread -lboost_system -lboost_date_time
g++: error: build/lib.macosx-10.6-x86_64-2.7/tomopy/lib/librecon.so: No such file or directory
error: command 'g++' failed with exit status 1

Do you have any idea what could be the problem?
Thanks you in advance

Best regards
Yannis

tiff.py indexing

file indexing on readTIFFStack does not work. I will work on it tonight and propose a solution

bunch issues

  1. gridrec should have ringWidth option as in the past
  2. tomopy.recon.rotation.write_center does not seem behave correctly. it should stop after saving trial reconstruction images. it however keeps doing something, probably repeating trial reconstruction again and again, after the first round is finished.
  3. in the old version tomopy, logarithm of the normalized data was done implicitly in gridrec routine. is this still same in the current version? If it is, is there a scale factor implicitly used in gridrec routine before the logarithm operation?
  4. current output is different from that with old version tomopy. first after 'normalize', the output are float in [0,1]. with old version tomopy, the output was rescaled integer in [0, 10000]. second, the reconstruction with phase retrieval has grayvalues in sample region smaller than the background. this is also opposite from that with old version.

Thanks,

Xianghui

Mac install

Environment variables should be revisited for Mac, e. g., DYLD_LIBRARY_PATH instead of LD_LIBRARY_PATH.

change README.md to README.rst and reformat

when running

python setup.py sdist

a warning is given:

sdist: standard file not found: should have one of README, README.rst, README.txt

README.rst has formatting and is recognized by GitHub

correct padding to sinogram

The correct padding size should be larger than twice of the sinogram.shape[2]. If sinogram.shape[2] is some number of power of 2, current default padding size to sinograms is simply equal to sinogram.shape[2]. To correct this we can modify the line 195 in gridrec.py to
while (paddedSinogramWidth < 2*data.shape[2]):

Issue about find_center

I am running the standard examples with find_center function.

def run_sim_data():
    obj = tomopy.shepp3d() # Generate an object.
    ang = tomopy.angles(180) # Generate uniformly spaced tilt angles.
    sim = tomopy.project(obj, ang) # Calculate projections.

    cen = tomopy.find_center(sim, ang)
    rec = tomopy.recon(sim, ang, center=cen, algorithm='art')

And I got the following error.

Traceback (most recent call last):
File "tomo_xrf.py", line 52, in
run_sim_data()
File "tomo_xrf.py", line 12, in run_sim_data
cen = tomopy.find_center(sim, ang)
File "/home/lili/mc/envs/my_analysis/lib/python2.7/site-packages/tomopy/recon/rotation.py", line 120, in find_center
rec = gridrec(tomo[:, ind:ind + 1, :], theta, emission=emission)
NameError: global name 'gridrec' is not defined

Thanks for any suggestions!

tiff.py

same issue I had yesterday came back:

I think is in
for m in range(len(ind)):
for n in range(digits):
if ind[m] < 10 * (n + 1):
fileName = dataFile + fileIndex[n] + str(ind[m]) + '.' + dataExtension
print 'FILE NAME *****', fileName
break

I added print 'FILE NAME *****', fileName and here is the output (it is basically done after loading 20 projections):


/local/data/PetraIII/ct2/ct2_00017.tif
FILE NAME ***** /local/data/PetraIII/ct2/ct2_00018.tif
Reading file: /local/data/PetraIII/ct2/ct2_00018.tif


/local/data/PetraIII/ct2/ct2_00018.tif
FILE NAME ***** /local/data/PetraIII/ct2/ct2_00019.tif
Reading file: /local/data/PetraIII/ct2/ct2_00019.tif


/local/data/PetraIII/ct2/ct2_00019.tif
FILE NAME ***** /local/data/PetraIII/ct2/ct2_0020.tif
FILE NAME ***** /local/data/PetraIII/ct2/ct2_0021.tif
FILE NAME ***** /local/data/PetraIII/ct2/ct2_0022.tif
FILE NAME ***** /local/data/PetraIII/ct2/ct2_0023.tif
FILE NAME ***** /local/data/PetraIII/ct2/ct2_0024.tif
FILE NAME ***** /local/data/PetraIII/ct2/ct2_0025.tif
FILE NAME ***** /local/data/PetraIII/ct2/ct2_0026.tif
FILE NAME ***** /local/data/PetraIII/ct2/ct2_0027.tif
FILE NAME ***** /local/data/PetraIII/ct2/ct2_0028.tif
FILE NAME ***** /local/data/PetraIII/ct2/ct2_0029.tif
FILE NAME ***** /local/data/PetraIII/ct2/ct2_030.tif
FILE NAME ***** /local/data/PetraIII/ct2/ct2_031.tif
FILE NAME ***** /local/data/PetraIII/ct2/ct2_032.tif
FILE NAME ***** /local/data/PetraIII/ct2/ct2_033.tif

Update docs

Explain requirements in docs more clearly. Suggest Scikits stable version.

Libs missing after install

python setup.py install worked but the test: python -c "import tomopy" failed with a missing shared library error OSError: /local/decarlo/tomopy-0.0.3/tomopy/lib/libprep.so: cannot open shared object file: No such file or directory,

user reports runtime error (same user as case 39 but on a different system)

cheolim@login1:~/TomoPy3> python Sample1_1_center.py
2014-09-11 21:42:47,834 - tomopy - WARNING - assumed 180-degree rotation [ok]
2014-09-11 21:42:47,847 - tomopy - DEBUG - data shape: [720, 2, 2560]
2014-09-11 21:42:49,603 - tomopy - DEBUG - normalize: cutoff: None
2014-09-11 21:42:49,603 - tomopy - INFO - normalize [ok]
2014-09-11 21:42:51,751 - tomopy - DEBUG - stripe_removal: level: 12
2014-09-11 21:42:51,751 - tomopy - DEBUG - stripe_removal: wname: db5
2014-09-11 21:42:51,752 - tomopy - DEBUG - stripe_removal: sigma: 2
2014-09-11 21:42:51,752 - tomopy - DEBUG - stripe_removal: padding: False
2014-09-11 21:42:51,752 - tomopy - INFO - stripe_removal [ok]
Traceback (most recent call last):
File "Sample1_1_center.py", line 42, in
d.downsample2d(level=level) # cltest
File "/N/soft/cle4/python/2.7.5/lib/python2.7/site-packages/tomopy-0.0.3-py2.7-linux-x86_64.egg/tomopy/xtomo/xtomo_preprocess.py", line 87, in _downsample2d
data = downsample2d(xtomo.data, level)
File "/N/soft/cle4/python/2.7.5/lib/python2.7/site-packages/tomopy-0.0.3-py2.7-linux-x86_64.egg/tomopy/algorithms/preprocess/downsample.py", line 81, in downsample2d
ctypes.c_int(num_projections),
TypeError: int expected instead of numpy.ndarray instance

Stripe Removal Information Request

Is there a reference available which describes the level, sigma and wname parameters?

For example:
For stripe_removal:
level - reasonable range (n to m); effect of range variation; tradeoffs (i.e. noise vs. blur vs. processing speed)
sigma - resonable range (p to q); effect of range variation; tradeoffs
wname - wavelet filter type - ? options and effects, etc. as above.

Also compare and contrast stripe_removal with stripe_removal2 (and it's parameters "Number of Blocks and alpha (damping factor)?

Thanks very much,

Steve J.

Conda installed latest tomopy but couldn't run test successfully

$ python test_recon.py
No handlers could be found for logger "tomopy.prep"

EEEEEEEEEEEE

ERROR: main.test_simulate

Traceback (most recent call last):
File "/home/wxu/anaconda/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "test_recon.py", line 82, in test_simulate
out = simulate(synthetic_data(), theta=(0., 1.))
File "/home/wxu/anaconda/lib/python2.7/site-packages/tomopy/recon.py", line 136, in simulate
LIB_TOMOPY.simulate.restype = ctypes.POINTER(ctypes.c_void_p)
AttributeError: 'NoneType' object has no attribute 'simulate'

ERROR: main.test_gridrec

Traceback (most recent call last):
File "/home/wxu/anaconda/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "test_recon.py", line 88, in test_gridrec
out = gridrec(synthetic_data(), theta=(0., 1.))
File "/home/wxu/anaconda/lib/python2.7/site-packages/tomopy/recon.py", line 209, in gridrec
LIB_TOMOPY.gridrec.restype = ctypes.POINTER(ctypes.c_void_p)
AttributeError: 'NoneType' object has no attribute 'gridrec'

ERROR: main.test_art

Traceback (most recent call last):
File "/home/wxu/anaconda/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "test_recon.py", line 94, in test_art
out = art(synthetic_data(), theta=(0., 1.))
File "/home/wxu/anaconda/lib/python2.7/site-packages/tomopy/recon.py", line 284, in art
LIB_TOMOPY.art.restype = ctypes.POINTER(ctypes.c_void_p)
AttributeError: 'NoneType' object has no attribute 'art'

ERROR: main.test_bart

Traceback (most recent call last):
File "/home/wxu/anaconda/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "test_recon.py", line 100, in test_bart
out = bart(synthetic_data(), theta=(0., 1.))
File "/home/wxu/anaconda/lib/python2.7/site-packages/tomopy/recon.py", line 366, in bart
LIB_TOMOPY.bart.restype = ctypes.POINTER(ctypes.c_void_p)
AttributeError: 'NoneType' object has no attribute 'bart'

ERROR: main.test_fbp

Traceback (most recent call last):
File "/home/wxu/anaconda/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "test_recon.py", line 106, in test_fbp
out = fbp(synthetic_data(), theta=(0., 1.))
File "/home/wxu/anaconda/lib/python2.7/site-packages/tomopy/recon.py", line 435, in fbp
LIB_TOMOPY.fbp.restype = ctypes.POINTER(ctypes.c_void_p)
AttributeError: 'NoneType' object has no attribute 'fbp'

ERROR: main.test_mlem

Traceback (most recent call last):
File "/home/wxu/anaconda/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "test_recon.py", line 112, in test_mlem
out = mlem(synthetic_data(), theta=(0., 1.))
File "/home/wxu/anaconda/lib/python2.7/site-packages/tomopy/recon.py", line 505, in mlem
LIB_TOMOPY.mlem.restype = ctypes.POINTER(ctypes.c_void_p)
AttributeError: 'NoneType' object has no attribute 'mlem'

ERROR: main.test_osem

Traceback (most recent call last):
File "/home/wxu/anaconda/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "test_recon.py", line 118, in test_osem
out = osem(synthetic_data(), theta=(0., 1.))
File "/home/wxu/anaconda/lib/python2.7/site-packages/tomopy/recon.py", line 587, in osem
LIB_TOMOPY.osem.restype = ctypes.POINTER(ctypes.c_void_p)
AttributeError: 'NoneType' object has no attribute 'osem'

ERROR: main.test_ospml_hybrid

Traceback (most recent call last):
File "/home/wxu/anaconda/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "test_recon.py", line 124, in test_ospml_hybrid
out = ospml_hybrid(synthetic_data(), theta=(0., 1.))
File "/home/wxu/anaconda/lib/python2.7/site-packages/tomopy/recon.py", line 678, in ospml_hybrid
LIB_TOMOPY.ospml_hybrid.restype = ctypes.POINTER(ctypes.c_void_p)
AttributeError: 'NoneType' object has no attribute 'ospml_hybrid'

ERROR: main.test_ospml_quad

Traceback (most recent call last):
File "/home/wxu/anaconda/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "test_recon.py", line 130, in test_ospml_quad
out = ospml_quad(synthetic_data(), theta=(0., 1.))
File "/home/wxu/anaconda/lib/python2.7/site-packages/tomopy/recon.py", line 769, in ospml_quad
LIB_TOMOPY.ospml_quad.restype = ctypes.POINTER(ctypes.c_void_p)
AttributeError: 'NoneType' object has no attribute 'ospml_quad'

ERROR: main.test_pml_hybrid

Traceback (most recent call last):
File "/home/wxu/anaconda/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "test_recon.py", line 136, in test_pml_hybrid
out = pml_hybrid(synthetic_data(), theta=(0., 1.))
File "/home/wxu/anaconda/lib/python2.7/site-packages/tomopy/recon.py", line 855, in pml_hybrid
LIB_TOMOPY.pml_hybrid.restype = ctypes.POINTER(ctypes.c_void_p)
AttributeError: 'NoneType' object has no attribute 'pml_hybrid'

ERROR: main.test_pml_quad

Traceback (most recent call last):
File "/home/wxu/anaconda/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "test_recon.py", line 142, in test_pml_quad
out = pml_quad(synthetic_data(), theta=(0., 1.))
File "/home/wxu/anaconda/lib/python2.7/site-packages/tomopy/recon.py", line 935, in pml_quad
LIB_TOMOPY.pml_quad.restype = ctypes.POINTER(ctypes.c_void_p)
AttributeError: 'NoneType' object has no attribute 'pml_quad'

ERROR: main.test_sirt

Traceback (most recent call last):
File "/home/wxu/anaconda/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "test_recon.py", line 148, in test_sirt
out = sirt(synthetic_data(), theta=(0., 1.))
File "/home/wxu/anaconda/lib/python2.7/site-packages/tomopy/recon.py", line 1007, in sirt
LIB_TOMOPY.sirt.restype = ctypes.POINTER(ctypes.c_void_p)
AttributeError: 'NoneType' object has no attribute 'sirt'


Ran 12 tests in 0.004s

FAILED (errors=12)

user reports installation error

Could you give us some advice to fix following error?
OSError: libboost_thread.so.1.55.0: cannot open shared object file: No such file or directory

Reply:
boost is a library that handles the multi-thread in the reconstruction routine called gridrec.
during the installation (python install.py --boost --fftw) did you get any error?
did you install in the default directory or set a path? (see http://tomopy.github.io/tomopy/install.html)
if you set a path did you:

setenv LD_LIBRARY_PATH /lib
setenv C_INCLUDE_PATH /include

did you install tomopy as administrator or as user?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.