diff --git a/environment-dev.yml b/environment-dev.yml index 7a47ed7..765f2f0 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -25,6 +25,7 @@ dependencies: - more-itertools==8.13.0 - pydantic>2 - echopype + - haversine - black - bottleneck - check-manifest diff --git a/environment.yml b/environment.yml index 7ab5975..72f3ae4 100644 --- a/environment.yml +++ b/environment.yml @@ -23,6 +23,7 @@ dependencies: - more-itertools==8.13.0 - pydantic>2 - echopype + - haversine - pip - git - pip: diff --git a/oceanstream/L2_calibrated_data/sv_interpolation.py b/oceanstream/L2_calibrated_data/sv_interpolation.py index 06e472b..2514573 100644 --- a/oceanstream/L2_calibrated_data/sv_interpolation.py +++ b/oceanstream/L2_calibrated_data/sv_interpolation.py @@ -54,7 +54,7 @@ def interpolate_sv( dataset = read_processed(path_to_file) # Retrieve the Sv DataArray from the dataset - sv_dataarray = dataset["Sv"] + sv_dataarray = dataset["Sv"].chunk({"ping_time": -1}) # Initialize an empty list to store the processed channels processed_channels = [] diff --git a/tests/test_nasc_process.py b/tests/test_nasc_process.py index 2a09c10..4e674c4 100644 --- a/tests/test_nasc_process.py +++ b/tests/test_nasc_process.py @@ -16,11 +16,11 @@ def test_compute_per_dataset_nasc(ek_60_Sv_full_denoised): def test_compute_masked_nasc(ek_60_Sv_shoal): dataset = ek_60_Sv_shoal fish_nasc = mask_nasc_data(dataset, {"mask_shoal": False}, True, "fish_NASC") - assert fish_nasc['fish_NASC_38000.0'] == 148692889.40505505 + assert fish_nasc['fish_NASC_38000.0'] == pytest.approx(131203167, 0.0001) def test_compute_full_nasc(ek_60_Sv_shoal): dataset = ek_60_Sv_shoal nasc = full_nasc_data(dataset, BASE_NASC_PARAMETERS) assert len(nasc) == 24 - assert nasc['fish_NASC_38000.0'] == 148692889.40505505 + assert nasc['fish_NASC_38000.0'] == pytest.approx(131203167, 0.0001)