@@ -351,16 +351,23 @@ def read_rhd(filename):
351
351
chan_info ['gain' ] = 0.0003125
352
352
chan_info ['offset' ] = - 32768 * 0.0003125
353
353
ordered_channels .append (chan_info )
354
- data_dtype [3 ]+= [(name ,'uint16' , BLOCK_SIZE )]
354
+ data_dtype [3 ] += [(name ,'uint16' , BLOCK_SIZE )]
355
355
356
356
# 4: USB board digital input channel stored in digitalin.dat/board-DIGITAL-IN-*
357
357
# 5: USB board digital output channel stored in digitalout.dat/board-DIGITAL-OUT-*
358
358
for sig_type in [4 , 5 ]:
359
- # at the moment theses channel are not in sig channel list
360
- # but they are in the raw memamp
359
+ # User can obtain digital channels from analog_signal_chunk and then process
360
+ # them themself
361
361
if len (channels_by_type [sig_type ]) > 0 :
362
362
name = {4 : 'DIGITAL-IN' , 5 : 'DIGITAL-OUT' }[sig_type ]
363
- data_dtype [sig_type ] += [(name ,'uint16' , BLOCK_SIZE )]
363
+ chan_info = channels_by_type [sig_type ][0 ]
364
+ chan_info ['native_channel_name' ] = name # overwite to allow memmap to work
365
+ chan_info ['sampling_rate' ] = sr
366
+ chan_info ['units' ] = 'TTL' # arbitrary units so I did TTL for the logic
367
+ chan_info ['gain' ] = 1.0
368
+ chan_info ['offset' ] = 0.0
369
+ ordered_channels .append (chan_info )
370
+ data_dtype [sig_type ] += [(name , 'uint16' , BLOCK_SIZE )]
364
371
365
372
if bool (global_info ['notch_filter_mode' ]) and version >= V ('3.0' ):
366
373
global_info ['notch_filter_applied' ] = True
0 commit comments