equal
deleted
inserted
replaced
1 #====================================================================== |
1 #====================================================================== |
2 # E D I T _ D A T A . P L |
2 # E D I T _ D A T A . P L |
3 # doc: Sat May 22 21:35:55 2010 |
3 # doc: Sat May 22 21:35:55 2010 |
4 # dlm: Sat Sep 26 12:58:46 2015 |
4 # dlm: Sun Jan 24 16:22:23 2016 |
5 # (c) 2010 A.M. Thurnherr |
5 # (c) 2010 A.M. Thurnherr |
6 # uE-Info: 34 56 NIL 0 0 72 2 2 4 NIL ofnI |
6 # uE-Info: 433 31 NIL 0 0 72 2 2 4 NIL ofnI |
7 #====================================================================== |
7 #====================================================================== |
8 |
8 |
9 # HISTORY: |
9 # HISTORY: |
10 # May 22, 2010: - created |
10 # May 22, 2010: - created |
11 # May 24, 2010: - added editSideLobesFromSeabed() |
11 # May 24, 2010: - added editSideLobesFromSeabed() |
30 # Mar 4, 2013: - added support for missing PITCH/ROLL (TILT) & HEADING |
30 # Mar 4, 2013: - added support for missing PITCH/ROLL (TILT) & HEADING |
31 # May 20, 2014: - added editPPI() |
31 # May 20, 2014: - added editPPI() |
32 # May 21, 2014: - got it to work correctly |
32 # May 21, 2014: - got it to work correctly |
33 # - croak -> error |
33 # - croak -> error |
34 # Sep 26, 2015: - added $vessel_draft to editSideLobes |
34 # Sep 26, 2015: - added $vessel_draft to editSideLobes |
|
35 # Jan 23, 2016: - added &editBadTimeLagging() |
35 |
36 |
36 # NOTES: |
37 # NOTES: |
37 # - editCorr_Earthcoords() is overly conservative and removed most |
38 # - editCorr_Earthcoords() is overly conservative and removed most |
38 # or all 3-beam solutions |
39 # or all 3-beam solutions |
39 # - all bins must be edited (not just the ones between $LADCP_firstBin |
40 # - all bins must be edited (not just the ones between $LADCP_firstBin |
414 if ($LADCP{ENSEMBLE}[$e]->{CTD_DEPTH} <= $sld); |
415 if ($LADCP{ENSEMBLE}[$e]->{CTD_DEPTH} <= $sld); |
415 } |
416 } |
416 return $nerm; |
417 return $nerm; |
417 } |
418 } |
418 |
419 |
|
420 |
|
421 #=============================================================================== |
|
422 # $nerm = editBadTimeLagging($fromEns,$toEns,$good_from_elapsed1,$good_to_elapsed1,...) |
|
423 #=============================================================================== |
|
424 |
|
425 sub editBadTimeLagging($$@) |
|
426 { |
|
427 my($fe,$te,@elim) = @_; |
|
428 |
|
429 my($nerm) = 0; # of ensembles removed |
|
430 my($i) = 0; |
|
431 |
|
432 if ($elim[0] < 0) { # entire piece is bad |
|
433 for (my($e)=$fe; $e<=$te; $e++) { |
|
434 undef($LADCP{ENSEMBLE}[$e]->{REFLR_W}); |
|
435 $nerm++; |
|
436 } |
|
437 } elsif (defined($elim[1])) { # limits in elim |
|
438 my($e); |
|
439 for ($e=$fe; @elim; shift(@elim),shift(@elim)) { |
|
440 # print(STDERR "deleting to $elim[0]\n"); |
|
441 while ($LADCP{ENSEMBLE}[$e]->{ELAPSED} < $elim[0]) { |
|
442 undef($LADCP{ENSEMBLE}[$e]->{REFLR_W}); |
|
443 $nerm++; |
|
444 $e++; |
|
445 } |
|
446 # print(STDERR "keeping to $elim[1]\n"); |
|
447 while ($LADCP{ENSEMBLE}[$e]->{ELAPSED} < $elim[1]) { $e++; } |
|
448 } |
|
449 # print(STDERR "deleting to $LADCP{ENSEMBLE}[$te]->{ELAPSED}\n"); |
|
450 while ($e <= $te) { |
|
451 undef($LADCP{ENSEMBLE}[$e]->{REFLR_W}); |
|
452 $nerm++; |
|
453 $e++; |
|
454 } |
|
455 } |
|
456 return $nerm; |
|
457 } |
|
458 |
|
459 |
419 1; |
460 1; |