function plot_argos(file_loc)
%Reads in argos data from compiled Oasis data

close all
file_names=sprintf('%sargos\\',file_loc(1:end-5));%what file
dirstruct=dir(file_names);
good_files={'co2'};%'hr3';'hs2';'oasis';'shutter';'spec.0m.1000';'spec.20m';'spec.20m.1000';'sat1';'spec.misc';'spec.noon';'temp.0m';'wetstar'};

for k=1:length(good_files)
    for j=1:length(dirstruct)
        if strcmp(dirstruct(j).name,good_files(k))
            eval(sprintf('plot_%s(''%s%s'')',char(good_files(k)),file_names,char(dirstruct(j).name)));
            break
        end
    end
end

function plot_co2(infile)
X=read_argdata(infile);
figure;
plot(X(:,1),X(:,2));
hold on;
clear X;
infile=sprintf('%s.cal',infile);
X=read_argdata(infile);
plot(X(:,1),X(:,2),'r.');
datetick('x');
legend('MV PCO2','Calibration MV');
title('PCO2');

function plot_hr3(infile)


function Data=read_argdata(infile)
fid=fopen(infile);%open file
Dat_Loc=rm_oasis_header(fid);%remove the header
fseek(fid,(Dat_Loc),'bof');%start of the data
i=1;
while ~feof(fid) %read in the numbers
    X=fgetl(fid);
    Data(i,:)=str2num(X);
    clear X;    
    i=i+1;
end;
fclose(fid);
Data=unique(Data,'rows');
Data(:,1)=dy2date(Data(:,1)+1900);
