/ challenges-old / cymbal2-solutions
Sign in
challenges-old / cymbal2-solutions
cymbal2-solutions / solvers / hermite-fem / fetch_progress.sh
16 lines · 1.1 KBCodeBlameHistory
2# Copy the progress files and partial wavs of the running chain from the office workstation into this checkout,
3# and print a one-line status per run. Usage: bash fetch_progress.sh
4here="$(cd "$(dirname "$0")/../.." && pwd)"
5remote=office:/home/magland/src/vault1/challenges/cymbal2-solutions
50128a6Laplacian loss term, rigid constraint by default, geometry-keyed mode cache, README on both solversJeremy Magland 6for c in cymbal2-flat-v1 cymbal2-crash-v1; do for sub in hermite-fem hermite-modal; do
7 mkdir -p "$here/solutions/$c/$sub"
8 scp -q "$remote/solutions/$c/$sub/*.progress.json" "$remote/solutions/$c/$sub/*.partial.wav" "$here/solutions/$c/$sub/" 2>/dev/null
9 for j in "$here"/solutions/$c/$sub/*.progress.json; do
11import json,sys; d=json.load(open('$j'))
50128a6Laplacian loss term, rigid constraint by default, geometry-keyed mode cache, README on both solversJeremy Magland 12amp = f\"max|w| {d['max_abs_w_m']*1e3:.1f} mm\" if 'max_abs_w_m' in d else f\"{d.get('n_modes','?')} modes\"
13print(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, {amp}, 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\")"
↑↓ move↵openescclose