Actiwatch Spectrum Pro: Add other than just white light information
annambiller opened this issue · comments
Anna M Biller commented
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
Grégory Hammad commented
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.
Grégory Hammad commented
Closing this issue as it has been solved.