Skip to content

Commit 3af6877

Browse files
committed
DOC: various docstring reformats
Rewrapping, some small numpy docstring fixes.
1 parent f0f35ad commit 3af6877

File tree

2 files changed

+39
-36
lines changed

2 files changed

+39
-36
lines changed

nipy/core/reference/__init__.py

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@
55
66
Mathematical model
77
==================
8-
The idea of a chart :lm:`\\phi` : I{U} S{sub} I{M} S{->} B{R}^k
9-
on a "manifold" I{M}. For a chart both input (I{M}) and output coordinates
10-
(B{R}^k) must be defined and a map relating the two coordinate systems.
8+
9+
The idea is of a chart $\phi : I{U} S{sub} I{M} S{->} B{R}^k$ on a "manifold"
10+
$I{M}$. For a chart, both input ($I{M}$) and output coordinates ($B{R}^k$)
11+
must be defined and there must be a map relating the two coordinate systems.
1112
1213
Description
1314
===========
15+
1416
The modules in this package contains classes which define the space in which an
1517
image exists and also functions for manipulating and traversing this space.
1618
@@ -19,22 +21,23 @@
1921
output CoordinateSystem, and a mapping which converts points in the
2022
input space to points in the output space.
2123
22-
A `CoordinateSystem` consists of a set of ordered `Coordinate` objects. Each
24+
A ``CoordinateSystem`` consists of a set of ordered ``Coordinate`` objects. Each
2325
Coordinate has a name and a builtin dtype.
2426
25-
The typical use of a `CoordinateMap` is to define how voxels in an `Image`
26-
(core.image.__init__.py) object's raw data map into real space.
27+
The typical use of a ``CoordinateMap`` is to define how voxels in an ``Image``
28+
(``core.image.__init__.py``) object's raw data map into real space.
2729
28-
`Image` traversal is general done in terms of the underlying coordinate_map, and a number of
29-
iterators are provided to traverse points in the coordinate_map (iterators.py). Access to
30-
available iterators is done through the CoordinateMap interface, rather than
31-
accessing the iterator classes directly.
32-
33-
The other common image access method is to take slices through the coordinate_map. In
34-
slices.py functions are presented which will return a `CoordinateMap` representing
35-
a single slice through a larger coordinate_map.
30+
``Image`` traversal is in general done in terms of the underlying
31+
coordinate_map, and a number of iterators are provided to traverse points in
32+
the coordinate_map (iterators.py). Access to available iterators is done
33+
through the CoordinateMap interface, rather than accessing the iterator classes
34+
directly.
3635
36+
The other common image access method is to take slices through the
37+
coordinate_map. In slices.py functions are presented which will return a
38+
``CoordinateMap`` representing a single slice through a larger coordinate_map.
3739
"""
40+
3841
from __future__ import absolute_import
3942
__docformat__ = 'restructuredtext'
4043

nipy/core/reference/coordinate_map.py

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,13 @@
44
This module describes two types of *mappings*:
55
66
* CoordinateMap: a general function from a domain to a range, with a possible
7-
inverse function.
8-
7+
inverse function;
98
* AffineTransform: an affine function from a domain to a range, not
10-
necessarily of the same dimension, hence not always invertible.
9+
necessarily of the same dimension, hence not always invertible.
1110
12-
Each of these objects is meant to encapsulate a tuple of
13-
(domain, range, function).
14-
Each of the mapping objects contain all the details about their domain
15-
CoordinateSystem, their range CoordinateSystem and the mapping between
11+
Each of these objects is meant to encapsulate a tuple of (domain, range,
12+
function). Each of the mapping objects contain all the details about their
13+
domain CoordinateSystem, their range CoordinateSystem and the mapping between
1614
them.
1715
1816
Common API
@@ -21,13 +19,16 @@
2119
They are separate classes, neither one inheriting from the other.
2220
They do, however, share some parts of an API, each having methods:
2321
24-
* renamed_domain : rename on the coordinates of the domain (returns a new mapping)
22+
* renamed_domain : rename on the coordinates of the domain (returns a new
23+
mapping)
2524
2625
* renamed_range : rename the coordinates of the range (returns a new mapping)
2726
28-
* reordered_domain : reorder the coordinates of the domain (returns a new mapping)
27+
* reordered_domain : reorder the coordinates of the domain (returns a new
28+
mapping)
2929
30-
* reordered_range : reorder the coordinates of the range (returns a new mapping)
30+
* reordered_range : reorder the coordinates of the range (returns a new
31+
mapping)
3132
3233
* inverse : when appropriate, return the inverse *mapping*
3334
@@ -45,20 +46,19 @@
4546
-----------------------------------------------
4647
4748
* compose : Take a sequence of mappings (either CoordinateMaps or
48-
AffineTransforms) and return their composition. If they are all
49-
AffineTransforms, an AffineTransform is returned. This checks to
50-
ensure that domains and ranges of the various mappings agree.
49+
AffineTransforms) and return their composition. If they are all
50+
AffineTransforms, an AffineTransform is returned. This checks to ensure that
51+
domains and ranges of the various mappings agree.
5152
* product : Take a sequence of mappings (either CoordinateMaps or
52-
AffineTransforms) and return a new mapping that has domain and range
53-
given by the concatenation of their domains and ranges, and the
54-
mapping simply concatenates the output of each of the individual
55-
mappings. If they are all AffineTransforms, an AffineTransform is
56-
returned. If they are all AffineTransforms that are in fact linear
57-
(i.e. origin=0) then can is represented as a block matrix with the
58-
size of the blocks determined by
53+
AffineTransforms) and return a new mapping that has domain and range given by
54+
the concatenation of their domains and ranges, and the mapping simply
55+
concatenates the output of each of the individual mappings. If they are all
56+
AffineTransforms, an AffineTransform is returned. If they are all
57+
AffineTransforms that are in fact linear (i.e. origin=0) then can is
58+
represented as a block matrix with the size of the blocks determined by
5959
* concat : Take a mapping and prepend a coordinate to its domain and
60-
range. For mapping `m`, this is the same as
61-
product(AffineTransform.identity('concat'), `m`)
60+
range. For mapping ``m``, this is the same as
61+
``product(AffineTransform.identity('concat'), m)``
6262
"""
6363
from __future__ import absolute_import
6464

0 commit comments

Comments
 (0)