From 688a55ca1a712995c15c3398f6f5284ed4a3afcb Mon Sep 17 00:00:00 2001 From: Felix F Zimmermann Date: Tue, 14 Jan 2025 10:17:04 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Christoph Kolbitsch --- docs/source/contributor_guide.rst | 2 +- docs/source/user_guide.rst | 6 +++--- examples/scripts/cartesian_reconstruction.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/source/contributor_guide.rst b/docs/source/contributor_guide.rst index fb008d23..cc752cf4 100644 --- a/docs/source/contributor_guide.rst +++ b/docs/source/contributor_guide.rst @@ -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 `_ . 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 diff --git a/docs/source/user_guide.rst b/docs/source/user_guide.rst index db6d6963..d3ba805e 100644 --- a/docs/source/user_guide.rst +++ b/docs/source/user_guide.rst @@ -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 `_ 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 diff --git a/examples/scripts/cartesian_reconstruction.py b/examples/scripts/cartesian_reconstruction.py index 3e5ef04f..c2c9a094 100644 --- a/examples/scripts/cartesian_reconstruction.py +++ b/examples/scripts/cartesian_reconstruction.py @@ -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]