ghammad / pyActigraphy

Python-based open source package for actigraphy data analysis

Home Page:https://ghammad.github.io/pyActigraphy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Automatic start time detection

ghammad opened this issue · comments

New function "estimate_start_time()" would return an estimate of the start time. Would be useful when the recording starts before the participant actually wears the device.

Companion function from the RawReader class: create_sst_log(). Would create a SST log file filled with the start time estimates for all the raw files.

Hi! Thanks so much for this package - could you walk me through how to get the create_sst_log() function working, do I need to specify a path to store the file? tried it a few different ways and its kicking back NameError: name 'create_sst_log' is not defined, getting an attribute error when I try it other ways. I also can't find that function in the source code.

@ChronoKatie : this issue is labelled as "enhancement", meaning that it is on my "wish list" for the package.
The idea is to implement a method to estimate, roughly, the start time, and create a set log with these estimates, that can be refined later on by the user after visual inspection.

However, one could imagine that, while this estimation method is missing, the function returns a blank file with the ID of the files read by the batch reader. Is it what you are looking for?

Otherwise, in the meantime, you can follow these instructions here and use the template included in the package.

Let me know if you still face any issue.

Good luck with your analysis.

Ahh ok, thank you! My issue is that I have ALOT of actigraphy files, so even just creating the SST log has been a mammoth task. I just pasted in data from raw.start_time() output, then added 5 days to create the stop time column data, that way I have an even number of days across all participants for the non-parametric functions.

A function to automatically create an SST file which you can then go into to make changes to start/stop times would be excellent.

Hello @ChronoKatie

Thank you for the suggestion. Indeed, that would be helpful!

I know that for large datasets, it is a enormous task. But, just to convince yourself about the necessity of such a work, do calculate at least once your metric of interest with and without the SST log applied...

Good luck with your analysis and keep us posted!