diff --git a/environments/environment-Linux.yml b/environments/environment-Linux.yml index 3d37525a5..16b777957 100644 --- a/environments/environment-Linux.yml +++ b/environments/environment-Linux.yml @@ -1,4 +1,4 @@ -name: nwb-guide +name: nwb-guide-2 channels: - conda-forge - defaults @@ -16,10 +16,8 @@ dependencies: - flask-cors == 4.0.0 - flask_restx == 1.1.0 - werkzeug < 3.0 # werkzeug 3.0 deprecates features used by flask 2.3.2. Remove this when updating flask. - # For stability, NeuroConv is pinned at a commit just prior to breaking SpikeInterface compatibility - - neuroconv @ git+https://github.com/catalystneuro/neuroconv.git@fa636458aa5c321f1c2c08f6e682b4a52d5a83f3#neuroconv[dandi,compressors,ecephys,ophys,behavior,text] - # For stability, pinning SpikeInterface to a version that works with NeuroConv and with tutorial generation - - spikeinterface == 0.100.5 + - neuroconv[full] == 0.6.6 + - spikeinterface >= 0.101.2 - scikit-learn == 1.4.0 # Tutorial data generation - tqdm_publisher >= 0.0.1 # Progress bars - tzlocal >= 5.2 # Frontend timezone handling diff --git a/environments/environment-MAC-apple-silicon.yml b/environments/environment-MAC-apple-silicon.yml index d193ce791..1b93f3712 100644 --- a/environments/environment-MAC-apple-silicon.yml +++ b/environments/environment-MAC-apple-silicon.yml @@ -25,9 +25,9 @@ dependencies: # NOTE: the NeuroConv wheel on PyPI includes sonpy which is not compatible with arm64, so build and install # NeuroConv from GitHub, which will remove the sonpy dependency when building from Mac arm64 # For stability, NeuroConv is pinned at a commit just prior to breaking SpikeInterface compatibility - - neuroconv @ git+https://github.com/catalystneuro/neuroconv.git@fa636458aa5c321f1c2c08f6e682b4a52d5a83f3#neuroconv[dandi,compressors,ecephys,ophys,behavior,text] + - neuroconv[dandi,compressors,ecephys,ophys,behavior,text] == 0.6.6 # For stability, pinning SpikeInterface to a version that works with NeuroConv and with tutorial generation - - spikeinterface == 0.100.5 + - spikeinterface >= 0.101.2 - scikit-learn == 1.4.0 # Tutorial data generation - tqdm_publisher >= 0.0.1 # Progress bars - tzlocal >= 5.2 # Frontend timezone handling diff --git a/environments/environment-MAC-intel.yml b/environments/environment-MAC-intel.yml index 61d38320d..83de9cd7c 100644 --- a/environments/environment-MAC-intel.yml +++ b/environments/environment-MAC-intel.yml @@ -19,10 +19,8 @@ dependencies: - flask-cors == 4.0.0 - flask_restx == 1.1.0 - werkzeug < 3.0 # werkzeug 3.0 deprecates features used by flask 2.3.2. Remove this when updating flask. - # For stability, NeuroConv is pinned at a commit just prior to breaking SpikeInterface compatibility - - neuroconv @ git+https://github.com/catalystneuro/neuroconv.git@fa636458aa5c321f1c2c08f6e682b4a52d5a83f3#neuroconv[dandi,compressors,ecephys,ophys,behavior,text] - # For stability, pinning SpikeInterface to a version that works with NeuroConv and with tutorial generation - - spikeinterface == 0.100.5 + - neuroconv[dandi,compressors,ecephys,ophys,behavior,text] == 0.6.6 + - spikeinterface >= 0.101.2 - scikit-learn == 1.4.0 # Tutorial data generation - tqdm_publisher >= 0.0.1 # Progress bars - tzlocal >= 5.2 # Frontend timezone handling diff --git a/environments/environment-Windows.yml b/environments/environment-Windows.yml index b7d650661..b25d64c2b 100644 --- a/environments/environment-Windows.yml +++ b/environments/environment-Windows.yml @@ -19,10 +19,8 @@ dependencies: - flask-cors === 3.0.10 - flask_restx == 1.1.0 - werkzeug < 3.0 # werkzeug 3.0 deprecates features used by flask 2.3.2. Remove this when updating flask. - # For stability, NeuroConv is pinned at a commit just prior to breaking SpikeInterface compatibility - - neuroconv @ git+https://github.com/catalystneuro/neuroconv.git@fa636458aa5c321f1c2c08f6e682b4a52d5a83f3#neuroconv[dandi,compressors,ecephys,ophys,behavior,text] - # For stability, pinning SpikeInterface to a version that works with NeuroConv and with tutorial generation - - spikeinterface == 0.100.5 + - neuroconv[dandi,compressors,ecephys,ophys,behavior,text] == 0.6.6 + - spikeinterface >= 0.101.2 - scikit-learn == 1.4.0 # Tutorial data generation - tqdm_publisher >= 0.0.1 # Progress bars - tzlocal >= 5.2 # Frontend timezone handling diff --git a/src/pyflask/manageNeuroconv/manage_neuroconv.py b/src/pyflask/manageNeuroconv/manage_neuroconv.py index 391f5b462..2a5f7091c 100644 --- a/src/pyflask/manageNeuroconv/manage_neuroconv.py +++ b/src/pyflask/manageNeuroconv/manage_neuroconv.py @@ -1726,12 +1726,19 @@ def generate_test_data(output_path: str): io.write(lf_meta_content) # Make Phy folder - waveform_extractor = spikeinterface.extract_waveforms( - recording=artificial_ap_band_in_uV, sorting=spiking, mode="memory" + sorting_analyzer = spikeinterface.create_sorting_analyzer( + recording=artificial_ap_band_in_uV, + sorting=spiking, ) + sorting_analyzer.compute(["random_spikes", "waveforms", "templates", "noise_levels"]) + _ = sorting_analyzer.compute("spike_amplitudes") + _ = sorting_analyzer.compute("principal_components", n_components=5, mode="by_channel_local") export_to_phy( - waveform_extractor=waveform_extractor, output_folder=phy_output_folder, remove_if_exists=True, copy_binary=False + sorting_analyzer=sorting_analyzer, + output_folder=phy_output_folder, + remove_if_exists=True, + copy_binary=False, )