Skip to content

Commit

Permalink
use squeeze instead of reshape
Browse files Browse the repository at this point in the history
  • Loading branch information
jtamir committed Oct 15, 2018
1 parent c531d19 commit 9bd722f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
8 changes: 2 additions & 6 deletions demos/pics-phantom/demo.md
Expand Up @@ -38,11 +38,6 @@ dim=256 # ky/kz dims
bart phantom -x $dim -k -s $nmaps ksp_orig
```

To match to the MRI-specific tools, we tranpose the spatial dimensions
```
bart reshape 7 1 $dim $dim ksp_orig ksp_orig
```

Add noise
```bash
noisevar=100
Expand All @@ -57,12 +52,13 @@ rmcfl cimg_noise
```

Create a variable density Poisson disc sampling pattern and sample k-space. The acceleration factor is given by `yaccel` and `zaccel`.
A fully sampled calibration region of size `caldim` is added.
A fully sampled calibration region of size `caldim` is added. To match the 2D k-space dimensions, we will remove singleton dimensions.
```bash
yaccel=1.5
zaccel=1.5
caldim=32
bart poisson -Y $dim -Z $dim -y $yaccel -z $zaccel -C $caldim -v -e mask
bart squeeze mask mask
bart fmac ksp_noise mask ksp_und
```

Expand Down
4 changes: 1 addition & 3 deletions demos/pics-phantom/demo.sh
Expand Up @@ -40,9 +40,6 @@ nmaps=8
bart phantom -x $dim -k -s $nmaps ksp_orig


# To match to the MRI-specific tools, we reshape the spatial dimensions
bart reshape 7 1 $dim $dim ksp_orig ksp_orig

# Add noise
noisevar=100
bart noise -n $noisevar ksp_orig ksp_noise
Expand All @@ -58,6 +55,7 @@ yaccel=1.5
zaccel=1.5
caldim=32
bart poisson -Y $dim -Z $dim -y $yaccel -z $zaccel -C $caldim -v -e mask
bart squeeze mask mask
bart fmac ksp_noise mask ksp_und

# View the mask
Expand Down

0 comments on commit 9bd722f

Please sign in to comment.