SchemaMapper¶
- class lsst.afw.table.SchemaMapper¶
Bases:
pybind11_object
Methods Summary
addMapping
(input[, output, doReplace])Add a mapped field to the output schema.
addMinimalSchema
(self, minimal[, doMap])addOutputField
(field[, type, doc, units, ...])Add an un-mapped field to the output Schema.
editOutputSchema
(self)getInputSchema
(self)getMapping
(*args, **kwargs)Overloaded function.
getOutputSchema
(self)isMapped
(*args, **kwargs)Overloaded function.
join
(inputs[, prefixes])removeMinimalSchema
(arg0, arg1)Methods Documentation
- addMapping(input, output=None, doReplace=True)¶
Add a mapped field to the output schema.
- Parameters:
- input
Key
A
Key
from the input schema whose values will be mapped to the new field.- output
str
orField
A
Field
object that describes the new field to be added to the output schema, or the name of the field (with documentation and units copied from the input schema). May be None to copy everything from the input schema.- doReplace
bool
If a field with this name already exists in the output schema, replace it instead of raising
pex.exceptions.InvalidParameterError
.
- input
- Returns:
- key
Key
The key for the new mapped field.
- key
- addMinimalSchema(self: lsst.afw.table.SchemaMapper, minimal: lsst.afw.table.Schema, doMap: bool = True) None ¶
- addOutputField(field, type=None, doc=None, units='', size=None, doReplace=False, parse_strict='raise')¶
Add an un-mapped field to the output Schema.
- Parameters:
- field
str
orField
The string name of the
Field
, or a fully-constructedField
object. If the latter, all other arguments besides doReplace are ignored.- type
str
The type of field to create. Valid types are the keys of the afw.table.Field dictionary.
- doc
str
Documentation for the field.
- unit
str
Units for the field, or an empty string if unitless.
- size
int
Size of the field; valid for string and array fields only.
- doReplace
bool
If a field with this name already exists, replace it instead of raising pex.exceptions.InvalidParameterError.
- parse_strict
str
One of ‘raise’ (default), ‘warn’, or ‘strict’, indicating how to handle unrecognized unit strings. See also astropy.units.Unit.
- field
- Returns:
- key
Key
The key of the field added.
- key
- editOutputSchema(self: lsst.afw.table.SchemaMapper) lsst.afw.table.Schema ¶
- getInputSchema(self: lsst.afw.table.SchemaMapper) lsst.afw.table.Schema ¶
- getMapping(*args, **kwargs)¶
Overloaded function.
getMapping(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyB) -> lsst.afw.table.KeyB
getMapping(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyU) -> lsst.afw.table.KeyU
getMapping(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyI) -> lsst.afw.table.KeyI
getMapping(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyL) -> lsst.afw.table.KeyL
getMapping(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyF) -> lsst.afw.table.KeyF
getMapping(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyD) -> lsst.afw.table.KeyD
getMapping(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyString) -> lsst.afw.table.KeyString
getMapping(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyAngle) -> lsst.afw.table.KeyAngle
getMapping(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyFlag) -> lsst.afw.table.KeyFlag
getMapping(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyArrayB) -> lsst.afw.table.KeyArrayB
getMapping(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyArrayU) -> lsst.afw.table.KeyArrayU
getMapping(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyArrayI) -> lsst.afw.table.KeyArrayI
getMapping(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyArrayF) -> lsst.afw.table.KeyArrayF
getMapping(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyArrayD) -> lsst.afw.table.KeyArrayD
- getOutputSchema(self: lsst.afw.table.SchemaMapper) lsst.afw.table.Schema ¶
- isMapped(*args, **kwargs)¶
Overloaded function.
isMapped(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyB) -> bool
isMapped(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyU) -> bool
isMapped(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyI) -> bool
isMapped(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyL) -> bool
isMapped(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyF) -> bool
isMapped(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyD) -> bool
isMapped(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyString) -> bool
isMapped(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyAngle) -> bool
isMapped(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyFlag) -> bool
isMapped(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyArrayB) -> bool
isMapped(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyArrayU) -> bool
isMapped(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyArrayI) -> bool
isMapped(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyArrayF) -> bool
isMapped(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyArrayD) -> bool
- static join(inputs: list[lsst.afw.table.Schema], prefixes: list[str] = []) list[lsst.afw.table.SchemaMapper] ¶
- static removeMinimalSchema(arg0: lsst.afw.table.Schema, arg1: lsst.afw.table.Schema) lsst.afw.table.SchemaMapper ¶