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:
inputKey

A Key from the input schema whose values will be mapped to the new field.

outputstr or Field

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.

doReplacebool

If a field with this name already exists in the output schema, replace it instead of raising pex.exceptions.InvalidParameterError.

Returns:
keyKey

The key for the new mapped field.

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:
fieldstr or Field

The string name of the Field, or a fully-constructed Field object. If the latter, all other arguments besides doReplace are ignored.

typestr

The type of field to create. Valid types are the keys of the afw.table.Field dictionary.

docstr

Documentation for the field.

unitstr

Units for the field, or an empty string if unitless.

sizeint

Size of the field; valid for string and array fields only.

doReplacebool

If a field with this name already exists, replace it instead of raising pex.exceptions.InvalidParameterError.

parse_strictstr

One of ‘raise’ (default), ‘warn’, or ‘strict’, indicating how to handle unrecognized unit strings. See also astropy.units.Unit.

Returns:
keyKey

The key of the field added.

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.

  1. getMapping(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyB) -> lsst.afw.table.KeyB

  2. getMapping(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyU) -> lsst.afw.table.KeyU

  3. getMapping(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyI) -> lsst.afw.table.KeyI

  4. getMapping(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyL) -> lsst.afw.table.KeyL

  5. getMapping(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyF) -> lsst.afw.table.KeyF

  6. getMapping(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyD) -> lsst.afw.table.KeyD

  7. getMapping(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyString) -> lsst.afw.table.KeyString

  8. getMapping(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyAngle) -> lsst.afw.table.KeyAngle

  9. getMapping(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyFlag) -> lsst.afw.table.KeyFlag

  10. getMapping(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyArrayB) -> lsst.afw.table.KeyArrayB

  11. getMapping(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyArrayU) -> lsst.afw.table.KeyArrayU

  12. getMapping(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyArrayI) -> lsst.afw.table.KeyArrayI

  13. getMapping(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyArrayF) -> lsst.afw.table.KeyArrayF

  14. 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.

  1. isMapped(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyB) -> bool

  2. isMapped(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyU) -> bool

  3. isMapped(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyI) -> bool

  4. isMapped(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyL) -> bool

  5. isMapped(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyF) -> bool

  6. isMapped(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyD) -> bool

  7. isMapped(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyString) -> bool

  8. isMapped(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyAngle) -> bool

  9. isMapped(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyFlag) -> bool

  10. isMapped(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyArrayB) -> bool

  11. isMapped(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyArrayU) -> bool

  12. isMapped(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyArrayI) -> bool

  13. isMapped(self: lsst.afw.table.SchemaMapper, arg0: lsst.afw.table.KeyArrayF) -> bool

  14. 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