-
Notifications
You must be signed in to change notification settings - Fork 52
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
Degrees to pixels and back again... #22
Comments
Dear Dan:
Thanks for the note. Unfortunately, I stopped working on this project back
in 2015 and have left academia. However, here are a few suggestions and I
hope they are helpful. If you resolve the issue, I'd appreciate it if you
commented on the GitHub issue so other can benefit:
1. Forgive me if you already have, but you should check out our paper
<https://www.nature.com/articles/sdata201528> and associated data
<https://datadryad.org/resource/doi:10.5061/dryad.gp40h> that give more
details about what the algorithm returns (and I assume how to plot/view)
2. From a quick glance, the easiest way to draw a circle or ellipse
around the eddy centroid seems to use the lat/lon of each centroid and then
draw a circle with the area in the SurfaceArea variable
3. If I understand correctly, you want to plot the eddy bodies (or just
the contours). To do that, you would use the
PixelIdList field in the eddy object. This gives you the linear index of
the pixels in your eddy (I believe MATLAB has a buil-in function to convert
linear indices to 2D indices given the overall grid dimensions such as 700
x 1400). So to plot the eddies, all you have to do is to have a zeros
matrix with the size of your entire grid and set the pixels in PixelIdList
to 1
4. Alternatively, depending on what you want to do, we have a mat_to_csv.m
function <https://github.com/jfaghm/OceanEddies/tree/master/db> that
takes the eddy tracks and saves them into a CSV for easier analyses.
I hope this helps.
Warmly,
James
…On Tue, Feb 12, 2019 at 1:53 PM DanHolstein ***@***.***> wrote:
Hi there. We are trying to use EddieScan to simply draw hulls around
eddies in the GOM HYCOM, from SSH. We can get the code to run just fine.
Where we're running into trouble is how to visualize the hulls created by
EddieScan, as the centroids are in degrees (Lon, Lat), but the other
attributes of the hulls are in pixels, which we think are linked to the
"area map" - however, it's not clear where the pixel IDs are, or how we
could use the output in any way other than in the GUI visualizer. Any
thoughts? Many thanks!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#22>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABtHp8hnG8cg2xI8BPoUxrxemu_KEKr8ks5vMzfbgaJpZM4a4IdF>
.
|
Wow - thanks for the detailed help! Will happily update the comment on github once we fiddle a bit more.
Cheers!
Dan Holstein
…Sent from my iPhone
On Feb 12, 2019, at 9:43 PM, jfaghm ***@***.***> wrote:
Dear Dan:
Thanks for the note. Unfortunately, I stopped working on this project back
in 2015 and have left academia. However, here are a few suggestions and I
hope they are helpful. If you resolve the issue, I'd appreciate it if you
commented on the GitHub issue so other can benefit:
1. Forgive me if you already have, but you should check out our paper
<https://www.nature.com/articles/sdata201528> and associated data
<https://datadryad.org/resource/doi:10.5061/dryad.gp40h> that give more
details about what the algorithm returns (and I assume how to plot/view)
2. From a quick glance, the easiest way to draw a circle or ellipse
around the eddy centroid seems to use the lat/lon of each centroid and then
draw a circle with the area in the SurfaceArea variable
3. If I understand correctly, you want to plot the eddy bodies (or just
the contours). To do that, you would use the
PixelIdList field in the eddy object. This gives you the linear index of
the pixels in your eddy (I believe MATLAB has a buil-in function to convert
linear indices to 2D indices given the overall grid dimensions such as 700
x 1400). So to plot the eddies, all you have to do is to have a zeros
matrix with the size of your entire grid and set the pixels in PixelIdList
to 1
4. Alternatively, depending on what you want to do, we have a mat_to_csv.m
function <https://github.com/jfaghm/OceanEddies/tree/master/db> that
takes the eddy tracks and saves them into a CSV for easier analyses.
I hope this helps.
Warmly,
James
On Tue, Feb 12, 2019 at 1:53 PM DanHolstein ***@***.***>
wrote:
> Hi there. We are trying to use EddieScan to simply draw hulls around
> eddies in the GOM HYCOM, from SSH. We can get the code to run just fine.
> Where we're running into trouble is how to visualize the hulls created by
> EddieScan, as the centroids are in degrees (Lon, Lat), but the other
> attributes of the hulls are in pixels, which we think are linked to the
> "area map" - however, it's not clear where the pixel IDs are, or how we
> could use the output in any way other than in the GUI visualizer. Any
> thoughts? Many thanks!
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <#22>, or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ABtHp8hnG8cg2xI8BPoUxrxemu_KEKr8ks5vMzfbgaJpZM4a4IdF>
> .
>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there. We are trying to use EddyScan to simply draw hulls around eddies in the GOM HYCOM, from SSH. We can get the code to run just fine. Where we're running into trouble is how to visualize the hulls created by EddieScan, as the centroids are in degrees (Lon, Lat), but the other attributes of the hulls are in pixels, which we think are linked to the "area map" - however, it's not clear where the pixel IDs are, or how we could use the output in any way other than in the GUI visualizer. Any thoughts? Many thanks!
The text was updated successfully, but these errors were encountered: