35 doReplace=False, parse_strict="raise"):
36 """Add an un-mapped field to the output Schema.
40 field : `str` or `~lsst.afw.table.Field`
41 The string name of the `Field`, or a fully-constructed
42 `Field` object. If the latter, all other arguments
43 besides doReplace are ignored.
45 The type of field to create. Valid types are the keys of the
46 afw.table.Field dictionary.
48 Documentation for the field.
50 Units for the field, or an empty string if unitless.
52 Size of the field; valid for string and array fields only.
54 If a field with this name already exists, replace it instead of
55 raising pex.exceptions.InvalidParameterError.
57 One of 'raise' (default), 'warn', or 'strict', indicating how to
58 handle unrecognized unit strings. See also astropy.units.Unit.
62 key : `~lsst.afw.table.Key`
63 The key of the field added.
66 field = Field[type](field, doc=doc, units=units,
67 size=size, parse_strict=parse_strict)
68 return field._addTo(self.editOutputSchema(), doReplace)
101 """SchemaMappers are equal if their respective input and output
102 schemas are identical, and they have the same mappings defined.
104 Note: It was simpler to implement equality in python than in C++.
106 iSchema = self.getInputSchema()
107 oSchema = self.getOutputSchema()
108 if (
not (iSchema.compare(other.getInputSchema(), Schema.IDENTICAL) == Schema.IDENTICAL
109 and oSchema.compare(other.getOutputSchema(), Schema.IDENTICAL) == Schema.IDENTICAL)):
113 if self.isMapped(item.key)
and other.isMapped(item.key):
114 if (self.getMapping(item.key) == other.getMapping(item.key)):
118 elif (
not self.isMapped(item.key))
and (
not other.isMapped(item.key)):