Skip to content

Commit

Permalink
Replaced all tomotools with etspy (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewHerzing authored Jul 16, 2024
1 parent b466980 commit 6f63006
Show file tree
Hide file tree
Showing 24 changed files with 706 additions and 1,241 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ jobs:
- uses: actions/checkout@v4
- run: pip install flake8
- run: pip install pydocstyle
- run: flake8 --exclude=api.py --ignore=E501 tomotools/
- run: flake8 --exclude=api.py --ignore=E501 etspy/
- if: always()
run: pydocstyle tomotools/
run: pydocstyle etspy/

pytest:
runs-on: ubuntu-latest
Expand All @@ -18,6 +18,6 @@ jobs:
steps:
- uses: actions/checkout@v4
- run: pip install -e ./
- run: pytest --doctest-modules --ignore=tomotools/tests/test_datasets.py tomotools/
- run: pytest --doctest-modules --ignore=etspy/tests/test_datasets.py etspy/
- if: always()
run: pytest --ignore=tomotools/tests/test_datasets.py tomotools/tests/
run: pytest --ignore=etspy/tests/test_datasets.py etspy/tests/
8 changes: 4 additions & 4 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ pytest-doctest:
stage: test
script:
- python setup.py install
- pytest --doctest-modules tomotools/ --ignore=tomotools/tomotools/tests/test_datasets.py
- pytest --doctest-modules etspy/ --ignore=etspy/etspy/tests/test_datasets.py

pytest-doctest:
stage: test
script:
- pytest tomotools/tomotools/tests/ --ignore=tomotools/tomotools/tests/test_datasets.py
- pytest etspy/etspy/tests/ --ignore=etspy/etspy/tests/test_datasets.py

flake8_checks:
stage: test
script:
- flake8 --exclude=api.py --ignore=E501 tomotools/
- flake8 --exclude=api.py --ignore=E501 etspy/

pydocstyle_checks:
stage: test
script:
- pydocstyle tomotools/
- pydocstyle etspy/
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
TomoTools package
ETSpy package
===========

TomoTools is a Hyperspy-based software package for the aligment and reconstruction
ETSpy is a Hyperspy-based software package for the aligment and reconstruction
of electron tomography data from TEM/STEM instruments. Tools are provided for basic
tilt series data processing, stack alignment, and reconstruction using the astra-toolbox.

Expand All @@ -20,14 +20,14 @@ Installation
conda install -c conda-forge hyperspy-base hyperspy-gui-ipywidgets
```

* Install the TomoTools package from GitHub:
* Install the ETSpy package from GitHub:
```bash
pip install git+https://github.com/usnistgov/tomotools.git
pip install git+https://github.com/usnistgov/etspy.git
```

Optional (higly recommended):
---------------------
* Install `ipympl` and `ipykernel` to use `tomotools` with Jupyter.
* Install `ipympl` and `ipykernel` to use `etspy` with Jupyter.
* `ipympl` enables interactive plotting in Jupyter Lab or Notebook.
* `ipykernel` allows use of the the tomoools kernel with Jupyter installed in a different environment.

Expand All @@ -40,7 +40,7 @@ Removal
The package can be removed with:

```bash
pip uninstall tomotools
pip uninstall etspy
```


Expand All @@ -49,16 +49,16 @@ Usage
In python or ipython:

```python
import tomotools.api as tomotools
stack = tomotools.load('TiltSeries.mrc')
import etspy.api as etspy
stack = etspy.load('TiltSeries.mrc')
```

Documentation is very limited at this point


Documentation
-------------
Release: https://github.com/usnistgov/tomotools
Release: https://github.com/usnistgov/etspy

A demo notebook is available in the resources folder. More documentation
will be made available over time.
Expand Down
66 changes: 33 additions & 33 deletions resources/tomotools demo.html → resources/etspy demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head><meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>TomoTools Demo</title><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script>
<title>ETSpy Demo</title><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script>



Expand Down Expand Up @@ -14580,7 +14580,7 @@
</div>
<div class="jp-InputArea jp-Cell-inputArea"><div class="jp-InputPrompt jp-InputArea-prompt">
</div><div class="jp-RenderedHTMLCommon jp-RenderedMarkdown jp-MarkdownOutput " data-mime-type="text/markdown">
<h1 id="TomoTools-Demo">TomoTools Demo<a class="anchor-link" href="#TomoTools-Demo">&#182;</a></h1><p>This notebook demonstrates the basic use and functionality of the TomoTools package.</p>
<h1 id="ETSpy-Demo">ETSpy Demo<a class="anchor-link" href="#ETSpy-Demo">&#182;</a></h1><p>This notebook demonstrates the basic use and functionality of the ETSpy package.</p>
<p>It covers:</p>
<ul>
<li>Loading simulated data</li>
Expand All @@ -14601,12 +14601,12 @@ <h1 id="TomoTools-Demo">TomoTools Demo<a class="anchor-link" href="#TomoTools-De
<div class="jp-InputArea jp-Cell-inputArea"><div class="jp-InputPrompt jp-InputArea-prompt">
</div><div class="jp-RenderedHTMLCommon jp-RenderedMarkdown jp-MarkdownOutput " data-mime-type="text/markdown">
<h1 id="Imports">Imports<a class="anchor-link" href="#Imports">&#182;</a></h1><p>For interactive plotting, we set the Matplotlib backend to <code>widget</code>.</p>
<p>In addition to the <code>tomotools</code> package itself we also need to import:</p>
<p>In addition to the <code>etspy</code> package itself we also need to import:</p>
<ul>
<li>PyPlot from MatplotLib</li>
<li>Hyperspy</li>
</ul>
<p>Finally, we also need to import the <code>datasets</code> module of <code>tomotools</code> in order to load the simluated data we will be working with.</p>
<p>Finally, we also need to import the <code>datasets</code> module of <code>etspyng with.</p>

</div>
</div>
Expand All @@ -14627,8 +14627,8 @@ <h1 id="Imports">Imports<a class="anchor-link" href="#Imports">&#182;</a></h1><p
<span class="kn">import</span> <span class="nn">matplotlib.pyplot</span> <span class="k">as</span> <span class="nn">plt</span>
<span class="kn">import</span> <span class="nn">hyperspy.api</span> <span class="k">as</span> <span class="nn">hs</span>

<span class="kn">import</span> <span class="nn">tomotools.api</span> <span class="k">as</span> <span class="nn">tomo</span>
<span class="kn">from</span> <span class="nn">tomotools</span> <span class="kn">import</span> <span class="n">datasets</span> <span class="k">as</span> <span class="n">ds</span>
<span class="kn">import</span> <span class="nn">etspy.api</span> <span class="k">as</span> <span class="nn">tomo</span>
<span class="kn">from</span> <span class="nn">etspy<span class="kn">import</span> <span class="n">datasets</span> <span class="k">as</span> <span class="n">ds</span>
</pre></div>

</div>
Expand Down Expand Up @@ -14961,8 +14961,8 @@ <h2 id="Stack-Registration">Stack Registration<a class="anchor-link" href="#Stac


<div class="jp-RenderedText jp-OutputArea-output" data-mime-type="application/vnd.jupyter.stderr">
<pre>INFO:tomotools.align:Performing stack registration using PyStackReg
INFO:tomotools.align:Stack registration complete
<pre>INFO:etspyerforming stack registration using PyStackReg
INFO:etspy.align:Stack registration complete
</pre>
</div>
</div>
Expand Down Expand Up @@ -15127,9 +15127,9 @@ <h3 id="Filtered-Backprojection-of-Single-Slice">Filtered Backprojection of Sing


<div class="jp-RenderedText jp-OutputArea-output" data-mime-type="application/vnd.jupyter.stderr">
<pre>INFO:tomotools.recon:Reconstructing volume using FBP
INFO:tomotools.recon:Reconstruction using 64 cores
INFO:tomotools.recon:Reconstruction complete
<pre>INFO:etspy
INFO:etspy.recon:Reconstruction using 64 cores
INFO:etspy.recon:Reconstruction complete
</pre>
</div>
</div>
Expand Down Expand Up @@ -15231,7 +15231,7 @@ <h3 id="SIRT-Error-Analysis">SIRT Error Analysis<a class="anchor-link" href="#SI


<div class="jp-RenderedText jp-OutputArea-output" data-mime-type="application/vnd.jupyter.stderr">
<pre>INFO:tomotools.base:CUDA detected with Astra
<pre>INFO:etspy.base:CUDA detected with Astra
</pre>
</div>
</div>
Expand Down Expand Up @@ -15396,10 +15396,10 @@ <h3 id="Reconstruct-the-entire-binned-stack">Reconstruct the entire binned stack


<div class="jp-RenderedText jp-OutputArea-output" data-mime-type="application/vnd.jupyter.stderr">
<pre>INFO:tomotools.recon:Reconstruction volume using FBP_CUDA
INFO:tomotools.recon:Reconstruction complete
INFO:tomotools.recon:Reconstructing volume using SIRT w/ minimum constraint. Minimum value: 0
INFO:tomotools.recon:Reconstruction complete
<pre>INFO:etspy
INFO:etspy.recon:Reconstruction complete
INFO:etspy.recon:Reconstructing volume using SIRT w/ minimum constraint. Minimum value: 0
INFO:etspy.recon:Reconstruction complete
</pre>
</div>
</div>
Expand Down Expand Up @@ -15636,7 +15636,7 @@ <h3 id="Save-the-Reconstruction-Results">Save the Reconstruction Results<a class


<div class="jp-RenderedText jp-OutputArea-output" data-mime-type="application/vnd.jupyter.stderr">
<pre>WARNING:hyperspy.misc.utils:The package {package} does not set its version in {package}.__version__. Please report this issue to the tomotools developers.
<pre>WARNING:hyperspy.misc.utils:The package {package} does not set its version in {package}.__version__. Please report this issue to the etspy developers.
</pre>
</div>
</div>
Expand All @@ -15657,7 +15657,7 @@ <h3 id="Save-the-Reconstruction-Results">Save the Reconstruction Results<a class


<div class="jp-RenderedText jp-OutputArea-output" data-mime-type="application/vnd.jupyter.stderr">
<pre>WARNING:hyperspy.misc.utils:The package {package} does not set its version in {package}.__version__. Please report this issue to the tomotools developers.
<pre>WARNING:hyperspy.misc.utils:The package {package} does not set its version in {package}.__version__. Please report this issue to the etspy developers.
</pre>
</div>
</div>
Expand Down Expand Up @@ -15713,7 +15713,7 @@ <h1 id="Experimental-Needle-shaped-Sample-Tilt-Series">Experimental Needle-shape


<div class="jp-RenderedText jp-OutputArea-output" data-mime-type="application/vnd.jupyter.stderr">
<pre>INFO:tomotools.io:Tilts found in MRC file header
<pre>INFO:etspy.io:Tilts found in MRC file header
</pre>
</div>
</div>
Expand Down Expand Up @@ -15831,8 +15831,8 @@ <h2 id="Stack-Registration">Stack Registration<a class="anchor-link" href="#Stac


<div class="jp-RenderedText jp-OutputArea-output" data-mime-type="application/vnd.jupyter.stderr">
<pre>INFO:tomotools.align:Performing stack registration using PyStackReg
INFO:tomotools.align:Stack registration complete
<pre>INFO:etspy.align:Performing stack registration using PyStackReg
INFO:etspy.align:Stack registration complete
</pre>
</div>
</div>
Expand Down Expand Up @@ -15929,9 +15929,9 @@ <h2 id="Stack-Registration">Stack Registration<a class="anchor-link" href="#Stac


<div class="jp-RenderedText jp-OutputArea-output" data-mime-type="application/vnd.jupyter.stderr">
<pre>INFO:tomotools.base:CUDA detected with Astra
INFO:tomotools.recon:Reconstruction volume using FBP_CUDA
INFO:tomotools.recon:Reconstruction complete
<pre>INFO:etspy.base:CUDA detected with Astra
INFO:etspy.recon:Reconstruction volume using FBP_CUDA
INFO:etspy.recon:Reconstruction complete
</pre>
</div>
</div>
Expand Down Expand Up @@ -16018,9 +16018,9 @@ <h2 id="Tilt-Axis-Alignment">Tilt Axis Alignment<a class="anchor-link" href="#Ti


<div class="jp-RenderedText jp-OutputArea-output" data-mime-type="application/vnd.jupyter.stderr">
<pre>INFO:tomotools.align:Performing alignments using slices: [84, 128, 171]
INFO:tomotools.align:Calculated tilt-axis shift 2.62
INFO:tomotools.align:Calculated tilt-axis rotation -1.99
<pre>INFO:etspy.align:Performing alignments using slices: [84, 128, 171]
INFO:etspy.align:Calculated tilt-axis shift 2.62
INFO:etspy.align:Calculated tilt-axis rotation -1.99
</pre>
</div>
</div>
Expand Down Expand Up @@ -16059,9 +16059,9 @@ <h2 id="Tilt-Axis-Alignment">Tilt Axis Alignment<a class="anchor-link" href="#Ti


<div class="jp-RenderedText jp-OutputArea-output" data-mime-type="application/vnd.jupyter.stderr">
<pre>INFO:tomotools.base:CUDA detected with Astra
INFO:tomotools.recon:Reconstruction volume using FBP_CUDA
INFO:tomotools.recon:Reconstruction complete
<pre>INFO:etspy.base:CUDA detected with Astra
INFO:etspy.recon:Reconstruction volume using FBP_CUDA
INFO:etspy.recon:Reconstruction complete
</pre>
</div>
</div>
Expand Down Expand Up @@ -16200,9 +16200,9 @@ <h2 id="Reconstruction">Reconstruction<a class="anchor-link" href="#Reconstructi


<div class="jp-RenderedText jp-OutputArea-output" data-mime-type="application/vnd.jupyter.stderr">
<pre>INFO:tomotools.base:CUDA detected with Astra
INFO:tomotools.recon:Reconstructing volume using SIRT w/ minimum constraint. Minimum value: 0
INFO:tomotools.recon:Reconstruction complete
<pre>INFO:etspy.base:CUDA detected with Astra
INFO:etspy.recon:Reconstructing volume using SIRT w/ minimum constraint. Minimum value: 0
INFO:etspy.recon:Reconstruction complete
</pre>
</div>
</div>
Expand Down
Loading

0 comments on commit 6f63006

Please sign in to comment.