{"id":50720359,"url":"https://github.com/mousebrains/turbulence","last_synced_at":"2026-06-09T23:30:26.357Z","repository":{"id":355895041,"uuid":"1176189972","full_name":"mousebrains/turbulence","owner":"mousebrains","description":"Process Rockland VMP or MR P files to extract epsilon and chi","archived":false,"fork":false,"pushed_at":"2026-06-08T01:09:13.000Z","size":5802,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-06-08T01:19:36.330Z","etag":null,"topics":["chi","epsilon","turbulence"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mousebrains.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":"AUDIT.md","citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-08T18:31:48.000Z","updated_at":"2026-06-07T23:31:18.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/mousebrains/turbulence","commit_stats":null,"previous_names":["mousebrains/turbulence"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mousebrains/turbulence","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mousebrains%2Fturbulence","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mousebrains%2Fturbulence/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mousebrains%2Fturbulence/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mousebrains%2Fturbulence/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mousebrains","download_url":"https://codeload.github.com/mousebrains/turbulence/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mousebrains%2Fturbulence/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34130641,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chi","epsilon","turbulence"],"created_at":"2026-06-09T23:30:25.700Z","updated_at":"2026-06-09T23:30:26.352Z","avatar_url":"https://github.com/mousebrains.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# microstructure-tpw\n\n[![CI](https://github.com/mousebrains/turbulence/actions/workflows/ci.yml/badge.svg)](https://github.com/mousebrains/turbulence/actions/workflows/ci.yml)\n[![Python 3.12+](https://img.shields.io/badge/python-3.12%2B-blue.svg)](https://www.python.org/downloads/)\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n[![codecov](https://codecov.io/gh/mousebrains/turbulence/graph/badge.svg?token=RwbKxeE7rA)](https://codecov.io/gh/mousebrains/turbulence)\n[![Code style: ruff](https://img.shields.io/badge/code%20style-ruff-000000.svg)](https://github.com/astral-sh/ruff)\n[![type checked: mypy](https://img.shields.io/badge/type%20checked-mypy-blue.svg)](https://mypy-lang.org/)\n[![MATLAB: MISS_HIT](https://img.shields.io/badge/MATLAB-MISS__HIT-blue.svg)](https://misshit.org/)\n\nPython tools for reading Rockland Scientific microprofiler data and computing turbulent dissipation rates from VMP (Vertical Microstructure Profiler) and MicroRider instruments.\n\n## Overview\n\n`microstructure-tpw` provides a complete processing pipeline for ocean turbulence measurements from Rockland Scientific instruments equipped with shear probes and fast thermistors (FP07). The package reads proprietary `.p` binary data files, converts channels to physical units, detects profiles, and computes both the rate of dissipation of turbulent kinetic energy (epsilon) and the rate of dissipation of thermal variance (chi), following the methods described in the Rockland Scientific ODAS MATLAB Library and associated Technical Notes.\n\n- **Epsilon (TKE dissipation rate)** from shear probe spectra ([detailed mathematics](docs/epsilon_mathematics.md)), including Goodman coherent noise removal, Nasmyth spectrum fitting, and Macoun \u0026 Lueck wavenumber correction.\n\n- **Chi (thermal variance dissipation rate)** from FP07 thermistor spectra ([detailed mathematics](docs/chi_mathematics.md)), including Batchelor/Kraichnan spectrum models, FP07 transfer function correction, and MLE spectral fitting.\n\nA **MATLAB implementation** of the chi calculation is also available — see [matlab/MATLAB.md](matlab/MATLAB.md).\n\nThe package is organized into four subpackages under `odas_tpw`:\n\n- **rsi** — Rockland Scientific instrument I/O, NetCDF conversion, profiles, epsilon/chi orchestration\n- **chi** — Chi (thermal variance dissipation) calculation\n- **scor160** — ATOMIX shear-probe benchmark processing and shared physics modules\n- **perturb** — Full campaign processing pipeline (trim, merge, calibrate, compute, bin)\n\n## Installation\n\n```bash\npip install -e \".[dev]\"    # editable install with dev dependencies\npip install .              # standard install\n```\n\nSee [docs/installation.md](docs/installation.md) for more options.\n\n## Quick Start\n\nTwo CLIs ship with the package, for different workflows:\n\n- **`rsi-tpw`** — single-file or short batch processing on the command line.\n- **`perturb`** — full campaign pipeline driven by a YAML config file\n  (trim → merge → profiles → epsilon → chi → bin → combo), with parallel\n  workers and stage-aware logging. Use this for cruise-scale runs.\n\n### `rsi-tpw` (single files / short batches)\n\n```bash\n# Full pipeline: .p files → epsilon → chi\nrsi-tpw pipeline VMP/*.p -o results/\n\n# Or run individual stages\nrsi-tpw eps VMP/*.p -o epsilon/\nrsi-tpw chi VMP/*.p --epsilon-dir epsilon/ -o chi/\n```\n\n```python\nfrom odas_tpw.rsi.pipeline import run_pipeline\nfrom pathlib import Path\n\n# Full pipeline: .p → profiles → epsilon → chi → binning → combine\nrun_pipeline([Path(\"VMP/file.p\")], Path(\"results/\"))\n\n# Or use the modular API\nfrom odas_tpw.rsi.dissipation import compute_diss_file\nfrom odas_tpw.rsi.chi_io import compute_chi_file\n\ncompute_diss_file(\"VMP/file.p\", \"epsilon/\")\ncompute_chi_file(\"VMP/file.p\", \"chi/\")\n```\n\n\u003e **Note:** `get_diss()` and `get_chi()` still work for backward compatibility\n\u003e but are deprecated in favor of `run_pipeline()` or the modular\n\u003e `compute_diss_file()` / `compute_chi_file()` functions.\n\n### `perturb` (campaign-scale batch pipeline)\n\n```bash\n# Write a template config you can edit (cruise paths, GPS file,\n# instrument-specific overrides, parallelism, etc.).\nperturb init my-cruise.yaml\n\n# Run the full pipeline — outputs land in \u003coutput_root\u003e/{profiles_NN,\n# diss_NN, chi_NN, ctd_NN, *_binned_NN, combo}, with a per-run log under\n# \u003coutput_root\u003e/logs/.\nperturb run -c my-cruise.yaml\n\n# Or run individual stages against the same config:\nperturb trim -c my-cruise.yaml\nperturb profiles -c my-cruise.yaml\nperturb diss     -c my-cruise.yaml\nperturb chi      -c my-cruise.yaml\nperturb bin      -c my-cruise.yaml\nperturb combo    -c my-cruise.yaml\n```\n\nSee [docs/perturb/pipeline.md](docs/perturb/pipeline.md) for the full stage list and [docs/perturb/configuration.md](docs/perturb/configuration.md) for the config schema.\n\n## Documentation\n\n### rsi-tpw (science library)\n\n| Document | Description |\n|----------|-------------|\n| [CLI Reference](docs/rsi-tpw/cli.md) | All `rsi-tpw` subcommands and flags |\n| [Configuration](docs/rsi-tpw/configuration.md) | YAML config file format and all parameter defaults |\n| [Pipeline](docs/rsi-tpw/pipeline.md) | Processing stages and data flow |\n| [Python API](docs/rsi-tpw/python_api.md) | Using microstructure-tpw from Python code |\n| [Output Directories](docs/rsi-tpw/output_directories.md) | Sequential hash-tracked output scheme |\n| [Vectorization](docs/rsi-tpw/vectorization.md) | Vectorized compute internals |\n\n### perturb (batch pipeline)\n\n| Document | Description |\n|----------|-------------|\n| [Pipeline](docs/perturb/pipeline.md) | Batch processing stages and data flow |\n| [CLI Reference](docs/perturb/cli.md) | All `perturb` subcommands and flags |\n| [Configuration](docs/perturb/configuration.md) | YAML config file format for perturb |\n| [Parallel Scaling](docs/perturb/parallel.md) | Benchmark results for multi-core scaling |\n| [Modules](docs/perturb/modules.md) | Module-level reference |\n| [pyturb Comparison](docs/perturb/pyturb_comparison.md) | Comparison with oceancascades/pyturb |\n\n### scor160 (ATOMIX benchmark)\n\n| Document | Description |\n|----------|-------------|\n| [CLI Reference](docs/scor160/cli.md) | All `scor160-tpw` subcommands and flags |\n\n### Shared\n\n| Document | Description |\n|----------|-------------|\n| [Epsilon Mathematics](docs/epsilon_mathematics.md) | TKE dissipation algorithm details |\n| [Chi Mathematics](docs/chi_mathematics.md) | Thermal dissipation algorithm details |\n| [Mixing Efficiency](docs/mixing_efficiency.md) | Mathematics of the dissipation ratio |\n| [Best Practices](docs/best_practices.md) | Guidance for comparing turbulence measurements |\n| [Bibliography](docs/bibliography.md) | Consolidated references |\n| [Installation](docs/installation.md) | Installation options |\n| [MATLAB](matlab/MATLAB.md) | MATLAB chi implementation |\n| [Changelog](CHANGELOG.md) | Version history |\n\n## References\n\nThis package is a Python implementation derived from the\n[Rockland Scientific ODAS MATLAB Library](https://rocklandscientific.com/support/software/) (v4.5.1)\nand associated\n[Technical Notes](https://rocklandscientific.com/support/technical-notes/)\n(TN-028, TN-051, TN-061).\n\nSee [docs/bibliography.md](docs/bibliography.md) for the full list of references.\n\n## Testing\n\n```bash\npython -m pytest                          # run all tests\npython -m pytest tests/test_epsilon.py    # epsilon pipeline tests only\n```\n\n## Development\n\nThis project was developed in collaboration with [Claude Code](https://claude.ai/code) (Anthropic's Opus 4.7).\n\n## License\n\nGPLv3 — see [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmousebrains%2Fturbulence","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmousebrains%2Fturbulence","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmousebrains%2Fturbulence/lists"}