#!/usr/bin/env python3 """scan_lutsub.py v2 — range-filtered scan for detector-LUT param subs. Filter: -60 1 else '/home/m/soothe-bt/dual_b1q_0.5.rpp' proc = subprocess.Popen(['/usr/bin/reaper','-nosplash','-ignoreerrors','-renderproject', rpp], stdout=open('/dev/null','w'), stderr=subprocess.STDOUT) t0=time.time(); host=None while time.time()-t0<30 and not host: host = find_host(); time.sleep(0.002) print('host', host, flush=True) if not host: sys.exit(1) fd = os.open(f'/proc/{host}/mem', os.O_RDONLY) def rd(a,n): try: return os.pread(fd,n,a) except OSError: return None seen={} alive=True t_end=time.time()+12 while time.time()-60)&(arr<-1) for i in np.nonzero(m)[0]: Bv=float(arr[i+1]) if i+11: continue p=struct.unpack('