This function is a driver to preprocess the transects data. Several scripts are run including: Filter Backscatter Replace bad GPS with BT (adapted from code by J. Czuba) P.R. Jackson, USGS, 12-9-08
0001 function A = VMT_PreProcess(z,A) 0002 % This function is a driver to preprocess the transects data. Several 0003 % scripts are run including: 0004 % 0005 % Filter Backscatter 0006 % Replace bad GPS with BT 0007 % 0008 % (adapted from code by J. Czuba) 0009 % 0010 % P.R. Jackson, USGS, 12-9-08 0011 0012 0013 %disp('Preprocessing Data...') 0014 0015 %% Filter the backscatter data 0016 0017 A = VMT_FilterBS(z,A); 0018 0019 %A = VMT_FilterBS_IntensityRS(z,A); 0020 0021 %% Variable Assignments 0022 0023 for zi = 1:z 0024 A(zi).Clean.bs = A(zi).Clean.bsf; 0025 A(zi).Clean.vMag = A(zi).Wat.vMag; 0026 A(zi).Clean.vEast = A(zi).Wat.vEast; 0027 A(zi).Clean.vNorth = A(zi).Wat.vNorth; 0028 A(zi).Clean.vVert = A(zi).Wat.vVert; 0029 A(zi).Clean.vDir = A(zi).Wat.vDir; 0030 A(zi).Clean.vError = A(zi).Wat.vError; 0031 end 0032 0033 % if 0 %A(1).Sup.binSize_cm == 25 %Set to zero due to ringing issues (from St. Clair) --omit for now 0034 % for zi = 1:z 0035 % A(zi).Clean.vMag(1,:)=NaN; 0036 % A(zi).Clean.vEast(1,:)=NaN; 0037 % A(zi).Clean.vNorth(1,:)=NaN; 0038 % A(zi).Clean.vVert(1,:)=NaN; 0039 % A(zi).Clean.bs(1,:)=NaN; 0040 % A(zi).Clean.vDir(1,:)=NaN; 0041 % end 0042 % end 0043 0044 0045 %% Replace bad GPS with BT 0046 A = VMT_RepBadGPS(z,A); 0047 0048 %% Close out 0049 %disp('Preprocessing Completed') 0050 0051 0052 %% Notes: 0053 0054 %1. Removed a number of original scripts by JC that filled holes and 0055 %screened data for the St. Clair River 0056 0057