Skip to content

Commit b625d2e

Browse files
DOC: Typos found by codespell
1 parent ea68c4e commit b625d2e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+74
-74
lines changed

Changelog

+4-4
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ Bug fixes
342342
reviewed by PM)
343343
* Safer warning registry manipulation when checking for overflows (pr/753)
344344
(CM, reviewed by MB)
345-
* Correctly write .annot files with duplicate lables (pr/763) (Richard Nemec
345+
* Correctly write .annot files with duplicate labels (pr/763) (Richard Nemec
346346
with CM)
347347

348348
Maintenance
@@ -997,7 +997,7 @@ visiting the URL::
997997
* Bugfix: Removed left-over print statement in extension code.
998998
* Bugfix: Prevent saving of bogus 'None.nii' images when the filename
999999
was previously assign, before calling NiftiImage.save() (Closes: #517920).
1000-
* Bugfix: Extension length was to short for all `edata` whos length matches
1000+
* Bugfix: Extension length was to short for all `edata` whose length matches
10011001
n*16-8, for all integer n.
10021002

10031003
0.20090205.1 (Thu, 5 Feb 2009)
@@ -1017,7 +1017,7 @@ visiting the URL::
10171017
automatically dumped into this extension.
10181018
Embedded meta data is not loaded automatically, since this has security
10191019
implications, because code from the file header is actually executed.
1020-
The documentation explicitely mentions this risk.
1020+
The documentation explicitly mentions this risk.
10211021
* Added :class:`~nifti.extensions.NiftiExtensions`. This is a container-like
10221022
handler to access and manipulate NIfTI1 header extensions.
10231023
* Exposed :class:`~nifti.image.MemMappedNiftiImage` in the root module.
@@ -1223,7 +1223,7 @@ visiting the URL::
12231223
* Does not depend on libfslio anymore.
12241224
* Up to seven-dimensional dataset are supported (as much as NIfTI can do).
12251225
* The complete NIfTI header dataset is modifiable.
1226-
* Most image properties are accessable via class attributes and accessor
1226+
* Most image properties are accessible via class attributes and accessor
12271227
methods.
12281228
* Improved documentation (but still a long way to go).
12291229

doc/misc/pylintrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ output-format=colorized
7979
# Include message's id in output
8080
include-ids=yes
8181

82-
# Tells wether to display a full report or only the messages
82+
# Tells whether to display a full report or only the messages
8383
reports=yes
8484

8585
[MISCELLANEOUS]

doc/source/coordinate_systems.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ then the image affine matrix $A$ is:
530530
531531
Why the extra row of $[0, 0, 0, 1]$? We need this row because we have
532532
rephrased the combination of rotations / zooms and translations as a
533-
transformation in *homogenous coordinates* (see `wikipedia homogenous
533+
transformation in *homogeneous coordinates* (see `wikipedia homogeneous
534534
coordinates`_). This is a trick that allows us to put the translation part
535535
into the same matrix as the rotations / zooms, so that both translations and
536536
rotations / zooms can be applied by matrix multiplication. In order to make

doc/source/devel/data_pkg_discuss.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ Discovery
369369
370370
Revsion ids could for example be hashes of the package instantiation
371371
(package contents), so they could be globally unique to the contents,
372-
whereever the contents was when the identifier was made. However, *tags*
372+
wherever the contents was when the identifier was made. However, *tags*
373373
are just names that someone has attached to a particular revsion id. If
374374
there is more than one person providing versions of a particular package,
375375
there may not be agreement on the revsion that a particular tag is attached

doc/source/devel/devguide.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ necessary and the branch gets tagged when a package version is released.
6464
Maintenance (as well as backport) releases or branches off from the respective
6565
packaging tag.
6666

67-
There might be additonal branches for each developer, prefixed with intials.
67+
There might be additional branches for each developer, prefixed with initials.
6868
Alternatively, several GitHub (or elsewhere) clones might be used.
6969

7070

@@ -99,7 +99,7 @@ Changelog
9999
=========
100100

101101
The changelog is located in the toplevel directory of the source tree in the
102-
`Changelog` file. The content of this file should be formated as restructured
102+
`Changelog` file. The content of this file should be formatted as restructured
103103
text to make it easy to put it into manual appendix and on the website.
104104

105105
This changelog should neither replicate the VCS commit log nor the

doc/source/dicom/dicom_intro.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ For example, there is a DIMSE service called "C-ECHO" that requests confirmation
686686
from the responding application that the echo message arrived.
687687

688688
The definition of the DIMSE services specifies, for a particular DIMSE service,
689-
whether the DIMSE commend set should be followed by a data set.
689+
whether the DIMSE command set should be followed by a data set.
690690

691691
In particular, the data set will be a full Information Object Definition's worth
692692
of data.

doc/source/dicom/dicom_mosaic.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ Data scaling
124124
SPM gets the DICOM scaling, offset for the image ('RescaleSlope',
125125
'RescaleIntercept'). It writes these scalings into the nifti_ header.
126126
Then it writes the raw image data (unscaled) to disk. Obviously these
127-
will have the corrent scalings applied when the nifti image is read again.
127+
will have the current scalings applied when the nifti image is read again.
128128

129129
A comment in the code here says that the data are not scaled by the
130130
maximum amount. I assume by this they mean that the DICOM scaling may

doc/source/dicom/dicom_orientation.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ constant, to the voxel coordinate for the slice (the value for the slice
350350
index).
351351

352352
Our DICOM might have the 'SliceLocation' field (0020,1041).
353-
'SliceLocation' seems to be proportianal to slice location, at least for
353+
'SliceLocation' seems to be proportional to slice location, at least for
354354
some GE and Philips DICOMs I was looking at. But, there is a more
355355
reliable way (that doesn't depend on this field), and uses only the very
356356
standard 'ImageOrientationPatient' and 'ImagePositionPatient' fields.
@@ -385,7 +385,7 @@ unit change in the slice voxel coordinate. So, the
385385
addition of two vectors $T^j = \mathbf{a} + \mathbf{b}$, where
386386
$\mathbf{a}$ is the position of the first voxel in some slice (here
387387
slice 1, therefore $\mathbf{a} = T^1$) and $\mathbf{b}$ is $d$ times the
388-
third colum of $A$. Obviously $d$ can be negative or positive. This
388+
third column of $A$. Obviously $d$ can be negative or positive. This
389389
leads to various ways of recovering something that is proportional to
390390
$d$ plus a constant. The algorithm suggested in this `ITK post on
391391
ordering slices`_ - and the one used by SPM - is to take the inner

doc/source/dicom/siemens_csa.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ Each item
124124

125125
Now there's a different length check from CSA1. ``item_len`` is given
126126
just by ``xx[1]``. If ``item_len`` > ``csa_max_pos - csa_position``
127-
(the remaining bytes in the header), then we just read the remaning
127+
(the remaining bytes in the header), then we just read the remaining
128128
bytes in the header (as above) into ``value`` below, as uint8, move the
129129
filepointer to the next 4 byte boundary, and give up reading.
130130

doc/source/gettingstarted.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Getting Started
1414
***************
1515

1616
NiBabel supports an ever growing collection of neuroimaging file formats. Every
17-
file format format has its own features and pecularities that need to be taken
17+
file format format has its own features and peculiarities that need to be taken
1818
care of to get the most out of it. To this end, NiBabel offers both high-level
1919
format-independent access to neuroimages, as well as an API with various levels
2020
of format-specific access to all available information in a particular file
@@ -109,7 +109,7 @@ True
109109

110110
In this case, we used the identity matrix as the affine transformation. The
111111
image header is initialized from the provided data array (i.e. shape, dtype)
112-
and all other values are set to resonable defaults.
112+
and all other values are set to reasonable defaults.
113113

114114
Saving this new image to a file is trivial:
115115

doc/source/gitwash/configure_git.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ and it gives graph / text output something like this (but with color!)::
142142
| * 4aff2a8 - fixed bug 35, and added a test in test_bugfixes (2 weeks ago) [Hugo]
143143
|/
144144
* a7ff2e5 - Added notes on discussion/proposal made during Data Array Summit. (2 weeks ago) [Corran Webster]
145-
* 68f6752 - Initial implimentation of AxisIndexer - uses 'index_by' which needs to be changed to a call on an Axes object - this is all very sketchy right now. (2 weeks ago) [Corr
145+
* 68f6752 - Initial implementation of AxisIndexer - uses 'index_by' which needs to be changed to a call on an Axes object - this is all very sketchy right now. (2 weeks ago) [Corr
146146
* 376adbd - Merge pull request #46 from terhorst/master (2 weeks ago) [Jonathan Terhorst]
147147
|\
148148
| * b605216 - updated joshu example to current api (3 weeks ago) [Jonathan Terhorst]

doc/source/links_names.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@
217217
.. _`wikipedia affine transform`: https://en.wikipedia.org/wiki/Affine_transformation
218218
.. _`wikipedia linear transform`: https://en.wikipedia.org/wiki/Linear_transformation
219219
.. _`wikipedia rotation matrix`: https://en.wikipedia.org/wiki/Rotation_matrix
220-
.. _`wikipedia homogenous coordinates`: https://en.wikipedia.org/wiki/Homogeneous_coordinates
220+
.. _`wikipedia homogeneous coordinates`: https://en.wikipedia.org/wiki/Homogeneous_coordinates
221221
.. _`wikipedia axis angle`: https://en.wikipedia.org/wiki/Axis_angle
222222
.. _`wikipedia Euler angles`: https://en.wikipedia.org/wiki/Euler_angles
223223
.. _`Mathworld Euler angles`: http://mathworld.wolfram.com/EulerAngles.html

doc/source/old/design.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ We think of an image as being the association of:
7171

7272
For simplicity, we want the transformation (above) to be spatial.
7373
Because the images are always at least 3D, and the transform is
74-
spatial, this means that the tranformation is always exactly 3D. We
74+
spatial, this means that the transformation is always exactly 3D. We
7575
have to know which of the N image dimensions are spatial. For
7676
example, if we have a 4D (space and time) image, we need to know
7777
which of the 4 dimensions are spatial. We could ask the image to

doc/source/old/orientation.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Affines as orientation
1212
----------------------
1313

1414
Orientations are expressed by 4 by 4 affine arrays. 4x4 affine arrays
15-
give, in homogenous coordinates, the relationship between the
15+
give, in homogeneous coordinates, the relationship between the
1616
coordinates in the voxel array, and millimeters. Let is say that I have
1717
a simple affine like this:
1818

@@ -26,7 +26,7 @@ And I have a voxel coordinate:
2626

2727
then the millimeter coordinate for that voxel is given by:
2828

29-
>>> # add extra 1 for homogenous coordinates
29+
>>> # add extra 1 for homogeneous coordinates
3030
>>> homogenous_coord = np.concatenate((coord, [1]))
3131
>>> mm_coord = np.dot(aff, homogenous_coord)[:3]
3232
>>> mm_coord

nibabel/affines.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def apply_affine(aff, pts):
3434
Parameters
3535
----------
3636
aff : (N, N) array-like
37-
Homogenous affine, for 3D points, will be 4 by 4. Contrary to first
37+
Homogeneous affine, for 3D points, will be 4 by 4. Contrary to first
3838
appearance, the affine will be applied on the left of `pts`.
3939
pts : (..., N-1) array-like
4040
Points, where the last dimension contains the coordinates of each
@@ -87,7 +87,7 @@ def apply_affine(aff, pts):
8787
def to_matvec(transform):
8888
"""Split a transform into its matrix and vector components.
8989
90-
The tranformation must be represented in homogeneous coordinates and is
90+
The transformation must be represented in homogeneous coordinates and is
9191
split into its rotation matrix and translation vector components.
9292
9393
Parameters
@@ -104,7 +104,7 @@ def to_matvec(transform):
104104
matrix : (N-1, M-1) array
105105
Matrix component of `transform`
106106
vector : (M-1,) array
107-
Vector compoent of `transform`
107+
Vector component of `transform`
108108
109109
See Also
110110
--------
@@ -145,7 +145,7 @@ def from_matvec(matrix, vector=None):
145145
Returns
146146
-------
147147
xform : array
148-
An (N+1, M+1) homogenous transform matrix.
148+
An (N+1, M+1) homogeneous transform matrix.
149149
150150
See Also
151151
--------
@@ -269,7 +269,7 @@ def voxel_sizes(affine):
269269
1)[:3]``. The world coordinate vector of voxel vector (1, 0, 0) is
270270
``v1_ax1 = affine.dot((1, 0, 0, 1))[:3]``. The final 1 in the voxel
271271
vectors and the ``[:3]`` at the end are because the affine works on
272-
homogenous coodinates. The translations part of the affine is ``trans =
272+
homogeneous coordinates. The translations part of the affine is ``trans =
273273
affine[:3, 3]``, and the rotations, zooms and shearing part of the affine
274274
is ``rzs = affine[:3, :3]``. Because of the final 1 in the input voxel
275275
vector, ``v0 == rzs.dot((0, 0, 0)) + trans``, and ``v1_ax1 == rzs.dot((1,

nibabel/analyze.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ def from_header(klass, header=None, check=True):
385385
# safely discard fields with names not known to this header
386386
# type on the basis they are from the wrong Analyze dialect
387387
pass
388-
# set any fields etc that are specific to this format (overriden by
388+
# set any fields etc that are specific to this format (overridden by
389389
# sub-classes)
390390
obj._clean_after_mapping()
391391
# Fallback basic conversion always done.

nibabel/batteryrunners.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
(very bad problem). The levels follow the log levels from the logging
3838
module (e.g 40 equivalent to "error" level, 50 to "critical"). The
3939
``error`` can be one of ``None`` if no error to suggest, or an Exception
40-
class that the user might consider raising for this sitation. The
40+
class that the user might consider raising for this situation. The
4141
``problem_msg`` and ``fix_msg`` are human readable strings that should
4242
explain what happened.
4343

nibabel/casting.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" Utilties for casting numpy values in various ways
1+
""" Utilities for casting numpy values in various ways
22
33
Most routines work round some numpy oddities in floating point precision and
44
casting. Others work round numpy casting to and from python ints
@@ -132,7 +132,7 @@ def shared_range(flt_type, int_type):
132132
Returns
133133
-------
134134
mn : object
135-
Number of type `flt_type` that is the minumum value in the range of
135+
Number of type `flt_type` that is the minimum value in the range of
136136
`int_type`, such that ``mn.astype(int_type)`` >= min of `int_type`
137137
mx : object
138138
Number of type `flt_type` that is the maximum value in the range of

nibabel/cifti2/tests/test_cifti2io_axes.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def check_Conte69(brain_model):
7979

8080
def check_rewrite(arr, axes, extension='.nii'):
8181
"""
82-
Checks wheter writing the Cifti2 array to disc and reading it back in gives the same object
82+
Checks whether writing the Cifti2 array to disc and reading it back in gives the same object
8383
8484
Parameters
8585
----------

nibabel/cmdline/diff.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def get_opt_parser():
7373
def are_values_different(*values):
7474
"""Generically compare values, return True if different
7575
76-
Note that comparison is targetting reporting of comparison of the headers
76+
Note that comparison is targeting reporting of comparison of the headers
7777
so has following specifics:
7878
- even a difference in data types is considered a difference, i.e. 1 != 1.0
7979
- nans are considered to be the "same", although generally nan != nan
@@ -94,7 +94,7 @@ def are_values_different(*values):
9494
except TypeError as exc:
9595
str_exc = str(exc)
9696
# Not implemented in numpy 1.7.1
97-
if "not supported" in str_exc or "ot implemented" in str_exc:
97+
if "not supported" in str_exc or "not implemented" in str_exc:
9898
value0_nans = None
9999
else:
100100
raise

nibabel/cmdline/tck2trk.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def main():
3030
try:
3131
nii = nib.load(args.anatomy)
3232
except Exception:
33-
parser.error("Expecting anatomical image as first agument.")
33+
parser.error("Expecting anatomical image as first argument.")
3434

3535
for tractogram in args.tractograms:
3636
tractogram_format = nib.streamlines.detect_format(tractogram)

nibabel/dataobj_images.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ def __init__(self, dataobj, header=None, extra=None, file_map=None):
2727
Parameters
2828
----------
2929
dataobj : object
30-
Object containg image data. It should be some object that retuns an
31-
array from ``np.asanyarray``. It should have ``shape`` and ``ndim``
32-
attributes or properties
30+
Object containing image data. It should be some object that returns
31+
an array from ``np.asanyarray``. It should have ``shape`` and
32+
``ndim`` attributes or properties
3333
header : None or mapping or header instance, optional
3434
metadata for this image format
3535
extra : None or mapping, optional

nibabel/ecat.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ def data_from_fileobj(self, frame=0, orientation=None):
661661

662662

663663
class EcatImageArrayProxy(object):
664-
""" Ecat implemention of array proxy protocol
664+
""" Ecat implementation of array proxy protocol
665665
666666
The array proxy allows us to freeze the passed fileobj and
667667
header such that it returns the expected data array.
@@ -989,7 +989,7 @@ def to_file_map(self, file_map=None):
989989
# Write frame images
990990
self._write_data(image, imgf, pos + 2, endianness='>')
991991

992-
# Move to dictionnary offset and write dictionnary entry
992+
# Move to dictionary offset and write dictionary entry
993993
self._write_data(mlist[index], imgf, entry_pos, endianness='>')
994994

995995
entry_pos = entry_pos + 16

nibabel/filename_parser.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ def splitext_addext(filename,
275275
Extension, where extension is not in `addexts` - e.g. ``.ext`` in
276276
example above
277277
addext : str
278-
Any suffixes appearing in `addext` occuring at end of filename
278+
Any suffixes appearing in `addext` occurring at end of filename
279279
280280
Examples
281281
--------

nibabel/fileslice.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ def optimize_slicer(slicer, dim_len, all_full, is_slowest, stride,
416416
# full, but reversed
417417
if slicer == slice(dim_len - 1, None, -1):
418418
return slice(None), slice(None, None, -1)
419-
# Not full, mabye continuous
419+
# Not full, maybe continuous
420420
is_int = False
421421
else: # int
422422
if slicer < 0: # make negative offsets positive

nibabel/gifti/gifti.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ class GiftiDataArray(xml.XmlSerializable):
331331
The Endianness to store the data array. Should correspond to the
332332
machine endianness. Default is system byteorder.
333333
coordsys : :class:`GiftiCoordSystem` instance
334-
Input and output coordinate system with tranformation matrix between
334+
Input and output coordinate system with transformation matrix between
335335
the two.
336336
ind_ord : int
337337
The ordering of the array. see util.array_index_order_codes. Default

nibabel/gifti/tests/test_gifti.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def test_dataarray_init():
146146
pytest.raises(KeyError, gda, datatype='not_datatype')
147147
# Float32 datatype comes from array if datatype not set
148148
assert gda(arr).datatype == 16
149-
# Can be overriden by init
149+
# Can be overridden by init
150150
assert gda(arr, datatype='uint8').datatype == 2
151151
# Encoding
152152
assert gda(encoding=1).encoding == 1

nibabel/imageclasses.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def __getitem__(self, *args, **kwargs):
125125

126126

127127
def spatial_axes_first(img):
128-
""" True if spatial image axes for `img` always preceed other axes
128+
""" True if spatial image axes for `img` always precede other axes
129129
130130
Parameters
131131
----------
@@ -136,7 +136,7 @@ def spatial_axes_first(img):
136136
-------
137137
spatial_axes_first : bool
138138
True if image only has spatial axes (number of axes < 4) or image type
139-
known to have spatial axes preceeding other axes.
139+
known to have spatial axes preceding other axes.
140140
"""
141141
if len(img.shape) < 4:
142142
return True

nibabel/loadsave.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ def read_img_data(img, prefer='scaled'):
243243
array is given by the raw data on disk, multiplied by a scalefactor
244244
and maybe with the addition of a constant. This function, with
245245
``unscaled`` returns the data on the disk, without these
246-
format-specific scalings applied. Please use this funciton only if
246+
format-specific scalings applied. Please use this function only if
247247
you absolutely need the unscaled data, and the magnitude of the
248248
data, as given by the scalefactor, is not relevant to your
249249
application. The Analyze-type formats have a single scalefactor +/-

0 commit comments

Comments
 (0)