% Huntington 2001
% Male and female rats administered malathion for 11 days (5, 50, or 150 mg/kg)

% mean male BW 325 g
% mean female BW 225 g


rat_parameters 	       % rat parameters
TSTOP=336;      			  % Simulation duration
BW=0.325;   	 			   % kg
FA=1;                   % fractional absorption


MAXT=0.01;       %maximum time step
MINT=1.0e-3;      %minimum time step


%11 day exposure
%Column A is time, Column B is low dose, C is mid, D is high
DT = xlsRead("Huntington_2001_dosing.xls", "repeat_dose", "A1:A15");  % Dosing Times (hr)
DORAL=xlsRead("Huntington_2001_dosing.xls", "repeat_dose", "d1:d15"); % Dose in ug/kg

prepare @clear @all

load @format=ascii @separator=comma @ignoreheader @file=Huntington_2001_repeatdose_1.csv Huntington_1
tdata1=Huntington_1

load @format=ascii @separator=comma @ignoreheader @file=Huntington_2001_repeatdose_2.csv Huntington_2
tdata2=Huntington_2

load @format=ascii @separator=comma @ignoreheader @file=Huntington_2001_repeatdose_3.csv Huntington_3
tdata3=Huntington_3


start@nocallback

%5 mg/kg
%plot(_time, _blbes, "-", tdata1(:,1), tdata1(:,2),tdata1(:,1),tdata1(:,5), "*", 'Huntingdon_repeatdose_plasma_1.aps')
%plot(_time, _rbcce, "-", tdata1(:,1), tdata1(:,3),tdata1(:,1),tdata1(:,6), "*", 'Huntingdon_repeatdose_RBC_1.aps')
%plot(_time, _bce, "-", tdata1(:,1), tdata1(:,4),tdata1(:,1),tdata1(:,7), "*", 'Huntingdon_repeatdose_brain_1.aps')

%50 mg/kg
%plot(_time, _blbes, "-", tdata2(:,1), tdata2(:,2),"*",tdata2(:,1), tdata2(:,5), "*", 'Huntingdon_repeatdose_plasma_2.aps')
%plot(_time, _rbcce, "-", tdata2(:,1), tdata2(:,3),"*",tdata2(:,1), tdata2(:,6), "*", 'Huntingdon_repeatdose_RBC_2.aps')
%plot(_time, _bce, "-", tdata2(:,1), tdata2(:,4),"*",tdata2(:,1), tdata2(:,7), "*", 'Huntingdon_repeatdose_brain_2.aps')

%150 mg/kg
plot(_time, _blbes, "-", tdata3(:,1), tdata3(:,2),tdata3(:,1), tdata3(:,5), "*", 'Huntingdon_repeatdose_plasma_3.aps')
plot(_time, _rbcce, "-", tdata3(:,1), tdata3(:,3),tdata3(:,1), tdata3(:,6), "*", 'Huntingdon_repeatdose_RBC_3.aps')
plot(_time, _bce, "-", tdata3(:,1), tdata3(:,4),tdata3(:,1), tdata3(:,7), "*", 'Huntingdon_repeatdose_brain_3.aps')



