diff --git a/atlaselectrophysiology/alignment_with_easyqc.py b/atlaselectrophysiology/alignment_with_easyqc.py index 924b8905..8d372af8 100644 --- a/atlaselectrophysiology/alignment_with_easyqc.py +++ b/atlaselectrophysiology/alignment_with_easyqc.py @@ -1,5 +1,5 @@ from easyqc.gui import viewseis -from neurodsp import voltage +from ibldsp import voltage import neuropixel from viewspikes.data import stream from viewspikes.plots import overlay_spikes @@ -7,7 +7,7 @@ from PyQt5 import QtCore, QtGui import numpy as np import pyqtgraph as pg -import qt +from qt_helpers import qt from one.api import ONE from iblutil.util import Bunch diff --git a/atlaselectrophysiology/ephys_atlas_gui.py b/atlaselectrophysiology/ephys_atlas_gui.py index cb1dcbc7..e3065689 100644 --- a/atlaselectrophysiology/ephys_atlas_gui.py +++ b/atlaselectrophysiology/ephys_atlas_gui.py @@ -20,7 +20,7 @@ from ephysfeatures.features_across_region import RegionFeatureWindow from atlaselectrophysiology.create_overview_plots import make_overview_plot from pathlib import Path -import qt +from qt_helpers import qt import matplotlib.pyplot as mpl # noqa # This is needed to make qt show properly :/ @@ -2149,6 +2149,14 @@ def viewer(probe_id, one=None, histology=False, spike_collection=None, title=Non return av +def launch_offline(): + + app_off = QtWidgets.QApplication([]) + mainapp_off = MainWindow(offline=True) + mainapp_off.show() + app_off.exec_() + + if __name__ == '__main__': import argparse diff --git a/atlaselectrophysiology/extract_files.py b/atlaselectrophysiology/extract_files.py index 8acaf426..90920448 100644 --- a/atlaselectrophysiology/extract_files.py +++ b/atlaselectrophysiology/extract_files.py @@ -4,7 +4,7 @@ from tqdm import tqdm import spikeglx import numpy as np -from neurodsp import fourier, utils +from ibldsp import fourier, utils from scipy import signal import one.alf.io as alfio import ibllib.ephys.ephysqc as ephysqc diff --git a/atlaselectrophysiology/plot_data.py b/atlaselectrophysiology/plot_data.py index b0214e62..d024873e 100644 --- a/atlaselectrophysiology/plot_data.py +++ b/atlaselectrophysiology/plot_data.py @@ -4,7 +4,7 @@ from brainbox.io.spikeglx import Streamer from brainbox.population.decode import xcorr from brainbox.task import passive -from neurodsp import voltage +from ibldsp import voltage import neuropixel import scipy from PyQt5 import QtGui diff --git a/atlasview/atlasview.py b/atlasview/atlasview.py index 79d402f7..6f372c12 100644 --- a/atlasview/atlasview.py +++ b/atlasview/atlasview.py @@ -21,7 +21,7 @@ import matplotlib from iblatlas.atlas import AllenAtlas -import qt +from qt_helpers import qt class TopView(QtWidgets.QMainWindow): diff --git a/data_exploration_gui/data_explore_gui.py b/data_exploration_gui/data_explore_gui.py index e0d21f39..fc695463 100644 --- a/data_exploration_gui/data_explore_gui.py +++ b/data_exploration_gui/data_explore_gui.py @@ -15,7 +15,7 @@ import data_exploration_gui.data_model as dat from data_exploration_gui import utils -import qt +from qt_helpers import qt import matplotlib.pyplot as mpl # noqa # This is needed to make qt show properly :/ from one.api import ONE diff --git a/data_exploration_gui/gui_main.py b/data_exploration_gui/gui_main.py index 9490c212..ecad16b1 100644 --- a/data_exploration_gui/gui_main.py +++ b/data_exploration_gui/gui_main.py @@ -12,7 +12,7 @@ from pathlib import Path import numpy as np -import qt +from qt_helpers import qt import matplotlib.pyplot as mpl # noqa # This is needed to make qt show properly :/ diff --git a/dlc/DLC_labeled_video.py b/dlc/DLC_labeled_video.py index 884ebd57..624bef2d 100644 --- a/dlc/DLC_labeled_video.py +++ b/dlc/DLC_labeled_video.py @@ -7,7 +7,7 @@ import pandas as pd # conda install -c conda-forge pyarrow import os -from neurodsp.smooth import smooth_interpolate_savgol +from ibldsp.smooth import smooth_interpolate_savgol from brainbox.io.one import SessionLoader from copy import deepcopy diff --git a/histology/atlas_mpl.py b/histology/atlas_mpl.py index 086f2bd6..7c9f632b 100644 --- a/histology/atlas_mpl.py +++ b/histology/atlas_mpl.py @@ -3,8 +3,8 @@ import numpy as np from PyQt5 import QtCore, QtWidgets, uic -from iblapps import qt -from iblapps.qt_matplotlib import BaseMplCanvas +from qt_helpers import qt +from qt_helpers.qt_matplotlib import BaseMplCanvas import iblatlas.atlas as atlas # Make sure that we are using QT5 diff --git a/needles2/probe_model.py b/needles2/probe_model.py index 78c042b3..b486c772 100644 --- a/needles2/probe_model.py +++ b/needles2/probe_model.py @@ -12,7 +12,7 @@ from iblatlas import atlas from neuropixel import TIP_SIZE_UM, trace_header from ibllib.pipes.ephys_alignment import EphysAlignment -from neurodsp.utils import fcn_cosine +from ibldsp.utils import fcn_cosine PROV_2_VAL = { 'Resolved': 90, diff --git a/needles2/run_needles2.py b/needles2/run_needles2.py index 2f4337f8..a1492245 100644 --- a/needles2/run_needles2.py +++ b/needles2/run_needles2.py @@ -11,7 +11,7 @@ from iblatlas.atlas import AllenAtlas, Insertion -import qt +from qt_helpers import qt from one.api import ONE from needles2.probe_model import ProbeModel diff --git a/needles2/spike_features.py b/needles2/spike_features.py index a7691684..3da141c8 100644 --- a/needles2/spike_features.py +++ b/needles2/spike_features.py @@ -1,7 +1,7 @@ from PyQt5 import QtWidgets, QtGui, QtCore import pyqtgraph as pg import pyqtgraph.exporters -import qt +from qt_helpers import qt import atlaselectrophysiology.ColorBar as cb from dataclasses import dataclass, field diff --git a/qt_helpers/__init__.py b/qt_helpers/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/qt.py b/qt_helpers/qt.py similarity index 100% rename from qt.py rename to qt_helpers/qt.py diff --git a/qt_matplotlib.py b/qt_helpers/qt_matplotlib.py similarity index 100% rename from qt_matplotlib.py rename to qt_helpers/qt_matplotlib.py diff --git a/setup.py b/setup.py index 1eca54a7..f1ee83e6 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ entry_points={ 'console_scripts': [ 'atlas=atlasview.atlasview:main', - 'align=atlaselectrophysiology.ephys_atlas_gui:main', + 'ephys-align=atlaselectrophysiology.ephys_atlas_gui:launch_offline', ] }, ) diff --git a/viewspikes/gui.py b/viewspikes/gui.py index 32313bf6..4219b9ad 100644 --- a/viewspikes/gui.py +++ b/viewspikes/gui.py @@ -7,7 +7,7 @@ from iblutil.numerical import bincount2D from viewephys.gui import viewephys -import neurodsp +import ibldsp from brainbox.io.one import EphysSessionLoader, SpikeSortingLoader from iblatlas.atlas import BrainRegions @@ -134,7 +134,7 @@ def show_ephys(self, t0, tlen=1): sos = scipy.signal.butter(**butter_kwargs, output='sos') butt = scipy.signal.sosfiltfilt(sos, raw) - destripe = neurodsp.voltage.destripe(raw, fs=self.sr.fs) + destripe = ibldsp.voltage.destripe(raw, fs=self.sr.fs) self.eqc_raw = viewephys(butt, self.sr.fs, channels=self.channels, br=regions, title='butt', t0=t0, t_scalar=1) self.eqc_des = viewephys(destripe, self.sr.fs, channels=self.channels, br=regions, title='destripe', t0=t0, t_scalar=1) diff --git a/viewspikes/load_ma_data.py b/viewspikes/load_ma_data.py index 7ad6a27e..48d90bc7 100644 --- a/viewspikes/load_ma_data.py +++ b/viewspikes/load_ma_data.py @@ -1,7 +1,7 @@ from one.api import ONE import one.alf.io as alfio from iblutil.util import Bunch -import qt +from qt_helpers import qt import numpy as np import pyqtgraph as pg