File size: 566 Bytes
871e4fa | 1 2 3 4 5 6 7 8 9 10 11 | """Small deterministic geometry sanity check. No performance claim."""
import json,time
import numpy as np
from yeorinx3.control import ActionLibrary
from yeorinx3.geometry import rotation_linearization_envelope
s=time.perf_counter();lib=ActionLibrary(160,90,90,np.ones((90,160)),directions=16)
c=lib.choose([.015,-.004],[[.015,-.004]],[[.002,.001]],.0002,8.)
print('build_s',time.perf_counter()-s,'templates',len(lib.angles),'choice',c)
print('fieldmax',np.linalg.norm(lib.field(c),axis=-1).max())
print('envelope',rotation_linearization_envelope(160,90,.024,.10))
|