LAST CHANGED    : 2018/12/28 20:19:42
CRUISE NAME(S)  : S04P_2018 (nbp1802)
CRUISE DATES    : 2018/03/10 to 2018/05/10
SHIP NAME       : N.B. Palmer
PORTS           : Hobart,Tasmania - Punta Arenas, Chile
CHIEF SCIENTIST : Alison Macdonald
DATABASE NAME   : aship
DATA FILES      : np2018_068_22866.raw to np2018_129_64800.raw

STATUS          :  to do                           done
                  ------                       -----------
                  averaged                       [  x  ]
                  loaded                         [  x  ]

                  NOTE: heading correction instrument exists
                        NOTE: time-dependent heading corrections
                        applied IN the ensembles
                        (see   cal/rotate/ens_hcorr.ang)

                  check heading correction       [  x  ]
                  calibration                    [  x  ]
                  edited                         [  x  ]
                  re-check heading correction    [  x  ]
                  check editing                  [  x  ]
                  figures                        [  x  ]

INSTRUMENT      : os38

ACQUISITION     : 
     PROGRAM    : uhdas
     PROCESSING:    : python

LOGGING         : 

     PARAMETERS : BT : bottom track mode (on or off)
                  SI : sampling interval or averaging period for ensemble (sec)
                  NB : number of bins
                  BL : bin length (m)
                  TD : transducer depth (m)
                  BK : blanking length (m)
                  HO : heading offset applied by DAS (deg)
                  HB : heading bias (deg)
                  CRPH : compensation for roll-pitch-heading, 1:on, 0:off)
                  
                  yy/mm/dd  hh:mm:ss   BT   SI  NB  BL  TD BK     HO     HB CRPH
                  2018/03/10 06:26:09  off  300  65  24   7 16  44.82   0.00 0001

HEADING         : 
     PRIMARY    : heading from gyro
     CORRECTION : heading correction from seapath1
                        NOTE: time-dependent heading corrections
                        applied IN the ensembles
                        (see   cal/rotate/ens_hcorr.ang)

POSITIONS       : gps positions from gpsnav

CALIBRATION     : (check original processing parameters)
                  additional rotation 0
                  final transducer angle is:  44.82
                       (original transducer angle) - (rotate_angle)
                  applied scale factor 1
                  additional scale factor 1.012
		  
		  GPS x sonar offset; adjustment applied:
		  
  		   .single ping processing: (q_py.cnt)
		    - original: dx = 7, dy = 1,

		   .post-processing:
		     --xducer_dx -2
		     --xducer_dy -1
 		   .final:  --xducer_dx 5
		            --xducer_dy 0
		          
COMMENTS        : just a few gaps in heading correction
                  some scattering layers


PROCESSOR       : U. Pinho


--- processing parameters ----------


## (determined from "sonar"): model = os
## (determined from "sonar"): frequency = 38
## (determined from "sonar"): instname = os38
## (determined from "sonar"): pingtype = nb
             badbeam   None
           beamangle   30
          configtype   python
          cruisename   nbp1802
            datatype   uhdas
              dbname   aship
             ens_len   300
             fixfile   aship.gps
          hcorr_inst   seapath1
               pgmin   50
            pingpref   None
         proc_engine   python
          ref_method   refsm
     refuv_smoothwin   3
        refuv_source   nav
               sonar   os38nb
            txy_file   aship.agt
           xducer_dx   7
           xducer_dy   1
            yearbase   2018



(1) Get some info:

    uhdas_info.py --overview --logfile uhdas_info.txt /home/data/palmer/nbp1802

==================================================================
======= start of report for /home/data/palmer/nbp1802 =====
==================================================================

------raw-------

raw:             gpsnav    739 files  (np2018_068_22866 - np2018_129_64800)
raw:               gyro    739 files  (np2018_068_22866 - np2018_129_64800)
raw:           seapath1    739 files  (np2018_068_22866 - np2018_129_64800)
raw:           seapath2    739 files  (np2018_068_22866 - np2018_129_64800)
raw:             sndspd      1 files  (np2018_068_22866 - np2018_068_22866)

adcp:   os38            .raw   739 files  (np2018_068_22866 - np2018_129_64800)
adcp:   os38        .raw.log   739 files  (np2018_068_22866 - np2018_129_64800)
adcp:   os38    .raw.log.bin   739 files  (np2018_068_22866 - np2018_129_64800)
adcp:   os75            .raw   739 files  (np2018_068_22866 - np2018_129_64800)
adcp:   os75        .raw.log   739 files  (np2018_068_22866 - np2018_129_64800)
adcp:   os75    .raw.log.bin   739 files  (np2018_068_22866 - np2018_129_64800)

-----rbin-------

rbin:               gpsnav:gps    739 files  (np2018_068_22866 - np2018_129_64800)
rbin:                 gyro:hdg    739 files  (np2018_068_22866 - np2018_129_64800)
rbin:         seapath1:gps_sea    739 files  (np2018_068_22866 - np2018_129_64800)
rbin:             seapath1:sea    739 files  (np2018_068_22866 - np2018_129_64800)
rbin:         seapath2:gps_sea    739 files  (np2018_068_22866 - np2018_129_64800)
rbin:             seapath2:sea    739 files  (np2018_068_22866 - np2018_129_64800)

-----gbin-------

gbin:       os38 (gyro,seapath2,gpsnav,time,sndspd,seapath1)

------ database time ranges --------

proc:     os38bb   No database found
proc:     os38nb        68.268 - 129.796 (2018/03/10 to 2018/05/10)
proc:     os75bb   No database found
proc:     os75nb        68.268 - 129.796 (2018/03/10 to 2018/05/10)

---------- end of report for /home/data/palmer/nbp1802--------------


# What we see:
  - GPS messages from: gpsnav,seapath1 and seapath2
  - Heading messages : seapath1, seapath2 and gyro
  - All other feeds  : 739 files
  - proc:     os38nb        68.268 - 129.796 (2018/03/10 to 2018/05/10)
  - proc:     os75nb        68.268 - 129.796 (2018/03/10 to 2018/05/10)

  cruise 61.52 days long.


# ******
# Single ping adcp_database_maker.py was applied
# sonar - gps offset applied:
# original dx=2, dy=-3, applied --xducer_dx 5,
# (dy remain the same --xducer_dy -3)


### POST-PROCESSING -----------------------------------------------------------

    cd os38nb
    plot_nav.py nav/aship.gps

  Go-Ship cruise from Hobart, Tasmania, to Chile, along 67 degrees South and
  Antartica.


(2) review the data


    (a) check calibration:heading correction device:

             figview.py cal/rotate/*png
	     
    - Gaps in the heading correction 
      patch_hcorr_app.py applied.
     
    (b) check calibration:


   **watertrack**   
------------
Number of edited points: 193 out of 225
   amp   = 1.0054  + 0.0001 (t - 101.9)
   phase =  -0.02  + -0.0018 (t - 101.9)
            median     mean      std
amplitude   1.0060   1.0054   0.0074
phase      -0.0560  -0.0170   0.3599
------------


   **transducer-gps offset**  
------------
guessing ADCP (dx=starboard, dy=fwd) meters from GPS
positions from aship.agt
calculation done at 2018/12/31 19:43:59
xducer_dx = -0.968805
xducer_dy = -1.623278
signal = 6310.946991
------------



    # uvship was also applied:

  quick_adcp.py --steps2rerun navsteps:calib --refuv_source uvship --auto



   **watertrack**   
------------
Number of edited points: 148 out of 180
   amp   = 1.0037  + 0.0000 (t - 105.3)
   phase =   0.02  + 0.0014 (t - 105.3)
            median     mean      std
amplitude   1.0030   1.0037   0.0057
phase       0.0215   0.0174   0.3931
------------


(3)  edit: dataviewer.py -e

    quick_adcp.py --steps2rerun apply_edit:navsteps:calib  --auto


    check calibration:


   **watertrack**   
------------
Number of edited points: 176 out of 197
   amp   = 1.0055  + -0.0000 (t - 103.7)
   phase =  -0.02  + -0.0009 (t - 103.7)
            median     mean      std
amplitude   1.0060   1.0055   0.0059
phase      -0.0515  -0.0241   0.3901
------------


   **transducer-gps offset**  
------------
guessing ADCP (dx=starboard, dy=fwd) meters from GPS
positions from aship.agt
calculation done at 2018/12/31 22:28:39
xducer_dx = -2.197716
xducer_dy = -0.695342
signal = 6310.946991
------------


  quick_adcp.py --steps2rerun rotate:navsteps:calib --rotate_amplitude 1.006 --xducer_dx -2 --xducer_dy -1 --auto


   **transducer-gps offset**  
------------
guessing ADCP (dx=starboard, dy=fwd) meters from GPS
positions from aship.agt
calculation done at 2018/12/31 23:30:11
xducer_dx = -1.282191
xducer_dy = -0.327406
signal = 6310.946991
------------


   **watertrack**   
------------
Number of edited points: 176 out of 197
   amp   = 0.9996  + -0.0000 (t - 103.7)
   phase =  -0.02  + -0.0009 (t - 103.7)
            median     mean      std
amplitude   1.0000   0.9996   0.0059
phase      -0.0490  -0.0231   0.3876
------------


# patch_hcorr_app.py run again to smooth seapath1 data:



---Original Calibration---
- Water Track Calibration:
            median     mean      std
amplitude   1.0000   0.9996   0.0059
phase      -0.0490  -0.0231   0.3876



---New Calibration---
- Water Track Calibration:
            median     mean      std
amplitude   1.0060   1.0056   0.0059
phase      -0.0225  -0.0106   0.3857


   quick_adcp.py --steps2rerun rotate:apply_edit:navsteps:calib --rotate_amplitude 1.006  --auto

   **watertrack**   
------------
Number of edited points: 176 out of 197
   amp   = 0.9996  + -0.0000 (t - 103.7)
   phase =  -0.01  + -0.0011 (t - 103.7)
            median     mean      std
amplitude   1.0000   0.9996   0.0058
phase      -0.0265  -0.0108   0.3854
------------


(5)  edit: dataviewer.py -e

    quick_adcp.py --steps2rerun apply_edit:navsteps:calib  --auto


    check calibration:


   **watertrack**   
------------
Number of edited points: 176 out of 197
   amp   = 0.9996  + -0.0000 (t - 103.7)
   phase =  -0.01  + -0.0011 (t - 103.7)
            median     mean      std
amplitude   1.0000   0.9996   0.0058
phase      -0.0265  -0.0108   0.3855
------------


   **transducer-gps offset**  
------------
guessing ADCP (dx=starboard, dy=fwd) meters from GPS
positions from aship.agt
calculation done at 2019/01/03 00:18:21
xducer_dx = -1.191661
xducer_dy = 0.020048
signal = 6310.946991
------------




(6) make web plots


       mkdir webpy
       cp ../os75nb/webpy/sectinfo.txt webpy/
       quick_web.py --redo

##       quick_web.py --interactive

 - view with a browser, look at webpy/index.html


(7) Extract data:

   quick_adcp.py --steps2rerun matfiles --auto


 You can extract NetCDF files as well.

   adcp_nc.py         adcpdb  contour/os38nb_short nbp1802 os38nb
   adcp_nc.py  --long adcpdb  contour/os38nb_long  nbp1802 os38nb

 To check netcdf file:

   ncdump -h contour/os38nb_short.nc


# cat cruise_info.txt at the top of this file!