#!/usr/bin/env bash # Run P1: build wells → wavelet/tie QC → LOWO (requires protocol.yaml to match its hash) → summary. set -euo pipefail cd "$(dirname "$0")/.." PY="${PY:-.venv/bin/python}" # Log + runtime: the whole pipeline goes to logs/runs/_p1/, one subdirectory per step, one row per step in # logs/index.csv (ml_porosity/runlog.py). [[ -n "${RUNLOG_DIR:-}" ]] || exec "$PY" -m ml_porosity.runlog -n p1 -- bash "scripts/$(basename "$0")" "$@" step() { "$PY" -m ml_porosity.runlog -- "$@"; } step "$PY" scripts/01_build_wells.py step "$PY" scripts/04_wavelet_tie.py step "$PY" scripts/05_lowo.py --only B0a,B0b,B1 step "$PY" scripts/05_lowo.py --only B2,B3a,B3b --workers "${WORKERS:-12}" step "$PY" scripts/06_summarize_p1.py