Public Member Functions | |
| __init__ (self, HtmPixelization pixelator) | |
| int | apdb_part (self, float ra, float dec) |
| int | apdb_time_part (self, float midpointMjdTai) |
| None | delete_records (self, Iterable[DiaObjectLocator] objects, Iterable[DiaSourceLocator] sources, Iterable[DiaForcedSourceLocator] forced_sources) |
Protected Member Functions | |
| Timer | _timer (self, str name, *, Mapping[str, str|int]|None tags=None) |
Protected Attributes | |
| _pixelator = pixelator | |
Implementation of `ApdbAdmin` for SQL backend.
Parameters
----------
pixelator : `HtmPixelization`
Pixelization scheme.
|
protected |
Create `Timer` instance given its name.
| int lsst.dax.apdb.sql.apdbSqlAdmin.ApdbSqlAdmin.apdb_part | ( | self, | |
| float | ra_deg, | ||
| float | dec_deg ) |
Return spatial partition index for given coordinates.
Parameters
----------
ra_deg, dec_deg : `float`
Spatial coordinates, in degrees.
Returns
-------
index : `int`
Spatial partition index.
Reimplemented from lsst.dax.apdb.apdbAdmin.ApdbAdmin.
| int lsst.dax.apdb.sql.apdbSqlAdmin.ApdbSqlAdmin.apdb_time_part | ( | self, | |
| float | midpointMjdTai ) |
Return temporal partition index for given time.
Parameters
----------
midpointMjdTai : `float`
Time in MJD.
Returns
-------
index : `int`
Temporal partition index.
Reimplemented from lsst.dax.apdb.apdbAdmin.ApdbAdmin.
| None lsst.dax.apdb.sql.apdbSqlAdmin.ApdbSqlAdmin.delete_records | ( | self, | |
| Iterable[DiaObjectLocator] | objects, | ||
| Iterable[DiaSourceLocator] | sources, | ||
| Iterable[DiaForcedSourceLocator] | forced_sources ) |
Remove DiaObjects and all their associated DiaSources and
DiaForcedSources from database.
Parameters
----------
objects : `~collections.abc.Iterable` [`DiaObjectLocator`]
Locators for DiaObject records to remove.
sources : `~collections.abc.Iterable` [`DiaSourceLocator`]
Locators for DiaSource records to remove.
forced_sources : `~collections.abc.Iterable` [`DiaSourceLocator`]
Locators for DiaForcedSource records to remove.
Notes
-----
The list of sources has to include all sources associated with objects
in ``objects`` list. Sources that are not associated with any object
from ``objects`` are not removed.
Reimplemented from lsst.dax.apdb.apdbAdmin.ApdbAdmin.