listEns
changeset 6 603221e51c6f
parent 5 29faa9e6226c
child 10 c835cd613f3e
equal deleted inserted replaced
5:29faa9e6226c 6:603221e51c6f
     1 #!/usr/bin/perl
     1 #!/usr/bin/perl
     2 #======================================================================
     2 #======================================================================
     3 #                    L I S T E N S 
     3 #                    L I S T E N S 
     4 #                    doc: Sat Jan 18 18:41:49 2003
     4 #                    doc: Sat Jan 18 18:41:49 2003
     5 #                    dlm: Wed Jan  5 06:09:49 2011
     5 #                    dlm: Thu May 12 10:46:46 2011
     6 #                    (c) 2003 A.M. Thurnherr
     6 #                    (c) 2003 A.M. Thurnherr
     7 #                    uE-Info: 191 73 NIL 0 0 72 2 2 4 NIL ofnI
     7 #                    uE-Info: 37 99 NIL 0 0 72 2 2 4 NIL ofnI
     8 #======================================================================
     8 #======================================================================
     9 
     9 
    10 # Print useful info from the ensemble list or dump ensembles to
    10 # Print useful info from the ensemble list or dump ensembles to
    11 # separate files.
    11 # separate files.
    12 
    12 
    32 #	Mar  2, 2009: - added # of valid bin-1 vels to non-ANTS output
    32 #	Mar  2, 2009: - added # of valid bin-1 vels to non-ANTS output
    33 #	Jul 30, 2009: - NaN => nan
    33 #	Jul 30, 2009: - NaN => nan
    34 #	Aug 15, 2010: - BUG: usage typo
    34 #	Aug 15, 2010: - BUG: usage typo
    35 #	Dec 10, 2010: - changed ANTS output to time/date instead of UNIX time
    35 #	Dec 10, 2010: - changed ANTS output to time/date instead of UNIX time
    36 #	Jan  5, 2011: - added -b
    36 #	Jan  5, 2011: - added -b
       
    37 #	May 12, 2011: - disabled error exit on built-in-test errors when ensembles are dumped to stdout
    37 
    38 
    38 # Notes:
    39 # Notes:
    39 #	- -E outputs data in earth coordinates, unless -b is set also
    40 #	- -E outputs data in earth coordinates, unless -b is set also
    40 #	- -E output is always in ANTS format, ignoring -A
    41 #	- -E output is always in ANTS format, ignoring -A
    41 #	- no soundspeed correction
    42 #	- no soundspeed correction
   251 				my($fn,$fi) = ($f =~ m{([^[]*)(\[.*)});
   252 				my($fn,$fi) = ($f =~ m{([^[]*)(\[.*)});
   252 				$fn = $f unless defined($fn);
   253 				$fn = $f unless defined($fn);
   253 				my($v) = eval("\$dta{ENSEMBLE}[$e]->{$fn}$fi");
   254 				my($v) = eval("\$dta{ENSEMBLE}[$e]->{$fn}$fi");
   254 				print(defined($v) ? " $v" : " nan");
   255 				print(defined($v) ? " $v" : " nan");
   255 			}
   256 			}
       
   257 			print(" BUILT-IN-TEST ERROR")
       
   258 				if defined($dta{ENSEMBLE}[$e]->{BUILT_IN_TEST_ERROR});
   256 			print("\n");
   259 			print("\n");
   257 		}
   260 		}
   258 		
   261 		
   259 	}
   262 	}
   260 
   263 
   271 		next if ($opt_w && $dta{ENSEMBLE}[$e]->{BIN1VELS}<3);
   274 		next if ($opt_w && $dta{ENSEMBLE}[$e]->{BIN1VELS}<3);
   272 
   275 
   273 		die("3-beams used in ensemble #$dta{ENSEMBLE}[$e]->{NUMBER}\n")
   276 		die("3-beams used in ensemble #$dta{ENSEMBLE}[$e]->{NUMBER}\n")
   274 			if ($dta{ENSEMBLE}[$e]->{N_BEAMS_USED} < 4);
   277 			if ($dta{ENSEMBLE}[$e]->{N_BEAMS_USED} < 4);
   275 		die("BIT error in ensemble $dta{ENSEMBLE}[$e]->{NUMBER}\n")
   278 		die("BIT error in ensemble $dta{ENSEMBLE}[$e]->{NUMBER}\n")
   276 			if defined($dta{ENSEMBLE}[$e]->{BUILT_IN_TEST_ERROR});
   279 			if ($opt_Q || $opt_A || $opt_E) && defined($dta{ENSEMBLE}[$e]->{BUILT_IN_TEST_ERROR});
   277 		die("Low gain in ensemble #$dta{ENSEMBLE}[$e]->{NUMBER}\n")
   280 		die("Low gain in ensemble #$dta{ENSEMBLE}[$e]->{NUMBER}\n")
   278 			if ($dta{ENSEMBLE}[$e]->{LOW_GAIN});
   281 			if ($dta{ENSEMBLE}[$e]->{LOW_GAIN});
   279 
   282 
   280 		&$dumpEns($e)
   283 		&$dumpEns($e)
   281 			unless ($opt_Q);
   284 			unless ($opt_Q);