YEORIN-X-v4-Research / experiments /dev_geometry.py
PureOne's picture
Release YEORIN-X v4 reproducible research and engineering package
871e4fa verified
Raw History Blame Contribute Delete
566 Bytes
"""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))