Skip to content

Commit ed2e238

Browse files
committed
DOC: add some documentation to ECAT types
Eric Larson tracked down the relevant documentation for the datatypes. We discovered that ECAT7_BYTE might be signed int, but we have no data to test with, so leaving as is for now.
1 parent 5bffac6 commit ed2e238

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

nibabel/ecat.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -152,14 +152,19 @@
152152
subhdr_dtype = np.dtype(subheader_dtd)
153153

154154
# Ecat Data Types
155+
# See:
156+
# http://www.turkupetcentre.net/software/libdoc/libtpcimgio/ecat7_8h_source.html#l00060
157+
# and:
158+
# http://www.turkupetcentre.net/software/libdoc/libtpcimgio/ecat7r_8c_source.html#l00717
155159
_dtdefs = ( # code, name, equivalent dtype
156-
(1, 'ECAT7_BYTE', np.uint8),
157-
(2, 'ECAT7_VAXI2', np.int16),
158-
(3, 'ECAT7_VAXI4', np.int32),
159-
(4, 'ECAT7_VAXR4', np.float32),
160-
(5, 'ECAT7_IEEER4', np.float32),
161-
(6, 'ECAT7_SUNI2', np.int16),
162-
(7, 'ECAT7_SUNI4', np.int32))
160+
(1, 'ECAT7_BYTE', np.uint8),
161+
# Byte signed? https://github.com/nipy/nibabel/pull/302/files#r28275780
162+
(2, 'ECAT7_VAXI2', np.int16),
163+
(3, 'ECAT7_VAXI4', np.int32),
164+
(4, 'ECAT7_VAXR4', np.float32),
165+
(5, 'ECAT7_IEEER4', np.float32),
166+
(6, 'ECAT7_SUNI2', np.int16),
167+
(7, 'ECAT7_SUNI4', np.int32))
163168
data_type_codes = make_dt_codes(_dtdefs)
164169

165170

0 commit comments

Comments
 (0)