-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 83c11a8
Showing
176 changed files
with
23,862 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
# OS Stuff | ||
Thumbs.db | ||
.DS_Store | ||
.idea | ||
|
||
# Mosaic stuff | ||
mosaic-workspace | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
*.pyc | ||
*.json | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
.token | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
_site | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# celery beat schedule file | ||
celerybeat-schedule | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
|
||
# Example outputs | ||
*.h5 | ||
!examples/stride/anastasio2D/data/*.h5 | ||
examples/*/*.png | ||
|
||
# Legacy code | ||
legacy/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v1.2.3 | ||
hooks: | ||
- id: flake8 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
include setup.py | ||
include README.md | ||
include MANIFEST.in | ||
include environment.yml | ||
include requirements.txt | ||
include requirements-optional.txt |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
|
||
|
||
# Stride - A (somewhat) general optimisation framework for medical ultrasound imaging | ||
|
||
## Quickstart | ||
|
||
The recommended way to install Stride is through Anaconda's package manager (version >=4.9), which can be downloaded | ||
in [Anaconda](https://www.continuum.io/downloads) or [Miniconda](https://conda.io/miniconda.html). | ||
A Python version above 3.7 is recommended to run Stride. | ||
|
||
To install Stride, follow these steps: | ||
|
||
```sh | ||
git clone [email protected]:trustimaging/stride.git | ||
cd stride | ||
conda env create -f environment.yml | ||
conda activate stride | ||
pip install -e . | ||
``` | ||
|
||
## Running the examples | ||
|
||
To perform a forward run on the alpha2D example: | ||
|
||
```sh | ||
cd examples/stride/alpha2D | ||
mrun python foward.py | ||
``` | ||
|
||
You can control the number of workers and threads per worker by running: | ||
|
||
```sh | ||
mrun -nw 2 -nth 5 python foward.py | ||
``` | ||
|
||
You can configure the devito solvers using environment variables. For example, to run the same code on a GPU with OpenACC you can: | ||
|
||
```sh | ||
export DEVITO_COMPILER=pgcc | ||
export DEVITO_LANGUAGE=openacc | ||
export DEVITO_PLATFORM=nvidiaX | ||
mrun -nw 1 -nth 5 python foward.py | ||
``` | ||
|
||
Once you've run alpha2D forward, you can run the corresponding inverse problem by doing: | ||
|
||
```sh | ||
mrun python inverse.py | ||
``` | ||
|
||
|
||
## Documentation | ||
|
||
You can build and access the documentation by running: | ||
|
||
```sh | ||
cd docs | ||
make html | ||
``` | ||
|
||
and opening the generated ``_build/index.html`` in your browser. |
Oops, something went wrong.