"""Mode frequencies from the stiffness written by modes.ts. Usage: python3 modes.py K.bin META.json [fmax] Prints the frequencies (Hz) of the modes below fmax, excluding the six rigid modes. """ import sys, json, numpy as np K = np.fromfile(sys.argv[1], dtype=" 3 else 1500 modes = f[(f > 5) & (f < fmax)] print(json.dumps({"params": meta["params"], "modes": [round(float(v), 1) for v in modes]}))