atadir '/' vfile]);
[v0,n,d,o] = rsf_read_all([datadir '/' v0file]);
mref       = 1e6./v(:).^2;
m0         = 1e6./v0(:).^2;

% read data
[D,nd,dd,od] = rsf_read_all([datadir '/' datafile]);
D            = reshape(D,nd(1)*nd(2),nd(3));

% model params
model.o    = o; model.d = d; model.n = n;
model.nb   = nb.*[1 1];
model.freq = od(3) + [0:nd(3)-1]*dd(3);
model.zsrc = zsrc;
model.xsrc = od(2) + [0:nd(2)-1]*dd(2);
model.zrec = zrec;
model.xrec = od(1) + [0:nd(1)-1]*dd(1);
model.f0   = f0;
model.t0   = t0;

Q 