LSST Applications  21.0.0-141-gec8a224e+c9dc52cf11,22.0.0+052faf71bd,22.0.0+1c4650f311,22.0.0+40ce427c77,22.0.0+5b6c068b1a,22.0.0+7589c3a021,22.0.0+b84b5806bd,22.0.1-1-g7d6de66+961d22230d,22.0.1-1-g87000a6+314cd8b7ea,22.0.1-1-g8760c09+052faf71bd,22.0.1-1-g8e32f31+5b6c068b1a,22.0.1-10-g779eefa+7d186d72ce,22.0.1-12-g3bd7ecb+bec1274511,22.0.1-15-g63cc0c1+2a7037787d,22.0.1-17-ge5a99e88+2652af7731,22.0.1-19-g88addfe+961d22230d,22.0.1-2-g1cb3e5b+9c7a6aab6f,22.0.1-2-g8ef0a89+961d22230d,22.0.1-2-g92698f7+1c4650f311,22.0.1-2-ga9b0f51+052faf71bd,22.0.1-2-gb66926d+5b6c068b1a,22.0.1-2-gcb770ba+0723a13595,22.0.1-2-ge470956+36d961e575,22.0.1-21-g532228a4+2ac85e833c,22.0.1-29-g184b6e44e+8b185d4e2d,22.0.1-3-g59f966b+89b97c2637,22.0.1-3-g8c1d971+f90df4c6d0,22.0.1-3-g997b569+d69a7aa2f8,22.0.1-3-gaaec9c0+4d194bf81c,22.0.1-4-g1930a60+283d9d2f1a,22.0.1-4-g5b7b756+c1283a92b8,22.0.1-4-g8623105+961d22230d,22.0.1-7-gba73697+283d9d2f1a,22.0.1-8-g47d23f5+39e151d95f,master-g5f2689bdc5+40ce427c77,w.2021.38
LSST Data Management Base Package
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
lsst.meas.algorithms.ingestIndexReferenceTask.IngestGaiaReferenceTask Class Reference
Inheritance diagram for lsst.meas.algorithms.ingestIndexReferenceTask.IngestGaiaReferenceTask:
lsst.meas.algorithms.ingestIndexReferenceTask.IngestIndexedReferenceTask

Public Member Functions

def __init__ (self, *args, **kwargs)
 
def createIndexedCatalog (self, inputFiles)
 
def makeSchema (self, dtype)
 

Public Attributes

 IngestManager
 
 butler
 
 indexer
 

Static Public Attributes

bool canMultiprocess = False
 
 ConfigClass = IngestIndexedReferenceConfig
 
 RunnerClass = IngestReferenceRunner
 

Detailed Description

A special-cased version of the refcat ingester for Gaia DR2.

Definition at line 438 of file ingestIndexReferenceTask.py.

Constructor & Destructor Documentation

◆ __init__()

def lsst.meas.algorithms.ingestIndexReferenceTask.IngestGaiaReferenceTask.__init__ (   self,
args,
**  kwargs 
)

Definition at line 441 of file ingestIndexReferenceTask.py.

441  def __init__(self, *args, **kwargs):
442  super().__init__(*args, **kwargs)
443  self.IngestManager = ingestIndexManager.IngestGaiaManager

Member Function Documentation

◆ createIndexedCatalog()

def lsst.meas.algorithms.ingestIndexReferenceTask.IngestIndexedReferenceTask.createIndexedCatalog (   self,
  inputFiles 
)
inherited
Index a set of files comprising a reference catalog.

Outputs are persisted in the butler repository.

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

Definition at line 332 of file ingestIndexReferenceTask.py.

332  def createIndexedCatalog(self, inputFiles):
333  """Index a set of files comprising a reference catalog.
334 
335  Outputs are persisted in the butler repository.
336 
337  Parameters
338  ----------
339  inputFiles : `list`
340  A list of file paths to read.
341  """
342  schema, key_map = self._saveMasterSchema(inputFiles[0])
343  # create an HTM we can interrogate about pixel ids
344  htm = lsst.sphgeom.HtmPixelization(self.indexer.htm.get_depth())
345  filenames = self._getButlerFilenames(htm)
346  worker = self.IngestManager(filenames,
347  self.config,
348  self.file_reader,
349  self.indexer,
350  schema,
351  key_map,
352  htm.universe()[0],
353  addRefCatMetadata,
354  self.log)
355  worker.run(inputFiles)
356 
357  # write the config that was used to generate the refcat
358  dataId = self.indexer.makeDataId(None, self.config.dataset_config.ref_dataset_name)
359  self.butler.put(self.config.dataset_config, 'ref_cat_config', dataId=dataId)
360 
HtmPixelization provides HTM indexing of points and regions.

◆ makeSchema()

def lsst.meas.algorithms.ingestIndexReferenceTask.IngestIndexedReferenceTask.makeSchema (   self,
  dtype 
)
inherited
Make the schema to use in constructing the persisted catalogs.

Parameters
----------
dtype : `numpy.dtype`
    Data type describing each entry in ``config.extra_col_names``
    for the catalogs being ingested.

Returns
-------
schemaAndKeyMap : `tuple` of (`lsst.afw.table.Schema`, `dict`)
    A tuple containing two items:
    - The schema for the output source catalog.
    - A map of catalog keys to use in filling the record

Definition at line 392 of file ingestIndexReferenceTask.py.

392  def makeSchema(self, dtype):
393  """Make the schema to use in constructing the persisted catalogs.
394 
395  Parameters
396  ----------
397  dtype : `numpy.dtype`
398  Data type describing each entry in ``config.extra_col_names``
399  for the catalogs being ingested.
400 
401  Returns
402  -------
403  schemaAndKeyMap : `tuple` of (`lsst.afw.table.Schema`, `dict`)
404  A tuple containing two items:
405  - The schema for the output source catalog.
406  - A map of catalog keys to use in filling the record
407  """
408  # make a schema with the standard fields
409  schema = LoadReferenceObjectsTask.makeMinimalSchema(
410  filterNameList=self.config.mag_column_list,
411  addCentroid=False,
412  addIsPhotometric=bool(self.config.is_photometric_name),
413  addIsResolved=bool(self.config.is_resolved_name),
414  addIsVariable=bool(self.config.is_variable_name),
415  coordErrDim=2 if bool(self.config.ra_err_name) else 0,
416  addProperMotion=2 if bool(self.config.pm_ra_name) else 0,
417  properMotionErrDim=2 if bool(self.config.pm_ra_err_name) else 0,
418  addParallax=bool(self.config.parallax_name),
419  )
420  keysToSkip = set(("id", "centroid_x", "centroid_y", "hasCentroid"))
421  key_map = {fieldName: schema[fieldName].asKey() for fieldName in schema.getOrderedNames()
422  if fieldName not in keysToSkip}
423 
424  def addField(name):
425  if dtype[name].kind == 'U':
426  # dealing with a string like thing. Need to get type and size.
427  at_size = dtype[name].itemsize
428  return schema.addField(name, type=str, size=at_size)
429  else:
430  at_type = dtype[name].type
431  return schema.addField(name, at_type)
432 
433  for col in self.config.extra_col_names:
434  key_map[col] = addField(col)
435  return schema, key_map
436 
437 
daf::base::PropertySet * set
Definition: fits.cc:912

Member Data Documentation

◆ butler

lsst.meas.algorithms.ingestIndexReferenceTask.IngestIndexedReferenceTask.butler
inherited

Definition at line 325 of file ingestIndexReferenceTask.py.

◆ canMultiprocess

bool lsst.meas.algorithms.ingestIndexReferenceTask.IngestIndexedReferenceTask.canMultiprocess = False
staticinherited

Definition at line 309 of file ingestIndexReferenceTask.py.

◆ ConfigClass

lsst.meas.algorithms.ingestIndexReferenceTask.IngestIndexedReferenceTask.ConfigClass = IngestIndexedReferenceConfig
staticinherited

Definition at line 310 of file ingestIndexReferenceTask.py.

◆ indexer

lsst.meas.algorithms.ingestIndexReferenceTask.IngestIndexedReferenceTask.indexer
inherited

Definition at line 327 of file ingestIndexReferenceTask.py.

◆ IngestManager

lsst.meas.algorithms.ingestIndexReferenceTask.IngestGaiaReferenceTask.IngestManager

Definition at line 443 of file ingestIndexReferenceTask.py.

◆ RunnerClass

lsst.meas.algorithms.ingestIndexReferenceTask.IngestIndexedReferenceTask.RunnerClass = IngestReferenceRunner
staticinherited

Definition at line 311 of file ingestIndexReferenceTask.py.


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