Module pyaurorax.search.conjunctions.swarmaurora

Classes

class SwarmAuroraManager (aurorax_obj)
Expand source code
class SwarmAuroraManager:
    """
    The SwarmAuroraManager 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, aurorax_obj):
        self.__aurorax_obj = aurorax_obj

    def get_url(self, search_obj: ConjunctionSearch) -> str:
        """
        Get a URL that displays a conjunction search in the Swarm-Aurora
        Conjunction Finder

        Args:
            search_obj (ConjunctionSearch): 
                A conjunction search object, must be a completed search with 
                the 'request_id' value populated

        Returns:
            The Swarm-Aurora Conjunction Finder URL for this conjunction search
        """
        return func_get_url(search_obj)

    def open_in_browser(self, search_obj: ConjunctionSearch, browser: Optional[str] = None) -> None:
        """
        In a browser, open a conjunction search in the Swarm-Aurora Conjunction Finder.

        Args:
            search_obj (ConjunctionSearch): 
                A conjunction search object, must be a completed search with 
                the 'request_id' value populated

            browser (str)): 
                The browser type to load using. Default is your default browser. Some common other 
                options are "google-chrome", "firefox", or "safari". For all available options, refer 
                to https://docs.python.org/3/library/webbrowser.html#webbrowser.get
        
        Raises:
            pyaurorax.exceptions.AuroraXError: Unsupported browser specified
        """
        return func_open_in_browser(search_obj, browser)

    def create_custom_import_file(self, search_obj: ConjunctionSearch, filename: Optional[str] = None, return_dict: bool = False) -> Any:
        """
        Generate a Swarm-Aurora custom import file for a given conjunction search

        Args:
            search_obj (ConjunctionSearch): 
                A conjunction search object, must be a completed search with 
                the 'request_id' value populated

            filename (str): 
                The output filename, default is 'swarmaurora_custom_import_file_{requestID}.json'
            
            return_dict (bool): 
                Return the custom import file contents as a dictionary instead of saving 
                a file, default is False

        Returns:
            The filename of the saved custom import file, or a dictionary with the file contents 
            if `return_dict` is set to True
        """
        return func_create_custom_import_file(self.__aurorax_obj, search_obj, filename, return_dict)

The SwarmAuroraManager 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 create_custom_import_file(self,
search_obj: ConjunctionSearch,
filename: str | None = None,
return_dict: bool = False) ‑> Any
Expand source code
def create_custom_import_file(self, search_obj: ConjunctionSearch, filename: Optional[str] = None, return_dict: bool = False) -> Any:
    """
    Generate a Swarm-Aurora custom import file for a given conjunction search

    Args:
        search_obj (ConjunctionSearch): 
            A conjunction search object, must be a completed search with 
            the 'request_id' value populated

        filename (str): 
            The output filename, default is 'swarmaurora_custom_import_file_{requestID}.json'
        
        return_dict (bool): 
            Return the custom import file contents as a dictionary instead of saving 
            a file, default is False

    Returns:
        The filename of the saved custom import file, or a dictionary with the file contents 
        if `return_dict` is set to True
    """
    return func_create_custom_import_file(self.__aurorax_obj, search_obj, filename, return_dict)

Generate a Swarm-Aurora custom import file for a given conjunction search

Args

search_obj : ConjunctionSearch
A conjunction search object, must be a completed search with the 'request_id' value populated
filename : str
The output filename, default is 'swarmaurora_custom_import_file_{requestID}.json'
return_dict : bool
Return the custom import file contents as a dictionary instead of saving a file, default is False

Returns

The filename of the saved custom import file, or a dictionary with the file contents if return_dict is set to True

def get_url(self,
search_obj: ConjunctionSearch) ‑> str
Expand source code
def get_url(self, search_obj: ConjunctionSearch) -> str:
    """
    Get a URL that displays a conjunction search in the Swarm-Aurora
    Conjunction Finder

    Args:
        search_obj (ConjunctionSearch): 
            A conjunction search object, must be a completed search with 
            the 'request_id' value populated

    Returns:
        The Swarm-Aurora Conjunction Finder URL for this conjunction search
    """
    return func_get_url(search_obj)

Get a URL that displays a conjunction search in the Swarm-Aurora Conjunction Finder

Args

search_obj : ConjunctionSearch
A conjunction search object, must be a completed search with the 'request_id' value populated

Returns

The Swarm-Aurora Conjunction Finder URL for this conjunction search

def open_in_browser(self,
search_obj: ConjunctionSearch,
browser: str | None = None) ‑> None
Expand source code
def open_in_browser(self, search_obj: ConjunctionSearch, browser: Optional[str] = None) -> None:
    """
    In a browser, open a conjunction search in the Swarm-Aurora Conjunction Finder.

    Args:
        search_obj (ConjunctionSearch): 
            A conjunction search object, must be a completed search with 
            the 'request_id' value populated

        browser (str)): 
            The browser type to load using. Default is your default browser. Some common other 
            options are "google-chrome", "firefox", or "safari". For all available options, refer 
            to https://docs.python.org/3/library/webbrowser.html#webbrowser.get
    
    Raises:
        pyaurorax.exceptions.AuroraXError: Unsupported browser specified
    """
    return func_open_in_browser(search_obj, browser)

In a browser, open a conjunction search in the Swarm-Aurora Conjunction Finder.

Args

search_obj : ConjunctionSearch
A conjunction search object, must be a completed search with the 'request_id' value populated

browser (str)): The browser type to load using. Default is your default browser. Some common other options are "google-chrome", "firefox", or "safari". For all available options, refer to https://docs.python.org/3/library/webbrowser.html#webbrowser.get

Raises

AuroraXError
Unsupported browser specified