function FF=base_to_extract(F);
%Calculation of constant shift FF of magnetic field value F
%for plotting as F-FF
%
%   FF=base_to_extract(F);
%
% FF is value as NN000 nT
%
% The initial set F should not content Inf or NaN values

k= isinf(F)|isnan(F);
if sum(k)<length(F),
    FF=fix(mean(F(~k))/1000)*1000;
else
    FF=NaN;
end
