Skip to main content

High-performance 3D coordinate system, differential geometry, and CFUT topological physics library with universal validation framework

Project description

Coordinate System Library

High-performance 3D geometry, complex frame, and topological physics toolkit for Python.

PyPI version Python License

Authors: Pan Guojun
Version: 12.0.0
License: MIT
DOI: https://doi.org/10.5281/zenodo.14435613


Overview

This library can be used in two ways:

  1. As a mathematical toolkit It provides standalone mathematical objects such as coordinate systems, curvature operators, spectral objects, and complex frames.

  2. As a topological-physics toolkit It organizes those mathematical objects into the physical framework:

    CCS -> CFUT -> Lambda -> Topological Physics

The existing mathematical usage remains available. In particular, CCS-style geometry usage is preserved.


Structure

Mathematical Object Layer

  • coordinate_system Core 3D objects such as vec3, quat, and coord3.

  • differential_geometry Surface geometry, curvature, metric, shape operator, and curvature packages.

  • spectral_geometry Spectral objects such as FourierFrame, Berry phase, Chern number, and related tools.

  • complex_frame Complex frame objects and gauge-side mathematical structures such as ComplexFrame, GaugeConnection, and FieldStrength.

Physical Framework Layer

  • CCS Geometry-facing physical wrapper over the CCS curvature and geometry pipeline.

  • CFUT Complexified framework wrapper. This layer organizes complex frame fields, two-sector packaging, Chern-Simons flow, and validation helpers.

  • Lambda Parameterization and constraint layer. This layer packages lambda benchmark, effective running, and constraint-oriented lambda state construction.

  • topological_physics Application layer for dynamic stall, friction, non-Newtonian flow, mass shell, dark-matter shell probes, sunspot-cycle compatibility, and geomagnetic reversal.


Installation

pip install coordinate-system

Or from source:

git clone https://github.com/panguojun/Coordinate-System.git
cd Coordinate-System
pip install -e .

Requirements: Python 3.7+, numpy, matplotlib, pybind11 for source builds.


Basic Usage

Mathematical Usage

The original mathematical-object usage is still supported.

from coordinate_system import Sphere, compute_gaussian_curvature
import math

sphere = Sphere(radius=2.0)
K = compute_gaussian_curvature(sphere, u=math.pi / 4, v=math.pi / 3)
print(K)

CCS Wrapper Usage

from coordinate_system import CCS, Sphere
import math

ccs = CCS(step_size=1e-4)
sphere = Sphere(radius=2.0)

pkg = ccs.geometry_package(sphere, math.pi / 4, math.pi / 3)
print(pkg.K, pkg.H)

CFUT Wrapper Usage

import numpy as np

from coordinate_system import CFUT, ComplexFrame, ComplexFrameField, GaugeConnection

def frame_sampler(x):
    x = np.asarray(x, dtype=float)
    return ComplexFrame(
        np.array([1.0 + 0.02j * x[0], 0.01 * x[1], 0.0], dtype=complex),
        np.array([0.0, 1.0 + 0.03j * x[1], 0.02 * x[2]], dtype=complex),
        np.array([0.01 * x[0], 0.0, 1.0 + 0.01j * x[2]], dtype=complex),
        ensure_unitary=True,
    )

def gauge_sampler(x):
    x = np.asarray(x, dtype=float)
    return [
        GaugeConnection(su3_component=np.full(8, 0.01 * (1.0 + x[0]))),
        GaugeConnection(su2_component=np.array([0.02, 0.01 * (1.0 + x[1]), 0.0])),
        GaugeConnection(u1_component=0.03j * (1.0 + x[2])),
    ]

field = ComplexFrameField(frame_sampler=frame_sampler, gauge_sampler=gauge_sampler)
cfut = CFUT(topo_lambda=0.5, energy_ev=0.026)

state = cfut.state(field, np.array([0.1, -0.2, 0.3]))
cs_term = cfut.cs_term(field, np.array([0.1, -0.2, 0.3]))

print(state.summary())
print(cs_term)

Lambda Wrapper Usage

from coordinate_system import Lambda

lam = Lambda(theta=1.0, energy_ev=0.026, running_beta=0.176)

print(lam.benchmark().lambda_0)
print(lam.low_energy().lambda_value)
print(lam.package().low_energy.lambda_value)

Application Usage

from coordinate_system import dynamic_stall_F, nearest_dm_shell

stall = dynamic_stall_F(k=0.05, delta_alpha_deg=15.0)
dm = nearest_dm_shell(6200.0)

print(stall.F_enhancement)
print(dm.shell_mass_GeV, dm.rel_error_pct)

Numerical Validation

The repository includes numerical tests and report-generation scripts.

Examples:

python -m unittest test_ccs_frame_core.py
python -m unittest test_unified_topological_physics.py
python test_topological_physics.py
python generate_validation_table_log.py

Generated reports are written under the local reports/ directory.


Notes

  • Mathematical object APIs remain directly usable.
  • CCS usage is preserved.
  • Physical wrappers are intended to organize workflows, constants, constraints, and application-facing computation without replacing the underlying mathematical objects.

MIT License. Copyright (c) 2024-2026 Pan Guojun.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

coordinate_system-12.0.0.tar.gz (114.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

coordinate_system-12.0.0-cp313-cp313-win_amd64.whl (266.0 kB view details)

Uploaded CPython 3.13Windows x86-64

File details

Details for the file coordinate_system-12.0.0.tar.gz.

File metadata

  • Download URL: coordinate_system-12.0.0.tar.gz
  • Upload date:
  • Size: 114.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for coordinate_system-12.0.0.tar.gz
Algorithm Hash digest
SHA256 c65c26315869a05d031306737c885fb1c4f21bc60ce9269fd6137a9542a1877f
MD5 1d8da45ca470e3fb037b297a9bfaa7d2
BLAKE2b-256 23cd9cabc64a2f2431db91f832879df64c62c673f1aa4293648c1a0cffae1532

See more details on using hashes here.

File details

Details for the file coordinate_system-12.0.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for coordinate_system-12.0.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 25b1a04bbc9adc6e71c57463f7e90b25a93ccef0a40cc04eb35332540d9959ae
MD5 2aed556d4981fc246a68212ee8a76d8b
BLAKE2b-256 143c6e7758d7622edf9f569e15268964b3f0270f4854e37763b10a9e22757abb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page