function result_status = make_planet_si(JSONString)
pkg load image

b2Img = imread('b2.png');
b2Img = single(b2Img);
max(max(b2Img))
min(min(b2Img))
b2Img = b2Img/max(max(b2Img));

b3Img = imread('b3.png');
b3Img = single(b3Img);
max(max(b3Img))
min(min(b3Img))
b3Img = b3Img/max(max(b3Img));

b4Img = imread('b4.png');
b4Img = single(b4Img);
max(max(b4Img))
min(min(b4Img))
b4Img = b4Img/max(max(b4Img));

nirImg = imread('nir.png');
nirImg = single(nirImg);
max(max(nirImg))
min(min(nirImg))
nirImg = nirImg/max(max(nirImg));
SI = (b3Img-nirImg)./(b3Img+nirImg);
VARI = (b3Img-b4Img)./(b3Img+b4Img-b2Img);
NDVI = (nirImg-b4Img)./(nirImg+b4Img);
AVI = (2*nirImg+1- sqrt((2*nirImg+1).^2-8*(nirImg-b4Img)))/2;

sizeAVI = size(AVI);
%b2 = blue, b3 = green, b4 = red
EVI = (1.5*(1.2*(nirImg-b3Img)-2.5*(b4Img-b3Img)))/(sqrt((2*nirImg+1).^2-(6*nirImg-5.*sqrt(b4Img))-0.5));
SAVI = ((120*(b4Img-b2Img))-(190*(b4Img-b3Img)))/2;
max(max(EVI))
max(max(SAVI))
max(max(AVI))
max(max(VARI))
max(max(NDVI))
max(max(SI))
EVI = EVI/(max(max(EVI)));
SAVI= SAVI/(max(max(SAVI)));
AVI = AVI/(max(max(AVI)));
VARI= VARI/(max(max(VARI)));
NDVI = NDVI/(max(max(NDVI)));
SI= SI/(max(max(SI)));

%SI = gen_map1_img(SI);

%EVI = gen_map1_img(EVI);
%VARI = gen_map1_img(VARI);
%NDVI = gen_map1_img(NDVI);

%SAVI = gen_map1_img(SAVI);
%AVI = gen_map1_img(AVI);
imwrite(VARI,'vari.png');
imwrite(SI,'si.png');
imwrite(AVI,'avi.png');
imwrite(EVI,'evi.png');
imwrite(SAVI,'savi.png');
imwrite(NDVI,'ndvi.png');

result_status = "successful";
end