Skip to content

Commit

Permalink
Merge pull request #57 from tomography/tike
Browse files Browse the repository at this point in the history
Scope reduction and API change
  • Loading branch information
carterbox authored Aug 16, 2018
2 parents 6fa6ed8 + 6936863 commit 8bc68ce
Show file tree
Hide file tree
Showing 28 changed files with 1,024 additions and 1,817 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,4 @@ Thumbs.db
.spyderworkspace
*.*~
*~
.*
17 changes: 11 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ language: python

python:
- "2.7"
- "3.4"
- "3.5"
- "3.6"

os:
- linux
Expand All @@ -30,13 +30,18 @@ before_install:
- conda install anaconda-client

install:
- conda install python=$TRAVIS_PYTHON_VERSION nose six numpy scipy matplotlib python-coveralls pillow cached-property setuptools
- pip install phasepack polytope
- conda install python=$TRAVIS_PYTHON_VERSION setuptools
- if [[ "$TRAVIS_PYTHON_VERSION" == "3.5" ]]; then
conda install python-coveralls;
fi
- conda install nose six numpy scipy matplotlib requests cached-property
- pip install phasepack
- conda info -a
- python setup.py build_ext --inplace

script:
- nosetests tests --with-coverage
- nosetests tests -vs --with-coverage

after_success:
- coveralls
- if [[ "$TRAVIS_PYTHON_VERSION" == "3.5" ]]; then
coveralls;
fi
3 changes: 1 addition & 2 deletions docs/source/api/xdesign.acquisition.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@

.. autosummary::

sinogram
raster_scan
raster_scan2D
31 changes: 31 additions & 0 deletions docs/source/bibtex/refs.bib
Original file line number Diff line number Diff line change
@@ -1,3 +1,34 @@
@article{Gordon1970,
author = {Gordon, Richard and Bender, Robert and Herman, Gabor T.},
doi = {10.1016/0022-5193(70)90109-8},
isbn = {0022-5193 (Print)$\backslash$n0022-5193 (Linking)},
issn = {10958541},
journal = {Journal of Theoretical Biology},
month = {dec},
number = {3},
pages = {471--481},
pmid = {5492997},
title = {{Algebraic Reconstruction Techniques (ART) for three-dimensional electron microscopy and X-ray photography}},
url = {https://doi.org/10.1016/0022-5193(70)90109-8},
volume = {29},
year = {1970}
}


@article{Gilbert1972,
abstract = {A method of reconstruction (ART) has recently been proposed (Gordon, Bender {\&} Herman, 1970) which consists in iteratively changing a trial structure until its projections are consistent with the original projections of the unknown structure. It is shown that in general ART produces erroneous reconstructions. An alternative iterative method is proposed which will give correct reconstructions under certain conditions. One of the potential applications of this method is in determining the three-dimensional structure of objects from electron micrographs. {\textcopyright} 1972.},
author = {Gilbert, Peter},
doi = {10.1016/0022-5193(72)90180-4},
isbn = {0022-5193},
issn = {10958541},
journal = {Journal of Theoretical Biology},
pmid = {5070894},
title = {{Iterative methods for the three-dimensional reconstruction of an object from projections}},
year = {1972},
url = {https://doi.org/10.1016/0022-5193(72)90180-4}
}


@article{AlRaoush:03,
author = {Al-Raoush R and Thompson K and Willson CS},
title = {Comparison of network generation techniques for unconsolidated porous media},
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ def __getattr__(cls, name):
MOCK_MODULES = ['numpy',
'matplotlib', 'matplotlib.pyplot', 'matplotlib.patches',
'matplotlib.path', 'matplotlib.patheffects', 'matplotlib.axis',
'polytope',
'matplotlib.collections',
'cached_property',
'scipy', 'scipy.stats', 'scipy.ndimage', 'scipy.spatial',
'cycler',
Expand Down
229 changes: 121 additions & 108 deletions docs/source/demos/FullReferenceMetrics.ipynb

Large diffs are not rendered by default.

333 changes: 101 additions & 232 deletions docs/source/demos/NoReferenceMetrics.ipynb

Large diffs are not rendered by default.

88 changes: 54 additions & 34 deletions docs/source/demos/Shepp.ipynb

Large diffs are not rendered by default.

42 changes: 22 additions & 20 deletions docs/source/demos/StandardPatterns.ipynb

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ requirements:
- six
- matplotlib
- phasepack
- pyfftw
- cached-property
- polytope

Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ six
numpy
scipy
matplotlib
requests
phasepack
cached-property
polytope >= 0.1.4
requests
2 changes: 1 addition & 1 deletion tests/DynamicRange[10, False].txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Phantom(geometry=Polygon(vertices=[Point([1.0, 1.0]), Point([0.0, 1.0]), Point([0.0, 0.0]), Point([1.0, 0.0])], sign=1), children=[Phantom(geometry=Circle(center=Point([0.44538880985485596, 0.84280137568431979]), radius=0.0625, sign=1), children=[], material=SimpleMaterial(mass_attenuation=4.0)), Phantom(geometry=Circle(center=Point([0.90570491543840059, 0.39801132897255548]), radius=0.0625, sign=1), children=[], material=SimpleMaterial(mass_attenuation=256.0)), Phantom(geometry=Circle(center=Point([0.75525940832233152, 0.52528305478379145]), radius=0.0625, sign=1), children=[], material=SimpleMaterial(mass_attenuation=16.0)), Phantom(geometry=Circle(center=Point([0.12465655092315107, 0.13873813723884812]), radius=0.0625, sign=1), children=[], material=SimpleMaterial(mass_attenuation=512.0)), Phantom(geometry=Circle(center=Point([0.080191097760285004, 0.79104236485444579]), radius=0.0625, sign=1), children=[], material=SimpleMaterial(mass_attenuation=2.0)), Phantom(geometry=Circle(center=Point([0.74338715708111913, 0.82376062971596675]), radius=0.0625, sign=1), children=[], material=SimpleMaterial(mass_attenuation=64.0)), Phantom(geometry=Circle(center=Point([0.91879104945366852, 0.76176374368963318]), radius=0.0625, sign=1), children=[], material=SimpleMaterial(mass_attenuation=128.0)), Phantom(geometry=Circle(center=Point([0.16599012263531657, 0.62243089366158333]), radius=0.0625, sign=1), children=[], material=SimpleMaterial(mass_attenuation=8.0)), Phantom(geometry=Circle(center=Point([0.51911728153131276, 0.42532919749170817]), radius=0.0625, sign=1), children=[], material=SimpleMaterial(mass_attenuation=1.0)), Phantom(geometry=Circle(center=Point([0.67292729643635674, 0.1151972876756111]), radius=0.0625, sign=1), children=[], material=SimpleMaterial(mass_attenuation=32.0))], material=None)
Phantom(geometry=Rectangle(Point([-0.5, -0.5]), [1, 1]), children=[Phantom(geometry=Circle(center=Point([-0.55461119014514404, -0.15719862431568021]), radius=0.0625, sign=1), children=[], material=SimpleMaterial(mass_attenuation=4.0)), Phantom(geometry=Circle(center=Point([-0.094295084561599407, -0.60198867102744447]), radius=0.0625, sign=1), children=[], material=SimpleMaterial(mass_attenuation=256.0)), Phantom(geometry=Circle(center=Point([-0.24474059167766848, -0.47471694521620855]), radius=0.0625, sign=1), children=[], material=SimpleMaterial(mass_attenuation=16.0)), Phantom(geometry=Circle(center=Point([-0.87534344907684891, -0.86126186276115191]), radius=0.0625, sign=1), children=[], material=SimpleMaterial(mass_attenuation=512.0)), Phantom(geometry=Circle(center=Point([-0.91980890223971501, -0.20895763514555421]), radius=0.0625, sign=1), children=[], material=SimpleMaterial(mass_attenuation=2.0)), Phantom(geometry=Circle(center=Point([-0.25661284291888087, -0.17623937028403325]), radius=0.0625, sign=1), children=[], material=SimpleMaterial(mass_attenuation=64.0)), Phantom(geometry=Circle(center=Point([-0.081208950546331482, -0.23823625631036682]), radius=0.0625, sign=1), children=[], material=SimpleMaterial(mass_attenuation=128.0)), Phantom(geometry=Circle(center=Point([-0.83400987736468346, -0.37756910633841667]), radius=0.0625, sign=1), children=[], material=SimpleMaterial(mass_attenuation=8.0)), Phantom(geometry=Circle(center=Point([-0.4808827184686873, -0.57467080250829183]), radius=0.0625, sign=1), children=[], material=SimpleMaterial(mass_attenuation=1.0)), Phantom(geometry=Circle(center=Point([-0.32707270356364326, -0.8848027123243889]), radius=0.0625, sign=1), children=[], material=SimpleMaterial(mass_attenuation=32.0))], material=None)
2 changes: 1 addition & 1 deletion tests/DynamicRange[10, True].txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Phantom(geometry=Polygon(vertices=[Point([1.0, 1.0]), Point([0.0, 1.0]), Point([0.0, 0.0]), Point([1.0, 0.0])], sign=1), children=[Phantom(geometry=Circle(center=Point([0.11719840140783656, 0.065027299680040715]), radius=0.0625, sign=1), children=[], material=SimpleMaterial(mass_attenuation=4.0)), Phantom(geometry=Circle(center=Point([0.42397162509775999, 0.16657748069349226]), radius=0.0625, sign=1), children=[], material=SimpleMaterial(mass_attenuation=256.0)), Phantom(geometry=Circle(center=Point([0.68295784506262869, 0.1597695938687313]), radius=0.0625, sign=1), children=[], material=SimpleMaterial(mass_attenuation=16.0)), Phantom(geometry=Circle(center=Point([0.86043018985322217, 0.17125151853085241]), radius=0.0625, sign=1), children=[], material=SimpleMaterial(mass_attenuation=512.0)), Phantom(geometry=Circle(center=Point([0.16146562976033307, 0.43482729277909549]), radius=0.0625, sign=1), children=[], material=SimpleMaterial(mass_attenuation=2.0)), Phantom(geometry=Circle(center=Point([0.37861186496911303, 0.41239482052709042]), radius=0.0625, sign=1), children=[], material=SimpleMaterial(mass_attenuation=64.0)), Phantom(geometry=Circle(center=Point([0.63350557013674158, 0.37018492028161648]), radius=0.0625, sign=1), children=[], material=SimpleMaterial(mass_attenuation=128.0)), Phantom(geometry=Circle(center=Point([0.92819957978658263, 0.4100661470358069]), radius=0.0625, sign=1), children=[], material=SimpleMaterial(mass_attenuation=8.0)), Phantom(geometry=Circle(center=Point([0.071379507274735868, 0.57728430323361668]), radius=0.0625, sign=1), children=[], material=SimpleMaterial(mass_attenuation=1.0)), Phantom(geometry=Circle(center=Point([0.32339116246269262, 0.64249012766594049]), radius=0.0625, sign=1), children=[], material=SimpleMaterial(mass_attenuation=32.0))], material=None)
Phantom(geometry=Rectangle(Point([0.0, 0.0]), [1, 1]), children=[Phantom(geometry=Circle(center=Point([-0.38280159859216345, -0.43497270031995927]), radius=0.0625, sign=1), children=[], material=SimpleMaterial(mass_attenuation=4.0)), Phantom(geometry=Circle(center=Point([-0.076028374902240015, -0.33342251930650774]), radius=0.0625, sign=1), children=[], material=SimpleMaterial(mass_attenuation=256.0)), Phantom(geometry=Circle(center=Point([0.18295784506262869, -0.3402304061312687]), radius=0.0625, sign=1), children=[], material=SimpleMaterial(mass_attenuation=16.0)), Phantom(geometry=Circle(center=Point([0.36043018985322217, -0.32874848146914759]), radius=0.0625, sign=1), children=[], material=SimpleMaterial(mass_attenuation=512.0)), Phantom(geometry=Circle(center=Point([-0.33853437023966693, -0.065172707220904513]), radius=0.0625, sign=1), children=[], material=SimpleMaterial(mass_attenuation=2.0)), Phantom(geometry=Circle(center=Point([-0.12138813503088697, -0.087605179472909578]), radius=0.0625, sign=1), children=[], material=SimpleMaterial(mass_attenuation=64.0)), Phantom(geometry=Circle(center=Point([0.13350557013674158, -0.12981507971838352]), radius=0.0625, sign=1), children=[], material=SimpleMaterial(mass_attenuation=128.0)), Phantom(geometry=Circle(center=Point([0.42819957978658263, -0.089933852964193095]), radius=0.0625, sign=1), children=[], material=SimpleMaterial(mass_attenuation=8.0)), Phantom(geometry=Circle(center=Point([-0.42862049272526415, 0.07728430323361668]), radius=0.0625, sign=1), children=[], material=SimpleMaterial(mass_attenuation=1.0)), Phantom(geometry=Circle(center=Point([-0.17660883753730738, 0.14249012766594049]), radius=0.0625, sign=1), children=[], material=SimpleMaterial(mass_attenuation=32.0))], material=None)
2 changes: 1 addition & 1 deletion tests/HyperbolicConcentric[].txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Phantom(geometry=None, children=[Phantom(geometry=Circle(center=Point([0.5, 0.5]), radius=0.5), children=[], material=SimpleMaterial(mass_attenuation=1.0)), Phantom(geometry=Circle(center=Point([0.5, 0.5]), radius=0.4898979485566356), children=[], material=SimpleMaterial(mass_attenuation=-1.0)), Phantom(geometry=Circle(center=Point([0.5, 0.5]), radius=0.4795831523312719), children=[], material=SimpleMaterial(mass_attenuation=1.0)), Phantom(geometry=Circle(center=Point([0.5, 0.5]), radius=0.469041575982343), children=[], material=SimpleMaterial(mass_attenuation=-1.0)), Phantom(geometry=Circle(center=Point([0.5, 0.5]), radius=0.458257569495584), children=[], material=SimpleMaterial(mass_attenuation=1.0)), Phantom(geometry=Circle(center=Point([0.5, 0.5]), radius=0.447213595499958), children=[], material=SimpleMaterial(mass_attenuation=-1.0)), Phantom(geometry=Circle(center=Point([0.5, 0.5]), radius=0.43588989435406744), children=[], material=SimpleMaterial(mass_attenuation=1.0)), Phantom(geometry=Circle(center=Point([0.5, 0.5]), radius=0.4242640687119285), children=[], material=SimpleMaterial(mass_attenuation=-1.0)), Phantom(geometry=Circle(center=Point([0.5, 0.5]), radius=0.41231056256176607), children=[], material=SimpleMaterial(mass_attenuation=1.0)), Phantom(geometry=Circle(center=Point([0.5, 0.5]), radius=0.4), children=[], material=SimpleMaterial(mass_attenuation=-1.0)), Phantom(geometry=Circle(center=Point([0.5, 0.5]), radius=0.3872983346207417), children=[], material=SimpleMaterial(mass_attenuation=1.0)), Phantom(geometry=Circle(center=Point([0.5, 0.5]), radius=0.37416573867739417), children=[], material=SimpleMaterial(mass_attenuation=-1.0)), Phantom(geometry=Circle(center=Point([0.5, 0.5]), radius=0.36055512754639896), children=[], material=SimpleMaterial(mass_attenuation=1.0)), Phantom(geometry=Circle(center=Point([0.5, 0.5]), radius=0.34641016151377546), children=[], material=SimpleMaterial(mass_attenuation=-1.0)), Phantom(geometry=Circle(center=Point([0.5, 0.5]), radius=0.33166247903554), children=[], material=SimpleMaterial(mass_attenuation=1.0)), Phantom(geometry=Circle(center=Point([0.5, 0.5]), radius=0.316227766016838), children=[], material=SimpleMaterial(mass_attenuation=-1.0)), Phantom(geometry=Circle(center=Point([0.5, 0.5]), radius=0.30000000000000004), children=[], material=SimpleMaterial(mass_attenuation=1.0)), Phantom(geometry=Circle(center=Point([0.5, 0.5]), radius=0.28284271247461906), children=[], material=SimpleMaterial(mass_attenuation=-1.0)), Phantom(geometry=Circle(center=Point([0.5, 0.5]), radius=0.2645751311064591), children=[], material=SimpleMaterial(mass_attenuation=1.0)), Phantom(geometry=Circle(center=Point([0.5, 0.5]), radius=0.2449489742783178), children=[], material=SimpleMaterial(mass_attenuation=-1.0)), Phantom(geometry=Circle(center=Point([0.5, 0.5]), radius=0.223606797749979), children=[], material=SimpleMaterial(mass_attenuation=1.0)), Phantom(geometry=Circle(center=Point([0.5, 0.5]), radius=0.2), children=[], material=SimpleMaterial(mass_attenuation=-1.0)), Phantom(geometry=Circle(center=Point([0.5, 0.5]), radius=0.17320508075688773), children=[], material=SimpleMaterial(mass_attenuation=1.0)), Phantom(geometry=Circle(center=Point([0.5, 0.5]), radius=0.14142135623730953), children=[], material=SimpleMaterial(mass_attenuation=-1.0)), Phantom(geometry=Circle(center=Point([0.5, 0.5]), radius=0.1), children=[], material=SimpleMaterial(mass_attenuation=1.0))], material=None)
Phantom(geometry=None, children=[Phantom(geometry=Circle(center=Point([0.0, 0.0]), radius=0.5, sign=1), children=[], material=SimpleMaterial(mass_attenuation=1.0)), Phantom(geometry=Circle(center=Point([0.0, 0.0]), radius=0.4898979485566356, sign=1), children=[], material=SimpleMaterial(mass_attenuation=-1.0)), Phantom(geometry=Circle(center=Point([0.0, 0.0]), radius=0.4795831523312719, sign=1), children=[], material=SimpleMaterial(mass_attenuation=1.0)), Phantom(geometry=Circle(center=Point([0.0, 0.0]), radius=0.469041575982343, sign=1), children=[], material=SimpleMaterial(mass_attenuation=-1.0)), Phantom(geometry=Circle(center=Point([0.0, 0.0]), radius=0.458257569495584, sign=1), children=[], material=SimpleMaterial(mass_attenuation=1.0)), Phantom(geometry=Circle(center=Point([0.0, 0.0]), radius=0.447213595499958, sign=1), children=[], material=SimpleMaterial(mass_attenuation=-1.0)), Phantom(geometry=Circle(center=Point([0.0, 0.0]), radius=0.43588989435406744, sign=1), children=[], material=SimpleMaterial(mass_attenuation=1.0)), Phantom(geometry=Circle(center=Point([0.0, 0.0]), radius=0.4242640687119285, sign=1), children=[], material=SimpleMaterial(mass_attenuation=-1.0)), Phantom(geometry=Circle(center=Point([0.0, 0.0]), radius=0.41231056256176607, sign=1), children=[], material=SimpleMaterial(mass_attenuation=1.0)), Phantom(geometry=Circle(center=Point([0.0, 0.0]), radius=0.4, sign=1), children=[], material=SimpleMaterial(mass_attenuation=-1.0)), Phantom(geometry=Circle(center=Point([0.0, 0.0]), radius=0.3872983346207417, sign=1), children=[], material=SimpleMaterial(mass_attenuation=1.0)), Phantom(geometry=Circle(center=Point([0.0, 0.0]), radius=0.37416573867739417, sign=1), children=[], material=SimpleMaterial(mass_attenuation=-1.0)), Phantom(geometry=Circle(center=Point([0.0, 0.0]), radius=0.36055512754639896, sign=1), children=[], material=SimpleMaterial(mass_attenuation=1.0)), Phantom(geometry=Circle(center=Point([0.0, 0.0]), radius=0.34641016151377546, sign=1), children=[], material=SimpleMaterial(mass_attenuation=-1.0)), Phantom(geometry=Circle(center=Point([0.0, 0.0]), radius=0.33166247903554, sign=1), children=[], material=SimpleMaterial(mass_attenuation=1.0)), Phantom(geometry=Circle(center=Point([0.0, 0.0]), radius=0.316227766016838, sign=1), children=[], material=SimpleMaterial(mass_attenuation=-1.0)), Phantom(geometry=Circle(center=Point([0.0, 0.0]), radius=0.30000000000000004, sign=1), children=[], material=SimpleMaterial(mass_attenuation=1.0)), Phantom(geometry=Circle(center=Point([0.0, 0.0]), radius=0.28284271247461906, sign=1), children=[], material=SimpleMaterial(mass_attenuation=-1.0)), Phantom(geometry=Circle(center=Point([0.0, 0.0]), radius=0.2645751311064591, sign=1), children=[], material=SimpleMaterial(mass_attenuation=1.0)), Phantom(geometry=Circle(center=Point([0.0, 0.0]), radius=0.2449489742783178, sign=1), children=[], material=SimpleMaterial(mass_attenuation=-1.0)), Phantom(geometry=Circle(center=Point([0.0, 0.0]), radius=0.223606797749979, sign=1), children=[], material=SimpleMaterial(mass_attenuation=1.0)), Phantom(geometry=Circle(center=Point([0.0, 0.0]), radius=0.2, sign=1), children=[], material=SimpleMaterial(mass_attenuation=-1.0)), Phantom(geometry=Circle(center=Point([0.0, 0.0]), radius=0.17320508075688773, sign=1), children=[], material=SimpleMaterial(mass_attenuation=1.0)), Phantom(geometry=Circle(center=Point([0.0, 0.0]), radius=0.14142135623730953, sign=1), children=[], material=SimpleMaterial(mass_attenuation=-1.0)), Phantom(geometry=Circle(center=Point([0.0, 0.0]), radius=0.1, sign=1), children=[], material=SimpleMaterial(mass_attenuation=1.0))], material=None)
Loading

0 comments on commit 8bc68ce

Please sign in to comment.