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

350 pairing extra feats #352

Merged
merged 8 commits into from
Nov 28, 2023
Merged

350 pairing extra feats #352

merged 8 commits into from
Nov 28, 2023

Conversation

cpaniaguam
Copy link
Member

@cpaniaguam cpaniaguam commented Nov 4, 2023

@cpaniaguam cpaniaguam added the enhancement New feature or request label Nov 4, 2023
@cpaniaguam cpaniaguam self-assigned this Nov 4, 2023
@cpaniaguam cpaniaguam linked an issue Nov 4, 2023 that may be closed by this pull request
3 tasks
Copy link

codecov bot commented Nov 4, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (290d7bd) 90.48% compared to head (ec0c674) 90.73%.

Files Patch % Lines
src/tracker/tracker-funcs.jl 92.85% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #352      +/-   ##
==========================================
+ Coverage   90.48%   90.73%   +0.25%     
==========================================
  Files          29       29              
  Lines         904      950      +46     
==========================================
+ Hits          818      862      +44     
- Misses         86       88       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Distances are easily recovereable from the data
Distances are easily recovereable from the data
@cpaniaguam
Copy link
Member Author

@danielmwatkins Below is what the output data structure is looking like after the matching criteria is addee. All units for lengths and areas are in km and sq. km, respectively; orientation is in radians. area_under (as named in the Matlab script) is the registration "floe mismatch" (sometimes clamped to 0 if a certain threshold is met); corr is the psi-s correlation. They are computed between the floes in the current row and the next. Note that these values are missing for the last floe in each group ID.

6×14 DataFrame
RowIDpasstimeareaconvex_areamajor_axis_lengthminor_axis_lengthorientationperimeterlatitudelongitudexyarea_undercorr
Int64DateTimeFloat64Float64Float64Float64Float64Float64Float64Float64Float64Float64Float64?Float64?
112022-09-14T12:44:4931.721941.74978.853116.2270.60717228.544566.4384-173.711.20753e6-1.68165e60.00.0102782
212022-09-14T13:59:1927.396237.35858.369516.027030.56640527.308470.5095-153.6411.20779e6-1.68216e60.00.0104143
312022-09-15T12:44:4931.721941.74978.481166.455380.47966428.756671.483-131.1671.20574e6-1.68088e6missingmissing
422022-09-14T12:44:4984.6792101.52320.82345.61064-0.31688848.922466.5149-173.7251.19448e6-1.67628e60.00.00823861
522022-09-14T13:59:1977.076494.510320.52665.27752-0.34092347.898371.4251-127.6121.19499e6-1.67704e60.00.0126095
622022-09-15T12:44:4984.6136102.44121.08725.65186-0.35811449.434471.5446-131.0221.19268e6-1.67576e6missingmissing

The other 'goodness of fit' metrics are being excluded from the output as they can be easily computed from the inputs. I was thinking that the same is true for centroid distances (thus not included above). Should they? Any further thoughts? Thanks!

@danielmwatkins
Copy link
Contributor

danielmwatkins commented Nov 6, 2023 via email

@cpaniaguam
Copy link
Member Author

The column as listed is actual 1 - correlation, is it not? If so, we should convert it to correlation (so the first row would be ~0.99 instead of 0.01) since in the Lopez-Acosta paper psi-s correlation is described with large values being a better match. For area_under, that's the total area of mismatch isn't it? Like, a 0 means that after rotation, the floes line up perfectly? If so, instead of calling it "area_under" we could call it "area_mismatch". Thoughts?

@danielmwatkins
I think those are very sensible choices; I will implement these changes. I now have some real test data I think we could use to thoroughly test the tracker and these new features. Thanks again!

src/tracker/tracker.jl Outdated Show resolved Hide resolved
# rename uuid to ID
rename!(propsvert, :uuid => :ID)
# sort by uuid_0, passtime and keep unique rows
_pairs = DataFrames.sort!(_pairs, [:uuid_0, :passtime]) |> unique
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! That's a great way to just get rid of the extra rows

@@ -497,3 +497,58 @@ function addfloemasks!(props, imgs)
end
return nothing
end

## LatLon functions originally from IFTPipeline.jl
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will it be removed from ice-floe-tracker-pipeline? It looks like these were orginially in the h5.jl script in that repo.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

@tdivoll tdivoll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Maybe just update the comment about where these functions were originally and log an issue for removing from the other repo.

cpaniaguam added a commit to WilhelmusLab/ice-floe-tracker-pipeline that referenced this pull request Nov 27, 2023
Copy link
Collaborator

@tdivoll tdivoll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@cpaniaguam cpaniaguam merged commit 03eb811 into main Nov 28, 2023
4 checks passed
@cpaniaguam cpaniaguam deleted the 350-pairing-extra-feats branch November 28, 2023 18:37
@cpaniaguam cpaniaguam restored the 350-pairing-extra-feats branch November 28, 2023 20:52
@tdivoll tdivoll mentioned this pull request Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

pairing extra feats
3 participants