File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
element_array_ephys/readers Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 1
1
import subprocess
2
+ import shutil
2
3
import sys
3
4
import pathlib
4
5
import json
@@ -371,7 +372,15 @@ def generate_modules_input_json(self):
371
372
372
373
self ._module_input_json = self ._json_directory / f'{ self ._npx_input_dir .name } -input.json'
373
374
374
- continuous_file = self ._npx_input_dir / 'continuous.dat'
375
+ if 'median_subtraction' in self ._modules :
376
+ # median subtraction step will overwrite original continuous.dat file with the corrected version
377
+ # to preserve the original raw data - make a copy here and work on the copied version
378
+ assert 'depth_estimation' in self ._modules
379
+ raw_ap_fp = self ._npx_input_dir / 'continuous.dat'
380
+ continuous_file = self ._npx_input_dir / 'preproc_continuous.dat'
381
+ shutil .copy2 (raw_ap_fp , continuous_file )
382
+ else :
383
+ continuous_file = self ._npx_input_dir / 'continuous.dat'
375
384
376
385
params = {}
377
386
for k , v in self ._params .items ():
You can’t perform that action at this time.
0 commit comments