diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index aa76fca..6da4e34 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -11,9 +11,10 @@ jobs: name: build (${{ matrix.python-version }}, ${{ matrix.os }}) runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: os: ["ubuntu-latest", "windows-latest"] - python-version: ["3.10"] + python-version: ["3.9", "3.10"] steps: - name: Checkout ibl-neuropixel repo uses: actions/checkout@v3 @@ -27,7 +28,7 @@ jobs: - name: flake8 run: | - pip install flake8 --quiet + pip install flake8>=7 --quiet cd ibl-neuropixel python -m flake8 diff --git a/requirements.txt b/requirements.txt index ce1cffc..fada42e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,8 @@ iblutil >= 1.7.0 joblib matplotlib mtscomp -numpy +numpy >= 1.21.6 one-api pandas -scipy +scipy >= 1.11 +pyfftw diff --git a/src/ibldsp/plots.py b/src/ibldsp/plots.py index 2973d98..9ab2487 100644 --- a/src/ibldsp/plots.py +++ b/src/ibldsp/plots.py @@ -16,17 +16,17 @@ def show_channels_labels(raw, fs, channel_labels, xfeats): butt = scipy.signal.sosfiltfilt(sos_hp, raw) fig, ax = plt.subplots(1, 5, figsize=(18, 6), gridspec_kw={'width_ratios': [1, 1, 1, 8, .2]}) ax[0].plot(xfeats['xcor_hf'], np.arange(nc)) - ax[0].plot(xfeats['xcor_hf'][iko := channel_labels == 1], np.arange(nc)[iko], 'r*') + ax[0].plot(xfeats['xcor_hf'][(iko := channel_labels == 1)], np.arange(nc)[iko], 'r*') ax[0].plot([- .5, -.5], [0, nc], 'r--') ax[0].set(ylabel='channel #', xlabel='high coherence', ylim=[0, nc], title='a) dead channel') ax[1].plot(xfeats['psd_hf'], np.arange(nc)) - ax[1].plot(xfeats['psd_hf'][iko := channel_labels == 2], np.arange(nc)[iko], 'r*') + ax[1].plot(xfeats['psd_hf'][(iko := channel_labels == 2)], np.arange(nc)[iko], 'r*') ax[1].plot([.02, .02], [0, nc], 'r--') ax[1].set(yticklabels=[], xlabel='PSD', ylim=[0, nc], title='b) noisy channel') ax[1].sharey(ax[0]) ax[2].plot(xfeats['xcor_lf'], np.arange(nc)) - ax[2].plot(xfeats['xcor_lf'][iko := channel_labels == 3], np.arange(nc)[iko], 'r*') + ax[2].plot(xfeats['xcor_lf'][(iko := channel_labels == 3)], np.arange(nc)[iko], 'r*') ax[2].plot([-.75, -.75], [0, nc], 'r--') ax[2].set(yticklabels=[], xlabel='low coherence', ylim=[0, nc], title='c) outside') ax[2].sharey(ax[0])