# Converted from rate_estimation_lots.mimportnumpyasnpstoi=np.array([[0,1,0,-1,-1,1],[-1,1,1,-1,0,0],[1,0,-1,0,-1,1]],dtype=float)r=np.array([1.,2.])A=stoi[:2,:]R=A.T@rrng=np.random.RandomState(0)npoints=500Rmeas=np.zeros((6,npoints))foriinrange(npoints):Rmeas[:,i]=0.05*rng.randn(6)+Rrest=(np.linalg.inv(A@A.T)@A@Rmeas).Twithopen('rate_estimation_lots.dat','w')asmyfile:forrowinrest:myfile.write(f'{row[0]:8.4f}{row[1]:8.4f}\n')