File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -355,7 +355,7 @@ def add_raw_ephys(
355355 electrode_row_indices : list
356356 which electrodes to add to table
357357 metadata : dict, optional
358- metadata dictionary, useed only for conversion if not in rec, by default None
358+ metadata dictionary, used only for conversion if not in rec, by default None
359359 """
360360
361361 electrode_table_region = nwbfile .create_electrode_table_region (
@@ -377,10 +377,13 @@ def add_raw_ephys(
377377 ) # Use metadata-provided conversion if not available in rec file
378378
379379 # read metadata
380- if "save_as_microvolts" in metadata :
381- save_as_microvolts = metadata ["save_as_microvolts" ]
382- else :
380+ if metadata is None :
383381 save_as_microvolts = True
382+ else :
383+ if "save_as_microvolts" in metadata :
384+ save_as_microvolts = metadata ["save_as_microvolts" ]
385+ else :
386+ save_as_microvolts = True
384387
385388 # make the data iterator
386389 rec_dci = RecFileDataChunkIterator (
You can’t perform that action at this time.
0 commit comments