listBins
changeset 12 0f89b1523648
parent 1 a3b6a908dec5
child 13 b176da8559b3
equal deleted inserted replaced
11:9c3b147b4372 12:0f89b1523648
     1 #!/usr/bin/perl
     1 #!/usr/bin/perl
     2 #======================================================================
     2 #======================================================================
     3 #                    L I S T B I N S 
     3 #                    L I S T B I N S 
     4 #                    doc: Fri Aug 25 15:57:05 2006
     4 #                    doc: Fri Aug 25 15:57:05 2006
     5 #                    dlm: Sun Aug 22 22:40:32 2010
     5 #                    dlm: Mon Apr 29 11:50:06 2013
     6 #                    (c) 2006 A.M. Thurnherr
     6 #                    (c) 2006 A.M. Thurnherr
     7 #                    uE-Info: 45 28 NIL 0 0 72 2 2 4 NIL ofnI
     7 #                    uE-Info: 108 20 NIL 0 0 72 2 2 4 NIL ofnI
     8 #======================================================================
     8 #======================================================================
     9 
     9 
    10 # Split data file into per-bin time series.
    10 # Split data file into per-bin time series.
    11 
    11 
    12 # HISTORY:
    12 # HISTORY:
    41 #	May 21, 2009: - added horizontal beampair velocities on -w
    41 #	May 21, 2009: - added horizontal beampair velocities on -w
    42 #				  - -P)itchRoll <bias/bias>
    42 #				  - -P)itchRoll <bias/bias>
    43 #	May 22, 2009: - added -B) <bias/bias/bias/bias>
    43 #	May 22, 2009: - added -B) <bias/bias/bias/bias>
    44 #	May 23, 2009: - adapted to changed beampair-velocity fun name
    44 #	May 23, 2009: - adapted to changed beampair-velocity fun name
    45 #	Aug 22, 2010: - added -R
    45 #	Aug 22, 2010: - added -R
       
    46 #	Apr 29, 2013: - cosmetics
       
    47 #				  - added warning on missing -S
    46 
    48 
    47 # General Notes:
    49 # General Notes:
    48 #	- everything (e.g. beams) is numbered from 1
    50 #	- everything (e.g. beams) is numbered from 1
    49 #	- no support for BT data
    51 #	- no support for BT data
    50 
    52 
    74 			  "[-a)ll ens (not just those with good vels)] " .
    76 			  "[-a)ll ens (not just those with good vels)] " .
    75 			  "[-M)agnetic <declination>] " .
    77 			  "[-M)agnetic <declination>] " .
    76 			  "[-S)oundspeed correction <salin|*,temp|*,depth|*> " .
    78 			  "[-S)oundspeed correction <salin|*,temp|*,depth|*> " .
    77 			  "[-P)itch/Roll <bias/bias>] [-B)eamvel <bias/bias/bias/bias>] " .
    79 			  "[-P)itch/Roll <bias/bias>] [-B)eamvel <bias/bias/bias/bias>] " .
    78 		 	  "[require -4)-beam solutions] [-d)iscard <beam#>] " .
    80 		 	  "[require -4)-beam solutions] [-d)iscard <beam#>] " .
    79 		 	  "[-%)good <min>] " .
    81 		 	  "[-p)ct-good <min>] " .
    80 		 	  "[output -b)eam coordinates] [output two separate -w) estimates] " .
    82 		 	  "[output -b)eam coordinates] [output two separate -w) estimates] " .
    81 			  "<RDI file>\n")
    83 			  "<RDI file>\n")
    82 	unless (&Getopts("4abB:d:f:M:p:r:P:RS:w") && @ARGV == 1);
    84 	unless (&Getopts("4abB:d:f:M:p:r:P:RS:w") && @ARGV == 1);
    83 
    85 
    84 ($P{pitch_bias},$P{roll_bias}) = split('[,/]',$opt_P);
    86 ($P{pitch_bias},$P{roll_bias}) = split('[,/]',$opt_P);
   101 $ifn = $ARGV[0];
   103 $ifn = $ARGV[0];
   102 
   104 
   103 ($first_ens,$last_ens) = split(',',$opt_r)
   105 ($first_ens,$last_ens) = split(',',$opt_r)
   104 	if defined($opt_r);
   106 	if defined($opt_r);
   105 
   107 
   106 ($SS_salin,$SS_temp,$SS_depth) = split(',',$opt_S)
   108 if (defined($opt_S)) {
   107 	if defined($opt_S);
   109 	($SS_salin,$SS_temp,$SS_depth) = split(',',$opt_S);
   108 $variable_ssCorr = ($SS_salin eq '*' || $SS_temp eq '*' || $SS_depth eq '*');
   110 	$variable_ssCorr = ($SS_salin eq '*' || $SS_temp eq '*' || $SS_depth eq '*');
       
   111 } else {
       
   112 	print(STDERR "WARNING: no soundspeed correction applied!\n");
       
   113 }
   109 
   114 
   110 #----------------------------------------------------------------------
   115 #----------------------------------------------------------------------
   111 
   116 
   112 sub min(@)								# return minimum
   117 sub min(@)								# return minimum
   113 {
   118 {