ReadFitsCatalogTask¶
ReadFitsCatalogTask
reads an object catalog from a FITS file into a numpy array object suitable for use with lsst.meas.algorithms.IngestIndexReferenceTask
.
Python API summary¶
from lsst.meas.algorithms.readFitsCatalogTask import ReadFitsCatalogTask
-
class
(config=None, name=None, parentTask=None, log=None)ReadFitsCatalogTask
Read an object catalog from a FITS table
...
-
attribute
config
Access configuration fields and retargetable subtasks.
-
method
(filename)run
Read an object catalog from the specified FITS file
...
See also
See the ReadFitsCatalogTask
API reference for complete details.
Retargetable subtasks¶
No subtasks.
Configuration fields¶
column_map¶
Mapping of input column name: output column name; each specified column must exist, but additional columns in the input data are written using their original name.
Examples¶
A complete example of using ReadFitsCatalogTask:
from lsst.meas.algorithms.readFitsCatalogTask import ReadFitsCatalogTask
filePath = "tests/data/testReadFitsCatalog.fits"
task = ReadFitsCatalogTask()
catalogArray = task.run(filePath)
The resulting catalogArray
is a numpy structured array containing fields such as “name”, “ra” and “dec”
and a few rows of data. For more complicated cases config parameters allow you to rename columns
and choose which HDU to read.