# ejlilley/basis architecture

> Architecture diagram of the GitHub repository ejlilley/basis, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ejlilley/basis
- Repository: https://github.com/ejlilley/basis

## Overview

##### Main Components
- Basis Module: Located in the “basis” directory, this module contains code for a general basis set algorithm (targeting galactic haloes and discs). It includes a Julia file (Isochrone.jl) along with several scripts in MATLAB format (disc_expressions.m, isochrone_expressions.m, spherical_expressions.m). Its README in the module further serves as documentation.
- Coulomb Module: Found in the “coulomb” directory, this module includes MATLAB scripts (B_function.m, B_function_alternate.m, gaussian.m, slater.m, and a common.m for shared functionality) that implement adapted resolutions of the Coulomb operator for various orbital functions.

##### Relationships and Interactions
- If there’s any shared common environment (for configuration, version control, or shared utilities) denote it as a central “Project Repository” node that branches into the two modules (represented by the top-level files such as .gitignore, LICENSE, and README.md).

##### Architectural Patterns and Design Principles
- Separation of Concerns: The distinct directories clearly separate the basis set algorithm from the Coulomb operator computations.
- Modularity: Each module encapsulates its logic and dependencies – the “Basis Module” deals with galactic dynamics calculations while the “Coulomb Module” deals with orbital operator resolutions.

## Diagram (Mermaid)

```mermaid
flowchart TD
    PR["Project Repository"]:::repo

    subgraph "Basis Module – Galactic Halo/Disc Calculations"
        BDir["Directory: basis"]:::dir
        BM1["Julia: Isochrone.jl"]:::julia
        BM2["Documentation: README.md"]:::doc
        BM3["MATLAB: disc_expressions.m"]:::matlab
        BM4["MATLAB: isochrone_expressions.m"]:::matlab
        BM5["MATLAB: spherical_expressions.m"]:::matlab
        BDir --> BM1
        BM1 --> BM2
        BM2 --> BM3
        BM3 --> BM4
        BM4 --> BM5
    end

    subgraph "Coulomb Module – Orbital Resolution"
        CDir["Directory: coulomb"]:::dir
        CM1["MATLAB: B_function.m"]:::matlab
        CM2["MATLAB: B_function_alternate.m"]:::matlab
        CM3["MATLAB: gaussian.m"]:::matlab
        CM4["MATLAB: slater.m"]:::matlab
        CM5["Shared Function: common.m"]:::matlab
        CDir --> CM1
        CM1 --> CM2
        CM2 --> CM3
        CM3 --> CM4
        CM4 --> CM5
    end

    PR --> BDir
    PR --> CDir

    click PR "https://github.com/ejlilley/basis/blob/main/.gitignore"
    click PR "https://github.com/ejlilley/basis/tree/main/LICENSE"
    click PR "https://github.com/ejlilley/basis/blob/main/README.md"

    click BDir "https://github.com/ejlilley/basis/tree/main/basis"
    click BM1 "https://github.com/ejlilley/basis/blob/main/basis/Isochrone.jl"
    click BM2 "https://github.com/ejlilley/basis/blob/main/basis/README.md"
    click BM3 "https://github.com/ejlilley/basis/blob/main/basis/disc_expressions.m"
    click BM4 "https://github.com/ejlilley/basis/blob/main/basis/isochrone_expressions.m"
    click BM5 "https://github.com/ejlilley/basis/blob/main/basis/spherical_expressions.m"

    click CDir "https://github.com/ejlilley/basis/tree/main/coulomb"
    click CM1 "https://github.com/ejlilley/basis/blob/main/coulomb/B_function.m"
    click CM2 "https://github.com/ejlilley/basis/blob/main/coulomb/B_function_alternate.m"
    click CM3 "https://github.com/ejlilley/basis/blob/main/coulomb/gaussian.m"
    click CM4 "https://github.com/ejlilley/basis/blob/main/coulomb/slater.m"
    click CM5 "https://github.com/ejlilley/basis/blob/main/coulomb/common.m"

    classDef repo fill:#ffeb3b,stroke:#000,stroke-width:2px;
    classDef dir fill:#e1bee7,stroke:#000;
    classDef julia fill:#bbdefb,stroke:#000;
    classDef matlab fill:#c8e6c9,stroke:#000;
    classDef doc fill:#ffe082,stroke:#000;
```
