-
Notifications
You must be signed in to change notification settings - Fork 72
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
Enable use of data from EchoData object in consolidate.add_depth
#1205
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #1205 +/- ##
===========================================
+ Coverage 77.08% 92.85% +15.77%
===========================================
Files 67 3 -64
Lines 5921 196 -5725
===========================================
- Hits 4564 182 -4382
+ Misses 1357 14 -1343
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 64 files with indirect coverage changes 📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today! |
Notes to self for creating mock from datatree import DataTree
import xarray as xr
from echopype.echodata.echodata import EchoData
ed = EchoData(sonar_model="EK80")
ds1 = xr.Dataset(dict(bar=("x", [1, 2])))
ds2 = xr.Dataset(dict(bar=("x", [10, 20])))
tree = DataTree.from_dict({'Platform': ds1, 'Sonar/Beam_group1': ds2}, name='root')
ed._set_tree(tree) |
Co-authored-by: Don Setiawan <landungs@uw.edu>
Co-authored-by: Don Setiawan <landungs@uw.edu>
Co-authored-by: Don Setiawan <landungs@uw.edu>
Added a test function to generate mock EchoData object with only the variables (and one attribute) required by |
@ctuguinay : This is also related to #1152. Let's talk through this. |
We'll close this now because it'll be superseded by #1319 . |
Overhaul
consolidate.add_depth
to enable using data from EchoData object. Addresses #790. See the echopype documentation for reference on several of the variables.Rotations are performed using scipy.spatial.transform.Rotation.
Notes and caveats:
depth
variable for the sample EK80 file, so I suspect something isn't working properly.tilt_x/y
variables are not handled. Only standard SONAR-netCDF4 variables are used. It assumes that tilt_x/y variables have already been transformed into pitch & roll. I'll create a new issue for this.TransducerAlphaX/Y/Z
variables are in degrees. We're currently interpreting them as a unit vector when mapping them tobeam_direction_x/y/z
. A conversion will need to be implemented inset_groups_ek80
(and ek60?). I'll create a new issue for this. For the sample file (below), it's not an issue b/c allTransducerAlphaX/Y/Z
values are zero. I couldn't find an EK80 file withTransducerAlphaX/Y/Z
values that are not all zero.pitch
,roll
, andvertical_offset
.vertical_offset
(based onheave
) is also suspicious b/c values are close to zero.water_level
(0) +vertical_offset
is supposed to be the positive distance from the ship origin.