# SCRIPT: RS03C_LINEAR_LIMIT # After W2/W2b: the Richardson criterion failed because the error is a complex number whose phase # turns with w, so a scalar power-law extrapolation of r misfires. This run asks the direct question: # does |r(w) - Gamma| / (omega w) settle to a constant as w -> 0 (first-order convergence to Gamma)? # Kill: the ratio changes by more than 2% between the last two widths at any angle. import rs03_push_lib as L ok = True for th in [10, 25, 31, 60]: out = [] for ow in [0.01, 0.005, 0.0025, 0.00125]: r, C = L.refl_resolved('tanh', 4, 1, 1, 0.5, ow/10, th); e = abs(r - L.gamma_pred(4, 1, C)); out.append(e/ow) ok &= abs(out[-1]/out[-2] - 1) < 0.02 print(f"theta {th}: |r - Gamma|/(omega w) = " + ", ".join(f"{x:.4f}" for x in out) + " at omega w = 0.01, 0.005, 0.0025, 0.00125", flush=True) print('RS03C:', 'PASS (first-order convergence to Gamma)' if ok else 'KILL')