BlobBase

class lsst.validate.drp.base.BlobBase[source]

Bases: lsst.validate.drp.base.JsonSerializationMixin, lsst.validate.drp.base.DatumAttributeMixin

Base class for Blob classes.

Blobs are flexible containers of data that are serialized to JSON.

Attributes

name Name of this blob (the BlobBase subclass’s Python namespace).
datums (dict) A dict of Datums instances contained by the Blob instance. The values of blobs can also be accessed as attributes of the BlobBase subclass. Keys in datums and attributes share the same names.
identifier (str) Unique identifier for this blob instance

Attributes Summary

identifier
json
name Name of this blob (the BlobBase subclass’s Python namespace).

Methods Summary

registerDatum(name[, value, units, label, ...]) Register a new Datum to be contained by, and serialized via, this blob.

Attributes Documentation

identifier
json
name

Name of this blob (the BlobBase subclass’s Python namespace).

Methods Documentation

registerDatum(name, value=None, units=None, label=None, description=None, datum=None)[source]

Register a new Datum to be contained by, and serialized via, this blob.

The value of the Datum can either be set at registration time (with the value argument) or later by setting the instance attribute named name.

Values of Datums can always be accessed or updated through instance attributes.

The full Datum object can be accessed as items of the datums dictionary attached to this class. This method is useful for accessing or updating metadata about a datum, such as units, label or description.

Parameters:

name : str

Name of the datum; used as the key in the datums attribute of this object.

value : obj

Value of the datum.

units : str, optional

An astropy-compatible unit string. See http://docs.astropy.org/en/stable/units/.

label : str, optional

Label suitable for plot axes (without units). By default the name is used as the label. Setting this label argument overrides this default.

description : str, optional

Extended description.

datum : Datum, optional

If a Datum is provided, its value, units and label will be used unless overriden by other arguments to registerParameter.