pyActigraphy.io.BaseRaw.read_sleep_diary

BaseRaw.read_sleep_diary(input_fname, header_size=2, state_index={'ACTIVE': 2, 'NAP': 1, 'NIGHT': 0, 'NOWEAR': -1}, state_colour={'NAP': '#7bc043', 'NIGHT': '#d3d3d3', 'NOWEAR': '#ee4035'})[source]

Reader function for sleep diaries.

Parameters
  • input_fname (str) – Path to the sleep diary file.

  • header_size (int) – Header size (i.e. number of lines) of the sleep diary. Default is 2.

  • state_index (dict) – The dictionnary of state’s indices. Default is ACTIVE=2, NAP=1, NIGHT=0, NOWEAR=-1.

  • state_color (dict) – The dictionnary of state’s colours. Default is NAP=’#7bc043’, NIGHT=’#d3d3d3’, NOWEAR=’#ee4035’.