LSSTApplications  20.0.0
LSSTDataManagementBasePackage
fitsTableContinued.py
Go to the documentation of this file.
1 __all__ = ["FitsTable", "getColumnData"]
2 
3 from . import base
4 from .fitsTable import FitsTable
5 
6 
7 def getColumnData(self, column):
8  """Retrieve the column data in the correct type and shape.
9 
10  Parameters
11  ----------
12  column : `str`
13  Name of the column to retrieve.
14 
15  Returns
16  -------
17  data : `list` of `numpy.array`
18 
19  """
20  nrows = self.nRow
21  shape = self.columnShape(column)
22  dtype = self.columnType(column)
23 
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
32 
33 
34 FitsTable.getColumnData = getColumnData
astshim.fitsTableContinued.getColumnData
def getColumnData(self, column)
Definition: fitsTableContinued.py:7
list
daf::base::PropertyList * list
Definition: fits.cc:913