diff options
author | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2018-01-09 15:45:34 +0100 |
---|---|---|
committer | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2018-01-09 15:45:34 +0100 |
commit | b3393ec49bbe2ffc3eb3b6c7512bb12b8b8d2e52 (patch) | |
tree | 210fd2e5de719cde8fb08a5db97e4f6056e14a0f | |
parent | f7037ad8af95af569649cff0afba97babebe9425 (diff) | |
download | astra-b3393ec49bbe2ffc3eb3b6c7512bb12b8b8d2e52.tar.gz astra-b3393ec49bbe2ffc3eb3b6c7512bb12b8b8d2e52.tar.bz2 astra-b3393ec49bbe2ffc3eb3b6c7512bb12b8b8d2e52.tar.xz astra-b3393ec49bbe2ffc3eb3b6c7512bb12b8b8d2e52.zip |
Fix comments for postalignment function
-rw-r--r-- | matlab/tools/astra_geom_postalignment.m | 12 | ||||
-rw-r--r-- | python/astra/functions.py | 11 |
2 files changed, 18 insertions, 5 deletions
diff --git a/matlab/tools/astra_geom_postalignment.m b/matlab/tools/astra_geom_postalignment.m index c16f8ed..c85a7a0 100644 --- a/matlab/tools/astra_geom_postalignment.m +++ b/matlab/tools/astra_geom_postalignment.m @@ -5,9 +5,15 @@ function proj_geom = astra_geom_postalignment(proj_geom, factor) % % Apply a postalignment to a vector-based projection geometry. Can be used to model the rotation axis offset. % +% For 2D geometries, the argument factor is a single float specifying the +% distance to shift the detector (measured in detector pixels). +% +% For 3D geometries, factor is a pair of floats specifying the horizontal +% resp. vertical distances to shift the detector. +% % proj_geom: input projection geometry (vector-based only, use astra_geom_2vec to convert conventional projection geometries) -% dim (optional): which dimension -% s: output +% factor: number of pixels to shift the detector +% proj_geom: output %-------------------------------------------------------------------------- % This file is part of the ASTRA Toolbox % @@ -33,4 +39,4 @@ function proj_geom = astra_geom_postalignment(proj_geom, factor) error('Projection geometry not suited for postalignment correction.') end -end
\ No newline at end of file +end diff --git a/python/astra/functions.py b/python/astra/functions.py index b3a470d..5a3d453 100644 --- a/python/astra/functions.py +++ b/python/astra/functions.py @@ -274,11 +274,18 @@ def geom_2vec(proj_geom): def geom_postalignment(proj_geom, factor): - """Returns the size of a volume or sinogram, based on the projection or volume geometry. + """Apply a postalignment to a vector-based projection geometry. + Can be used to model the rotation axis offset. + + For 2D geometries, the argument factor is a single float specifying the + distance to shift the detector (measured in detector pixels). + + For 3D geometries, factor is a pair of floats specifying the horizontal + resp. vertical distances to shift the detector. :param proj_geom: input projection geometry (vector-based only, use astra.geom_2vec to convert conventional projection geometries) :type proj_geom: :class:`dict` - :param factor: Optional axis index to return + :param factor: number of pixels to shift the detector :type factor: :class:`float` """ |