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 11import subprocess
2+ import shutil
23import sys
34import pathlib
45import json
@@ -371,7 +372,15 @@ def generate_modules_input_json(self):
371372
372373 self ._module_input_json = self ._json_directory / f'{ self ._npx_input_dir .name } -input.json'
373374
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'
375384
376385 params = {}
377386 for k , v in self ._params .items ():
You can’t perform that action at this time.
0 commit comments