|
15 | 15 | from tqdm import tqdm
|
16 | 16 | from uuid import uuid4
|
17 | 17 |
|
18 |
| -from ... import ephys |
| 18 | +#from ... import ephys |
19 | 19 |
|
20 |
| -# from workflow.pipeline import ephys |
| 20 | +from workflow.pipeline import ephys |
21 | 21 |
|
22 | 22 |
|
23 | 23 | class DecimalEncoder(json.JSONEncoder):
|
@@ -112,8 +112,12 @@ def add_electrodes_to_nwb(session_key: dict, nwbfile: pynwb.NWBFile):
|
112 | 112 | insertion_record = (ephys.InsertionLocation & this_probe).fetch1()
|
113 | 113 | if insertion_record:
|
114 | 114 | insert_location = json.dumps(
|
115 |
| - {k: v for k, v in insertion_record.items() if k not in ephys.InsertionLocation.primary_key}, |
116 |
| - cls=DecimalEncoder |
| 115 | + { |
| 116 | + k: v |
| 117 | + for k, v in insertion_record.items() |
| 118 | + if k not in ephys.InsertionLocation.primary_key |
| 119 | + }, |
| 120 | + cls=DecimalEncoder, |
117 | 121 | )
|
118 | 122 | else:
|
119 | 123 | insert_location = "unknown"
|
@@ -332,7 +336,9 @@ def add_ephys_recording_to_nwb(
|
332 | 336 | ):
|
333 | 337 | probe_id = (ephys.ProbeInsertion() & ephys_recording_record).fetch1("probe")
|
334 | 338 |
|
335 |
| - relative_path = (ephys.EphysRecording.EphysFile & ephys_recording_record).fetch1("file_path") |
| 339 | + relative_path = ( |
| 340 | + ephys.EphysRecording.EphysFile & ephys_recording_record |
| 341 | + ).fetch1("file_path") |
336 | 342 | file_path = ephys.find_full_path(get_ephys_root_data_dir(), relative_path)
|
337 | 343 |
|
338 | 344 | if ephys_recording_record["acq_software"] == "SpikeGLX":
|
@@ -457,7 +463,9 @@ def add_ephys_lfp_from_source_to_nwb(
|
457 | 463 | ):
|
458 | 464 | probe_id = (ephys.ProbeInsertion() & ephys_recording_record).fetch1("probe")
|
459 | 465 |
|
460 |
| - relative_path = (ephys.EphysRecording.EphysFile & ephys_recording_record).fetch1("file_path") |
| 466 | + relative_path = ( |
| 467 | + ephys.EphysRecording.EphysFile & ephys_recording_record |
| 468 | + ).fetch1("file_path") |
461 | 469 | file_path = find_full_path(ephys.get_ephys_root_data_dir(), relative_path)
|
462 | 470 |
|
463 | 471 | if ephys_recording_record["acq_software"] == "SpikeGLX":
|
|
0 commit comments