@@ -310,6 +310,16 @@ def _update_module_status(self, updated_module_status={}):
310
310
modules_status = json .load (f )
311
311
modules_status = {** modules_status , ** updated_module_status }
312
312
else :
313
+ # handle cases of processing rerun on different parameters (the hash changes)
314
+ # delete outdated files
315
+ outdated_files = [
316
+ f
317
+ for f in self ._json_directory .glob ("*" )
318
+ if f .is_file () and f .name != self ._module_input_json .name
319
+ ]
320
+ for f in outdated_files :
321
+ f .unlink ()
322
+
313
323
modules_status = {
314
324
module : {"start_time" : None , "completion_time" : None , "duration" : None }
315
325
for module in self ._modules
@@ -602,6 +612,16 @@ def _update_module_status(self, updated_module_status={}):
602
612
modules_status = json .load (f )
603
613
modules_status = {** modules_status , ** updated_module_status }
604
614
else :
615
+ # handle cases of processing rerun on different parameters (the hash changes)
616
+ # delete outdated files
617
+ outdated_files = [
618
+ f
619
+ for f in self ._json_directory .glob ("*" )
620
+ if f .is_file () and f .name != self ._module_input_json .name
621
+ ]
622
+ for f in outdated_files :
623
+ f .unlink ()
624
+
605
625
modules_status = {
606
626
module : {"start_time" : None , "completion_time" : None , "duration" : None }
607
627
for module in self ._modules
@@ -747,8 +767,8 @@ def _write_channel_map_file(
747
767
)
748
768
749
769
if is_0_based :
750
- channel_ind += 1
751
- shank_ind += 1
770
+ channel_ind = channel_ind + 1
771
+ shank_ind = shank_ind + 1
752
772
753
773
channel_count = len (channel_ind )
754
774
chanMap0ind = np .arange (0 , channel_count , dtype = "float64" )
@@ -757,8 +777,7 @@ def _write_channel_map_file(
757
777
758
778
# channels to exclude
759
779
mask = get_noise_channels (ap_band_file , channel_count , sample_rate , bit_volts )
760
- bad_channel_ind = np .where (mask is False )[0 ]
761
- connected [bad_channel_ind ] = 0
780
+ connected = np .where (mask is False , 0 , connected )
762
781
763
782
mdict = {
764
783
"chanMap" : chanMap ,
0 commit comments