"""
CNCHASH - Python implementation of HASH v1.2 for earthquake focal mechanism inversion.

This package provides a pure Python implementation of the HASH algorithm for
determining earthquake focal mechanisms from polarities, with performance
optimizations using numba and numpy.

Author: He XingChen
License: BSD 3-Clause
"""

__version__ = "1.0.1"
__author__ = "He XingChen"

from .amp_subs import (
    focalamp_mc,
    get_misf_amp,
)
from .core import (
    focalmc,
    get_numba_threads,
    get_gap,
    get_misfit,
    set_numba_threads,
)
from .driver import (
    run_hash,
    run_hash_event_payload,
    run_hash_from_file,
    run_hash_with_amp,
)
from .io import (
    read_phase_file,
    read_station_file,
    read_velocity_model,
    write_mechanism_output,
)
from .uncertainty import (
    mech_avg,
    mech_prob,
    mech_rot,
)
from .utils import (
    cross_product,
    fp_coord,
    normal_distribution_random,
    strike_dip_rake_to_vectors,
    to_cartesian,
    vectors_to_strike_dip_rake,
)
from .velocity import (
    get_tts,
    make_table,
)

__all__ = [
    # Main functions
    "run_hash",
    "run_hash_event_payload",
    "run_hash_with_amp",
    "run_hash_from_file",
    # Core algorithms
    "focalmc",
    "focalamp_mc",
    "mech_prob",
    "mech_avg",
    "mech_rot",
    # Utilities
    "get_misfit",
    "get_misf_amp",
    "get_gap",
    "set_numba_threads",
    "get_numba_threads",
    "make_table",
    "get_tts",
    "cross_product",
    "to_cartesian",
    "fp_coord",
    "normal_distribution_random",
    "strike_dip_rake_to_vectors",
    "vectors_to_strike_dip_rake",
    # I/O
    "read_phase_file",
    "read_station_file",
    "read_velocity_model",
    "write_mechanism_output",
]
