Skip to content

Commit

Permalink
Fixed tests to reflect required settings argument
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobpennington committed Mar 3, 2024
1 parent a5dc7d7 commit f024bf5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion kilosort/run_kilosort.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def run_kilosort(settings, probe=None, probe_name=None, filename=None,
tic0 = time.time()

# Configure settings, ops, and file paths
if settings is None or settings['n_chan_bin'] is None:
if settings is None or settings.get('n_chan_bin', None) is None:
raise ValueError(
'`n_chan_bin` is a required setting. This is the total number of '
'channels in the binary file, which may or may not be equal to the '
Expand Down
2 changes: 1 addition & 1 deletion tests/test_full_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def test_pipeline(data_directory, results_directory, saved_ops, torch_device, ca
with pytest.raises(ValueError):
# Should result in an error, since `n_chan_bin` isn't specified.
ops, st, clu, _, _, _, _, _ = run_kilosort(
filename=bin_file, device=torch_device,
settings={}, filename=bin_file, device=torch_device,
probe_name='neuropixPhase3B1_kilosortChanMap.mat',
)

Expand Down

0 comments on commit f024bf5

Please sign in to comment.