|
LSST Applications g00274db5b6+edbf708997,g00d0e8bbd7+edbf708997,g199a45376c+5137f08352,g1fd858c14a+1d4b6db739,g262e1987ae+f4d9505c4f,g29ae962dfc+7156fb1a53,g2cef7863aa+73c82f25e4,g35bb328faa+edbf708997,g3e17d7035e+5b3adc59f5,g3fd5ace14f+852fa6fbcb,g47891489e3+6dc8069a4c,g53246c7159+edbf708997,g64539dfbff+9f17e571f4,g67b6fd64d1+6dc8069a4c,g74acd417e5+ae494d68d9,g786e29fd12+af89c03590,g7ae74a0b1c+a25e60b391,g7aefaa3e3d+536efcc10a,g7cc15d900a+d121454f8d,g87389fa792+a4172ec7da,g89139ef638+6dc8069a4c,g8d7436a09f+28c28d8d6d,g8ea07a8fe4+db21c37724,g92c671f44c+9f17e571f4,g98df359435+b2e6376b13,g99af87f6a8+b0f4ad7b8d,gac66b60396+966efe6077,gb88ae4c679+7dec8f19df,gbaa8f7a6c5+38b34f4976,gbf99507273+edbf708997,gc24b5d6ed1+9f17e571f4,gca7fc764a6+6dc8069a4c,gcc769fe2a4+97d0256649,gd7ef33dd92+6dc8069a4c,gdab6d2f7ff+ae494d68d9,gdbb4c4dda9+9f17e571f4,ge410e46f29+6dc8069a4c,geaed405ab2+e194be0d2b,w.2025.47
LSST Data Management Base Package
|
Public Member Functions | |
| __init__ (self, str schema_file, str ss_schema_file) | |
| type|str | column_dtype (self, felis.datamodel.DataType|ExtraDataTypes felis_type) |
| VersionTuple | schemaVersion (self) |
| bool | has_mjd_timestamps (self) |
Public Attributes | |
| tableSchemas | |
Protected Member Functions | |
| tuple[Mapping[ApdbTables, Table], VersionTuple|None] | _buildSchemas (cls, str schema_file) |
Protected Attributes | |
| tuple[Mapping[ApdbTables, Table], VersionTuple|None] | _schemaVersion = self._buildSchemas(schema_file) |
Class for management of APDB schema.
Attributes
----------
tableSchemas : `dict`
Maps table name to `TableDef` instance.
Parameters
----------
schema_file : `str`
Location of the YAML file with APDB schema.
ss_schema_file : `str`
Location of the YAML file with SSO schema. File will be loaded if APDB
schema file does not contain SSObject/SSSource tables. Can be set to
empty string to skip loading of SSObject/SSSource schema.
Definition at line 115 of file apdbSchema.py.
| lsst.dax.apdb.apdbSchema.ApdbSchema.__init__ | ( | self, | |
| str | schema_file, | ||
| str | ss_schema_file ) |
Definition at line 133 of file apdbSchema.py.
|
protected |
Create schema definitions for tables from felis schema.
Reads YAML schema and builds a dictionary containing
`.schema_model.Table` instances for each APDB table appearing in that
schema.
Parameters
----------
schema_file : `str`
Name of YAML file with ``felis`` schema.
Returns
-------
tables : `dict` [`ApdbTables`, `schema_model.Table`]
Mapping of table names to `.schema_model.Table` instances.
version : `VersionTuple` or `None`
Schema version defined in schema file, `None` if version is not
defined.
Definition at line 189 of file apdbSchema.py.
| type | str lsst.dax.apdb.apdbSchema.ApdbSchema.column_dtype | ( | self, | |
| felis.datamodel.DataType | ExtraDataTypes | felis_type ) |
Return Pandas data type for a given Felis column type.
Parameters
----------
felis_type : `felis.datamodel.DataType`
Felis type, on of the enums defined in `felis.datamodel` module.
Returns
-------
column_dtype : `type` or `str`
Type that can be used for columns in Pandas.
Raises
------
TypeError
Raised if type is cannot be handled.
Definition at line 151 of file apdbSchema.py.
| bool lsst.dax.apdb.apdbSchema.ApdbSchema.has_mjd_timestamps | ( | self | ) |
True if timestamps columns are in MJD (`bool`).
Definition at line 233 of file apdbSchema.py.
| VersionTuple lsst.dax.apdb.apdbSchema.ApdbSchema.schemaVersion | ( | self | ) |
Return schema version as defined in YAML schema file.
Returns
-------
version : `VersionTuple`
Version number read from YAML file, if YAML file does not define
schema version then "0.1.0" is returned.
Definition at line 174 of file apdbSchema.py.
|
protected |
Definition at line 139 of file apdbSchema.py.
| lsst.dax.apdb.apdbSchema.ApdbSchema.tableSchemas |
Definition at line 139 of file apdbSchema.py.