Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
fzimmermann89 committed Jan 13, 2025
1 parent ba5b484 commit 408022b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ cython_debug/

# Documentation
**/_autosummary
**/_notebooks

# Ignore Conda environment directories:
.conda
Expand All @@ -192,3 +193,4 @@ cython_debug/
*~
*.swp
*.swo

Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@
"show_images(\n",
" img_us_regularized_iterative_sense.rss()[0, 0],\n",
" img_manual.abs()[0, 0, 0],\n",
" titles=['Regularized Iterative SENSE R=20', '\"Manual\" Regularized Iterative SENSE R=20'],\n",
" titles=['RegularizedIterativeSense', 'Manual'],\n",
")"
]
},
Expand All @@ -427,7 +427,7 @@
"metadata": {},
"outputs": [],
"source": [
"assert torch.allclose(img_us_regularized_iterative_sense.data, img_manual)"
"torch.testing.assert_close(img_us_regularized_iterative_sense.data, img_manual)"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,13 @@ def show_images(*images: torch.Tensor, titles: list[str] | None = None) -> None:
show_images(
img_us_regularized_iterative_sense.rss()[0, 0],
img_manual.abs()[0, 0, 0],
titles=['Regularized Iterative SENSE R=20', '"Manual" Regularized Iterative SENSE R=20'],
titles=['RegularizedIterativeSense', 'Manual'],
)
# %% [markdown]
# We can also check if the results are equal by comparing the actual image data.
# If the assert statement does not raise an exception, the results are equal.
# %%
assert torch.allclose(img_us_regularized_iterative_sense.data, img_manual)
torch.testing.assert_close(img_us_regularized_iterative_sense.data, img_manual)

# %% [markdown]
# ### Next steps
Expand Down

0 comments on commit 408022b

Please sign in to comment.