-
Notifications
You must be signed in to change notification settings - Fork 4
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
Task: Reorganize readers #17
Comments
This will work for now but not forever - Many watches use .bin as the extension. |
Of course they do... @Asanto32 perhaps we want to omit the wrapper read function |
I can offer adding one to actfast that reads a few bytes and returns the type |
Ahh, I already started with something simple as follows, but I can remove it.
|
Also, this is what the reader for GGIR looks like, it seems the other watch with .bin is movisens? https://github.com/wadpac/GGIR/blob/master/R/g.readaccfile.R |
@ReinderVosDeWael @nx10 if I'm not mistaken the actfast readers only work with str. So if I use the wrapper above in |
Yeah so far they only work with string, but I will probably make them compatible with arrows filesystem abstraction then you can directly stream from stuff like S3 Either way just use actfast.read_x_y(str(path)) for now. |
I'm also open to move whatever wrapper you come up with to actfast eventually. PyO3 currently can't generate stubs (that's why actfast has no in-editor auto complete) so it would make sense to also ship a thin python layer. |
Yeah I concur with Florian here; you can take in a |
Just for reference from the GGIR docs:
( https://cran.r-project.org/web/packages/GGIR/vignettes/GGIR.html ) So it seems that GENEActiv, Movisens, Genea, and Axivity all use the .bin file extension for their different formats. Additionally ActiGraph .gt3x files are of course also just zip archives that contain a .bin file. |
Description
The readers need to be rewritten to account for the WatchData class changes and there should be a convenience reader function that selects the correct function based on file extension.
These should all be placed inside
wristpy/io/readers.py
.Tasks
pathlib.Path | str
.pathlib.Path | str
.read_watch_data
that takes the same input and output and selects the correct reader based on file extension or raises and error for unknown file extensions.Freeform Notes
No response
The text was updated successfully, but these errors were encountered: