Loading [MathJax]/extensions/tex2jax.js
LSST Applications g04a91732dc+cc8870d3f5,g07dc498a13+5aa0b8792f,g0fba68d861+80045be308,g1409bbee79+5aa0b8792f,g1a7e361dbc+5aa0b8792f,g1fd858c14a+f64bc332a9,g208c678f98+1ae86710ed,g35bb328faa+fcb1d3bbc8,g4d2262a081+47ad8a29a8,g4d39ba7253+9633a327c1,g4e0f332c67+5d362be553,g53246c7159+fcb1d3bbc8,g60b5630c4e+9633a327c1,g668ecb457e+25d63fd678,g78460c75b0+2f9a1b4bcd,g786e29fd12+cf7ec2a62a,g7b71ed6315+fcb1d3bbc8,g8852436030+8b64ca622a,g89139ef638+5aa0b8792f,g89e1512fd8+04325574d3,g8d6b6b353c+9633a327c1,g9125e01d80+fcb1d3bbc8,g989de1cb63+5aa0b8792f,g9f33ca652e+b196626af7,ga9baa6287d+9633a327c1,gaaedd4e678+5aa0b8792f,gabe3b4be73+1e0a283bba,gb1101e3267+71e32094df,gb58c049af0+f03b321e39,gb90eeb9370+2807b1ad02,gcf25f946ba+8b64ca622a,gd315a588df+a39986a76f,gd6cbbdb0b4+c8606af20c,gd9a9a58781+fcb1d3bbc8,gde0f65d7ad+4e42d81ab7,ge278dab8ac+932305ba37,ge82c20c137+76d20ab76d,gfe73954cf8+a1301e4c20,w.2025.11
LSST Data Management Base Package
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
lsst.dax.apdb.sql.apdbSql Namespace Reference

Classes

class  ApdbSql
 

Functions

pandas.DataFrame _coerce_uint64 (pandas.DataFrame df)
 
float _make_midpointMjdTai_start (astropy.time.Time visit_time, int months)
 
None _onSqlite3Connect (sqlite3.Connection dbapiConnection, sqlalchemy.pool._ConnectionRecord connectionRecord)
 

Variables

 _LOG = logging.getLogger(__name__)
 
 _MON = MonAgent(__name__)
 
 VERSION = VersionTuple(0, 1, 2)
 

Detailed Description

Module defining Apdb class and related methods.

Function Documentation

◆ _coerce_uint64()

pandas.DataFrame lsst.dax.apdb.sql.apdbSql._coerce_uint64 ( pandas.DataFrame df)
protected
Change the type of uint64 columns to int64, and return copy of data
frame.

Definition at line 79 of file apdbSql.py.

79def _coerce_uint64(df: pandas.DataFrame) -> pandas.DataFrame:
80 """Change the type of uint64 columns to int64, and return copy of data
81 frame.
82 """
83 names = [c[0] for c in df.dtypes.items() if c[1] == np.uint64]
84 return df.astype({name: np.int64 for name in names})
85
86

◆ _make_midpointMjdTai_start()

float lsst.dax.apdb.sql.apdbSql._make_midpointMjdTai_start ( astropy.time.Time visit_time,
int months )
protected
Calculate starting point for time-based source search.

Parameters
----------
visit_time : `astropy.time.Time`
    Time of current visit.
months : `int`
    Number of months in the sources history.

Returns
-------
time : `float`
    A ``midpointMjdTai`` starting point, MJD time.

Definition at line 87 of file apdbSql.py.

87def _make_midpointMjdTai_start(visit_time: astropy.time.Time, months: int) -> float:
88 """Calculate starting point for time-based source search.
89
90 Parameters
91 ----------
92 visit_time : `astropy.time.Time`
93 Time of current visit.
94 months : `int`
95 Number of months in the sources history.
96
97 Returns
98 -------
99 time : `float`
100 A ``midpointMjdTai`` starting point, MJD time.
101 """
102 # TODO: Use of MJD must be consistent with the code in ap_association
103 # (see DM-31996)
104 return float(visit_time.mjd - months * 30)
105
106

◆ _onSqlite3Connect()

None lsst.dax.apdb.sql.apdbSql._onSqlite3Connect ( sqlite3.Connection dbapiConnection,
sqlalchemy.pool._ConnectionRecord connectionRecord )
protected

Definition at line 107 of file apdbSql.py.

109) -> None:
110 # Enable foreign keys
111 with closing(dbapiConnection.cursor()) as cursor:
112 cursor.execute("PRAGMA foreign_keys=ON;")
113
114

Variable Documentation

◆ _LOG

lsst.dax.apdb.sql.apdbSql._LOG = logging.getLogger(__name__)
protected

Definition at line 68 of file apdbSql.py.

◆ _MON

lsst.dax.apdb.sql.apdbSql._MON = MonAgent(__name__)
protected

Definition at line 70 of file apdbSql.py.

◆ VERSION

lsst.dax.apdb.sql.apdbSql.VERSION = VersionTuple(0, 1, 2)

Definition at line 72 of file apdbSql.py.