Skip to content

feat: v0.2.0 — sequence helpers, irregular-time stepping, Bayesian filtering, MLE fit#1

Merged
bionicbutterfly13 merged 2 commits into
mainfrom
feat/v0.2-consolidation
May 7, 2026
Merged

feat: v0.2.0 — sequence helpers, irregular-time stepping, Bayesian filtering, MLE fit#1
bionicbutterfly13 merged 2 commits into
mainfrom
feat/v0.2-consolidation

Conversation

@bionicbutterfly13
Copy link
Copy Markdown
Owner

Summary

Expands linoss-dynamics from a single-step physics primitive into a higher-level multi-use library for oscillatory state-space dynamics, while keeping the core NumPy-only.

This is the first PyPI release. v0.1.0 was never published.

What changed

Core (NumPy-only)

  • linoss_scan(U, A, dt, ...) — sequence helper running linoss_step over a (T, n) input.
  • damped_oscillator_closed_form — analytic step supporting variable dt (irregular sampling); handles underdamped, critically damped, and overdamped regimes via exact matrix exponential.
  • stability module: is_stable, eigvals_to_freq_damping, freq_damping_to_oscillator_block, period_from_omega, harmonic_stack.
  • filters module: kalman_filter, rts_smoother — Bayesian state estimation over oscillator state-space models.

Optional [probabilistic] extra (scipy)

  • discretize_lti_with_noise, discretize_control, oscillator_mats — van Loan exact matrix-exponential discretization.
  • fit_oscillator_mle — MLE parameter recovery via L-BFGS-B in log-parameter space.

Docs and tutorials

  • examples/ directory with 8 runnable tutorials.
  • docs/api.md — per-function API reference.
  • docs/roadmap.md — public vision document (v0.3 candidates, v1.0 unified oscillator+attractor goal, v1.x spatial extensions, explicit non-goals).
  • README Vision section linking to roadmap.
  • PROVENANCE.md: framing-only attribution (no shared code with upstream JAX impl).
  • architecture.md: lineage section grounding the package in the research family.

Notable

  • scipy-gated symbols use module-level __getattr__ to raise LinOSSError with install hint if scipy is absent (instead of bare AttributeError).
  • Empty-array guards added to is_stable for both modes.
  • Core remains NumPy-only; SciPy is gated behind [probabilistic].

Test plan

  • 119/119 pytest pass on Python 3.11
  • CI matrix green on 3.10, 3.11, 3.12 (this PR)
  • python -m ruff check src tests examples clean
  • python -m compileall -q src tests examples clean
  • python -m build produces wheel + sdist
  • python -m twine check dist/* PASSED for both
  • Clean-venv install from local wheel: all 23 public symbols importable, smoke test green
  • Independent Reviewer review: PASS WITH FINDINGS — all 3 Highs fixed before commit

Roadmap

This release is the v0.2.0 milestone of the public roadmap at docs/roadmap.md. v1.0 will introduce unified oscillator + attractor primitives. v1.x explores spatio-temporal extensions (BioOSS-class). See roadmap for the full vision.

…ltering, MLE fit

Expands linoss-dynamics from a single-step physics primitive into a higher-level
multi-use library for oscillatory state-space dynamics, while keeping the core
NumPy-only.

Added (NumPy-only core):
- linoss_scan: sequence helper that runs linoss_step over a (T, n) input
- damped_oscillator_closed_form: analytic step supporting variable dt (irregular sampling)
- stability module: is_stable, eigvals_to_freq_damping, freq_damping_to_oscillator_block,
  period_from_omega, harmonic_stack
- filters module: kalman_filter, rts_smoother

Added (optional [probabilistic] extra; requires scipy):
- discretize module: discretize_lti_with_noise (van Loan), discretize_control (ZOH),
  oscillator_mats
- fit module: fit_oscillator_mle (L-BFGS-B parameter recovery)

Docs and tutorials:
- 8 runnable examples covering single-step, forced, damped, energy tracking,
  convergence, typed errors, sunspots fit, and Kalman phase tracking
- docs/api.md: per-function API reference
- docs/roadmap.md: public vision document (v0.3 candidates, v1.0 unified
  oscillator+attractor goal, v1.x spatial extensions, explicit non-goals)
- README Vision section linking to roadmap
- PROVENANCE: framing-only attribution; no shared code with upstream JAX impl
- architecture.md: lineage section grounding the package in the research family

Verification:
- 119/119 pytest green (Python 3.11)
- ruff check clean across src/tests/examples
- compileall clean
- python -m build produces wheel + sdist; twine check PASSED
- Clean-venv install from local wheel: all 23 public symbols importable, smoke test green

scipy-gated symbols use module-level __getattr__ to raise LinOSSError with
install hint if scipy is absent, instead of bare AttributeError.
@bionicbutterfly13 bionicbutterfly13 merged commit 0b1ccdd into main May 7, 2026
3 checks passed
@bionicbutterfly13 bionicbutterfly13 deleted the feat/v0.2-consolidation branch May 7, 2026 04:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant