-
Notifications
You must be signed in to change notification settings - Fork 8
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
Provide coordinates for both time
and frame
#117
Comments
What do y'all think @neuroinformatics-unit/behaviour @b-peri ? |
Both sounds like a good idea to me. |
I agree - having both would be super useful! |
After discussing at the team meeting today, we settled on the following course of action:
|
Great point, also useful for synchronising with other modalities. We should definitely provide a method for people to pass a vector of timestamps instead of fps. |
xarray supports dimensions with multiuple coordinate axes, but we'd have to carefully review the relevant terminilogy of dimension- vs non-dimension coordinates and indexed-vs non-indexed coordinates. Ideally we want both |
Is your feature request related to a problem? Please describe.
Currently in our
xarray.Dataset
we only have onetime
axis, the units of which may vary depending on whether the user has provided anfps
value or not. This is a bit confusing, the coords of that axis may be in seconds or in frames. We keep track of the units inDataset.attrs
, but it may still cause confusion.Describe the solution you'd like
We could have both coordinates systems -
frame
andtime
(in seconds) associated with the same axis/dimension. The user should be able to dods.sel(frame=10)
as well asds.sel(time=200)
. AFAIK this is supported byxarray
, see example implementation inxarray-video
.Describe alternatives you've considered
Alternatively we could alway require
fps
and only have thetime
coords in seconds. But even if we do that, it's still valuable to have bothtime
andframe
coords defined, as users might need one or the other, depending on the occasion.The text was updated successfully, but these errors were encountered: