tic
[tocsy_spec tocsy_axes] = read_nmrp('tocsy.ft2'); 
     % TOCSY spectrum found in file tocsy.ft2
[tocsy_covar tocsy_covar_axes] = covar(tocsy_spec,'axes1',tocsy_axes);
     % direct covariance with matrix square root requires no other value/option pairs
write_covar2pipe(tocsy_covar, tocsy_covar_axes,'tocsy.covar');
     % write output to tocsy.covar
toc
tic
[tocsy_spec64 tocsy_axes64] = read_nmrp('tocsy_cut.ft2');
     % TOCSY spectrum with N1 = 64 found in tocsy_cut.ft2
[tocsy_covar64 tocsy_covar_axes64] = covar(tocsy_spec64,'axes1',tocsy_axes64);
write_covar2pipe(tocsy_covar64, tocsy_covar_axes64,'tocsy64.covar');
     % write output to tocsy64.covar
toc

% example of plotting a region from a covariance spectrum
         
Plot2DSpec([2.5 5.0],[2.5 5.0],tocsy_covar,tocsy_covar_axes,2.5*(10^8),1.3,30); 
print -dpdf direct_covar.pdf