@@ -110,16 +110,20 @@ def _add_channel_groups(self):
110110
111111class IntanSplitFilesRecordingExtractor (ConcatenateSegmentRecording , AppendSegmentRecording ):
112112 """
113- Class for reading Intan traditional format split files from a folder and concatenating them in temporal order.
113+ Class for reading Intan traditional format split files from a folder and
114+ concatenating/appending them in temporal order.
114115
115- Intan traditional format creates multiple files with time-based naming when recording for extended
116- periods. This class automatically sorts the files by filename and concatenates them
117- to create a continuous recording.
116+ Intan traditional format creates multiple files with time-based naming when recording
117+ for extended periods. This class automatically sorts the files by filename and concatenates
118+ them to create a continuous recording (monosegment) or appends them to a multisegment recording.
118119
119120 Parameters
120121 ----------
121122 folder_path : str or Path
122123 Path to the folder containing split Intan files (.rhd or .rhs extensions)
124+ mode : "concatenate" | "append": default: "concatenate"
125+ The determines whether to concatenate intan files to make a monosegment or to append them
126+ to make a multisegment recording
123127 stream_id : str, default: None
124128 If there are several streams, specify the stream id you want to load.
125129 stream_name : str, default: None
@@ -143,13 +147,20 @@ class IntanSplitFilesRecordingExtractor(ConcatenateSegmentRecording, AppendSegme
143147 def __init__ (
144148 self ,
145149 folder_path ,
146- mode : Literal ["append" | "concatenate" ] = "concatenate" ,
150+ mode : Literal ["append" , "concatenate" ] = "concatenate" ,
147151 stream_id = None ,
148152 stream_name = None ,
149153 all_annotations = False ,
150154 use_names_as_ids = False ,
151155 ignore_integrity_checks : bool = False ,
152156 ):
157+
158+ if mode not in ("append" , "concatenate" ):
159+ mode_error = (
160+ "Possible options for the `mode` argument are 'concatenate' or 'append', you have entered " f"{ mode } ."
161+ )
162+ raise ValueError (mode_error )
163+
153164 folder_path = Path (folder_path )
154165
155166 if not folder_path .exists () or not folder_path .is_dir ():
0 commit comments