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

Feat(tracker): add rotation calculations #232

Draft
wants to merge 52 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
08e7204
fix(tracker): re-include masks in csv output
hollandjg Mar 10, 2025
31cb081
feat: add csv joiner utility
hollandjg Mar 10, 2025
b75bfc0
Merge branch 'main' into feat(tracker)--add-rotation-calculations
hollandjg Mar 10, 2025
7fa6d8b
remove psi column again
hollandjg Mar 10, 2025
5540838
feat(cli): add get_rotation_single command to cli
hollandjg Mar 10, 2025
a5c51cc
feat(csvjoin): add support for joining on ISO8601 timestamps
hollandjg Mar 12, 2025
e869919
feat(cli): add stub of rotations function
hollandjg Mar 12, 2025
9180765
test(cli): add test file for tracked floes with a satellite column
hollandjg Mar 12, 2025
d1bbb2e
feat(csvjoin): add support for different left and right columns
hollandjg Mar 12, 2025
73cf648
feat(workflow): add support for rotation task
hollandjg Mar 12, 2025
2a26614
add parsing of mask field
hollandjg Mar 12, 2025
aa31ca6
feat(rotation): add calculation of a single example rotation
hollandjg Mar 12, 2025
ed5be22
feat(rotation): output results for all rows in the input table
hollandjg Mar 12, 2025
eb53591
feat(rotation): add support for radians, degrees, and angular speeds …
hollandjg Mar 12, 2025
20df957
chore(rotation): add dependencies
hollandjg Mar 12, 2025
b27bc8f
fix(workflow): update syntax for csvjoin and get_rotation_single scripts
hollandjg Mar 12, 2025
ae26884
chore: add missing whitespace
hollandjg Mar 12, 2025
21f51a8
test(rotation): update path to tracked file
hollandjg Mar 12, 2025
945790a
test(rotation): add synthetic rotation example
hollandjg Mar 12, 2025
43e9501
test(rotation): add shorter test case
hollandjg Mar 12, 2025
f35b67f
test(rotation): add test-rotate file
hollandjg Mar 12, 2025
68176b0
chore: export get_rotation_single
hollandjg Mar 12, 2025
6f79737
test: fix function calls
hollandjg Mar 12, 2025
99423f9
test(rotation): correct df index
hollandjg Mar 12, 2025
d74f833
test: rename test files
hollandjg Mar 12, 2025
958bc98
rename rotation test set
hollandjg Mar 12, 2025
4fdd6bc
refactor(rotation): change results calculation into a list comprehension
hollandjg Mar 13, 2025
1900c2c
feat(rotation): convert time differences using Dates objects
hollandjg Mar 13, 2025
7d23449
Revert "refactor(rotation): change results calculation into a list co…
hollandjg Mar 13, 2025
7892667
refactor(rotation): update name of delta time column
hollandjg Mar 13, 2025
559a45e
docs(rotation): add docstring
hollandjg Mar 13, 2025
f6f8ce2
refactor(rotations): rename variables
hollandjg Mar 13, 2025
111610d
docs(rotation): update docstring
hollandjg Mar 13, 2025
0bbe296
docs(rotation): add comment on append
hollandjg Mar 13, 2025
edd8290
downgrade required dates
hollandjg Mar 13, 2025
c817c49
refactor(rotation): split get_rotation_measurement into simpler funct…
hollandjg Mar 13, 2025
a1c374f
remove single-line function for calculating rotation mismatch
hollandjg Mar 13, 2025
356dbea
refactor(rotation): split rotation function again for testing
hollandjg Mar 13, 2025
b638198
test(rotation): add testcases with less symmetric object
hollandjg Mar 13, 2025
8701a5f
test(rotation): update testing function
hollandjg Mar 13, 2025
00b0626
refactor(rotations): update the rotation function
hollandjg Mar 13, 2025
1a9218e
teat(rotation): add some more testcases with larger images
hollandjg Mar 14, 2025
6a36eea
chore: include LinearAlgebra dependency
hollandjg Mar 14, 2025
07d9509
test(rotation): update testcases to allow some to fail
hollandjg Mar 14, 2025
b580de5
test(rotation): add note on target fraction
hollandjg Mar 14, 2025
4418360
test: add LinearAlgebra dependency
hollandjg Mar 14, 2025
b44c7fd
test: update target correctness
hollandjg Mar 14, 2025
1eed181
test(rotation): remove test weakening
hollandjg Mar 14, 2025
220af60
feat(h5export): add support for zoned date times
hollandjg Mar 17, 2025
539ce51
feat(tracker): add support for zoned date-times
hollandjg Mar 17, 2025
2b77641
refactor(workflow): remove "Z" truncation on timestamps
hollandjg Mar 17, 2025
be035cc
fix(python): remove early instantiate call
hollandjg Mar 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
docs(rotation): add docstring
hollandjg committed Mar 13, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 559a45e323a56e76772448339613e2b6ff20fde6
28 changes: 28 additions & 0 deletions IFTPipeline.jl/src/rotations.jl
Original file line number Diff line number Diff line change
@@ -3,7 +3,35 @@ using TimeZones
using Dates

"""
get_rotation_single(
input::String,
output::String,
)
Make a CSV of pairwise rotations between floes detected on adjacent days.
Loads the floes from the `input` CSV file, and uses the columns:
- `floe` ID
- `satellite` name
- `mask` – the binary mask
- `overpass time` in ISO8601 format (with trailing Z or +00:00), e.g. 2022-09-11T09:21:00+00:00
- `date` of the overpass in YYYY-MM-DD format
Returns a CSV with one row per floe comparison.
In the following, `i=1` means the earlier observation, `i=2` the later.
Columns returned:
- `ID` of the floe
- Angle measures `theta_<deg,rad>` – angle between floe image in degrees or radians
- Time measurements:
- `delta_time_sec` – number of seconds between overpass in the two measurements
- `omega_<deg,rad>_per_<sec,hour,day>` – mean angular velocity of rotation in degrees or radians per second hour or day.
- Metadata
- `satellite<i>` – which satellite measurement `i` was from
- `date<i>` – which date measurement `i` was taken
- `datetime<i>` – which UTC time measurement `i`'s overpass occurred
- Original data
- `mask<i>` – the binary mask used for the measurement
"""
function get_rotation_single(; input::String, output::String)
input_df = DataFrame(CSV.File(input))