77from probeinterface import generate_multi_columns_probe
88
99
10- def generate_test_template (template_type , is_scaled = True ) -> Templates :
10+ def generate_test_template (template_type , is_in_uV = True ) -> Templates :
1111 num_units = 3
1212 num_samples = 5
1313 num_channels = 4
@@ -28,7 +28,7 @@ def generate_test_template(template_type, is_scaled=True) -> Templates:
2828 probe = probe ,
2929 unit_ids = unit_ids ,
3030 channel_ids = channel_ids ,
31- is_scaled = is_scaled ,
31+ is_in_uV = is_in_uV ,
3232 )
3333 elif template_type == "sparse" : # sparse with sparse templates
3434 sparsity_mask = np .array (
@@ -53,7 +53,7 @@ def generate_test_template(template_type, is_scaled=True) -> Templates:
5353 sampling_frequency = sampling_frequency ,
5454 nbefore = nbefore ,
5555 probe = probe ,
56- is_scaled = is_scaled ,
56+ is_in_uV = is_in_uV ,
5757 unit_ids = unit_ids ,
5858 channel_ids = channel_ids ,
5959 )
@@ -68,16 +68,16 @@ def generate_test_template(template_type, is_scaled=True) -> Templates:
6868 sampling_frequency = sampling_frequency ,
6969 nbefore = nbefore ,
7070 probe = probe ,
71- is_scaled = is_scaled ,
71+ is_in_uV = is_in_uV ,
7272 unit_ids = unit_ids ,
7373 channel_ids = channel_ids ,
7474 )
7575
7676
77- @pytest .mark .parametrize ("is_scaled " , [True , False ])
77+ @pytest .mark .parametrize ("is_in_uV " , [True , False ])
7878@pytest .mark .parametrize ("template_type" , ["dense" , "sparse" ])
79- def test_pickle_serialization (template_type , is_scaled , tmp_path ):
80- template = generate_test_template (template_type , is_scaled )
79+ def test_pickle_serialization (template_type , is_in_uV , tmp_path ):
80+ template = generate_test_template (template_type , is_in_uV )
8181
8282 # Dump to pickle
8383 pkl_path = tmp_path / "templates.pkl"
@@ -91,21 +91,21 @@ def test_pickle_serialization(template_type, is_scaled, tmp_path):
9191 assert template == template_reloaded
9292
9393
94- @pytest .mark .parametrize ("is_scaled " , [True , False ])
94+ @pytest .mark .parametrize ("is_in_uV " , [True , False ])
9595@pytest .mark .parametrize ("template_type" , ["dense" , "sparse" ])
96- def test_json_serialization (template_type , is_scaled ):
97- template = generate_test_template (template_type , is_scaled )
96+ def test_json_serialization (template_type , is_in_uV ):
97+ template = generate_test_template (template_type , is_in_uV )
9898
9999 json_str = template .to_json ()
100100 template_reloaded_from_json = Templates .from_json (json_str )
101101
102102 assert template == template_reloaded_from_json
103103
104104
105- @pytest .mark .parametrize ("is_scaled " , [True , False ])
105+ @pytest .mark .parametrize ("is_in_uV " , [True , False ])
106106@pytest .mark .parametrize ("template_type" , ["dense" , "sparse" ])
107- def test_get_dense_templates (template_type , is_scaled ):
108- template = generate_test_template (template_type , is_scaled )
107+ def test_get_dense_templates (template_type , is_in_uV ):
108+ template = generate_test_template (template_type , is_in_uV )
109109 dense_templates = template .get_dense_templates ()
110110 assert dense_templates .shape == (template .num_units , template .num_samples , template .num_channels )
111111
@@ -115,10 +115,10 @@ def test_initialization_fail_with_dense_templates():
115115 template = generate_test_template (template_type = "sparse_with_dense_templates" )
116116
117117
118- @pytest .mark .parametrize ("is_scaled " , [True , False ])
118+ @pytest .mark .parametrize ("is_in_uV " , [True , False ])
119119@pytest .mark .parametrize ("template_type" , ["dense" , "sparse" ])
120- def test_save_and_load_zarr (template_type , is_scaled , tmp_path ):
121- original_template = generate_test_template (template_type , is_scaled )
120+ def test_save_and_load_zarr (template_type , is_in_uV , tmp_path ):
121+ original_template = generate_test_template (template_type , is_in_uV )
122122
123123 zarr_path = tmp_path / "templates.zarr"
124124 original_template .to_zarr (str (zarr_path ))
@@ -129,10 +129,10 @@ def test_save_and_load_zarr(template_type, is_scaled, tmp_path):
129129 assert original_template == loaded_template
130130
131131
132- @pytest .mark .parametrize ("is_scaled " , [True , False ])
132+ @pytest .mark .parametrize ("is_in_uV " , [True , False ])
133133@pytest .mark .parametrize ("template_type" , ["dense" , "sparse" ])
134- def test_select_units (template_type , is_scaled ):
135- template = generate_test_template (template_type , is_scaled )
134+ def test_select_units (template_type , is_in_uV ):
135+ template = generate_test_template (template_type , is_in_uV )
136136 selected_unit_ids = ["unit_a" , "unit_c" ]
137137 selected_unit_ids_indices = [0 , 2 ]
138138
@@ -149,10 +149,10 @@ def test_select_units(template_type, is_scaled):
149149 assert np .array_equal (selected_template .sparsity_mask , template .sparsity_mask [selected_unit_ids_indices ])
150150
151151
152- @pytest .mark .parametrize ("is_scaled " , [True , False ])
152+ @pytest .mark .parametrize ("is_in_uV " , [True , False ])
153153@pytest .mark .parametrize ("template_type" , ["dense" ])
154- def test_select_channels (template_type , is_scaled ):
155- template = generate_test_template (template_type , is_scaled )
154+ def test_select_channels (template_type , is_in_uV ):
155+ template = generate_test_template (template_type , is_in_uV )
156156 selected_channel_ids = ["channel1" , "channel3" ]
157157 selected_channel_ids_indices = [0 , 2 ]
158158
0 commit comments