Note
Go to the end to download the full example code. or to run this example in your browser via Binder
How to manage configs
#
Note
This is a quick how-to on config
management. See here for a long-form tutorial.
Show available configs
import spikewrap as sw
sw.show_configs("neuropixels+kilosort2_5")
The preprocessing options are: {
"1": [
"bandpass_filter",
{
"freq_max": 6000,
"freq_min": 300
}
],
"2": [
"common_reference",
{
"operator": "median",
"reference": "global"
}
]
}
The sorting options are: {
"kilosort2_5": {
"car": false,
"freq_min": 150
}
}
print(f"These are stored at:\n"
f"{sw.get_configs_path()}")
These are stored at:
/home/runner/.spikewrap/configs
We can create and save our own configs
, from the currently supported steps.
Currently supported preprocessing steps are:
['phase_shift', 'bandpass_filter', 'common_reference']
By default, these will be stored in the spikewrap configs folder (otherwise, pass the
full filepath to where you want to save a .yaml
file). This config can now be
used by name in spikewrap
processing functions.
config_dict = {
"preprocessing": {
"1": ["phase_shift", {}],
"2": ["bandpass_filter", {"freq_min": 300, "freq_max": 6000}],
"3": ["common_reference", {"operator": "median"}]
},
"sorting": {
"kilosort2_5": {'car': False, 'freq_min': 150}}
}
sw.save_config_dict(config_dict, "my_config")
or load a config
directly from .yaml
config_dict = sw.load_config_dict(
sw.get_configs_path() / "neuropixels+kilosort2_5.yaml"
)
use spikewrap.save_config_dict()
to save this to the spikewrap with
a keyword name, to use by name in processing functions.
Total running time of the script: (0 minutes 0.006 seconds)