.. _add_wtpoints: Adding watertrack calibration points if the ship was slow --------------------------------------------------------------- **Question**: I have a UHDAS+CODAS Python processing directory with lots of short, straight segments, surveying a small feature at slow speeds. How can I increase the number of watertrack points? **Answer:** Watertracking calibration consists of 3 steps: In ``nav``" directory: (1) ``adcpsect as_nav.tmp`` # by default: whole cruise, run once In ``cal/watertrk`` (2) ``timslip timslip.tmp`` # by default: whole cruise, run once (3) ``python3 Wtplot_script.py`` # by default: whole cruise, run once Step 1 is not changed. Step 2 controls what points are extracted for watertrack. Here's the 'diff' of the change ``timslip.tmp`` to make it get more points: - first, copy to another name, eg ``timeslip_morepts.tmp`` - second, make these changes: (i) change output file name (ii) change filtering (iii) change thresholds .. To read the difference below, - "``<``" refers to the first file, ``timeslip.tmp`` - "``>``" refers to the second file, ``timeslip_morepts.tmp`` Here's the difference between the two:: ulili:(watertrk)$ diff timslip.tmp timslip_morepts.tmp 6c6 < output_file: aship_7.cal --- > output_file: aship_5.cal /* new name!! */ 9,20c9,20 < min_n_fixes= 7 /* 5 7 9 */ < < n_refs= 7 /* 5 7 9 */ < < i_ref_l0= 1 < i_ref_l1= 2 /* 1 2 3 */ < i_ref_r0= 5 /* 4 5 6 */ < i_ref_r1= 6 /* 4 6 8 */ < < up_thresh= 3.0 /* m/s */ < down_thresh= 3.0 /* m/s */ < turn_speed= 2.0 /* m/s */ --- > min_n_fixes= 5 /* 5 7 9 */ > > n_refs= 5 /* 5 7 9 */ > > i_ref_l0= 1 > i_ref_l1= 1 /* 1 2 3 */ > i_ref_r0= 4 /* 4 5 6 */ > i_ref_r1= 4 /* 4 6 8 */ > > up_thresh= 1.5 /* m/s */ > down_thresh= 1.5 /* m/s */ > turn_speed= 1.0 /* m/s */ Step 2, last part: run ``timslip timslip_morepts.tmp`` In this example, the output is a file called ``aship_5.cal`` Step 3: Alter ``Wtplot_script.py`` as one can for :ref:`Bottom Track `. - copy to ``Wtplot_script_morepts.py`` - edit so the diff is :: < 40c37 < WT(cal_filename = 'aship_7.cal', --- > WT(cal_filename = 'aship_5.cal', ## read new file 42a40,42 > statsfile = 'adcpcal_morepts.out', # different output > ## add these here if you need to edit out some of the points you added: > ## clip_ph, clip_amp, clip_var, clip_dt, clip_u, clip_v Then run ``python3 Wtplot_script_morepts.py`` and look at the output, both in the ascii file and the figures (sorry, at the moment the png files will overwrite -- save copies if you want to keep them):: ##------------- begin "timslip_morepts.tmp" ---------------------- fix_file_type: simple fix_file: ../../nav/aship.gps reference_file: ../../nav/aship.nav output_file: aship_5.cal /* new name!! */ year_base= 2013 min_n_fixes= 5 /* 5 7 9 */ n_refs= 5 /* 5 7 9 */ i_ref_l0= 1 i_ref_l1= 1 /* 1 2 3 */ i_ref_r0= 4 /* 4 5 6 */ i_ref_r1= 4 /* 4 6 8 */ up_thresh= 1.5 /* m/s */ down_thresh= 1.5 /* m/s */ turn_speed= 1.0 /* m/s */ turn_thresh= 60 /* degrees */ dtmax= 360 /* seconds, for 300-second ensembles */ tolerance= 5.e-5 /* days, about 5 seconds */ grid: ensemble use_shifted_times? no #----------------- end ------------------------------------- and:: # --------------- begin Wtplot_script_morepts.py ---------------- #!/usr/bin/env python ## written by quick_mplplots.py -- edit as needed: ## cruiseid is 'ADCP' ## dbname is 'aship' ## proc_yearbase is 2013 ## printformats is 'png' import matplotlib.pyplot as plt from pycurrents.adcp.quick_mplplots import Wtplot ## other options that can be chosen ## ## name value ## ------------- ----------- ## cruiseid 'ADCP ## printformats 'pdf' ## dpi 100 ## outfilebase 'wtcal' ## statsfile 'adcpcal.out' ## comment '#' ## ddrange 'all' ## clip_ph 3, ## clip_amp 0.04 ## clip_var 0.05 ## clip_dt 60 ## clip_u [-100,100] ## clip_v [-100,100] WT = Wtplot() WT(cal_filename = 'aship_5.cal', ## read new file printformats = 'png', cruiseid = 'ADCP', statsfile = 'adcpcal_morepts.out', # different output ## add these here if you need to edit out some of the points you added: ## clip_ph, clip_amp, clip_var, clip_dt, clip_u, clip_v proc_yearbase = '2013') plt.show() #------------------------------ end------------------------------- .. toctree:: :hidden: