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

Sleep diary file format bug

alexwashburn1 opened this issue · comments

Hello,

When attempting to read in a sleep diary .ods file, the suggested format provided on the github tutorial page -
https://ghammad.github.io/pyActigraphy/pyActigraphy-Sleep-Diary.html - does not read in the file correctly, unless the following 3 things are corrected:

  1. The 'Type', 'Start', and 'End' columns must be capitalized to 'TYPE', 'START', and 'END'.
  2. For the 'TYPE' column, values 'Night/Nap/NoWear' all must be capitalized as well.
  3. A blank line (on row 2) needed to be inserted between the header line describing the subjectID and the line with the column names ('TYPE', 'START', and 'END').

Thank you!
Alex Washburn

Hello @alexwashburn1,

thank you for reporting these info. Indeed, the rendering of the sleep diary file format in the tutorial notebook is misleading.

If you want to use a sleep diary, I suggest to start from a copy of the example file used in the tutorial: https://github.com/ghammad/pyActigraphy/blob/master/pyActigraphy/tests/data/example_01_sleepdiary.ods

More generally, in the same GitHub folder, one could find examples for a sleep diary with an extra state or for the start-stop (SST) log (see corresponding tutorial).

Hope that helps.

Best regards,

Grégory

@alexwashburn1 : any update? Did you manage to create and read a sleep diary file?

@ghammad yes, thank you so much for your response and help. The sleep diary file is now reading fine!

@alexwashburn1 Excellent. Glad to know that it works for you. Closing the issue then but feel free to open a new one if needed.

@ghammad That sounds great. Thank you again.