Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
[ghstack-poisoned]
  • Loading branch information
fzimmermann89 committed Jan 7, 2025
2 parents 25f6c62 + b041215 commit 70b3363
Show file tree
Hide file tree
Showing 19 changed files with 1,287 additions and 109 deletions.
11 changes: 5 additions & 6 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
.github
.vscode
binder
examples
docs
tests
.github
.vscode
examples
docs
tests
18 changes: 18 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,24 @@ jobs:
run: |
echo "current jupyter-notebook: ${{ matrix.notebook }}"
- name: Add nb-myst download badge
run: |
notebook=${{ matrix.notebook }}
notebook_name=$(basename $notebook)
download_badge_md="[![Download notebook](https://img.shields.io/badge/Download-notebook-blue?logo=jupyter)](path:$notebook_name)"
python_command="import nbformat as nbf\n\
nb = nbf.read(open('$notebook'), as_version=4)\n\
# if the 1st cell is md and has colab text => add space after\n\
if nb['cells'][0]['cell_type'] == 'markdown' and 'colab' in nb['cells'][0]['source'].lower():\n\
nb['cells'][0]['source'] += ' '\n\
# if there is no md cell with colab => create empty md cell on top\n\
else:\n\
nb['cells'].insert(0, nbf.v4.new_markdown_cell())\n\
nb['cells'][0]['source'] += '$download_badge_md'\n\
nbf.write(nb, open('$notebook', 'w'))"
python -c "exec (\"$python_command\")"
- name: Run notebook
uses: fzimmermann89/run-notebook@v3
env:
Expand Down
55 changes: 55 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
abstract:
<p>MRpro is a MR image reconstruction and processing framework specifically
developed to work well with PyTorch. The data classes utilize torch tensors for
storing data such as MR raw data or reconstructed image data. Where possible batch
parallelisation of PyTorch is utilized to speed up image reconstruction.</p>
authors:
- affiliation: Physikalisch-Technische Bundesanstalt
family-names: Zimmermann
given-names: Felix Frederik
orcid: 0000-0002-0862-8973
- affiliation: Physikalisch-Technische Bundesanstalt
family-names: Schuenke
given-names: Patrick
orcid: 0000-0002-3179-4830
- affiliation: Physikalisch-Technische Bundesanstalt
family-names: Brahma
given-names: Sherine
orcid: 0000-0003-4340-6513
- affiliation: Physikalisch-Technische Bundesanstalt
family-names: Guastini
given-names: Mara
- affiliation: Physikalisch-Technische Bundesanstalt
family-names: Hammacher
given-names: Johannes
- affiliation: Physikalisch-Technische Bundesanstalt
family-names: Kofler
given-names: Andreas
orcid: 0000-0002-7416-4433
- affiliation: Physikalisch-Technische Bundesanstalt
family-names: Kranich Redshaw
given-names: Catarina
- affiliation: Physikalisch-Technische Bundesanstalt
family-names: Lunin
given-names: Leonid
orcid: 0000-0001-6469-5532
- affiliation: Physikalisch-Technische Bundesanstalt
family-names: Martin
given-names: Stefan
- affiliation: Physikalisch-Technische Bundesanstalt
family-names: Schote
given-names: David
orcid: 0000-0003-3468-0676
- affiliation: Physikalisch-Technische Bundesanstalt
family-names: Kolbitsch
given-names: Christoph
orcid: 0000-0002-4355-8368
cff-version: 1.2.0
date-released: "2024-12-17"
doi: 10.5281/zenodo.14509598
license:
- apache-2.0
repository-code: https://github.com/PTB-MR/mrpro/
title: MRpro - PyTorch-based MR image reconstruction and processing package
type: software
url: https://doi.org/10.5281/zenodo.14509598
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
![Python](https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12-blue)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
![Coverage Bagde](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/ckolbPTB/48e334a10caf60e6708d7c712e56d241/raw/coverage.json)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.14509598.svg)](https://doi.org/10.5281/zenodo.14509598)

MR image reconstruction and processing package specifically developed for PyTorch.

- **Source code:** <https://github.com/PTB-MR/mrpro>
- **Documentation:** <https://ptb-mr.github.io/mrpro/>
- **Bug reports:** <https://github.com/PTB-MR/mrpro/issues>
- **Try it out:** [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/PTB-MR/mrpro.git/main?labpath=examples)
- **Try it out:** [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/PTB-MR/mrpro)

## Awards

Expand Down
9 changes: 0 additions & 9 deletions binder/environment.yml

This file was deleted.

19 changes: 7 additions & 12 deletions docs/source/contributor_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ Contributor Guide
Repo structure
==============
This repository uses a *pyproject.toml* file to specify all the requirements.
If you need a "normal" *requirements.txt* file, please have a look in *binder*. There you find a *requirements.txt*
automatically created from *pyproject.toml* using GitHub actions.

**.github/workflows**
Definitions of GitHub action workflows to carry out formatting checks, run tests and automatically create this
Expand All @@ -18,12 +16,9 @@ automatically created from *pyproject.toml* using GitHub actions.
**.docs**
Files to create this documentation.

**binder**
*environment.yml* to install MRpro when starting a binder session.

**examples**
Python scripts showcasing how MRpro can be used. Any data needed has to be available from
an online repository (e.g. zenodo) such that it can be automatically downloaded. The scripts
an online repository (e.g. zenodo) such that it can be automatically downloaded. The scripts
are automatically translated to jupyter notebooks using GitHub
actions. Individual cells should be indicated with ``# %%``. For markdown cells use ``# %% [markdown]``.
The translation from python script to jupyter notebook is done using
Expand Down Expand Up @@ -67,14 +62,14 @@ src/mrpro structure

Linting
=======
We use Ruff for linting. If you are using VSCode, you can install an
`extension <https://marketplace.visualstudio.com/items?itemName=charliermarsh.ruff>`_,
which we have also added to the list of extensions that VSCode should recommend when you open the code.
We use Ruff for linting. If you are using VSCode, you can install an
`extension <https://marketplace.visualstudio.com/items?itemName=charliermarsh.ruff>`_,
which we have also added to the list of extensions that VSCode should recommend when you open the code.
We also run `mypy <https://pypi.org/project/mypy/>`_ as a type checker.

In CI, our linting is driven by `pre-commit <https://pre-commit.com/>`_.
In CI, our linting is driven by `pre-commit <https://pre-commit.com/>`_.
If you install MRpro via ``pip install -e .[test]``, pre-commit will be installed in your python environment.
You can either add pre-commit to your git pre-commit hooks, requiring it to pass before each commit (``pre-commit install``),
You can either add pre-commit to your git pre-commit hooks, requiring it to pass before each commit (``pre-commit install``),
or run it manually using ``pre-commit run --all-files`` after making your changes, before requesting a PR review.

Naming convention
Expand Down Expand Up @@ -115,4 +110,4 @@ We are still in pre-release mode and do not guarantee a stable API / strict sema
Compatibility
=============
We aim to always be compatible with the latest stable pytorch release and the latest python version supported by pytorch. We are compatible with one previous python version.
Our type hints will usually only be valid with the latest pytorch version.
Our type hints will usually only be valid with the latest pytorch version.
4 changes: 3 additions & 1 deletion docs/source/examples.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
Examples
========
.. |colab-badge| image:: https://colab.research.google.com/assets/colab-badge.svg
:target: https://colab.research.google.com/github/PTB-MR/mrpro

Notebooks with examples of how you can use MRpro.
All of the notebooks can directly be run via binder or colab from the repo.
Each notebook can be launched in Colab |colab-badge|

.. toctree::
:maxdepth: 1
Expand Down
8 changes: 6 additions & 2 deletions docs/source/user_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ MRpro is a MR image reconstruction and processing framework specifically develop
The data classes utilize torch tensors for storing data such as MR raw data or reconstructed image data.
Where possible batch parallelisation of pytorch is utilized to speed up image reconstruction.

MRpro is designed to work directly from MR raw data using the `MRD <https://ismrmrd.readthedocs.io/en/latest/>`_ data format.
MRpro is designed to work directly from MR raw data using the `MRD <https://ismrmrd.readthedocs.io/en/latest/>`_ data format.

A basic pipeline would contain the following steps:

Expand All @@ -15,9 +15,13 @@ A basic pipeline would contain the following steps:
* Data reconstruction
* Image processing

.. |colab-badge| image:: https://colab.research.google.com/assets/colab-badge.svg
:target: https://colab.research.google.com/github/PTB-MR/mrpro

The following provides some basic information about these steps.
For more detailed information please have a look at the notebooks in the *examples* folder.
You can easily start a binder session via the badge in the *README* and give the notebooks a try without having to

You can easily launch notebooks via the |colab-badge| badge and give the notebooks a try without having to
install anything.

Reading in raw data
Expand Down
Loading

0 comments on commit 70b3363

Please sign in to comment.