@@ -138,19 +138,19 @@ def auto_generate_entries(cls, session_key):
138138 Method to auto-generate ProbeInsertion entries for a particular session
139139 Probe information is inferred from the meta data found in the session data directory
140140 """
141- sess_dir = find_full_path (get_ephys_root_data_dir (),
141+ session_dir = find_full_path (get_ephys_root_data_dir (),
142142 get_session_directory (session_key ))
143143 # search session dir and determine acquisition software
144144 for ephys_pattern , ephys_acq_type in zip (['*.ap.meta' , '*.oebin' ],
145145 ['SpikeGLX' , 'Open Ephys' ]):
146- ephys_meta_filepaths = list (sess_dir .rglob (ephys_pattern ))
146+ ephys_meta_filepaths = list (session_dir .rglob (ephys_pattern ))
147147 if ephys_meta_filepaths :
148148 acq_software = ephys_acq_type
149149 break
150150 else :
151151 raise FileNotFoundError (
152152 f'Ephys recording data not found!'
153- f' Neither SpikeGLX nor Open Ephys recording files found in: { sess_dir } ' )
153+ f' Neither SpikeGLX nor Open Ephys recording files found in: { session_dir } ' )
154154
155155 probe_list , probe_insertion_list = [], []
156156 if acq_software == 'SpikeGLX' :
@@ -174,7 +174,7 @@ def auto_generate_entries(cls, session_key):
174174 'probe' : spikeglx_meta .probe_SN ,
175175 'insertion_number' : int (probe_number )})
176176 elif acq_software == 'Open Ephys' :
177- loaded_oe = openephys .OpenEphys (sess_dir )
177+ loaded_oe = openephys .OpenEphys (session_dir )
178178 for probe_idx , oe_probe in enumerate (loaded_oe .probes .values ()):
179179 probe_key = {'probe_type' : oe_probe .probe_model , 'probe' : oe_probe .probe_SN }
180180 if (probe_key ['probe' ] not in [p ['probe' ] for p in probe_list ]
@@ -512,15 +512,15 @@ def infer_output_dir(cls, key, relative=False, mkdir=False):
512512 e.g.: sub4/sess1/probe_2/kilosort2_0
513513 """
514514 processed_dir = pathlib .Path (get_processed_root_data_dir ())
515- sess_dir = find_full_path (get_ephys_root_data_dir (),
515+ session_dir = find_full_path (get_ephys_root_data_dir (),
516516 get_session_directory (key ))
517- root_dir = find_root_directory (get_ephys_root_data_dir (), sess_dir )
517+ root_dir = find_root_directory (get_ephys_root_data_dir (), session_dir )
518518
519519 method = (ClusteringParamSet * ClusteringMethod & key ).fetch1 (
520520 'clustering_method' ).replace ("." , "-" )
521521
522522 output_dir = (processed_dir
523- / sess_dir .relative_to (root_dir )
523+ / session_dir .relative_to (root_dir )
524524 / f'probe_{ key ["insertion_number" ]} '
525525 / f'{ method } _{ key ["paramset_idx" ]} ' )
526526
@@ -912,9 +912,9 @@ def get_spikeglx_meta_filepath(ephys_recording_key):
912912def get_openephys_probe_data (ephys_recording_key ):
913913 inserted_probe_serial_number = (ProbeInsertion * probe .Probe
914914 & ephys_recording_key ).fetch1 ('probe' )
915- sess_dir = find_full_path (get_ephys_root_data_dir (),
915+ session_dir = find_full_path (get_ephys_root_data_dir (),
916916 get_session_directory (ephys_recording_key ))
917- loaded_oe = openephys .OpenEphys (sess_dir )
917+ loaded_oe = openephys .OpenEphys (session_dir )
918918 return loaded_oe .probes [inserted_probe_serial_number ]
919919
920920
0 commit comments