# aurorax-space/pyaurorax architecture

> Architecture diagram of the GitHub repository aurorax-space/pyaurorax, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aurorax-space/pyaurorax
- Repository: https://github.com/aurorax-space/pyaurorax

## Overview

##### Main Components

a) Core Components:
- PyAuroraX Base Module
- Search Engine Interface
- Data Access Layer
- Tools & Analysis Module
- CLI Interface
- Models Module

b) External Components:
- AuroraX Search Engine (external service)
- Data Sources (THEMIS, TREx, REGO, etc.)
- PyPI Repository

##### Component Relationships

Top Layer:
- Client Applications/Users
- CLI Interface

Middle Layer:
- PyAuroraX Core Module
- Search Module
- Data Module
- Tools Module
- Models Module

Bottom Layer:
- External Services & Data Sources

##### Specific Implementation Details

- Rectangles: Core modules
- Hexagons: External services
- Rounded rectangles: Tools and utilities

- Blue: Core functionality
- Green: Data access components
- Orange: Search functionality
- Purple: Analysis tools
- Gray: External services

c) Component Details:

Search Module:
- Availability
- Conjunctions
- Data Products
- Ephemeris
- Sources
- Metadata
- API Classes

Data Module:
- UCalgary Data Access
- Data Readers
- Format Handlers

Tools Module:
- Keogram
- Montage
- Mosaic
- Calibration
- Grid Files
- Spectra Analysis

##### Key Features to Highlight

- Modular architecture
- Extensible design
- Multiple data source support
- Search engine integration
- Analysis tools suite

##### Additional Elements

Include:
- Version compatibility (Python 3.9+)
- External dependencies
- API endpoints
- Data flow directions
- Authentication points

##### Documentation References

References to:
- API Documentation
- Example Gallery
- Configuration Options
- External Resources

Remember to include the CLI tool as a separate entry point, showing how it interfaces with the core library components. Also, highlight the search engine integration as it's a key feature of the system.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Styles and classes
    classDef core fill:#b3d9ff,stroke:#333
    classDef search fill:#ffd9b3,stroke:#333
    classDef data fill:#b3ffb3,stroke:#333
    classDef tools fill:#e6b3ff,stroke:#333
    classDef external fill:#f2f2f2,stroke:#333
    classDef cli fill:#ffb3b3,stroke:#333
    classDef models fill:#ffff99,stroke:#333

    %% Client Layer
    subgraph ClientLayer
        Client["Client Applications"]
        CLI["CLI Interface"]:::cli
    end

    %% Core Layer
    subgraph CoreLayer
        PyAuroraX["PyAuroraX Base Module"]:::core
        Models["Models Module"]:::models
    end

    %% Search Layer
    subgraph SearchLayer
        Search["Search Engine Interface"]:::search
        SearchAPI["Search API Classes"]:::search
        DataProducts["Data Products"]:::search
        Ephemeris["Ephemeris"]:::search
        Sources["Sources"]:::search
        Metadata["Metadata"]:::search
    end

    %% Data Layer
    subgraph DataLayer
        DataAccess["Data Access Layer"]:::data
        UCalgary["UCalgary Data Access"]:::data
    end

    %% Tools Layer
    subgraph ToolsLayer
        Tools["Tools & Analysis Module"]:::tools
        Keogram["Keogram"]:::tools
        Montage["Montage"]:::tools
        Mosaic["Mosaic"]:::tools
        Calibration["Calibration"]:::tools
        GridFiles["Grid Files"]:::tools
        Spectra["Spectra Analysis"]:::tools
    end

    %% External Services
    subgraph ExternalLayer
        AuroraX["AuroraX Search Engine"]:::external
        DataSources["Data Sources<br>(THEMIS, TREx, REGO)"]:::external
        PyPI["PyPI Repository"]:::external
    end

    %% Relationships
    Client --> CLI
    Client --> PyAuroraX
    CLI --> PyAuroraX
    PyAuroraX --> Models
    PyAuroraX --> Search
    Search --> SearchAPI
    Search --> DataProducts
    Search --> Ephemeris
    Search --> Sources
    Search --> Metadata
    PyAuroraX --> DataAccess
    DataAccess --> UCalgary
    PyAuroraX --> Tools
    Tools --> Keogram
    Tools --> Montage
    Tools --> Mosaic
    Tools --> Calibration
    Tools --> GridFiles
    Tools --> Spectra
    Search -.-> AuroraX
    DataAccess -.-> DataSources
    PyAuroraX -.-> PyPI

    %% Click events
    click PyAuroraX "https://github.com/aurorax-space/PyAuroraX/blob/main/pyaurorax/pyaurorax.py"
    click Search "https://github.com/aurorax-space/PyAuroraX/tree/main/pyaurorax/search/"
    click DataAccess "https://github.com/aurorax-space/PyAuroraX/tree/main/pyaurorax/data/"
    click Tools "https://github.com/aurorax-space/PyAuroraX/tree/main/pyaurorax/tools/"
    click CLI "https://github.com/aurorax-space/PyAuroraX/tree/main/pyaurorax/cli/"
    click Models "https://github.com/aurorax-space/PyAuroraX/tree/main/pyaurorax/models/"
    click SearchAPI "https://github.com/aurorax-space/PyAuroraX/tree/main/pyaurorax/search/api/classes/"
    click DataProducts "https://github.com/aurorax-space/PyAuroraX/tree/main/pyaurorax/search/data_products/"
    click Ephemeris "https://github.com/aurorax-space/PyAuroraX/tree/main/pyaurorax/search/ephemeris/"
    click Sources "https://github.com/aurorax-space/PyAuroraX/tree/main/pyaurorax/search/sources/"
    click Metadata "https://github.com/aurorax-space/PyAuroraX/tree/main/pyaurorax/search/metadata/"
    click Keogram "https://github.com/aurorax-space/PyAuroraX/tree/main/pyaurorax/tools/keogram/"
    click Montage "https://github.com/aurorax-space/PyAuroraX/tree/main/pyaurorax/tools/montage/"
    click Mosaic "https://github.com/aurorax-space/PyAuroraX/tree/main/pyaurorax/tools/mosaic/"
    click Calibration "https://github.com/aurorax-space/PyAuroraX/tree/main/pyaurorax/tools/calibration/"
    click GridFiles "https://github.com/aurorax-space/PyAuroraX/tree/main/pyaurorax/tools/grid_files/"
    click Spectra "https://github.com/aurorax-space/PyAuroraX/tree/main/pyaurorax/tools/spectra/"
    click UCalgary "https://github.com/aurorax-space/PyAuroraX/tree/main/pyaurorax/data/ucalgary/"
```
