Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error during interpolation in consolidate.add_latlon with an edge case #1009

Open
emiliom opened this issue Mar 25, 2023 · 1 comment
Open
Labels
bug Something isn't working

Comments

@emiliom
Copy link
Collaborator

emiliom commented Mar 25, 2023

(Following up from #769 (comment)) In PR #1000 I added several new consolidate.add_latlon tests to test_consolidate_integration.py, including two new test datasets (including one AZFP). One thing I did not add was an EK80 test file. While running consolidate.add_latlon on two EK80 test files just now, I ran into the same error for both files during the interpolation step (return position_var.interp(time1=ds["ping_time"])):

InvalidIndexError: Reindexing only valid with uniquely valued Index objects

The two files are ek80_bb_with_calibration/2018115-D20181213-T094600.raw and ek80/Summer2018--D20180905-T033113.raw. Examining the data a bit, I found two factors in common among those two files, other than being EK80:

  • Their time-varying lat-lon locations are effectively at a single point, +/- very small floating-point variations.
  • They span a tiny time range, of a couple of seconds.

The error is actually emitted by Pandas. In searching for this error message, I see some references to problems with datetimes. I wasted a lot of time thinking the problem might be with the interpolation of near-constant values, but I now think it's somehow related to the tiny datetime range. I don't think it has anything to do with the files being from EK80. It'll take more effort to track this down.

@emiliom emiliom added the bug Something isn't working label Mar 25, 2023
@emiliom emiliom added this to the 0.7.1 milestone Mar 25, 2023
@emiliom emiliom added this to Echopype Mar 25, 2023
@github-project-automation github-project-automation bot moved this to Todo in Echopype Mar 25, 2023
@leewujung
Copy link
Member

Well, I am not sure where the test files came from, but the small time (and hence lat/lon) range is likely inherent from small files. The per-ping data size is often larger, so the number of pings is smaller for a file that is just a couple MB.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Todo
Development

No branches or pull requests

2 participants