You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

27 lines
698 B

  1. Some processing thoughts:
  2. grep ^1 log | tail -n +119 > log-locked
  3. octave:
  4. octave:1> a=load("log-locked");
  5. octave:3> t=1:10000;
  6. octave:5> keith=a(:,3);
  7. octave:7> calib=a(1,4)
  8. calib = 1.9507
  9. octave:8> dac=a(:,5);
  10. octave:9> adc=a(:,6);
  11. octave:12> meas=-(dac - calib * adc);
  12. octave:25> plot(keith(t),meas(t))
  13. octave:48> [p, errorest] = polyfit(keith, meas, 1);
  14. octave:57> p
  15. p =
  16. 20405.9116453934 -31177.1688297700
  17. octave:59> plot(t,keith(t) * p(1) + p(2),t,meas(t))
  18. octave:66> t=1:710872;
  19. octave:73> plot(t,keith(t) * p(1) + p(2) - meas(t))
  20. octave:75> axis([0 710872 10 -10])
  21. octave:76> # generally +- 5 over the entire range. this is on the scale of "dac values" so that's pretty damn good.