@@ -417,7 +417,9 @@ def build_neuropixels_probe(probe_part_number: str) -> Probe:
417417
418418 # ===== 4. Calculate contact IDs =====
419419 shank_ids_iter = shank_ids if shank_ids is not None else [None ] * len (elec_ids )
420- contact_ids = [_build_canonical_contact_id (elec_id , shank_id ) for shank_id , elec_id in zip (shank_ids_iter , elec_ids )]
420+ contact_ids = [
421+ _build_canonical_contact_id (elec_id , shank_id ) for shank_id , elec_id in zip (shank_ids_iter , elec_ids )
422+ ]
421423
422424 # ===== 5. Create Probe object and set contacts =====
423425 probe = Probe (ndim = 2 , si_units = "um" , model_name = probe_part_number , manufacturer = "imec" )
@@ -838,8 +840,7 @@ def read_spikeglx(file: str | Path) -> Probe:
838840 imro_electrode = imro_per_channel ["electrode" ]
839841 imro_shank = imro_per_channel .get ("shank" , [None ] * len (imro_electrode ))
840842 active_contact_ids = [
841- _build_canonical_contact_id (elec_id , shank_id )
842- for shank_id , elec_id in zip (imro_shank , imro_electrode )
843+ _build_canonical_contact_id (elec_id , shank_id ) for shank_id , elec_id in zip (imro_shank , imro_electrode )
843844 ]
844845
845846 # ===== 5. Slice full probe to active electrodes =====
@@ -854,11 +855,13 @@ def read_spikeglx(file: str | Path) -> Probe:
854855 # ===== 6. Store IMRO properties (acquisition settings) as annotations =====
855856 # Map IMRO field names to probeinterface field names and add as contact annotations
856857 imro_properties_to_add = ("channel" , "bank" , "bank_mask" , "ref_id" , "ap_gain" , "lf_gain" , "ap_hipas_flt" )
857- probe .annotate_contacts (** {
858- imro_field_to_pi_field .get (k ): v
859- for k , v in imro_per_channel .items ()
860- if k in imro_properties_to_add and len (v ) > 0
861- })
858+ probe .annotate_contacts (
859+ ** {
860+ imro_field_to_pi_field .get (k ): v
861+ for k , v in imro_per_channel .items ()
862+ if k in imro_properties_to_add and len (v ) > 0
863+ }
864+ )
862865
863866 # ===== 7. Slice to saved channels (if subset was saved) =====
864867 # This is DIFFERENT from IMRO selection: IMRO selects which electrodes to acquire,
0 commit comments