-
Notifications
You must be signed in to change notification settings - Fork 2
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
hollandjg
wants to merge
52
commits into
main
Choose a base branch
from
feat(tracker)--add-rotation-calculations
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,566
−13
Draft
Changes from all commits
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 31cb081
feat: add csv joiner utility
hollandjg b75bfc0
Merge branch 'main' into feat(tracker)--add-rotation-calculations
hollandjg 7fa6d8b
remove psi column again
hollandjg 5540838
feat(cli): add get_rotation_single command to cli
hollandjg a5c51cc
feat(csvjoin): add support for joining on ISO8601 timestamps
hollandjg e869919
feat(cli): add stub of rotations function
hollandjg 9180765
test(cli): add test file for tracked floes with a satellite column
hollandjg d1bbb2e
feat(csvjoin): add support for different left and right columns
hollandjg 73cf648
feat(workflow): add support for rotation task
hollandjg 2a26614
add parsing of mask field
hollandjg aa31ca6
feat(rotation): add calculation of a single example rotation
hollandjg ed5be22
feat(rotation): output results for all rows in the input table
hollandjg eb53591
feat(rotation): add support for radians, degrees, and angular speeds …
hollandjg 20df957
chore(rotation): add dependencies
hollandjg b27bc8f
fix(workflow): update syntax for csvjoin and get_rotation_single scripts
hollandjg ae26884
chore: add missing whitespace
hollandjg 21f51a8
test(rotation): update path to tracked file
hollandjg 945790a
test(rotation): add synthetic rotation example
hollandjg 43e9501
test(rotation): add shorter test case
hollandjg f35b67f
test(rotation): add test-rotate file
hollandjg 68176b0
chore: export get_rotation_single
hollandjg 6f79737
test: fix function calls
hollandjg 99423f9
test(rotation): correct df index
hollandjg d74f833
test: rename test files
hollandjg 958bc98
rename rotation test set
hollandjg 4fdd6bc
refactor(rotation): change results calculation into a list comprehension
hollandjg 1900c2c
feat(rotation): convert time differences using Dates objects
hollandjg 7d23449
Revert "refactor(rotation): change results calculation into a list co…
hollandjg 7892667
refactor(rotation): update name of delta time column
hollandjg 559a45e
docs(rotation): add docstring
hollandjg f6f8ce2
refactor(rotations): rename variables
hollandjg 111610d
docs(rotation): update docstring
hollandjg 0bbe296
docs(rotation): add comment on append
hollandjg edd8290
downgrade required dates
hollandjg c817c49
refactor(rotation): split get_rotation_measurement into simpler funct…
hollandjg a1c374f
remove single-line function for calculating rotation mismatch
hollandjg 356dbea
refactor(rotation): split rotation function again for testing
hollandjg b638198
test(rotation): add testcases with less symmetric object
hollandjg 8701a5f
test(rotation): update testing function
hollandjg 00b0626
refactor(rotations): update the rotation function
hollandjg 1a9218e
teat(rotation): add some more testcases with larger images
hollandjg 6a36eea
chore: include LinearAlgebra dependency
hollandjg 07d9509
test(rotation): update testcases to allow some to fail
hollandjg b580de5
test(rotation): add note on target fraction
hollandjg 4418360
test: add LinearAlgebra dependency
hollandjg b44c7fd
test: update target correctness
hollandjg 1eed181
test(rotation): remove test weakening
hollandjg 220af60
feat(h5export): add support for zoned date times
hollandjg 539ce51
feat(tracker): add support for zoned date-times
hollandjg 2b77641
refactor(workflow): remove "Z" truncation on timestamps
hollandjg be035cc
fix(python): remove early instantiate call
hollandjg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
using DataFrames | ||
using TimeZones | ||
using Dates | ||
using CSV | ||
|
||
# Base.tryparse(::Type{ZonedDateTime}, str) = ZonedDateTime | ||
# default_format(::Type{ZonedDateTime}) = Format("yyyy-mm-dd\\THH:MM:SS.sZ") | ||
|
||
""" | ||
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 (choose a column using argument `mask_column`) | ||
- `passtime` in ISO8601 format (with trailing Z or +00:00), e.g. 2022-09-11T09:21:00+00:00 (choose a column using argument `time_column`) | ||
- `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, mask_column=:mask, time_column=:passtime | ||
) | ||
input_df = DataFrame(CSV.File(input)) | ||
|
||
input_df[!, mask_column] = eval.(Meta.parse.(input_df[:, mask_column])) | ||
input_df[!, time_column] = ZonedDateTime.(input_df[:, time_column]) | ||
|
||
results = [] | ||
for row in eachrow(input_df) | ||
append!( # adds the 0 – n measurements from `get_rotation_measurements` to the results array | ||
results, | ||
get_rotation_measurements( | ||
row, input_df; mask_column=mask_column, time_column=time_column | ||
), | ||
) | ||
end | ||
results_df = DataFrame(results) | ||
@info results_df | ||
|
||
FileIO.save(output, results_df) | ||
return results_df | ||
end | ||
|
||
function get_rotation_measurements( | ||
measurement::DataFrameRow, df::DataFrame; mask_column, time_column | ||
) | ||
filtered_df = subset( | ||
df, | ||
:ID => ByRow(==(measurement[:ID])), | ||
:date => ByRow(==(measurement[:date] - Dates.Day(1))), | ||
) | ||
|
||
results = [ | ||
get_rotation_measurements( | ||
earlier_measurement, measurement; mask_column, time_column | ||
) for earlier_measurement in eachrow(filtered_df) | ||
] | ||
|
||
return results | ||
end | ||
|
||
function get_rotation_measurements( | ||
row1::DataFrameRow, row2::DataFrameRow; mask_column, time_column | ||
) | ||
theta_rad = get_rotation(row1[mask_column], row2[mask_column]) | ||
theta_deg = rad2deg(theta_rad) | ||
|
||
dt = row2[time_column] - row1[time_column] | ||
dt_sec = dt / Dates.Second(1) | ||
dt_hour = dt / Dates.Hour(1) | ||
dt_day = dt / Dates.Day(1) | ||
|
||
omega_deg_per_sec = (theta_deg) / (dt_sec) | ||
omega_deg_per_hour = (theta_deg) / (dt_hour) | ||
omega_deg_per_day = (theta_deg) / (dt_day) | ||
|
||
omega_rad_per_sec = (theta_rad) / (dt_sec) | ||
omega_rad_per_hour = (theta_rad) / (dt_hour) | ||
omega_rad_per_day = (theta_rad) / (dt_day) | ||
|
||
return ( | ||
ID=row1.ID, | ||
theta_deg, | ||
theta_rad, | ||
delta_time_sec=dt_sec, | ||
omega_deg_per_sec, | ||
omega_deg_per_hour, | ||
omega_deg_per_day, | ||
omega_rad_per_sec, | ||
omega_rad_per_hour, | ||
omega_rad_per_day, | ||
satellite1=row1.satellite, | ||
satellite2=row2.satellite, | ||
date1=row1.date, | ||
date2=row2.date, | ||
datetime1=row1[time_column], | ||
datetime2=row2[time_column], | ||
mask1=row1[mask_column], | ||
mask2=row2[mask_column], | ||
) | ||
end | ||
|
||
""" | ||
Get the angle in radians to rotate mask1 to mask2. | ||
""" | ||
function get_rotation( | ||
mask1, mask2; mxshift::Tuple{Int64,Int64}=(100, 100), mxrot::Float64=Float64(pi) | ||
) | ||
affine_map, _ = IceFloeTracker.Register.RegisterQD.qd_rigid( | ||
IceFloeTracker.centered(mask1), | ||
IceFloeTracker.centered(mask2), | ||
mxshift, | ||
mxrot; | ||
print_interval=typemax(Int), | ||
) | ||
linear_map = affine_map.linear | ||
cosθ = linear_map[1, 1] | ||
sinθ = linear_map[2, 1] | ||
θ = atan(sinθ, cosθ) | ||
return θ | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
58 changes: 58 additions & 0 deletions
58
IFTPipeline.jl/test/test_inputs/rotation/floes.tracked.normal.csv
Large diffs are not rendered by default.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
IFTPipeline.jl/test/test_inputs/rotation/floes.tracked.short.csv
Large diffs are not rendered by default.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
IFTPipeline.jl/test/test_inputs/rotation/floes.tracked.synthetic.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
ID,satellite,passtime,date,mask | ||
1,terra,2020-01-01T12:00:00Z,2020-01-01,Bool[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] | ||
1,terra,2020-01-02T12:00:00Z,2020-01-02,Bool[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] | ||
1,terra,2020-01-03T12:00:00Z,2020-01-03,Bool[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] | ||
1,terra,2020-01-04T12:00:00Z,2020-01-04,Bool[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] | ||
1,terra,2020-01-05T12:00:00Z,2020-01-05,Bool[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] | ||
1,terra,2020-01-06T12:00:00Z,2020-01-06,Bool[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] | ||
1,terra,2020-01-06T12:00:00Z,2020-01-06,Bool[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0; 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0; 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0; 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0; 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0; 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.nox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
*.py,cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
cover/ | ||
|
||
|
||
# pyenv | ||
# For a library or package, you might want to ignore these files since the code is | ||
# intended to run in multiple environments; otherwise, check them in: | ||
# .python-version | ||
|
||
# pipenv | ||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. | ||
# However, in case of collaboration, if having platform-specific dependencies or dependencies | ||
# having no cross-platform support, pipenv may install dependencies that don't work, or not | ||
# install all needed dependencies. | ||
#Pipfile.lock | ||
|
||
# UV | ||
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control. | ||
# This is especially recommended for binary packages to ensure reproducibility, and is more | ||
# commonly ignored for libraries. | ||
#uv.lock | ||
|
||
# pdm | ||
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. | ||
#pdm.lock | ||
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it | ||
# in version control. | ||
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control | ||
.pdm.toml | ||
.pdm-python | ||
.pdm-build/ | ||
|
||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm | ||
__pypackages__/ | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# mypy | ||
.mypy_cache/ | ||
.dmypy.json | ||
dmypy.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# csvjoin | ||
|
||
The joiner combines two csv files using a simple join. | ||
|
||
## Run the code | ||
|
||
You can run the local version of the code from this directory by calling | ||
```bash | ||
pipx run . csvjoin | ||
``` | ||
|
||
You can run the code anywhere by calling: | ||
```bash | ||
pipx run --spec "git+https://github.com/wilhelmuslab/ice-floe-tracker-pipeline#egg=csvjoin&subdirectory=csvjoin" csvjoin | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/usr/bin/env python3.11 | ||
"""Utility to join two csv files.""" | ||
|
||
from enum import Enum | ||
from functools import partial | ||
import pathlib | ||
from typing import Annotated | ||
|
||
import pandas | ||
import typer | ||
|
||
app = typer.Typer() | ||
|
||
|
||
class HOW(str, Enum): | ||
left = "left" | ||
right = "right" | ||
outer = "outer" | ||
inner = "inner" | ||
cross = "cross" | ||
|
||
|
||
@app.command() | ||
def main( | ||
left: Annotated[pathlib.Path, typer.Argument(help="path to left csv file")], | ||
left_on: Annotated[str, typer.Argument(help="column on which to join")], | ||
right: Annotated[pathlib.Path, typer.Argument(help="path to right csv file")], | ||
right_on: Annotated[str, typer.Argument(help="column on which to join")], | ||
output: Annotated[pathlib.Path, typer.Argument(help="path to output csv file")], | ||
how: Annotated[HOW, typer.Option(help="type of join")] = HOW.left, | ||
on_is_utc: Annotated[ | ||
bool, typer.Option(help="`on` is a datetime which should be treated as UTC") | ||
] = False, | ||
): | ||
"""Join two csv files.""" | ||
left_df = read_df(path=left, index_col=left_on, on_is_utc=on_is_utc) | ||
right_df = read_df(path=right, index_col=right_on, on_is_utc=on_is_utc) | ||
output_df = left_df.join(right_df, how=how.value) | ||
output_df.to_csv(output, date_format="%Y-%m-%dT%H:%M:%SZ") | ||
|
||
def read_df(path, index_col, on_is_utc=False): | ||
read_kwargs = dict(index_col=index_col) | ||
if on_is_utc: | ||
read_kwargs["converters"] = {index_col: partial(pandas.to_datetime, utc=True)} | ||
df = pandas.read_csv(path, **read_kwargs) | ||
return df | ||
|
||
if __name__ == "__main__": | ||
app() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[project] | ||
name = "csvjoin" | ||
version = "0.1.0" | ||
description = "Utility to join two csv files." | ||
requires-python = ">=3.10" | ||
authors = [{ name = "John G. Holland", email = "john_holland1@brown.edu" }] | ||
|
||
|
||
classifiers = [ | ||
"Development Status :: 3 - Alpha", | ||
"Intended Audience :: Science/Research", | ||
"License :: OSI Approved :: MIT License", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Programming Language :: Python :: 3 :: Only", | ||
] | ||
|
||
dependencies = ["typer", "pandas"] | ||
|
||
[project.scripts] | ||
csvjoin = "csvjoin:app" | ||
|
||
[build-system] | ||
requires = ["setuptools>=43.0.0", "wheel", "hatchling"] | ||
build-backend = "hatchling.build" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
overpass time,measurement | ||
2022-09-14T08:12:55Z,dogs | ||
2022-09-14T13:02:42Z,cats | ||
2022-09-15T08:55:28Z,dogs | ||
2022-09-15T12:07:34Z,cats | ||
2022-09-14T08:12:55Z,moose | ||
2022-09-14T13:02:42Z,moose | ||
2022-09-15T08:55:28Z,moose | ||
2022-09-15T12:07:34Z,moose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
overpass time,measurement | ||
2022-09-14T08:12:55,dogs | ||
2022-09-14T13:02:42,cats | ||
2022-09-15T08:55:28,dogs | ||
2022-09-15T12:07:34,cats | ||
2022-09-14T08:12:55,moose | ||
2022-09-14T13:02:42,moose | ||
2022-09-15T08:55:28,moose | ||
2022-09-15T12:07:34,moose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
overpass time,measurement,date,satellite | ||
2022-09-14T08:12:55Z,dogs,2022-09-14,aqua | ||
2022-09-14T13:02:42Z,cats,2022-09-14,terra | ||
2022-09-15T08:55:28Z,dogs,2022-09-15,aqua | ||
2022-09-15T12:07:34Z,cats,2022-09-15,terra | ||
2022-09-14T08:12:55Z,moose,2022-09-14,aqua | ||
2022-09-14T13:02:42Z,moose,2022-09-14,terra | ||
2022-09-15T08:55:28Z,moose,2022-09-15,aqua | ||
2022-09-15T12:07:34Z,moose,2022-09-15,terra |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
date,satellite,overpass time | ||
2022-09-14,aqua,2022-09-14T08:12:55Z | ||
2022-09-14,terra,2022-09-14T13:02:42Z | ||
2022-09-15,aqua,2022-09-15T08:55:28Z | ||
2022-09-15,terra,2022-09-15T12:07:34Z |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
How does it handle it if the pass time doesn't have the Z? Perhaps assuming UTC and raising a warning would be appropriate.
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.
If the pass time doesn't have the Z or an explicit time zone, right now it should throw an error.
I think assuming UTC would be sensible, but right now the mechanism it's using to parse the values doesn't have an easy way to add that as a fallback. Could we add that as an issue and tackle it later?