pyActigraphy icon indicating copy to clipboard operation
pyActigraphy copied to clipboard

Pyactigrpahy native actigrpahy data CWA file

Open abdulhaleem21 opened this issue 1 year ago • 1 comments

Dear Gregory Hammad,

I am currently working on a sleep analysis project using open-source software. I was not able to find the library in Pyactigpahgy which can read the native file format of Axivity Ax6 (CWA format). could you please explain to me how we can process cwa file format within pyactigraphy.

Looking forward to hearing from you.

Kind Regards, Abdul Haleem

abdulhaleem21 avatar Nov 09 '23 09:11 abdulhaleem21

Hello @abdulhaleem21

Directly reading .cwa files in pyActigraphy is not supported. The reason is that those .cwa files need to be resampled, calibrated, etc... And there is already a fantastic package in python designed specifically to handle Axivity data: https://biobankaccanalysis.readthedocs.io/en/latest/index.html

By processing the .cwa files through this 'accelerometer' package, they will be converted into .csv files (timeSeries.csv.gz) that are ready for analysis. And pyActigraphy does read such files (see https://ghammad.github.io/pyActigraphy/_autosummary/pyActigraphy.io.read_raw_bba.html#pyActigraphy.io.read_raw_bba). Once the .csv file has been read by pyActigraphy, all the functionalities illustrated in the various tutorials are available.

Hope that helps.

Greg

ghammad avatar Nov 24 '23 08:11 ghammad