lsst.dax.apdb g9290983e33+d2d81de7f7
 
Loading...
Searching...
No Matches
lsst.dax.apdb.sql.apdbSqlAdmin.ApdbSqlAdmin Class Reference
Inheritance diagram for lsst.dax.apdb.sql.apdbSqlAdmin.ApdbSqlAdmin:
lsst.dax.apdb.apdbAdmin.ApdbAdmin

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
 

Detailed Description

Implementation of `ApdbAdmin` for SQL backend.

Parameters
----------
pixelator : `HtmPixelization`
    Pixelization scheme.

Member Function Documentation

◆ _timer()

Timer lsst.dax.apdb.sql.apdbSqlAdmin.ApdbSqlAdmin._timer ( self,
str name,
* ,
Mapping[str, str | int] | None tags = None )
protected
Create `Timer` instance given its name.

◆ apdb_part()

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.

◆ apdb_time_part()

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.

◆ delete_records()

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.


The documentation for this class was generated from the following file: