Browse Source

update

git-svn-id: https://bucket.mit.edu/svn/nilm/zoom@7724 ddd99763-3ecb-0310-9145-efcb8ce7c51f
tags/zoom-1.0
jim 14 years ago
parent
commit
40611cf7f7
1 changed files with 30 additions and 0 deletions
  1. +30
    -0
      pc/data/20090722/makeplotdata.m

+ 30
- 0
pc/data/20090722/makeplotdata.m View File

@@ -0,0 +1,30 @@
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];
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");


Loading…
Cancel
Save