diff --git a/echopype/convert/set_groups_azfp.py b/echopype/convert/set_groups_azfp.py index 76da16019..9faa45091 100644 --- a/echopype/convert/set_groups_azfp.py +++ b/echopype/convert/set_groups_azfp.py @@ -382,6 +382,34 @@ def set_beam(self) -> List[xr.Dataset]: "valid_min": 0.0, }, ), + "beam_stabilisation": ( + [], + np.array(0, np.byte), + { + "long_name": "Beam stabilisation applied (or not)", + "flag_values": [0, 1], + "flag_meanings": ["not stabilised", "stabilised"], + }, + ), + "non_quantitative_processing": ( + [], + np.array(0, np.int16), + { + "long_name": "Presence or not of non-quantitative processing applied" + " to the backscattering data (sonar specific)", + "flag_values": [0], + "flag_meanings": ["None"], + }, + ), + "sample_time_offset": ( + [], + 0.0, + { + "long_name": "Time offset that is subtracted from the timestamp" + " of each sample", + "units": "s", + }, + ), }, coords={ "channel": ( diff --git a/echopype/convert/set_groups_ek60.py b/echopype/convert/set_groups_ek60.py index b7237f3ee..55387af4b 100644 --- a/echopype/convert/set_groups_ek60.py +++ b/echopype/convert/set_groups_ek60.py @@ -596,6 +596,25 @@ def set_beam(self) -> List[xr.Dataset]: ], }, ), + "beam_stabilisation": ( + [], + np.array(0, np.byte), + { + "long_name": "Beam stabilisation applied (or not)", + "flag_values": [0, 1], + "flag_meanings": ["not stabilised", "stabilised"], + }, + ), + "non_quantitative_processing": ( + [], + np.array(0, np.int16), + { + "long_name": "Presence or not of non-quantitative processing applied" + " to the backscattering data (sonar specific)", + "flag_values": [0], + "flag_meanings": ["None"], + }, + ), }, coords={ "channel": ( diff --git a/echopype/convert/set_groups_ek80.py b/echopype/convert/set_groups_ek80.py index 298c6ebe5..67c6d25eb 100644 --- a/echopype/convert/set_groups_ek80.py +++ b/echopype/convert/set_groups_ek80.py @@ -592,6 +592,25 @@ def _assemble_ds_ping_invariant(self, params, data_type): ["channel"], beam_params["transceiver_software_version"], ), + "beam_stabilisation": ( + [], + np.array(0, np.byte), + { + "long_name": "Beam stabilisation applied (or not)", + "flag_values": [0, 1], + "flag_meanings": ["not stabilised", "stabilised"], + }, + ), + "non_quantitative_processing": ( + [], + np.array(0, np.int16), + { + "long_name": "Presence or not of non-quantitative processing applied" + " to the backscattering data (sonar specific)", + "flag_values": [0], + "flag_meanings": ["None"], + }, + ), }, coords={ "channel": ( @@ -921,10 +940,17 @@ def _assemble_ds_common(self, ch, range_sample_size): "flag_meanings": ["CW", "FM", "FMD"], }, ), - "range_sample_offset": ( + "sample_time_offset": ( ["ping_time"], - np.array(self.parser_obj.ping_data_dict["offset"][ch], dtype=int), - {"long_name": "First sample number"}, + ( + np.array(self.parser_obj.ping_data_dict["offset"][ch]) + * np.array(self.parser_obj.ping_data_dict["sample_interval"][ch]) + ), + { + "long_name": "Time offset that is subtracted from the timestamp" + " of each sample", + "units": "s", + }, ), }, coords={ diff --git a/echopype/utils/coding.py b/echopype/utils/coding.py index a4a57a7cc..e199840ee 100644 --- a/echopype/utils/coding.py +++ b/echopype/utils/coding.py @@ -43,7 +43,8 @@ "cal_channel_id": np.str_, "beam": np.str_, "channel_mode": np.byte, - "range_sample_offset": np.int32, + "beam_stabilisation": np.byte, + "non_quantitative_processing": np.int16, } # channel name # beam name PREFERRED_CHUNKS = "preferred_chunks"