#!/bin/bash # Copy the progress files and partial wavs of the running chain from the office workstation into this checkout, # and print a one-line status per run. Usage: bash fetch_progress.sh here="$(cd "$(dirname "$0")/../.." && pwd)" remote=office:/home/magland/src/vault1/challenges/cymbal2-solutions for c in cymbal2-flat-v1 cymbal2-crash-v1; do mkdir -p "$here/solutions/$c/hermite-fem" scp -q "$remote/solutions/$c/hermite-fem/*.progress.json" "$remote/solutions/$c/hermite-fem/*.partial.wav" "$here/solutions/$c/hermite-fem/" 2>/dev/null for j in "$here"/solutions/$c/hermite-fem/*.progress.json; do [ -f "$j" ] && python3 -c " import json,sys; d=json.load(open('$j')) print(f\"$c {d['tag']}: t = {d['t']:.2f} / {d['duration']:.0f} s, {d['elapsed_s']/60:.0f} min elapsed, {d['eta_s']/60:.0f} min left, peak {d['peak_pa']:.1f} Pa, max|w| {d['max_abs_w_m']*1e3:.1f} mm, sticks: impulse {d['impulse_Ns']} N s, contact {d['contact_ms']} ms, peak force {d['peak_force_N']} N, rebound {d['rebound_mps']} m/s\")" done done exit 0