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.
 
 
 
 

31 lines
708 B

  1. data=load('log');
  2. dac=data(:,1);
  3. adc=data(:,2);
  4. t=1:size(data,1);
  5. calib=1.385419;
  6. length(t)
  7. %% adc to actual current in (A/ADC count)
  8. scale = computeI/1000;
  9. scale = scale(1); % just the gain part only
  10. %% get the dc value
  11. t=50:100;
  12. dc = mean(dac(t)-calib*adc(t));
  13. % extract the part for the light and pc
  14. t=1079950:1080290;
  15. out = [t' - t(1), (dac(t) - calib*adc(t) - dc)/calib*scale, (adc(t) < 400 | adc(t) > 1650)];
  16. save("-ascii","lightpc.dat","out");
  17. % light only
  18. t=100090:100358;
  19. out = [t' - t(1), (dac(t) - calib*adc(t) - dc)/calib*scale];
  20. save("-ascii","light.dat","out");
  21. % keithley stepping
  22. t=1590000:1680000;
  23. out = [t' - t(1), (dac(t) - calib*adc(t) - dc)];
  24. save("-ascii","keithley.dat","out");