ConvertGaiaXpManager

class lsst.meas.algorithms.ConvertGaiaXpManager(filenames, config, file_reader, indexer, schema, key_map, htmRange, addRefCatMetadata, log)

Bases: lsst.meas.algorithms.ConvertRefcatManager

Special-case convert manager for Gaia XP spectrophotometry catalogs, that have fluxes/flux errors, instead of magnitudes/mag errors. The input flux and error values are in units of W/Hz/(m^2) (Gaia Collaboration, Montegriffo et al. 2022). The the flux and fluxErr fields in the output catalog have units of nJy.

Methods Summary

computeCoord(row, ra_name, dec_name) Create an ICRS coord.
getCatalog(pixelId, schema, nNewElements) Get a catalog from disk or create it if it doesn’t exist.
run(inputFiles) Index a set of input files from a reference catalog, and write the output to the appropriate filenames, in parallel.

Methods Documentation

static computeCoord(row, ra_name, dec_name)

Create an ICRS coord. from a row of a catalog being converted.

Parameters:
row : numpy.ndarray

Row from catalog being converted.

ra_name : str

Name of RA key in catalog being converted.

dec_name : str

Name of Dec key in catalog being converted.

Returns:
coord : lsst.geom.SpherePoint

ICRS coordinate.

getCatalog(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.

run(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.

Returns:
output : dict [int, str]

The htm ids and the filenames that were written to.