|
123456789101112131415161718192021222324252627282930 |
- data=load('log');
- dac=data(:,1);
- adc=data(:,2);
- t=1:size(data,1);
- calib=1.385419;
- length(t)
-
- %% adc to actual current in (A/ADC count)
- scale = computeI/1000;
- scale = scale(1); % just the gain part only
-
- %% get the dc value
- t=50:100;
- dc = mean(dac(t)-calib*adc(t));
-
- % extract the part for the light and pc
- t=1080020:1080290;
- out = [t' - t(1), (dac(t) - calib*adc(t) - dc)/calib*scale, (adc(t) < 400 | adc(t) > 1650)];
- save("-ascii","lightpc.dat","out");
-
- % light only
- t=100090:100358;
- out = [t' - t(1), (dac(t) - calib*adc(t) - dc)/calib*scale];
- save("-ascii","light.dat","out");
-
- % keithley stepping
- t=1590000:1680000;
- out = [t' - t(1), (dac(t) - calib*adc(t) - dc)];
- save("-ascii","keithley.dat","out");
-
|