Module pyaurorax.search.util

Utility methods. For example, converting arbitrary geographic locations to North/South B-trace geographic locations.

Classes

class UtilManager
Expand source code
class UtilManager:
    """
    The UtilManager object is initialized within every PyAuroraX object. It acts as a way to access 
    the submodules and carry over configuration information in the super class.
    """

    def __init__(self):
        pass

    def ground_geo_to_nbtrace(self, geo_location: Location, timestamp: datetime.datetime) -> Location:
        """
        Convert geographic location to North B-Trace geographic location

        The timestamp is required because when calculating the B-trace values, the 
        location is converted into geomagnetic coordinates using AACGM. This conversion 
        is different  based on the timestamp since the magnetic coordinates change over time.

        Args:
            geo_location (Location): 
                A Location object representing the geographic location

            timestamp (datetime.datetime): 
                Timestamp for this set of latitudes and longitudes

        Returns:
            The north B-trace location as a `Location` object
        """
        return func_ground_geo_to_nbtrace(geo_location, timestamp)

    def ground_geo_to_sbtrace(self, geo_location: Location, timestamp: datetime.datetime) -> Location:
        """
        Convert geographic location to South B-Trace geographic location

        The timestamp is required because when calculating the B-trace values, the 
        location is converted into geomagnetic coordinates using AACGM. This conversion 
        is different  based on the timestamp since the magnetic coordinates change over time.

        Args:
            geo_location (Location): 
                A Location object representing the geographic location

            timestamp (datetime.datetime): 
                Timestamp for this set of latitudes and longitudes

        Returns:
            The south B-trace location as a `Location` object
        """
        return func_ground_geo_to_sbtrace(geo_location, timestamp)

The UtilManager object is initialized within every PyAuroraX object. It acts as a way to access the submodules and carry over configuration information in the super class.

Methods

def ground_geo_to_nbtrace(self,
geo_location: Location,
timestamp: datetime.datetime) ‑> Location
Expand source code
def ground_geo_to_nbtrace(self, geo_location: Location, timestamp: datetime.datetime) -> Location:
    """
    Convert geographic location to North B-Trace geographic location

    The timestamp is required because when calculating the B-trace values, the 
    location is converted into geomagnetic coordinates using AACGM. This conversion 
    is different  based on the timestamp since the magnetic coordinates change over time.

    Args:
        geo_location (Location): 
            A Location object representing the geographic location

        timestamp (datetime.datetime): 
            Timestamp for this set of latitudes and longitudes

    Returns:
        The north B-trace location as a `Location` object
    """
    return func_ground_geo_to_nbtrace(geo_location, timestamp)

Convert geographic location to North B-Trace geographic location

The timestamp is required because when calculating the B-trace values, the location is converted into geomagnetic coordinates using AACGM. This conversion is different based on the timestamp since the magnetic coordinates change over time.

Args

geo_location : Location
A Location object representing the geographic location
timestamp : datetime.datetime
Timestamp for this set of latitudes and longitudes

Returns

The north B-trace location as a Location object

def ground_geo_to_sbtrace(self,
geo_location: Location,
timestamp: datetime.datetime) ‑> Location
Expand source code
def ground_geo_to_sbtrace(self, geo_location: Location, timestamp: datetime.datetime) -> Location:
    """
    Convert geographic location to South B-Trace geographic location

    The timestamp is required because when calculating the B-trace values, the 
    location is converted into geomagnetic coordinates using AACGM. This conversion 
    is different  based on the timestamp since the magnetic coordinates change over time.

    Args:
        geo_location (Location): 
            A Location object representing the geographic location

        timestamp (datetime.datetime): 
            Timestamp for this set of latitudes and longitudes

    Returns:
        The south B-trace location as a `Location` object
    """
    return func_ground_geo_to_sbtrace(geo_location, timestamp)

Convert geographic location to South B-Trace geographic location

The timestamp is required because when calculating the B-trace values, the location is converted into geomagnetic coordinates using AACGM. This conversion is different based on the timestamp since the magnetic coordinates change over time.

Args

geo_location : Location
A Location object representing the geographic location
timestamp : datetime.datetime
Timestamp for this set of latitudes and longitudes

Returns

The south B-trace location as a Location object