Coverage for python/astshim/fitsTableContinued.py : 29%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1__all__ = ["FitsTable", "getColumnData"]
3from . import base
4from .fitsTable import FitsTable
7def getColumnData(self, column):
8 """Retrieve the column data in the correct type and shape.
10 Parameters
11 ----------
12 column : `str`
13 Name of the column to retrieve.
15 Returns
16 -------
17 data : `list` of `numpy.array`
19 """
20 nrows = self.nRow
21 shape = self.columnShape(column)
22 dtype = self.columnType(column)
24 if dtype == base.DataType.DoubleType:
25 newshape = list(shape)
26 newshape.append(nrows)
27 coldata = self.getColumnData1D(column)
28 coldata = coldata.reshape(newshape, order="F")
29 else:
30 raise ValueError("Can only retrieve double column data")
31 return coldata
34FitsTable.getColumnData = getColumnData