ApdbUpdateNDiaSourcesRecord

class lsst.dax.apdb.ApdbUpdateNDiaSourcesRecord(*, diaObjectId: int, ra: float, dec: float, update_time_ns: int, update_order: int, nDiaSources: int)

Bases: ApdbUpdateRecord, DiaObjectId

Record representing change in the number of associated sources of DIAObject.

Attributes Summary

apdb_table

Class variable defining APDB table that this update applies to, must be defined in all concrete subclasses.

dec

DIAObject dec, in degrees.

diaObjectId

ID of DIAObject record.

ra

DIAObject ra, in degrees.

update_type

Class variable defining type of the update, must be defined in all concrete subclasses and be unique.

Methods Summary

from_json(update_time_ns, update_order, json_str)

from_named_tuple(named_tuple)

Construct DiaObjectId from a named tuple.

to_json()

Attributes Documentation

apdb_table: ClassVar[ApdbTables] = 'DiaObject'

Class variable defining APDB table that this update applies to, must be defined in all concrete subclasses.

dec: float

DIAObject dec, in degrees. Not required to be exact, but needs to be close to the value in database record.

diaObjectId: int

ID of DIAObject record.

ra: float

DIAObject ra, in degrees. Not required to be exact, but needs to be close to the value in database record.

update_type: ClassVar[str] = 'update_n_dia_sources'

Class variable defining type of the update, must be defined in all concrete subclasses and be unique.

Methods Documentation

classmethod from_json(update_time_ns: int, update_order: int, json_str: str) ApdbUpdateRecord
classmethod from_named_tuple(named_tuple: Any) DiaObjectId

Construct DiaObjectId from a named tuple.

Parameters:
named_tuple

Named tuple which includes the same attributes as this class, e.g. a tuple returned from pandas.DataFrame.itertuples(). Any additional attributes are ignored.

Returns:
object_idDiaObjectId

Instance of this class.

to_json() str