% This function is for aqueous dioxygen
%
% D Faux April 2022
%
%================================================================= 
function R1_O2 = findO2Offset_2(Freq)

% Function inputs are aq. O2 density scaling and expt frequencies (MHz)
% NO2 = 1.0 normally based on Ward-Williams paper and analysis in
% Oxygen_1.xls

    PI = 3.141592653589793;
    e_spin_fac = 658.21;
    B = 3.07E+9;
    tau = 5.2E-12;

    NFreq = size(Freq,1);            % the number of expt frequencies
    R1_O2 = zeros(NFreq,1);
    OmegaI = zeros(NFreq,1);
    OmegaS = zeros(NFreq,1);
    Jw_OSbeta = zeros(NFreq,1);
    JwS_OSbeta = zeros(NFreq,1);

    OmegaI(1:NFreq,1) = 2.0*PI*Freq(1:NFreq,1)*(10^6);                  % input frequencies in MHz
    OmegaS(1:NFreq,1) = 2.0*PI*e_spin_fac*Freq(1:NFreq,1)*(10^6);

    for ifr=1:NFreq
       Jw_OSbeta(ifr,1) = B*tau/(1.0 + (tau*OmegaI(ifr,1))^2);
       JwS_OSbeta(ifr,1) = B*tau/(1.0 + (tau*OmegaS(ifr,1))^2);
       R1_O2(ifr,1) = 7.0*JwS_OSbeta(ifr,1) + 3.0*Jw_OSbeta(ifr,1);
    end

end

