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.
Authors: Pan Guojun
Version: 12.1.0
License: MIT
DOI: https://doi.org/10.5281/zenodo.14435613
Overview
This library can be used in two ways:
-
As a mathematical toolkit It provides standalone mathematical objects such as coordinate systems, curvature operators, spectral objects, and complex frames.
-
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_systemCore 3D objects such asvec3,quat, andcoord3. -
differential_geometrySurface geometry, curvature, metric, shape operator, and curvature packages. -
spectral_geometrySpectral objects such asFourierFrame, Berry phase, Chern number, and related tools. -
complex_frameComplex frame objects and gauge-side mathematical structures such asComplexFrame,GaugeConnection, andFieldStrength.
Physical Framework Layer
-
CCSGeometry-facing physical wrapper over the CCS curvature and geometry pipeline. -
CFUTComplexified framework wrapper. This layer organizes complex frame fields, two-sector packaging, Chern-Simons flow, and validation helpers. -
LambdaParameterization and constraint layer. This layer packages lambda benchmark, effective running, and constraint-oriented lambda state construction. -
topological_physicsApplication 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
External validation runners can be used to generate professional table-form reports without mixing validation scripts into the package code itself.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file coordinate_system-12.1.0.tar.gz.
File metadata
- Download URL: coordinate_system-12.1.0.tar.gz
- Upload date:
- Size: 113.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f60b3dc7928cb03e37fc2276462aba43874d11db7719a938af3f400a7ea69fa4
|
|
| MD5 |
5900f80ca74bd0b4ad760e13a8a9d2f5
|
|
| BLAKE2b-256 |
f027526f9a2cf37c97830c23e3461cd3e6e27ef12f6f0e8b55f94fb451dfb8ee
|
File details
Details for the file coordinate_system-12.1.0-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: coordinate_system-12.1.0-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 266.0 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8727b522e0fea3ee9c294038d316c69c94273624cdb08b9e0eb45eab37628360
|
|
| MD5 |
dd02c334b6018bd9d442c547d12c6db0
|
|
| BLAKE2b-256 |
d4962dadca1158380b22e5925cbae010f90029e49dfbb16be8de8a30c06f9093
|