WilhelmusLab / IceFloeTracker.jl

Julia package for ice floe tracker
https://wilhelmuslab.github.io/IceFloeTracker.jl/
MIT License
1 stars 2 forks source link

350 pairing extra feats #352

Closed cpaniaguam closed 9 months ago

cpaniaguam commented 10 months ago

350 #339

codecov[bot] commented 10 months ago

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 :warning:
Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

cpaniaguam commented 10 months ago

@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 commented 10 months ago

Yes, along-track distance is easily calculated from the other columns. I think Float64 makes sense for area_under and corr as well, since we want to be able to have NaN for the last timestamp in a trajectory. For clarity, I wonder if we should make the names "area_under" and "corr" more descriptive. 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?

On Mon, Nov 6, 2023 at 11:38 AM Carlos Paniagua @.***> wrote:

@danielmwatkins https://github.com/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_lengthorientation perimeterlatitudelongitudexyarea_undercorr Int64DateTimeFloat64Float64Float64Float64Float64Float64Float64Float64 Float64Float64Float64?Float64? 1 1 2022-09-14T12:44:49 31.7219 41.7497 8.85311 6.227 0.607172 28.5445 66.4384 -173.71 1.20753e6 -1.68165e6 0.0 0.0102782 2 1 2022-09-14T13:59:19 27.3962 37.3585 8.36951 6.02703 0.566405 27.3084 70.5095 -153.641 1.20779e6 -1.68216e6 0.0 0.0104143 3 1 2022-09-15T12:44:49 31.7219 41.7497 8.48116 6.45538 0.479664 28.7566 71.483 -131.167 1.20574e6 -1.68088e6 missing missing 4 2 2022-09-14T12:44:49 84.6792 101.523 20.8234 5.61064 -0.316888 48.9224 66.5149 -173.725 1.19448e6 -1.67628e6 0.0 0.00823861 5 2 2022-09-14T13:59:19 77.0764 94.5103 20.5266 5.27752 -0.340923 47.8983 71.4251 -127.612 1.19499e6 -1.67704e6 0.0 0.0126095 6 2 2022-09-15T12:44:49 84.6136 102.441 21.0872 5.65186 -0.358114 49.4344 71.5446 -131.022 1.19268e6 -1.67576e6 missing missing

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!

— Reply to this email directly, view it on GitHub https://github.com/WilhelmusLab/IceFloeTracker.jl/pull/352#issuecomment-1795413668, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB6TAULEIGQMRQGQZXNNYQLYDEG7FAVCNFSM6AAAAAA65H5HPGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJVGQYTGNRWHA . You are receiving this because you were mentioned.Message ID: @.***>

cpaniaguam commented 10 months ago

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!