.
--- a/IfM_LADCP2ANTS.m
+++ b/IfM_LADCP2ANTS.m
@@ -1,9 +1,9 @@
%======================================================================
% I F M _ L A D C P 2 A N T S . M
% doc: Sun Jan 22 15:19:00 2006
-% dlm: Tue Aug 26 12:39:11 2008
+% dlm: Mon Oct 12 22:58:20 2009
% (c) 2006 A.M. Thurnherr
-% uE-Info: 17 29 NIL 0 0 72 2 2 4 NIL ofnI
+% uE-Info: 68 0 NIL 0 0 72 2 2 4 NIL ofnI
%======================================================================
%
% export IfM-GEOMAR LADCP output to ANTS file
@@ -15,6 +15,7 @@
% Jul 21, 2008: - created from [LDEO_LADCP2ANTS.m]
% Jul 22, 2008: - cosmetics
% Aug 26, 2008: - cosmetics
+% Oct 12, 2009: - adapted to new struct2ANTS
function [] = IfM_LADCP2ANTS(dr,p,obn)
@@ -64,7 +65,7 @@
prof.ensemble_vel_err = dr.ensemble_vel_err;
end
- struct2ANTS(prof,sprintf('%s.prof',obn));
+ struct2ANTS(prof,sprintf('%s.mat',f.res),sprintf('%s.prof',obn));
%----------------------------------------------------------------------
% SADCP
@@ -94,7 +95,7 @@
SADCP.err = dr.uerr_sadcp;
end
- struct2ANTS(SADCP,sprintf('%s.SADCP',obn));
+ struct2ANTS(SADCP,sprintf('%s.mat',f.res),sprintf('%s.SADCP',obn));
end
@@ -120,7 +121,7 @@
BT.v = dr.vbot;
BT.err = dr.uerrbot;
- struct2ANTS(BT,sprintf('%s.BT',obn));
+ struct2ANTS(BT,sprintf('%s.mat',f.res),sprintf('%s.BT',obn));
end
--- a/LDEO_LADCP2ANTS.m
+++ b/LDEO_LADCP2ANTS.m
@@ -1,14 +1,14 @@
%======================================================================
% L D E O _ L A D C P 2 A N T S . M
% doc: Sun Jan 22 15:19:00 2006
-% dlm: Thu Apr 23 21:49:36 2009
+% dlm: Mon Oct 12 22:47:23 2009
% (c) 2006 A.M. Thurnherr
-% uE-Info: 154 39 NIL 0 0 72 2 2 4 NIL ofnI
+% uE-Info: 155 47 NIL 0 0 72 2 2 4 NIL ofnI
%======================================================================
%
% export LDEO LADCP output to ANTS file
%
-% USAGE: LDEO_LADCP2ANTS(dr,p,outBaseName)
+% USAGE: LDEO_LADCP2ANTS(dr,f,p,outBaseName)
%
% HISTORY:
@@ -21,8 +21,9 @@
% Nov 9, 2006: - added additional time output (requiring p input)
% Jul 17, 2008: - added cruise, software, magdecl, procdir info
% Apr 23, 2009: - added globarl var EXPORT_CTD_DATA
+% Oct 12, 2009: - adapted to new struct2ANTS
-function [] = LDEO_LADCP2ANTS(dr,p,obn)
+function [] = LDEO_LADCP2ANTS(dr,f,p,obn)
%----------------------------------------------------------------------
% INVERSE SOLUTION
@@ -73,7 +74,7 @@
prof.temp = dr.ctd_t;
prof.salin = dr.ctd_s;
- struct2ANTS(prof,sprintf('%s.prof',obn));
+ struct2ANTS(prof,sprintf('%s.mat',f.res),sprintf('%s.prof',obn));
%----------------------------------------------------------------------
% SADCP
@@ -103,7 +104,7 @@
SADCP.err = dr.uerr_sadcp;
end
- struct2ANTS(SADCP,sprintf('%s.SADCP',obn));
+ struct2ANTS(SADCP,sprintf('%s.mat',f.res),sprintf('%s.SADCP',obn));
end
@@ -129,7 +130,7 @@
BT.v = dr.vbot;
BT.err = dr.uerrbot;
- struct2ANTS(BT,sprintf('%s.BT',obn));
+ struct2ANTS(BT,sprintf('%s.mat',f.res),sprintf('%s.BT',obn));
end
%----------------------------------------------------------------------
@@ -151,5 +152,5 @@
CTD.temp = dr.ctd_t;
CTD.salin = dr.ctd_s;
- struct2ANTS(CTD,sprintf('%s.CTD',obn));
+ struct2ANTS(CTD,sprintf('%s.mat',f.res),sprintf('%s.CTD',obn));
end
--- a/MMP2ANTS.m
+++ b/MMP2ANTS.m
@@ -1,9 +1,9 @@
%======================================================================
% M M P 2 A N T S . M
% doc: Tue Apr 21 17:31:52 2009
-% dlm: Mon May 18 15:25:49 2009
+% dlm: Tue Oct 13 10:04:17 2009
% (c) 2009 A.M. Thurnherr
-% uE-Info: 94 41 NIL 0 0 72 2 2 4 NIL ofnI
+% uE-Info: 16 54 NIL 0 0 72 2 2 4 NIL ofnI
%======================================================================
% HISTORY:
@@ -13,6 +13,7 @@
% - added depth calc
% May 18, 2009: - added export of raw ACM file
% - BUG: hdg actually was vel_dir
+% Oct 13, 2009: - adapted to new struct2ANTS (V4.0: dependencies)
function mmp2ANTS(plist,epoch)
@@ -98,7 +99,7 @@
prof.dpdt = dpdtave(igood);
prof.ACM_Nsamp = ascan2(igood) - ascan1(igood);
- struct2ANTS(prof,sprintf('%04d.prof',p));
+ struct2ANTS(prof,sprintf('grd%04d.mat',p),sprintf('%04d.prof',p));
end % if grd file loaded
@@ -125,7 +126,7 @@
ACM.aTx = aTx;
ACM.aTy = aTy;
- struct2ANTS(ACM,sprintf('%04d.ACM',p));
+ struct2ANTS(ACM,sprintf('raw%04d.mat',p),sprintf('%04d.ACM',p));
end % if grd file loaded
--- a/UH_LADCP2ANTS.m
+++ b/UH_LADCP2ANTS.m
@@ -1,9 +1,9 @@
%======================================================================
% U H _ L A D C P 2 A N T S . M
% doc: Sun Jan 22 15:19:00 2006
-% dlm: Sun Nov 2 18:02:14 2008
+% dlm: Mon Oct 12 22:57:17 2009
% (c) 2006 A.M. Thurnherr
-% uE-Info: 16 62 NIL 0 0 72 0 2 4 NIL ofnI
+% uE-Info: 53 24 NIL 0 0 72 0 2 4 NIL ofnI
%======================================================================
%
% export LDEO LADCP output to ANTS file
@@ -14,6 +14,7 @@
% HISTORY:
% Jan 22, 2006: - created
% Nov 2, 2008: - BUG: v_var vas not exported because of typo
+% Oct 12, 2009: - adapted to new struct2ANTS
function [] = LADCP2ANTS(ifn,obn)
@@ -49,5 +50,5 @@
sn_dn_i(dn_bad) = NaN; prof.dn_samp = sn_dn_i(good);
sn_up_i(up_bad) = NaN; prof.up_samp = sn_up_i(good);
- struct2ANTS(prof,sprintf('%s.prof',obn));
+ struct2ANTS(prof,ifn,sprintf('%s.prof',obn));
--- a/struct2ANTS.m
+++ b/struct2ANTS.m
@@ -1,14 +1,14 @@
%======================================================================
% S T R U C T 2 A N T S . M
% doc: Thu Oct 20 11:48:17 2005
-% dlm: Tue Apr 15 14:43:45 2008
+% dlm: Thu Oct 22 14:05:24 2009
% (c) 2005 A.M. Thurnherr
-% uE-Info: 16 56 NIL 0 0 72 2 2 4 NIL ofnI
+% uE-Info: 15 40 NIL 0 0 72 2 2 4 NIL ofnI
%======================================================================
%
% export Matlab structure to ANTS file
%
-% USAGE: struct2ANTS(struct,outFileName)
+% USAGE: struct2ANTS(struct,depFileName,outFileName)
%
% NOTES:
% - scalar strings & numbers become %PARAMs
@@ -23,11 +23,17 @@
% Nov 16, 2007: - replaced cell2mat() by char()
% Apr 15, 2008: - added vector-compatibility test
% - cosmetics
+% Oct 12, 2009: - added ifn (ANTS 4.0: deps)
+% Oct 13, 2009: - allowed for NULL ifn, ofn
-function [] = struct2ANTS(struct,ofn)
+function [] = struct2ANTS(struct,ifn,ofn)
[ldef,dta] = parseStruct(struct,'','',[],ofn);
save /tmp/.struct2ANTS dta -ASCII -DOUBLE;
- system(sprintf('list -M%%.15g %s /tmp/.struct2ANTS > %s',ldef,ofn));
+ if length(ofn) == 0
+ system(sprintf('list -M%%.15g -d,%s, %s /tmp/.struct2ANTS',ifn,ldef));
+ else
+ system(sprintf('list -M%%.15g -d,%s, %s /tmp/.struct2ANTS > %s',ifn,ldef,ofn));
+ end
%======================================================================