.
authorAndreas Thurnherr <ant@ldeo.columbia.edu>
Mon, 13 Apr 2020 11:06:22 -0400
changeset 40 c1803ae2540f
parent 39 56bdfe65a697
child 41 fa41b3a72c97
.
antsutils.pl
libIMP.pl
libstats.pl
--- a/antsutils.pl
+++ b/antsutils.pl
@@ -2,9 +2,9 @@
 #======================================================================
 #                    A N T S U T I L S . P L 
 #                    doc: Fri Jun 19 23:25:50 1998
-#                    dlm: Fri Aug 30 13:39:50 2019
+#                    dlm: Fri Apr  5 16:21:54 2019
 #                    (c) 1998 A.M. Thurnherr
-#                    uE-Info: 108 62 NIL 0 0 70 10 2 4 NIL ofnI
+#                    uE-Info: 106 55 NIL 0 0 70 10 2 4 NIL ofnI
 #======================================================================
 
 # Miscellaneous auxillary functions
--- a/libIMP.pl
+++ b/libIMP.pl
@@ -1,9 +1,9 @@
 #======================================================================
 #                    L I B I M P . P L 
 #                    doc: Tue Nov 26 21:59:40 2013
-#                    dlm: Mon Jul  1 15:47:57 2019
+#                    dlm: Sun Apr 12 10:03:38 2020
 #                    (c) 2017 A.M. Thurnherr
-#                    uE-Info: 689 0 NIL 0 0 70 2 2 4 NIL ofnI
+#                    uE-Info: 181 61 NIL 0 0 72 0 2 4 NIL ofnI
 #======================================================================
 
 # HISTORY:
@@ -59,6 +59,8 @@
 #				  - modified output of pre-/post-cast records to include all LADCP
 #				    but no IMU data
 #				  - BUG: GIMBAL_PITCH had not only been defined for in-water records
+#	Jun  9, 2018: - BUG: some "edge" data (beyond the valid profile) were bogus (does not matter in practice)
+#	Apr 12, 2020: - modified rot_vecs to pass all records with non-numerical elapsed 
 
 #----------------------------------------------------------------------
 # gRef() library
@@ -115,8 +117,8 @@
 	$plot_malapsed = $max_elapsed unless defined($plot_malapsed);
 
 	while (&antsIn()) {
-		next if ($ants_[0][$elapsedF] < $min_elapsed);								# trim data
-		last if ($ants_[0][$elapsedF] > $max_elapsed);
+		next if numberp($ants_[0][$elapsedF]) && ($ants_[0][$elapsedF] < $min_elapsed);	# trim data
+		last if numberp($ants_[0][$elapsedF]) && ($ants_[0][$elapsedF] > $max_elapsed);
 		
 		my($cpiro) = -1;															# current pitch/roll accelerometer
 		my(@R); 																	# rotation matrix
@@ -184,8 +186,9 @@
 
 		pl_mag_calib_plot($valid,$magX,$magY)
 			if defined($P{profile_id}) &&
-				($ants_[0][$elapsedF] >= $plot_milapsed) &&
-				($ants_[0][$elapsedF] <= $plot_malapsed);
+				(!numberp($ants_[0][$elapsedF]) ||
+					($ants_[0][$elapsedF] >= $plot_milapsed) &&
+					($ants_[0][$elapsedF] <= $plot_malapsed));
 	}
 }
 
@@ -451,7 +454,7 @@
 	}
 	$IMP_pitch_mean /= $nPR;
 	$IMP_roll_mean /= $nPR;
-	
+
 	for (my($ens)=$LADCP_begin; $ens<=$LADCP_end; $ens++) {
 		my($r) = int(($LADCP{ENSEMBLE}[$ens]->{ELAPSED_TIME} + $IMP{TIME_LAG} - $ants_[0][$elapsedF]) / $IMP{DT});
 		next unless numberp($IMP{TILT_AZIMUTH}[$r]);
--- a/libstats.pl
+++ b/libstats.pl
@@ -1,9 +1,9 @@
 #======================================================================
 #                    . . / L I B / L I B S T A T S . P L 
 #                    doc: Wed Mar 24 13:59:27 1999
-#                    dlm: Thu Mar 12 15:11:24 2020
+#                    dlm: Tue Mar 26 12:59:32 2019
 #                    (c) 1999 A.M. Thurnherr
-#                    uE-Info: 45 44 NIL 0 0 72 0 2 4 NIL ofnI
+#                    uE-Info: 50 31 NIL 0 0 72 0 2 4 NIL ofnI
 #======================================================================
 
 # HISTORY: