Skip to content

Add structured FETCH range calculation modules#1

Open
MaleenKidiwela wants to merge 1 commit intomainfrom
codex/refactor-fetch-range-calculation-workflow
Open

Add structured FETCH range calculation modules#1
MaleenKidiwela wants to merge 1 commit intomainfrom
codex/refactor-fetch-range-calculation-workflow

Conversation

@MaleenKidiwela
Copy link
Copy Markdown
Owner

Motivation

  • Refactor the procedural FETCH Range Calculation.ipynb analysis into reusable, unit-focused Python modules to improve maintainability and reuse.
  • Preserve the original notebook workflow and file naming while enabling programmatic usage from scripts and notebooks.
  • Provide explicit helpers for salinity calibration, tidal correction, velocity interpolation, and baseline/tilt handling so downstream analyses can be composed and tested.

Description

  • Add modular implementations extracted from the notebook: code/range_salinity.py, code/tidal_correction.py, code/velocity_interpolation.py, code/pressure_moving_average.py, code/range_calculation_workflow.py, and code/range_calculation_main.py, plus a notebook scaffold code/fetch_range_calculation.ipynb that demonstrates the workflow.
  • Implement salinity calibration (gap stitching, post-gap smoothing, bottle calibration) in range_salinity.py and expose SalinityCalibrationConfig, GapMeanShiftConfig, prepare_salinity_series, and bottle_residuals.
  • Implement tidal-prediction parsing, optimization and pressure correction in tidal_correction.py, velocity interpolation in velocity_interpolation.py, and 15-day pressure moving-average helpers in pressure_moving_average.py.
  • Add build_baseline_perturbations to code/positioning.py to construct per-baseline perturbation timeseries, export the new helpers from code/__init__.py, and document modules in code/README.md.

Testing

  • No automated tests were run for this change.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant