|
lsst.meas.algorithms g1d3acf762d+812787a8c8
|
Public Member Functions | |
| run (self, inputFiles) | |
| getCatalog (self, pixelId, schema, nNewElements) | |
Static Public Member Functions | |
| computeCoord (row, ra_name, dec_name) | |
Public Attributes | |
| filenames = filenames | |
| config = config | |
| file_reader = file_reader | |
| indexer = indexer | |
| schema = schema | |
| key_map = key_map | |
| htmRange = htmRange | |
| addRefCatMetadata = addRefCatMetadata | |
| log = log | |
| coord_err_unit = u.Unit(self.config.coord_err_unit) | |
| nInputFiles = len(inputFiles) | |
Static Public Attributes | |
| ConfigClass = ConvertRefcatManagerConfig | |
Protected Member Functions | |
| _getFluxes (self, inputData) | |
| _convertOneFile (self, filename, fileLocks) | |
| _doOnePixel (self, inputData, matchedPixels, pixelId, fluxes, coordErr) | |
| _setIds (self, inputData, catalog) | |
| _getCoordErr (self, inputData) | |
| _setFlags (self, record, row) | |
| _setProperMotion (self, record, row) | |
| _setParallax (self, record, row) | |
| _epochToMjdTai (self, nativeEpoch) | |
| _setCoordinateCovariance (self, record, row) | |
| _setExtra (self, record, row) | |
| _fillRecord (self, record, row) | |
Static Protected Attributes | |
| list | _flags = ['photometric', 'resolved', 'variable'] |
| str | _DefaultName = '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.
Definition at line 537 of file convertRefcatManager.py.
|
protectedinherited |
Read and process one file, and write its records to the correct
indexed files, while handling exceptions in a useful way so that they
don't get swallowed by the multiprocess pool.
Parameters
----------
filename : `str`
The file to process.
fileLocks : `dict` [`int`, `multiprocessing.Lock`]
A Lock for each HTM pixel; each pixel gets one file written, and
we need to block when one process is accessing that file.
Returns
-------
pixels, files : `list` [`int`]
The pixel ids that were written to.
Definition at line 133 of file convertRefcatManager.py.
|
protectedinherited |
Process one HTM pixel, appending to an existing catalog or creating
a new catalog, as needed.
Parameters
----------
inputData : `numpy.ndarray`
The data from one input file.
matchedPixels : `numpy.ndarray`
The row-matched pixel indexes corresponding to ``inputData``.
pixelId : `int`
The pixel index we are currently processing.
fluxes : `dict` [`str`, `numpy.ndarray`]
The values that will go into the flux and fluxErr fields in the
output catalog.
coordErr : `dict` [`str`, `numpy.ndarray`]
The values that will go into the coord_raErr, coord_decErr, and
coord_ra_dec_Cov fields in the output catalog (in radians).
Definition at line 183 of file convertRefcatManager.py.
|
protectedinherited |
Convert an epoch in native format to TAI MJD (a float).
Definition at line 394 of file convertRefcatManager.py.
|
protectedinherited |
Fill a record in an indexed catalog to be persisted.
Parameters
----------
record : `lsst.afw.table.SimpleRecord`
Row from indexed catalog to modify.
row : structured `numpy.array`
Row from catalog being converted.
Definition at line 440 of file convertRefcatManager.py.
|
protectedinherited |
Compute the ra/dec error fields that will go into the output catalog.
Parameters
----------
inputData : `numpy.ndarray`
The input data to compute fluxes for.
Returns
-------
coordErr : `dict` [`str`, `numpy.ndarray`]
The values that will go into the coord_raErr, coord_decErr, fields
in the output catalog (in radians).
Notes
-----
This does not handle the ra/dec covariance field,
``coord_ra_coord_dec_Cov``. That field is handled in
`_setCoordinateCovariance`.
Definition at line 290 of file convertRefcatManager.py.
|
protected |
Compute the flux fields that will go into the output catalog.
Parameters
----------
inputData : `numpy.ndarray`
The input data to compute fluxes for.
Returns
-------
fluxes : `dict` [`str`, `numpy.ndarray`]
The values that will go into the flux and fluxErr fields in the
output catalog.
Reimplemented from lsst.meas.algorithms.convertRefcatManager.ConvertRefcatManager.
Definition at line 544 of file convertRefcatManager.py.
|
protectedinherited |
Set the off-diagonal position covariance in a record of an indexed
catalog.
There is no generic way to determine covariance. Override this method
in a subclass specialized for your dataset.
Parameters
----------
record : `lsst.afw.table.SimpleRecord`
Row from indexed catalog to modify.
row : structured `numpy.array`
Row from catalog being converted.
Reimplemented in lsst.meas.algorithms.convertRefcatManager.ConvertGaiaManager.
Definition at line 400 of file convertRefcatManager.py.
|
protectedinherited |
Set extra data fields in a record of an indexed catalog.
Parameters
----------
record : `lsst.afw.table.SimpleRecord`
Row from indexed catalog to modify.
row : structured `numpy.array`
Row from catalog being converted.
Definition at line 417 of file convertRefcatManager.py.
|
protectedinherited |
Set flags in an output record.
Parameters
----------
record : `lsst.afw.table.SimpleRecord`
Row from indexed catalog to modify.
row : `numpy.ndarray`
Row from catalog being converted.
Definition at line 318 of file convertRefcatManager.py.
|
protectedinherited |
Fill the `id` field of catalog with a running index, filling the
last values up to the length of ``inputData``.
Fill with `self.config.id_name` if specified, otherwise use the
global running counter value.
Parameters
----------
inputData : `numpy.ndarray`
The input data that is being processed.
catalog : `lsst.afw.table.SimpleCatalog`
The output catalog to fill the ids.
Definition at line 220 of file convertRefcatManager.py.
|
protectedinherited |
Set the parallax fields in a record of a refcat.
Definition at line 385 of file convertRefcatManager.py.
|
protectedinherited |
Set proper motion fields in a record of an indexed catalog.
The proper motions are read from the specified columns,
scaled appropriately, and installed in the appropriate
columns of the output.
Parameters
----------
record : `lsst.afw.table.SimpleRecord`
Row from indexed catalog to modify.
row : structured `numpy.array`
Row from catalog being converted.
Definition at line 361 of file convertRefcatManager.py.
|
staticinherited |
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.
Definition at line 271 of file convertRefcatManager.py.
|
inherited |
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 242 of file convertRefcatManager.py.
|
inherited |
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.
Definition at line 100 of file convertRefcatManager.py.
|
staticprotectedinherited |
Definition at line 81 of file convertRefcatManager.py.
|
staticprotectedinherited |
Definition at line 80 of file convertRefcatManager.py.
|
inherited |
Definition at line 93 of file convertRefcatManager.py.
|
inherited |
Definition at line 87 of file convertRefcatManager.py.
|
staticinherited |
Definition at line 82 of file convertRefcatManager.py.
|
inherited |
Definition at line 98 of file convertRefcatManager.py.
|
inherited |
Definition at line 88 of file convertRefcatManager.py.
|
inherited |
Definition at line 86 of file convertRefcatManager.py.
|
inherited |
Definition at line 92 of file convertRefcatManager.py.
|
inherited |
Definition at line 89 of file convertRefcatManager.py.
|
inherited |
Definition at line 91 of file convertRefcatManager.py.
|
inherited |
Definition at line 94 of file convertRefcatManager.py.
|
inherited |
Definition at line 114 of file convertRefcatManager.py.
|
inherited |
Definition at line 90 of file convertRefcatManager.py.