Skip to content

Commit

Permalink
Use integer division.
Browse files Browse the repository at this point in the history
  • Loading branch information
arokem committed Mar 29, 2017
1 parent acee6d7 commit 1bc443c
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions doc/examples/quick_start.py
Expand Up @@ -29,7 +29,7 @@
``dname`` holds the directory name where the 3 files are in.
"""

dname = join(home, '.dipy', 'sherbrooke_3shell')
dname = join(home, '.dipy', 'sherbrooke_3shell')

"""
Here, we show the complete filenames of the 3 files
Expand All @@ -56,8 +56,8 @@
Now, that we have their filenames we can start checking what these look like.
Let's start first by loading the dMRI datasets. For this purpose, we
use a python library called nibabel_ which enables us to read and write
Let's start first by loading the dMRI datasets. For this purpose, we
use a python library called nibabel_ which enables us to read and write
neuroimaging-specific file formats.
"""

Expand Down Expand Up @@ -92,7 +92,7 @@

import matplotlib.pyplot as plt

axial_middle = data.shape[2] / 2
axial_middle = data.shape[2] // 2
plt.figure('Showing the datasets')
plt.subplot(1, 2, 1).set_axis_off()
plt.imshow(data[:, :, axial_middle, 0].T, cmap='gray', origin='lower')
Expand All @@ -107,16 +107,16 @@
**Showing the middle axial slice without (left) and with (right) diffusion weighting**.
The next step is to load the b-values and b-vectors from the disk using
The next step is to load the b-values and b-vectors from the disk using
the function ``read_bvals_bvecs``.
"""

from dipy.io import read_bvals_bvecs
bvals, bvecs = read_bvals_bvecs(fbval, fbvec)

"""
In Dipy, we use an object called ``GradientTable`` which holds all the acquision
specific parameters, e.g. b-values, b-vectors, timings and others. To create this
In Dipy, we use an object called ``GradientTable`` which holds all the acquision
specific parameters, e.g. b-values, b-vectors, timings and others. To create this
object you can use the function ``gradient_table``.
"""

Expand All @@ -132,11 +132,11 @@

"""
B-values shape (193,)
min 0.000000
max 3500.000000
min 0.000000
max 3500.000000
B-vectors shape (193, 3)
min -0.964050
max 0.999992
min -0.964050
max 0.999992
You, can also see the b-values using:
"""
Expand Down Expand Up @@ -188,7 +188,7 @@
[ 0.232937 , 0.931884 , -0.278087 ],
[ 0.93672 , 0.144139 , -0.31903 ]])
``gtab`` can be used to tell what part of the data is the S0 volumes
``gtab`` can be used to tell what part of the data is the S0 volumes
(volumes which correspond to b-values of 0).
"""

Expand All @@ -209,7 +209,7 @@
nib.save(nib.Nifti1Image(S0s, img.affine), 'HARDI193_S0.nii.gz')

"""
Now, that we learned how to load dMRI datasets we can start the analysis.
Now, that we learned how to load dMRI datasets we can start the analysis.
See example :ref:`example_reconst_dti` to learn how to create FA maps.
.. include:: ../links_names.inc
Expand Down

0 comments on commit 1bc443c

Please sign in to comment.