Module pyaurorax.search.conjunctions.classes.conjunction

Class definition for a conjunction

Global variables

var CONJUNCTION_TYPE_GEOGRAPHIC : str

Conjunction search 'conjunction_type' category for finding conjunctions using the geographic position data

var CONJUNCTION_TYPE_NBTRACE : str

Conjunction search 'conjunction_type' category for finding conjunctions using the north B-trace data

var CONJUNCTION_TYPE_SBTRACE : str

Conjunction search 'conjunction_type' category for finding conjunctions using the south B-trace data

Classes

class Conjunction (conjunction_type: str,
start: datetime.datetime,
end: datetime.datetime,
data_sources: List[DataSource],
min_distance: float,
max_distance: float,
events: List[Dict],
closest_epoch: datetime.datetime,
farthest_epoch: datetime.datetime)
Expand source code
class Conjunction:
    """
    Conjunction object

    Attributes:
        conjunction_type (str): 
            The type of location data used when the conjunction was found (either `nbtrace`, 
            `sbtrace`, or `geographic`)
            
        start (datetime.datetime): 
            Start timestamp of the conjunction

        end (datetime.datetime): 
            End timestamp of the conjunction

        data_sources (List[DataSource]): 
            Data sources in the conjunction

        min_distance (float): 
            Minimum kilometer distance of the conjunction

        max_distance (float): 
            Maximum kilometer distance of the conjunction

        events (List[Dict]): 
            The sub-conjunctions that make up this over-arching conjunction (the conjunctions 
            between each set of two data sources)

        closest_epoch (datetime.datetime): 
            Timestamp for when data sources were closest

        farthest_epoch (datetime.datetime): 
            Timestamp for when data sources were farthest
    """

    def __init__(
        self,
        conjunction_type: str,
        start: datetime.datetime,
        end: datetime.datetime,
        data_sources: List[DataSource],
        min_distance: float,
        max_distance: float,
        events: List[Dict],
        closest_epoch: datetime.datetime,
        farthest_epoch: datetime.datetime,
    ):
        self.conjunction_type = conjunction_type
        self.start = start
        self.end = end
        self.data_sources = data_sources
        self.min_distance = min_distance
        self.max_distance = max_distance
        self.events = events
        self.closest_epoch = closest_epoch
        self.farthest_epoch = farthest_epoch

    def __str__(self) -> str:
        return self.__repr__()

    def __repr__(self) -> str:
        return f"Conjunction(start={repr(self.start)}, end={repr(self.end)}, min_distance={self.min_distance:.2f}, " \
            f"max_distance={self.max_distance:.2f}, data_sources=[...], events=[...])"

Conjunction object

Attributes

conjunction_type : str
The type of location data used when the conjunction was found (either nbtrace, sbtrace, or geographic)
start : datetime.datetime
Start timestamp of the conjunction
end : datetime.datetime
End timestamp of the conjunction
data_sources : List[DataSource]
Data sources in the conjunction
min_distance : float
Minimum kilometer distance of the conjunction
max_distance : float
Maximum kilometer distance of the conjunction
events : List[Dict]
The sub-conjunctions that make up this over-arching conjunction (the conjunctions between each set of two data sources)
closest_epoch : datetime.datetime
Timestamp for when data sources were closest
farthest_epoch : datetime.datetime
Timestamp for when data sources were farthest