-
Notifications
You must be signed in to change notification settings - Fork 76
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
Add simple plotting functionality #436
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #436 +/- ##
===========================================
- Coverage 77.13% 19.94% -57.19%
===========================================
Files 39 40 +1
Lines 3415 3420 +5
===========================================
- Hits 2634 682 -1952
- Misses 781 2738 +1957
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@leewujung Do you know if there's a better file for me to develop the visualization with that's pretty? 😃 |
TODO: Investigate what platform or sonar/beam metadata attribute exists or should be added that clearly specifies the "direction" the echosounder is oriented (eg, downward vs upward looking). This need came about in the context of the OOI EK60/80 sensor @lsetiawan is using in his plotting tests, which is upward looking. This functionality would allow the echogram plots of raw data to be automatically oriented correctly with a depth y axis. Looking through the SONAR-netCDF4 convention, the |
The upcoming version of SONAR-netCDF4 has a more complete orientation and coordinate system that allows for specifying absolute beam pointing directions - details here. It was designed for multi-beam bathymetric sonars and might be a bit complicated for just upward-looking echosounders, but was intended to be general enough for all purposes and does not assume a ship-based frame of reference (keep in mind that the platform is not necessary a vessel). The beam_mode in version 1 of SONAR-netCDF4 is a label for the different groups of beams that fisheries omni-directional sonars have (e.g., a set of horizontal beams, a set of vertical beams, and spot beams - the word inspection comes from the usage in such sonars - a narrow beam for inspecting parts of a fish school) |
Great! please add EK500 colormap as one of the options. :) |
@gavinmacaulay thanks so much for chiming in to elaborate on the new coordinate system framework and the context of the |
For quick visualization of EK80 complex data, we can plot the magnitude np.abs(ed.beam.backscatter_r + 1j * ed.beam.backscatter_i) of each quadrant separately. Can have an option doing a coherent sum over all quadrants (ed.beam.backscatter_r + 1j * ed.beam.backscatter_i).sum(dim="quadrant") and then do the magnitude. |
@lsetiawan : thanks for the changes, they look great! I put in a couple small comments that should pretty easy to address. Do you think you could add a test for the water_level options? With all the possibilities it seems a good idea to have a test to catch any potential hiccups. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @lsetiawan : Thanks for the changes. I found a couple bugs in the water_level tests and added a couple suggestions. Once they are fixed this should be good to go!
@lsetiawan : thanks, the changes look great! I'll merge this after adding in some small notes to the One thing I noticed which we'll need to do something about (also requested in #259 ) is to include the addition of water_level in the Sv dataset (since right now even if users put in The more general description is that people are plotting the range offset from some platform. Let's discuss how that coordinate should be named... Hence I am wondering if Pinging @emiliom here since this is related to the whole convention and attribute conversation. |
To check how the EK500 colormap looks like (as in this previous comment), use From a recent deprecation warning:
|
Overview
This PR adds an initial simple plotting functionality by calling
ep.visualize.create_echogram
.NOTE: This is still a draft, suggestions are highly welcomed and encouraged.
Example
Actions
Ability to plot ADCP(Currently not supported at this moment).Add actual plot comparison test?(Maybe future improvements, not sure how to do this at this moment).Notes
There are still some quirks and improvements to add, and some questions to be discussed such as:
Backscatter_r
is not available in ADCP, at least the one on the test data. In this case, what to do?