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: Optional[Config] = None, name: Optional[str] = None, parentTask: Optional[Task] = None, log: Optional[Union[logging.Logger, lsst.utils.logging.LsstLogAdapter]] = None)ReadFitsCatalogTask
Read an object catalog from a FITS table
...
-
attribute
config
Access configuration fields and retargetable subtasks.
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.