@@ -747,11 +747,13 @@ def read_rhs(filename, file_format: str):
747747
748748 # Build a dictionary with channel count
749749 special_cases_for_counting = [
750- "DC Amplifier channel" , # Same as RHS2000 amplifier channel
751- "Stim channel" , # Same as RHS2000 amplifier channel
750+ "DC Amplifier channel" ,
751+ "Stim channel" ,
752752 ]
753753 names_to_count = [name for name in stream_names if name not in special_cases_for_counting ]
754754 channel_number_dict = {name : len (stream_name_to_channel_info_list [name ]) for name in names_to_count }
755+
756+ # Both DC Amplifier and Stim streams have the same number of channels as the amplifier stream
755757 channel_number_dict ["DC Amplifier channel" ] = channel_number_dict ["RHS2000 amplifier channel" ]
756758 channel_number_dict ["Stim channel" ] = channel_number_dict ["RHS2000 amplifier channel" ]
757759
@@ -1264,6 +1266,8 @@ def create_one_file_per_channel_dict_rhd(dirname):
12641266 raw_files_paths_dict: dict
12651267 A dict of all the file paths
12661268 """
1269+ # Developer note, at the moment, the channels require to be n in order
1270+ # See https://github.com/NeuralEnsemble/python-neo/issues/1599 fo
12671271
12681272 file_names = dirname .glob ("**/*.dat" )
12691273 files = [file for file in file_names if file .is_file ()]
@@ -1316,9 +1320,7 @@ def create_one_file_per_channel_dict_rhs(
13161320 sorted_stream_files = sorted (stream_files , key = file_path_to_channel_name )
13171321 raw_file_paths_dict [stream_name ] = sorted_stream_files
13181322
1319- # we need time to be the last value
13201323 raw_file_paths_dict ["timestamp" ] = [Path (dirname / "time.dat" )]
1321- # 10 and 11 are hardcoded in the rhs reader so hardcoded here
13221324 raw_file_paths_dict ["DC Amplifier channel" ] = [file for file in files if "dc-" in file .name ]
13231325 # we can find the files, but I can see how to read them out of header
13241326 # so for now we don't expose the stim files in one-file-per-channel
0 commit comments