Repository: OSOceanAcoustics/echopype (language: python)

Issue:
Update `_calc_Sv_offset` for AZFP parsing
This PR includes the following:
- adds additional values in the Sv_offset dictionary based on communication with ASL Evn Sci
- updates `_calc_Sv_offset` to use a param dictionary instead of nested if-else

One existing test needs to be skipped because the pulse length is not in the Sv_offset dictionary.
We need to request a new file from ASL or Rutgers folks to make sure we still have tests covering files without temperature/pressure/tilt data (those on glider).

This is to address #1300.


Discussion / hints:
## [Codecov](https://app.codecov.io/gh/OSOceanAcoustics/echopype/pull/1304?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=OSOceanAcoustics) Report
Attention: Patch coverage is `77.77778%` with `2 lines` in your changes are missing coverage. Please review.
> Project coverage is 77.94%. Comparing base [(`9f56124`)](https://app.codecov.io/gh/OSOceanAcoustics/echopype/commit/9f5612477ce56a19f828f9a7c1730fc55f8622a6?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=OSOceanAcoustics) to head [(`b729729`)](https://app.codecov.io/gh/OSOceanAcoustics/echopype/pull/1304?dropdown=coverage&src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=OSOceanAcoustics).
> Report is 44 commits behind head on main.

| [Files](https://app.codecov.io/gh/OSOceanAcoustics/echopype/pull/1304?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=OSOceanAcoustics) | Patch % | Lines |
|---|---|---|
| [echopype/convert/parse\_azfp.py](https://app.codecov.io/gh/OSOceanAcoustics/echopype/pull/1304?src=pr&el=tree&filepath=echopype%2Fconvert%2Fparse_azfp.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=OSOceanAcoustics#diff-ZWNob3B5cGUvY29udmVydC9wYXJzZV9hemZwLnB5) | 77.77% | [2 Missing :warning: ](https://app.codecov.io/gh/OSOceanAcoustics/echopype/pull/1304?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=OSOceanAcoustics) |

<details><summary>Additional details and impacted files</summary>


```diff
@@            Coverage Diff             @@
##             main    #1304      +/-   ##
==========================================
- Coverage   83.52%   77.94%   -5.58%     
==========================================
  Files          64       16      -48     
  Lines        5686     2621    -3065     
==========================================
- Hits         4749     2043    -2706     
+ Misses        937      578     -359     
```

| [Flag](https://app.codecov.io/gh/OSOceanAcoustics/echopype/pull/1304/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=OSOceanAcoustics) | Coverage Δ | |
|---|---|---|
| [unittests](https://app.codecov.io/gh/OSOceanAcoustics/echopype/pull/1304/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=OSOceanAcoustics) | `77.94% <77.77%> (-5.58%)` | :arrow_down: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=OSOceanAcoustics#carryforward-flags-in-the-pull-request-comment) to find out more.


</details>

[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/OSOceanAcoustics/echopype/pull/1304?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=OSOceanAcoustics).   
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=OSOceanAcoustics).

> I think the latter would be much nicer since `set_vendor` should just be packing the vendor datasets, and it also gives the function an actual purpose within the parser class, rather than just being in it for encapsulation.

Yep, it'll be nice to have that in the parser so that we can keep the set group methods clean. Do you want to make a PR for that change? 😛
@leewujung Yeah I can do that. Perhaps, I do that PR in conjunction with when the test data arrives, so it's a little more than a few lines changed?
Sure, let me email ASL and cc you. 

Fix patch:
diff --git a/echopype/convert/parse_azfp.py b/echopype/convert/parse_azfp.py
index 1e307ab9e..2cc8c8c62 100644
--- a/echopype/convert/parse_azfp.py
+++ b/echopype/convert/parse_azfp.py
@@ -31,11 +31,21 @@
         500: 1.1,
         **SV_OFFSET_HF,
     },
+    120000.0: {
+        150: 1.4,
+        250: 1.3,
+        **SV_OFFSET_HF,
+    },
     125000.0: {
         150: 1.4,
         250: 1.3,
         **SV_OFFSET_HF,
     },
+    130000.0: {
+        150: 1.4,
+        250: 1.3,
+        **SV_OFFSET_HF,
+    },
     200000.0: {
         150: 1.4,
         250: 1.3,


Test patch:
diff --git a/echopype/tests/convert/test_convert_azfp.py b/echopype/tests/convert/test_convert_azfp.py
index f0a0451b9..4ff718797 100644
--- a/echopype/tests/convert/test_convert_azfp.py
+++ b/echopype/tests/convert/test_convert_azfp.py
@@ -194,6 +194,19 @@ def test_convert_azfp_01a_pressure_temperature(azfp_path):
     assert not echodata["Environment"]["temperature"].isnull().all()
 
 
+def test_convert_azfp_UNB_glider_130kHz(azfp_path):
+    """Test converting UNB AZFP files with 130kHz."""
+    azfp_01B_path = azfp_path / 'UNB_glider/20092418.01B'
+    azfp_xml_path = azfp_path / 'UNB_glider/20092414.XML'
+
+    echodata = open_raw(
+        raw_file=azfp_01B_path, sonar_model='AZFP', xml_path=azfp_xml_path
+    )
+
+    # Check that frequency nominal include 130kHz
+    assert 130000.0 in echodata["Sonar/Beam_group1"]["frequency_nominal"]
+
+
 def test_load_parse_azfp_xml(azfp_path):
     azfp_xml_path = azfp_path / '23081211.XML'
     parseAZFP = ParseAZFP(None, str(azfp_xml_path))