Tutorial 3: WCI Viewer widget#

themachinethatgoesping tutorial series#

themachinethatgoesping concepts covered:

  • Start WCI viewer

[1]:
%matplotlib widget

import numpy as np
import themachinethatgoesping as theping
from matplotlib import pyplot as plt
from tqdm.auto import tqdm
[2]:
# data folder
folder = '../unittest_data'

# find all Kongsberg files in the list of folders
files = theping.echosounders.index_functions.find_files(folder,['.all','.wcd'])
files.sort()

# create the file handler
fileHandler = theping.echosounders.kongsbergall.KongsbergAllFileHandler(files)

# get pings that contain WCD
pings = theping.pingprocessing.filter_pings.by_features(fileHandler.get_pings(),['watercolumn.amplitudes'])
Found 18 files
indexing files ⠐ 100% [00m:00s<00m:00s] [..0871266855321420.all (1/18)]
indexing files ⠠ 100% [00m:00s<00m:00s] [..3008643552583898.wcd (18/18)]
indexing files ⢀ 100% [00m:00s<00m:00s] [Found: 729 datagrams in 18 files (10MB)]
Initializing ping interface ⢀ 90% [00m:00s<00m:00s] [Done]
WARNING: get_depth_sensor_offsets: Only DSH (Depth (pressure) sensor heave) == NI is supported yet, but DSH is IN
WARNING: get_depth_sensor_offsets: Only DSH (Depth (pressure) sensor heave) == NI is supported yet, but DSH is IN

Start WCI viewer#

Built-in widget to view and explore water-column data

[19]:
# check data with the WCI Viewer
viewer = theping.widgets.WCIViewer(pings)
viewer.w_index.value = 60 # select ping nr 60 at start

Basic usage:

  • Switch display between beam-vs-sample view and wedge view with the wci_render dropdown menu

  • Swith xy aspect with the aspect dropdown menu. Choose between auto (stretch) or equal (equal x and y dimensions)

  • Change ping number with the ping nr slider

  • Click the fix x/y button to fix the x/y axis limits to the current view. Click on unfix x/y to revert to automatic axis limits

  • Change the variable displayed with the wci value dropdown menu


Dual head support#

If you have dual head systems you can group the ping data before displaying them. The viewer will display the date without overlap.

[20]:
# Note if you have dual head systems you can group head data
grouped_pings = theping.pingprocessing.group_pings.dual_head(pings)
print(type(grouped_pings))
viewer = theping.widgets.WCIViewer(grouped_pings,name = 'WCI (Dual head grouped)')
viewer.w_index.value = 60 # select ping nr 60 at start
<class 'list'>
[ ]: