Skip to content

Commit

Permalink
bugfix in infer_output_dir
Browse files Browse the repository at this point in the history
  • Loading branch information
Thinh Nguyen committed Sep 6, 2023
1 parent 350deef commit e13146f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 15 deletions.
6 changes: 1 addition & 5 deletions element_calcium_imaging/imaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,13 +254,9 @@ def infer_output_dir(cls, key, relative=False, mkdir=False):
e.g.: sub4/sess1/scan0/suite2p_0
"""
acq_software = (scan.Scan & key).fetch1("acq_software")
filetypes = dict(
ScanImage="*.tif", Scanbox="*.sbx", NIS="*.nd2", PrairieView="*.tif"
)

scan_dir = find_full_path(
get_imaging_root_data_dir(),
get_calcium_imaging_files(key, filetypes[acq_software])[0],
get_calcium_imaging_files(key, acq_software)[0],
).parent
root_dir = find_root_directory(get_imaging_root_data_dir(), scan_dir)

Expand Down
6 changes: 1 addition & 5 deletions element_calcium_imaging/imaging_no_curation.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,13 +254,9 @@ def infer_output_dir(cls, key, relative=False, mkdir=False):
e.g.: sub4/sess1/scan0/suite2p_0
"""
acq_software = (scan.Scan & key).fetch1("acq_software")
filetypes = dict(
ScanImage="*.tif", Scanbox="*.sbx", NIS="*.nd2", PrairieView="*.tif"
)

scan_dir = find_full_path(
get_imaging_root_data_dir(),
get_calcium_imaging_files(key, filetypes[acq_software])[0],
get_calcium_imaging_files(key, acq_software)[0],
).parent
root_dir = find_root_directory(get_imaging_root_data_dir(), scan_dir)

Expand Down
6 changes: 1 addition & 5 deletions element_calcium_imaging/imaging_preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,13 +444,9 @@ def infer_output_dir(cls, key, relative=False, mkdir=False):
e.g.: sub4/sess1/scan0/suite2p_0
"""
acq_software = (scan.Scan & key).fetch1("acq_software")
filetypes = dict(
ScanImage="*.tif", Scanbox="*.sbx", NIS="*.nd2", PrairieView="*.tif"
)

scan_dir = find_full_path(
get_imaging_root_data_dir(),
get_calcium_imaging_files(key, filetypes[acq_software])[0],
get_calcium_imaging_files(key, acq_software)[0],
).parent
root_dir = find_root_directory(get_imaging_root_data_dir(), scan_dir)

Expand Down

0 comments on commit e13146f

Please sign in to comment.