From 6e3bc6b2a1f0041bebb020ae8ce46e7f42534221 Mon Sep 17 00:00:00 2001 From: Atika-Syeda Date: Mon, 11 Sep 2023 09:49:09 -0400 Subject: [PATCH] Fix import bug and linter --- docs/conf.py | 1 + facemap/gui/gui.py | 12 ++++++++++-- facemap/gui/neural_activity_window.py | 18 +++++++++--------- facemap/pose/refine_pose.py | 2 +- 4 files changed, 21 insertions(+), 12 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 66b3e67..a939caf 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -15,6 +15,7 @@ # import os import sys + sys.path.insert(0, os.path.abspath('.')) """ diff --git a/facemap/gui/gui.py b/facemap/gui/gui.py index aed2675..0c139c0 100644 --- a/facemap/gui/gui.py +++ b/facemap/gui/gui.py @@ -2,9 +2,10 @@ Copright © 2023 Howard Hughes Medical Institute, Authored by Carsen Stringer and Atika Syeda. """ import os -import sys, cv2 +import sys from pathlib import Path +import cv2 import h5py import matplotlib import matplotlib.pyplot as plt @@ -37,7 +38,14 @@ from scipy.stats import skew, zscore from facemap import process, roi, utils -from facemap.gui import cluster, guiparts, help_windows, io, menus, neural_activity_window +from facemap.gui import ( + cluster, + guiparts, + help_windows, + io, + menus, + neural_activity_window, +) from facemap.pose import model_loader, pose, pose_gui, refine_pose istr = ["pupil", "motSVD", "blink", "running", "movSVD"] diff --git a/facemap/gui/neural_activity_window.py b/facemap/gui/neural_activity_window.py index 621aee4..4471900 100644 --- a/facemap/gui/neural_activity_window.py +++ b/facemap/gui/neural_activity_window.py @@ -1,16 +1,16 @@ -import numpy as np -from PyQt5 import QtCore, QtWidgets, QtGui import os + +import matplotlib +import numpy as np +import pyqtgraph as pg import scipy.io as sio -from facemap.gui import guiparts, help_windows, io -from facemap.neural_prediction import prediction_utils -from PyQt5.QtWidgets import * +from matplotlib import cm +from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtCore import Qt, QUrl +from PyQt5.QtWidgets import * + from facemap import utils -import matplotlib -from matplotlib import cm -import pyqtgraph as pg -from PyQt5.QtMultimedia import QMediaPlayer, QMediaContent +from facemap.gui import guiparts, help_windows, io from facemap.neural_prediction import neural_activity, prediction_utils diff --git a/facemap/pose/refine_pose.py b/facemap/pose/refine_pose.py index a54d4be..5c1ae9a 100644 --- a/facemap/pose/refine_pose.py +++ b/facemap/pose/refine_pose.py @@ -32,11 +32,11 @@ QSpinBox, QVBoxLayout, ) +from torch.nn import functional as F from .. import utils from ..gui import help_windows, io from . import model_loader, transforms -from torch.nn import functional as F """ Single workflow for re-training the model or fine-tuning the model with new data.