Skip to content

Commit

Permalink
Merge branch 'qt_module' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
mayofaulkner committed Sep 3, 2024
2 parents 6709876 + 9fbad04 commit 49d6829
Show file tree
Hide file tree
Showing 18 changed files with 26 additions and 18 deletions.
4 changes: 2 additions & 2 deletions atlaselectrophysiology/alignment_with_easyqc.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
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
import scipy
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

Expand Down
10 changes: 9 additions & 1 deletion atlaselectrophysiology/ephys_atlas_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 :/


Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion atlaselectrophysiology/extract_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion atlaselectrophysiology/plot_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion atlasview/atlasview.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import matplotlib

from iblatlas.atlas import AllenAtlas
import qt
from qt_helpers import qt


class TopView(QtWidgets.QMainWindow):
Expand Down
2 changes: 1 addition & 1 deletion data_exploration_gui/data_explore_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion data_exploration_gui/gui_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 :/


Expand Down
2 changes: 1 addition & 1 deletion dlc/DLC_labeled_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions histology/atlas_mpl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion needles2/probe_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion needles2/run_needles2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion needles2/spike_features.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Empty file added qt_helpers/__init__.py
Empty file.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
]
},
)
4 changes: 2 additions & 2 deletions viewspikes/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion viewspikes/load_ma_data.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit 49d6829

Please sign in to comment.