Internal Decompression Simulation & Tissue Visualization#245
Merged
Conversation
Enable internal Bühlmann ZH-L16 decompression simulations using the `octo-deco` library. This allows Divemap to generate safety ceilings for dives where the computer telemetry is missing (e.g., Suunto FIT exports). Key changes: - Create `deco_service.py` to calculate time-series ceilings. - Automate deco backfilling during import and profile retrieval. - Parse Gradient Factors (GF) from dive descriptions as a fallback. - Robustify Garmin FIT parser to handle missing fields gracefully. - Refactor `Dockerfile` to multi-stage build for efficient compilation of Cython extensions without bloating the runtime image. - Remove `--only-binary=all` to support source package installation. - Display "Calculated" indicators in the frontend profile chart. - Add unit tests for deco logic and Suunto-style imports.
- Adjust TissueHeatmap height and color scale for better visibility of ongassing activity across all compartments. - Align tissue graphs horizontally with the main dive profile chart by accounting for the temperature axis margin. - Reduce vertical spacing and borders in DiveDetail to bring simulated safety data closer to the depth profile. - Apply minor formatting fixes to App.jsx routing.
ac54009 to
fdebe4b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR integrates the
octo-decolibrary into the Divemap backend to enable internal decompression model simulations using the Bühlmann ZH-L16 algorithm. This allows the system to automatically generate safety ceilings and rich tissue saturation analytics for dives where the computer telemetry is missing or incomplete (e.g., Suunto FIT exports or historical Subsurface XMLs).Changes Made
Backend & Algorithm
deco_service.pyto calculate time-series ceilings and 16-compartment tissue saturation (GF99) usingocto-deco.Infrastructure
backend/Dockerfileto use a builder stage for compiling Cython extensions, keeping the final runtime image lean.docker-test-github-actions.shto include compilers required for new dependencies.Frontend & UI
Testing
test_deco_service.pyto verify the accuracy of the ZH-L16 implementation.test_garmin_suunto_import.pyto verify the robust parsing and backfilling logic.Testing
./docker-test-github-actions.sh).Related Issues
Additional Notes
gccandbuild-essentialin the builder stage.