Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Christoph Kolbitsch <[email protected]>
  • Loading branch information
fzimmermann89 and ckolbPTB authored Jan 14, 2025
1 parent 4d497e7 commit 688a55c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/source/contributor_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ This repository uses a *pyproject.toml* file to specify all the requirements.
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.
Individual cells should be indicated with ``# %%``. For markdown cells use ``# %% [markdown]``.
The translation from python script to jupyter notebook is done in pre-commit (locally and and on GitHub)
The translation from python script to jupyter notebook is done in pre-commit (locally and on GitHub)
using `jupytext <https://jupytext.readthedocs.io/en/latest/>`_ . See its documentation for more details.

After translating the scripts to notebooks, the notebooks are run and their output is converted to html and added
Expand Down
6 changes: 3 additions & 3 deletions docs/source/user_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ Reading in raw data from a MRD file works by creating a `mrpro.data.KData` objec
To ensure the trajectory is calculated correctly, a `~mrpro.data.traj_calculators.KTrajectoryCalculator` needs to be provided.
The trajectory can either be calculated based on MRpro functionality (e.g. for a 2D radial sampling scheme), read out
from MRD or calculated from a `pulseq <http://pulseq.github.io/>`_ file. See `~mrpro.data.traj_calculators`
for available trajectory calculators and :doc:`_notebooks/comparison_trajectory_calculators` an example.
for available trajectory calculators and :doc:`_notebooks/comparison_trajectory_calculators` for an example.


.. note::
In MRpro, we use the convention ``(z, y, x)`` for spatial dimensions and ``(k2, k1, k0)`` for k-space dimensions.
Here, `k0` is the readout direction, `k1` and `k2` are phase encoding directions.
The full shape of a 2D k-space data, for example, is ``(other, coil, 1, k1, k0)``.
Here, `other` will be the different slices. In general, `other` can be any number of additional dimensions.
The full shape of a multi-slice 2D k-space data, for example, is ``(other, coil, 1, k1, k0)`` where `other` will be the different slices.
In general, `other` can be any number of additional dimensions.

.. note::
The trajectory is expected to be defined within the space of the `encoding_matrix`, e.g. if the
Expand Down
2 changes: 1 addition & 1 deletion examples/scripts/cartesian_reconstruction.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def show_images(*images: torch.Tensor, titles: list[str] | None = None) -> None:


# %%
# Combine data from different coils and show magntiude image
# Combine data from different coils and show magnitude image
magnitude_fully_sampled = img.abs().square().sum(dim=-4).sqrt().squeeze()
show_images(magnitude_fully_sampled)
# %% [markdown]
Expand Down

0 comments on commit 688a55c

Please sign in to comment.