function [R, Rw] = radiusx(A, G, t1=0, t2=NaN)

  n1 = lookup(A(:,1), t1);
  n2 = lookup(A(:,1), t2);
  
  nz = lookup(A(:,1), 1);
  Back = mean(A(1:nz,2));
  
  Rw = (Back - A(:,2)) ./ G(:,4) .^ 2;
  R = mean(Rw(n1 : n2));
 
endfunction
