% concentration, T2 (ms), error (questionable)
data = [1e19 7.359432 0.751664;
        5e18 11.997248 1.559879;
        2.5e18 479.375776 219.526119;
        1e16 677.990079 524.851763;
        1e15 943.326857 795.326417;
        1e14 628.515892 455.613209;
        1e12 696.439604 497.356689];
    
% data(:,2:3) = data(:,2:3)/1000; % Convert to seconds
   
 loglog(data(:,1),data(:,2),'o','markersize',5); hold on;
 errorbar(data(:,1),data(:,2),data(:,3),'o','markersize',5);
 
 T1data = [10^19 0.00386559 0.000233407;
           5*10^18 0.00623818 0.000263728;
           2.5*10^18 0.302583 0.0608779;
           10^18 0.955386 0.353973;
%           5*10^17 1.79643 2.77887;
           10^17 0.294146 0.117562;
           10^16 0.748515 0.400156;
           10^15 0.573329 0.265247;
           10^14 0.652576 0.250062;
           10^13 0.418668 0.109072;
           10^12 0.658648 0.305933];
 T1data(:,2:3) = 1000*T1data(:,2:3);
       
 errorbar(T1data(:,1),T1data(:,2),T1data(:,3),'r^','markersize',5);
       
 T2bloem = [6.3e20 5.0119e-4;
            1.7e20 2.8184e-3;
            3.98e19 7.94e-3;
            1.41e19 3.16e-2;
            5.01e18 7.94e-2;
            1.58e18 3.16e-1;
            6.31e17 7.94e-1;
            2.24e17 1.58];
 T2bloem(:,2) = 1000*T2bloem(:,2);
 plot(T2bloem(:,1),T2bloem(:,2),'ks','markersize',5);
   grid on;
  set(gca,'XMinorGrid','off');
  set(gca,'YMinorGrid','off');
  legend('T_2','T_2','T_1','T_2 (Bloembergen)',3);
  fs = 14;
  xlabel('Paramagnetic ion concentration (ions/cc)','fontsize',fs);
  ylabel('Relaxation times (msec)','fontsize',fs);
  title('Relaxation times T_1, T_2 as a function of paramagnetic ion concentration',...
        'fontsize',fs);