DiaSourceId

class lsst.dax.apdb.DiaSourceId(*, diaSourceId: int, ra: float, dec: float, midpointMjdTai: float)

Bases: object

Collection of data items identifying DIASource records.

DIASource primary key is diaSourceId, in Cassandra the table is partitioned by both spatial coordinates (ra and dec) and time (midpointMjdTai).

Attributes Summary

dec

DIASource dec, in degrees.

diaSourceId

ID of DIASource record.

midpointMjdTai

DIASource midpointMjdTai, not required to be exact, but needs to be close to the value in database record.

ra

DIASource ra, in degrees.

Methods Summary

from_named_tuple(named_tuple)

Construct DiaSourceId from a named tuple.

Attributes Documentation

dec: float

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

diaSourceId: int

ID of DIASource record.

midpointMjdTai: float

DIASource midpointMjdTai, not required to be exact, but needs to be close to the value in database record.

ra: float

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

Methods Documentation

classmethod from_named_tuple(named_tuple: Any) DiaSourceId

Construct DiaSourceId 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_idDiaSourceId

Instance of this class.