%% hesf.m estimates the scaling factor required by GPID so that its
%% He+ profiles more closely match those of FLIP.

function sf=hesf(f107,tdiur,lsh)

% f107 = F10.7 solar flux of point of interest
% tdiur = duirinal factor from temperature model
% lsh = L-shells of interest
%
% sf = scaling factor to multiple He+ scale heights by

pt1=[100,1.35];
pt2=[150,1.1];
f107(f107>pt2(1))=pt2(1);
m=(pt2(2)-pt1(2))/(pt2(1)-pt1(1));
sfc=(pt1(2)-1)+m*(f107-pt1(1));
sf=1+sfc.*(1-tdiur).*lshsf(lsh);