Tpu

class HSTB.kluster.modules.tpu.Tpu(debug=False, plot_tpu=False)

Bases: object

Total propogated uncertainty - following the Rob Hare model
See “Depth and Position Error Budgets for Multibeam Echosounding” by Rob Hare

Here we provide the framework of the Rob Hare model, replacing as much of the modeled uncertainty elements with manufacturer provided records. Currently this class will use the following: - TVU (tidal) => sounder vert uncert, separation_model, dynamic_draft, waterline - TVU (ellipse) => sounder vert uncert, separation_model, pospac vert_position error - THU => sounder horizontal uncert, pospac north_position error, pospac east_position_error

I suspect this is not a 100% complete interpretation of the Hare model. The sounder uncertainty elements that rely on attitude/sound velocity (numbers 3-6 on page 67) and the horizontal elements that are not based on the positioning system (lines 2-4 in number 10) probably need to be included.

All the attributes in this class are in degrees or meters. The only inputs allowed to be in radians have switches in the load_from_data method.

Methods Summary

generate_total_uncertainties([vert_ref, sigma])

Build the total vertical/horizontal uncertainties from the provided data.

load_from_data(roll, raw_beam_angles, ...[, ...])

Load the provided data here into the class, doing any necessary conversion of units and validation

populate_from_dict(tpu_dict)

Populate the attribution of this class by matching with the provided dictionary of keys/values

Methods Documentation

generate_total_uncertainties(vert_ref='ellipse', sigma=1.96)

Build the total vertical/horizontal uncertainties from the provided data. The vertical uncertainty calculation depends on the vertical reference of the survey. Ellipse will involve the sbet vert uncertainty, Tidal will use the waterlevel related static uncertainty values.

Parameters
  • vert_ref (str) – vertical reference of the survey, one of ‘ellipse’, ‘waterline’, ‘NOAA MLLW’, ‘NOAA MHW’

  • sigma (float) – specify the number of stddev you want the error to represent, sigma=1.96 would generate 2sigma uncertainty.

Returns

  • Union[xr.DataArray, np.array] – total vertical uncertainty in meters for each sounding (time, beam)

  • Union[xr.DataArray, np.array] – total horizontal uncertainty in meters for each sounding (time, beam)

load_from_data(roll, raw_beam_angles, beam_angles, acrosstrack_offset, depth_offset, surf_sound_speed, datum_uncertainty=None, quality_factor=None, north_position_error=None, east_position_error=None, down_position_error=None, roll_error=None, pitch_error=None, heading_error=None, roll_in_degrees=True, raw_beam_angles_in_degrees=True, beam_angles_in_degrees=True, qf_type='ifremer')

Load the provided data here into the class, doing any necessary conversion of units and validation

Parameters
  • roll (Union[DataArray, array]) – roll value at ping time

  • raw_beam_angles (Union[DataArray, array]) – raw beam angles

  • beam_angles (Union[DataArray, array]) – corrected beam angles, for attitude and mounting angles

  • acrosstrack_offset (Union[DataArray, array]) – offset in meters to each beam in across track direction (+ STBD)

  • depth_offset (Union[DataArray, array]) – offset in meters down to each sounding (+ DOWN)

  • surf_sound_speed (Union[DataArray, array]) – surface sound speed sensor (meters/second)

  • datum_uncertainty (Union[DataArray, array, float, None]) – uncertainty associated with the vertical datum transformation, a beamwise value, optional, if not provided uses the value in the tpu_dict

  • quality_factor (Union[DataArray, array, None]) – sonar uncertainty provided as a quality factor, can either be Kongsberg std dev or Kongsberg reported Ifremer quality factor

  • north_position_error (Union[DataArray, array, None]) – pospac reported rms north position error

  • east_position_error (Union[DataArray, array, None]) – pospac reported rms east position error

  • down_position_error (Union[DataArray, array, None]) – pospac reported rms down position error

  • roll_error (Union[DataArray, array, None]) – pospac reported rms roll error in degrees

  • pitch_error (Union[DataArray, array, None]) – pospac reported rms pitch error in degrees

  • heading_error (Union[DataArray, array, None]) – pospac reported rms heading error in degrees

  • roll_in_degrees (bool) – whether or not the provided roll is in degrees (True) or radians (False)

  • raw_beam_angles_in_degrees (bool) – whether or not the provided raw_beam_angles are in degrees (True) or radians (False)

  • beam_angles_in_degrees (bool) – whether or not the provided beam_angles are in degrees (True) or radians (False)

  • qf_type (str) – whether or not the provided quality factor is Ifremer (‘ifremer’) or Kongsberg std dev (‘kongsberg’)

populate_from_dict(tpu_dict)

Populate the attribution of this class by matching with the provided dictionary of keys/values

Parameters

tpu_dict (dict) – dictionary of keys that match the attributes of this class