MHKiT-Software / MHKiT-Python

MHKiT-Python provides the marine renewable energy (MRE) community tools for data processing, visualization, quality control, resource assessment, and device performance.
https://mhkit-software.github.io/MHKiT/
BSD 3-Clause "New" or "Revised" License
50 stars 45 forks source link

Dolfyn incorrectly processing irregular Bin sizes #207

Closed browniea closed 1 year ago

browniea commented 1 year ago

Describe the bug:

The Teledyn river pro has a mode to set bin depths to "auto." This produces data with a variable bin size ex:

delta depth:

Columns 1 through 6

0.1200    0.1200    0.1200    0.1200    0.3000    0.4800

Columns 7 through 12

0.4800    0.4800    0.4800    0.4800    0.4800    0.4800

Columns 13 through 18

0.4800    0.4800    0.4800    0.4800    0.4800    0.4800

Columns 19 through 20

Dolfyn is calculating bin depth as if they are consistent and dropping data outside of the range calculated by values from the header file

dat['coords']['range'] = (cfg['bin1_dist_m'] + np.arange(self.ensemble['n_cells']) * cfg['cell_size'])

jmcvey3 commented 1 year ago

Updating info on this: Teledyne has an "auto" setting for their RiverPro and StreamPro ADCPs where a second "surface layer" profile is sampled in addition to the primary water track profile. Since little information other than the bare necessities are stored in the surface layer data, the update I'm adding stores this second profile is added to the primary dataset with an "_sl" tag (i.e. "vel_sl" and "range_sl").