lsst.meas.algorithms  20.0.0-14-g05f4b37e+5ec167a87d
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
lsst.meas.algorithms.ingestIndexManager.IngestIndexManager Class Reference
Inheritance diagram for lsst.meas.algorithms.ingestIndexManager.IngestIndexManager:
lsst.meas.algorithms.ingestIndexManager.IngestGaiaManager

Public Member Functions

def __init__ (self, filenames, config, file_reader, indexer, schema, key_map, htmRange, addRefCatMetadata, log)
 
def run (self, inputFiles)
 
def getCatalog (self, pixelId, schema, nNewElements)
 

Static Public Member Functions

def computeCoord (row, ra_name, dec_name)
 

Public Attributes

 filenames
 
 config
 
 file_reader
 
 indexer
 
 schema
 
 key_map
 
 htmRange
 
 addRefCatMetadata
 
 log
 
 coord_err_unit
 
 nInputFiles
 

Detailed Description

Ingest a reference catalog from external files into a butler repository,
using a multiprocessing Pool to speed up the work.

Parameters
----------
filenames : `dict` [`int`, `str`]
    The HTM pixel id and filenames to ingest the catalog into.
config : `lsst.meas.algorithms.IngestIndexedReferenceConfig`
    The Task configuration holding the field names.
file_reader : `lsst.pipe.base.Task`
    The file reader to use to load the files.
indexer : `lsst.meas.algorithms.HtmIndexer`
    The class used to compute the HTM pixel per coordinate.
schema : `lsst.afw.table.Schema`
    The schema of the output catalog.
key_map : `dict` [`str`, `lsst.afw.table.Key`]
    The mapping from output field names to keys in the Schema.
htmRange : `tuple` [`int`]
    The start and end HTM pixel ids.
addRefCatMetadata : callable
    A function called to add extra metadata to each output Catalog.
log : `lsst.log.Log`
    The log to send messages to.

Definition at line 45 of file ingestIndexManager.py.

Constructor & Destructor Documentation

◆ __init__()

def lsst.meas.algorithms.ingestIndexManager.IngestIndexManager.__init__ (   self,
  filenames,
  config,
  file_reader,
  indexer,
  schema,
  key_map,
  htmRange,
  addRefCatMetadata,
  log 
)

Definition at line 73 of file ingestIndexManager.py.

Member Function Documentation

◆ computeCoord()

def lsst.meas.algorithms.ingestIndexManager.IngestIndexManager.computeCoord (   row,
  ra_name,
  dec_name 
)
static
Create an ICRS coord. from a row of a catalog being ingested.

Parameters
----------
row : `numpy.ndarray`
    Row from catalog being ingested.
ra_name : `str`
    Name of RA key in catalog being ingested.
dec_name : `str`
    Name of Dec key in catalog being ingested.

Returns
-------
coord : `lsst.geom.SpherePoint`
    ICRS coordinate.

Definition at line 235 of file ingestIndexManager.py.

◆ getCatalog()

def lsst.meas.algorithms.ingestIndexManager.IngestIndexManager.getCatalog (   self,
  pixelId,
  schema,
  nNewElements 
)
Get a catalog from disk or create it if it doesn't exist.

Parameters
----------
pixelId : `dict`
    Identifier for catalog to retrieve
schema : `lsst.afw.table.Schema`
    Schema to use in catalog creation it does not exist.
nNewElements : `int`
    The number of new elements that will be added to the catalog,
    so space can be preallocated.

Returns
-------
catalog : `lsst.afw.table.SimpleCatalog`
    The new or read-and-resized catalog specified by `dataId`.

Definition at line 206 of file ingestIndexManager.py.

◆ run()

def lsst.meas.algorithms.ingestIndexManager.IngestIndexManager.run (   self,
  inputFiles 
)
Index a set of input files from a reference catalog, and write the
output to the appropriate filenames, in parallel.

Parameters
----------
inputFiles : `list`
    A list of file paths to read data from.

Definition at line 88 of file ingestIndexManager.py.

Member Data Documentation

◆ addRefCatMetadata

lsst.meas.algorithms.ingestIndexManager.IngestIndexManager.addRefCatMetadata

Definition at line 81 of file ingestIndexManager.py.

◆ config

lsst.meas.algorithms.ingestIndexManager.IngestIndexManager.config

Definition at line 75 of file ingestIndexManager.py.

◆ coord_err_unit

lsst.meas.algorithms.ingestIndexManager.IngestIndexManager.coord_err_unit

Definition at line 85 of file ingestIndexManager.py.

◆ file_reader

lsst.meas.algorithms.ingestIndexManager.IngestIndexManager.file_reader

Definition at line 76 of file ingestIndexManager.py.

◆ filenames

lsst.meas.algorithms.ingestIndexManager.IngestIndexManager.filenames

Definition at line 74 of file ingestIndexManager.py.

◆ htmRange

lsst.meas.algorithms.ingestIndexManager.IngestIndexManager.htmRange

Definition at line 80 of file ingestIndexManager.py.

◆ indexer

lsst.meas.algorithms.ingestIndexManager.IngestIndexManager.indexer

Definition at line 77 of file ingestIndexManager.py.

◆ key_map

lsst.meas.algorithms.ingestIndexManager.IngestIndexManager.key_map

Definition at line 79 of file ingestIndexManager.py.

◆ log

lsst.meas.algorithms.ingestIndexManager.IngestIndexManager.log

Definition at line 82 of file ingestIndexManager.py.

◆ nInputFiles

lsst.meas.algorithms.ingestIndexManager.IngestIndexManager.nInputFiles

Definition at line 98 of file ingestIndexManager.py.

◆ schema

lsst.meas.algorithms.ingestIndexManager.IngestIndexManager.schema

Definition at line 78 of file ingestIndexManager.py.


The documentation for this class was generated from the following file: