pyActigraphy icon indicating copy to clipboard operation
pyActigraphy copied to clipboard

Actiwatch Spectrum Pro: Add other than just white light information

Open annambiller opened this issue 3 years ago • 1 comments

Dear Grégory,

as discussed today, reading raw Actitwtach Spectrum Pro files into pyActi only allows to view the white light data (command raw.light) even though the device collected other light colours, too. Could you add them so they're also accessible through the "raw.light" command or similar?

Thank you! Best Anna

annambiller avatar Jan 24 '22 20:01 annambiller

Hello @annambiller

I just finished to add accessors to the red, blue and green light for RPX Spectrum Pro devices.

As usual, light data can be accessed through:

import os
import pyActigraphy
fpath_test = os.path.join(os.path.dirname(pyActigraphy.__file__),'tests/data/')
raw = pyActigraphy.io.read_raw_rpx(
    fpath_test+'test_sample_rpx_ger_with_light.csv',
    language='GER',delimiter=',',decimal=','
)
# Access to white light:
raw.white_light
# Access to red light:
raw.red_light
# Access to blue light:
raw.blue_light
# Access to green light:
raw.green_light
# Access to all light:
raw.light  # this gives you access to a pandas.DataFrame containing all the light channels.

Hope that helps.

Happy actigraphing.

ghammad avatar Apr 20 '22 14:04 ghammad

Closing this issue as it has been solved.

ghammad avatar Dec 01 '22 16:12 ghammad