keyword stringclasses 7
values | repo_name stringlengths 8 98 | file_path stringlengths 4 244 | file_extension stringclasses 29
values | file_size int64 0 84.1M | line_count int64 0 1.6M | content stringlengths 1 84.1M ⌀ | language stringclasses 14
values |
|---|---|---|---|---|---|---|---|
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/graphicsItems/PlotItem/PlotItem.py | .py | 47,182 | 1,210 | # -*- coding: utf-8 -*-
import sys
import weakref
import numpy as np
import os
from ...Qt import QtGui, QtCore, QT_LIB
from ... import pixmaps
from ... import functions as fn
from ...widgets.FileDialog import FileDialog
from .. PlotDataItem import PlotDataItem
from .. ViewBox import ViewBox
from .. AxisItem import Axis... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/graphicsItems/PlotItem/plotConfigTemplate_pyside.py | .py | 12,205 | 169 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file './pyqtgraph/graphicsItems/PlotItem/plotConfigTemplate.ui'
#
# Created: Mon Dec 23 10:10:52 2013
# by: pyside-uic 0.2.14 running on PySide 1.1.2
#
# WARNING! All changes made in this file will be lost!
from PySide import QtCore, QtGui
... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/graphicsItems/ViewBox/axisCtrlTemplate_pyqt5.py | .py | 5,579 | 90 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file './pyqtgraph/graphicsItems/ViewBox/axisCtrlTemplate.ui'
#
# Created: Wed Mar 26 15:09:28 2014
# by: PyQt5 UI code generator 5.0.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/graphicsItems/ViewBox/ViewBox.py | .py | 68,062 | 1,714 | # -*- coding: utf-8 -*-
import weakref
import sys
from copy import deepcopy
import numpy as np
from ...Qt import QtGui, QtCore
from ...python2_3 import basestring
from ...Point import Point
from ... import functions as fn
from .. ItemGroup import ItemGroup
from .. GraphicsWidget import GraphicsWidget
from ... import de... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/graphicsItems/ViewBox/__init__.py | .py | 29 | 2 | from .ViewBox import ViewBox
| Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/graphicsItems/ViewBox/axisCtrlTemplate_pyqt.py | .py | 6,134 | 103 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file './pyqtgraph/graphicsItems/ViewBox/axisCtrlTemplate.ui'
#
# Created: Mon Dec 23 10:10:51 2013
# by: PyQt4 UI code generator 4.10
#
# WARNING! All changes made in this file will be lost!
from ...Qt import QtCore, QtGui
try:
_fromUtf... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/graphicsItems/ViewBox/axisCtrlTemplate_pyside.py | .py | 6,650 | 89 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file './pyqtgraph/graphicsItems/ViewBox/axisCtrlTemplate.ui'
#
# Created: Mon Dec 23 10:10:51 2013
# by: pyside-uic 0.2.14 running on PySide 1.1.2
#
# WARNING! All changes made in this file will be lost!
from PySide import QtCore, QtGui
cla... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/graphicsItems/ViewBox/axisCtrlTemplate_pyside2.py | .py | 5,581 | 90 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file './pyqtgraph/graphicsItems/ViewBox/axisCtrlTemplate.ui'
#
# Created: Wed Mar 26 15:09:28 2014
# by: PyQt5 UI code generator 5.0.1
#
# WARNING! All changes made in this file will be lost!
from PySide2 import QtCore, QtGui, QtWidgets
cla... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/graphicsItems/ViewBox/ViewBoxMenu.py | .py | 10,034 | 279 | # -*- coding: utf-8 -*-
from ...Qt import QtCore, QtGui, QT_LIB
from ...python2_3 import asUnicode
from ...WidgetGroup import WidgetGroup
if QT_LIB == 'PyQt4':
from .axisCtrlTemplate_pyqt import Ui_Form as AxisCtrlTemplate
elif QT_LIB == 'PySide':
from .axisCtrlTemplate_pyside import Ui_Form as AxisCtrlTemplat... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/graphicsItems/ViewBox/tests/test_ViewBox.py | .py | 2,631 | 103 | #import PySide
import pyqtgraph as pg
import pytest
app = pg.mkQApp()
qtest = pg.Qt.QtTest.QTest
QRectF = pg.QtCore.QRectF
def assertMapping(vb, r1, r2):
assert vb.mapFromView(r1.topLeft()) == r2.topLeft()
assert vb.mapFromView(r1.bottomLeft()) == r2.bottomLeft()
assert vb.mapFromView(r1.topRight()) == r2... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/graphicsItems/tests/test_PlotDataItem.py | .py | 2,033 | 91 | import numpy as np
import pyqtgraph as pg
pg.mkQApp()
def test_fft():
f = 20.
x = np.linspace(0, 1, 1000)
y = np.sin(2 * np.pi * f * x)
pd = pg.PlotDataItem(x, y)
pd.setFftMode(True)
x, y = pd.getData()
assert abs(x[np.argmax(y)] - f) < 0.03
x = np.linspace(0, 1, 1001)
y = np.sin... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/graphicsItems/tests/test_AxisItem.py | .py | 2,785 | 90 | import pyqtgraph as pg
app = pg.mkQApp()
def test_AxisItem_stopAxisAtTick(monkeypatch):
def test_bottom(p, axisSpec, tickSpecs, textSpecs):
assert view.mapToView(axisSpec[1]).x() == 0.25
assert view.mapToView(axisSpec[2]).x() == 0.75
def test_left(p, axisSpec, tickSpecs, textSpecs):
a... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/graphicsItems/tests/test_ROI.py | .py | 8,578 | 240 | # -*- coding: utf-8 -*-
import sys
import numpy as np
import pytest
import pyqtgraph as pg
from pyqtgraph.Qt import QtCore, QtTest
from pyqtgraph.tests import assertImageApproved, mouseMove, mouseDrag, mouseClick, TransposedImageItem, resizeWindow
import pytest
app = pg.mkQApp()
def test_getArrayRegion(transpose=Fals... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/graphicsItems/tests/test_PlotCurveItem.py | .py | 1,279 | 36 | import numpy as np
import pyqtgraph as pg
from pyqtgraph.tests import assertImageApproved
def test_PlotCurveItem():
p = pg.GraphicsWindow()
p.ci.layout.setContentsMargins(4, 4, 4, 4) # default margins vary by platform
v = p.addViewBox()
p.resize(200, 150)
data = np.array([1,4,2,3,np.inf,5,7,6,-np... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/graphicsItems/tests/test_ImageItem.py | .py | 5,540 | 148 | import time
import pytest
from pyqtgraph.Qt import QtCore, QtGui, QtTest
import numpy as np
import pyqtgraph as pg
from pyqtgraph.tests import assertImageApproved, TransposedImageItem
app = pg.mkQApp()
def test_ImageItem(transpose=False):
w = pg.GraphicsWindow()
view = pg.ViewBox()
w.setCentralW... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/graphicsItems/tests/test_ErrorBarItem.py | .py | 910 | 40 | import pyqtgraph as pg
import numpy as np
app = pg.mkQApp()
def test_ErrorBarItem_defer_data():
plot = pg.PlotWidget()
plot.show()
# plot some data away from the origin to set the view rect
x = np.arange(5) + 10
curve = pg.PlotCurveItem(x=x, y=x)
plot.addItem(curve)
app.processEvents()
... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/graphicsItems/tests/test_ScatterPlotItem.py | .py | 2,965 | 99 | from pyqtgraph.Qt import QtGui, QtCore
import pyqtgraph as pg
import numpy as np
app = pg.mkQApp()
app.processEvents()
def test_scatterplotitem():
plot = pg.PlotWidget()
# set view range equal to its bounding rect.
# This causes plots to look the same regardless of pxMode.
plot.setRange(rect=plot.bou... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/graphicsItems/tests/test_GraphicsItem.py | .py | 802 | 37 | import gc
import weakref
try:
import faulthandler
faulthandler.enable()
except ImportError:
pass
import pyqtgraph as pg
pg.mkQApp()
def test_getViewWidget():
view = pg.PlotWidget()
vref = weakref.ref(view)
item = pg.InfiniteLine()
view.addItem(item)
assert item.getViewWidget() is view
... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/graphicsItems/tests/test_InfiniteLine.py | .py | 3,452 | 97 | import pyqtgraph as pg
from pyqtgraph.Qt import QtGui, QtCore, QtTest
from pyqtgraph.tests import mouseDrag, mouseMove
pg.mkQApp()
def test_InfiniteLine():
# Test basic InfiniteLine API
plt = pg.plot()
plt.setXRange(-10, 10)
plt.setYRange(-10, 10)
plt.resize(600, 600)
# seemingly arbitrar... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/graphicsItems/tests/test_TextItem.py | .py | 400 | 24 | import pytest
import pyqtgraph as pg
app = pg.mkQApp()
def test_TextItem_setAngle():
plt = pg.plot()
plt.setXRange(-10, 10)
plt.setYRange(-20, 20)
item = pg.TextItem(text="test")
plt.addItem(item)
t1 = item.transform()
item.setAngle(30)
app.processEvents()
t2 = item.transform()... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/flowchart/FlowchartTemplate_pyside.py | .py | 2,387 | 55 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file './pyqtgraph/flowchart/FlowchartTemplate.ui'
#
# Created: Mon Dec 23 10:10:51 2013
# by: pyside-uic 0.2.14 running on PySide 1.1.2
#
# WARNING! All changes made in this file will be lost!
from PySide import QtCore, QtGui
class Ui_Form(... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/flowchart/FlowchartTemplate_pyqt5.py | .py | 2,404 | 56 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file './pyqtgraph/flowchart/FlowchartTemplate.ui'
#
# Created: Wed Mar 26 15:09:28 2014
# by: PyQt5 UI code generator 5.0.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Form(ob... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/flowchart/FlowchartGraphicsView.py | .py | 1,364 | 42 | # -*- coding: utf-8 -*-
from ..Qt import QtGui, QtCore
from ..widgets.GraphicsView import GraphicsView
from ..GraphicsScene import GraphicsScene
from ..graphicsItems.ViewBox import ViewBox
class FlowchartGraphicsView(GraphicsView):
sigHoverOver = QtCore.Signal(object)
sigClicked = QtCore.Signal(object)
... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/flowchart/FlowchartTemplate_pyqt.py | .py | 2,849 | 69 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file './pyqtgraph/flowchart/FlowchartTemplate.ui'
#
# Created: Mon Dec 23 10:10:51 2013
# by: PyQt4 UI code generator 4.10
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/flowchart/__init__.py | .py | 113 | 4 | # -*- coding: utf-8 -*-
from .Flowchart import *
from .library import getNodeType, registerNodeType, getNodeTree | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/flowchart/Node.py | .py | 25,297 | 644 | # -*- coding: utf-8 -*-
from ..Qt import QtCore, QtGui
from ..graphicsItems.GraphicsObject import GraphicsObject
from .. import functions as fn
from .Terminal import *
from ..pgcollections import OrderedDict
from ..debug import *
import numpy as np
def strDict(d):
return dict([(str(k), v) for k, v in d.items()])
... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/flowchart/FlowchartCtrlTemplate_pyqt.py | .py | 3,387 | 81 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file './pyqtgraph/flowchart/FlowchartCtrlTemplate.ui'
#
# Created: Mon Dec 23 10:10:50 2013
# by: PyQt4 UI code generator 4.10
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtC... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/flowchart/FlowchartTemplate_pyside2.py | .py | 2,376 | 55 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'FlowchartTemplate.ui'
#
# Created: Sun Sep 18 19:16:03 2016
# by: pyside2-uic running on PySide2 2.0.0~alpha0
#
# WARNING! All changes made in this file will be lost!
from PySide2 import QtCore, QtGui, QtWidgets
class Ui_Form(object)... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/flowchart/NodeLibrary.py | .py | 2,623 | 87 | from ..pgcollections import OrderedDict
from .Node import Node
def isNodeClass(cls):
try:
if not issubclass(cls, Node):
return False
except:
return False
return hasattr(cls, 'nodeName')
class NodeLibrary:
"""
A library of flowchart Node types. Custom libraries may be ... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/flowchart/FlowchartCtrlTemplate_pyside2.py | .py | 3,040 | 67 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'FlowchartCtrlTemplate.ui'
#
# Created: Sun Sep 18 19:16:46 2016
# by: pyside2-uic running on PySide2 2.0.0~alpha0
#
# WARNING! All changes made in this file will be lost!
from PySide2 import QtCore, QtGui, QtWidgets
class Ui_Form(obj... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/flowchart/FlowchartCtrlTemplate_pyqt5.py | .py | 2,908 | 68 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file './pyqtgraph/flowchart/FlowchartCtrlTemplate.ui'
#
# Created: Wed Mar 26 15:09:28 2014
# by: PyQt5 UI code generator 5.0.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_For... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/flowchart/Terminal.py | .py | 20,786 | 568 | # -*- coding: utf-8 -*-
from ..Qt import QtCore, QtGui
import weakref
from ..graphicsItems.GraphicsObject import GraphicsObject
from .. import functions as fn
from ..Point import Point
class Terminal(object):
def __init__(self, node, name, io, optional=False, multi=False, pos=None, renamable=False, removable=Fals... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/flowchart/Flowchart.py | .py | 35,702 | 941 | # -*- coding: utf-8 -*-
from ..Qt import QtCore, QtGui, QT_LIB
from .Node import *
from ..pgcollections import OrderedDict
from ..widgets.TreeWidget import *
from .. import FileDialog, DataTreeWidget
## pyside and pyqt use incompatible ui files.
if QT_LIB == 'PySide':
from . import FlowchartTemplate_pyside as Flow... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/flowchart/FlowchartCtrlTemplate_pyside.py | .py | 3,175 | 67 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file './pyqtgraph/flowchart/FlowchartCtrlTemplate.ui'
#
# Created: Mon Dec 23 10:10:51 2013
# by: pyside-uic 0.2.14 running on PySide 1.1.2
#
# WARNING! All changes made in this file will be lost!
from PySide import QtCore, QtGui
class Ui_F... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/flowchart/library/Filters.py | .py | 13,217 | 348 | # -*- coding: utf-8 -*-
import numpy as np
from ...Qt import QtCore, QtGui
from ..Node import Node
from . import functions
from ... import functions as pgfn
from .common import *
from ...python2_3 import xrange
from ... import PolyLineROI
from ... import Point
from ... import metaarray as metaarray
class Downsample(C... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/flowchart/library/Data.py | .py | 15,904 | 476 | # -*- coding: utf-8 -*-
from ..Node import Node
from ...Qt import QtGui, QtCore
import numpy as np
from .common import *
from ...SRTTransform import SRTTransform
from ...Point import Point
from ...widgets.TreeWidget import TreeWidget
from ...graphicsItems.LinearRegionItem import LinearRegionItem
from . import function... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/flowchart/library/Display.py | .py | 10,343 | 313 | # -*- coding: utf-8 -*-
from ..Node import Node
import weakref
from ...Qt import QtCore, QtGui
from ...graphicsItems.ScatterPlotItem import ScatterPlotItem
from ...graphicsItems.PlotCurveItem import PlotCurveItem
from ... import PlotDataItem, ComboBox
from .common import *
import numpy as np
class PlotWidgetNode(Node... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/flowchart/library/common.py | .py | 5,982 | 192 | # -*- coding: utf-8 -*-
from ...Qt import QtCore, QtGui
from ...widgets.SpinBox import SpinBox
#from ...SignalProxy import SignalProxy
from ...WidgetGroup import WidgetGroup
#from ColorMapper import ColorMapper
from ..Node import Node
import numpy as np
from ...widgets.ColorButton import ColorButton
try:
import met... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/flowchart/library/__init__.py | .py | 812 | 29 | # -*- coding: utf-8 -*-
from ...pgcollections import OrderedDict
import os, types
from ...debug import printExc
from ..NodeLibrary import NodeLibrary, isNodeClass
from ... import reload as reload
# Build default library
LIBRARY = NodeLibrary()
# For backward compatibility, expose the default library's properties her... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/flowchart/library/functions.py | .py | 11,766 | 357 | import numpy as np
from ...metaarray import MetaArray
from ...python2_3 import basestring, xrange
def downsample(data, n, axis=0, xvals='subsample'):
"""Downsample by averaging points together across axis.
If multiple axes are specified, runs once per axis.
If a metaArray is given, then the axis values ca... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/flowchart/library/Operators.py | .py | 3,225 | 106 | # -*- coding: utf-8 -*-
from ..Node import Node
from .common import CtrlNode
class UniOpNode(Node):
"""Generic node for performing any operation like Out = In.fn()"""
def __init__(self, name, fn):
self.fn = fn
Node.__init__(self, name, terminals={
'In': {'io': 'in'},
'O... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/imageview/ImageViewTemplate_pyqt.py | .py | 8,781 | 169 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ImageViewTemplate.ui'
#
# Created: Thu May 1 15:20:40 2014
# by: PyQt4 UI code generator 4.10.4
#
# WARNING! All changes made in this file will be lost!
from ..Qt import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
exce... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/imageview/__init__.py | .py | 161 | 7 | """
Widget used for display and analysis of 2D and 3D image data.
Includes ROI plotting over time and image normalization.
"""
from .ImageView import ImageView
| Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/imageview/ImageView.py | .py | 31,448 | 828 | # -*- coding: utf-8 -*-
"""
ImageView.py - Widget for basic image dispay and analysis
Copyright 2010 Luke Campagnola
Distributed under MIT/X11 license. See license.txt for more information.
Widget used for displaying 2D or 3D data. Features:
- float or int (including 16-bit int) image display via ImageItem
- zoo... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/imageview/ImageViewTemplate_pyside2.py | .py | 8,687 | 155 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ImageViewTemplate.ui'
#
# Created: Sun Sep 18 19:17:41 2016
# by: pyside2-uic running on PySide2 2.0.0~alpha0
#
# WARNING! All changes made in this file will be lost!
from PySide2 import QtCore, QtGui, QtWidgets
class Ui_Form(object)... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/imageview/ImageViewTemplate_pyqt5.py | .py | 8,275 | 157 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file './pyqtgraph/imageview/ImageViewTemplate.ui'
#
# Created: Wed Mar 26 15:09:28 2014
# by: PyQt5 UI code generator 5.0.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Form(ob... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/imageview/ImageViewTemplate_pyside.py | .py | 8,928 | 155 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ImageViewTemplate.ui'
#
# Created: Thu May 1 15:20:42 2014
# by: pyside-uic 0.2.15 running on PySide 1.2.1
#
# WARNING! All changes made in this file will be lost!
from PySide import QtCore, QtGui
class Ui_Form(object):
def setup... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/imageview/tests/test_imageview.py | .py | 233 | 13 | import pyqtgraph as pg
import numpy as np
app = pg.mkQApp()
def test_nan_image():
img = np.ones((10,10))
img[0,0] = np.nan
v = pg.image(img)
v.imageItem.getHistogram()
app.processEvents()
v.window().close()
| Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/GraphicsScene/mouseEvents.py | .py | 14,192 | 380 | from ..Point import Point
from ..Qt import QtCore, QtGui
import weakref
from .. import ptime as ptime
class MouseDragEvent(object):
"""
Instances of this class are delivered to items in a :class:`GraphicsScene <pyqtgraph.GraphicsScene>` via their mouseDragEvent() method when the item is being mouse-dragged.
... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/GraphicsScene/exportDialogTemplate_pyside.py | .py | 3,149 | 64 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file './pyqtgraph/GraphicsScene/exportDialogTemplate.ui'
#
# Created: Mon Dec 23 10:10:53 2013
# by: pyside-uic 0.2.14 running on PySide 1.1.2
#
# WARNING! All changes made in this file will be lost!
from PySide import QtCore, QtGui
class U... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/GraphicsScene/__init__.py | .py | 29 | 2 | from .GraphicsScene import *
| Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/GraphicsScene/GraphicsScene.py | .py | 23,994 | 537 | # -*- coding: utf-8 -*-
import weakref
import warnings
from ..Qt import QtCore, QtGui
from ..Point import Point
from .. import functions as fn
from .. import ptime as ptime
from .mouseEvents import *
from .. import debug as debug
if hasattr(QtCore, 'PYQT_VERSION'):
try:
import sip
HAVE_SIP = True... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/GraphicsScene/exportDialogTemplate_pyqt5.py | .py | 2,846 | 65 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file './pyqtgraph/GraphicsScene/exportDialogTemplate.ui'
#
# Created: Wed Mar 26 15:09:29 2014
# by: PyQt5 UI code generator 5.0.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/GraphicsScene/exportDialogTemplate_pyside2.py | .py | 3,006 | 64 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'exportDialogTemplate.ui'
#
# Created: Sun Sep 18 19:19:58 2016
# by: pyside2-uic running on PySide2 2.0.0~alpha0
#
# WARNING! All changes made in this file will be lost!
from PySide2 import QtCore, QtGui, QtWidgets
class Ui_Form(obje... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/GraphicsScene/exportDialogTemplate_pyqt.py | .py | 3,351 | 78 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file './pyqtgraph/GraphicsScene/exportDialogTemplate.ui'
#
# Created: Mon Dec 23 10:10:52 2013
# by: PyQt4 UI code generator 4.10
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = ... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/GraphicsScene/exportDialog.py | .py | 5,839 | 160 | from ..Qt import QtCore, QtGui, QT_LIB
from .. import exporters as exporters
from .. import functions as fn
from ..graphicsItems.ViewBox import ViewBox
from ..graphicsItems.PlotItem import PlotItem
if QT_LIB == 'PySide':
from . import exportDialogTemplate_pyside as exportDialogTemplate
elif QT_LIB == 'PySide2':
... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/multiprocess/remoteproxy.py | .py | 48,600 | 1,132 | import os, time, sys, traceback, weakref
import numpy as np
import threading
import warnings
try:
import __builtin__ as builtins
import cPickle as pickle
except ImportError:
import builtins
import pickle
# color printing for debugging
from ..util import cprint
class ClosedError(Exception):
"""Rais... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/multiprocess/parallelizer.py | .py | 12,494 | 339 | # -*- coding: utf-8 -*-
import os, sys, time, multiprocessing, re
from .processes import ForkedProcess
from .remoteproxy import ClosedError
from ..python2_3 import basestring, xrange
class CanceledError(Exception):
"""Raised when the progress dialog is canceled during a processing operation."""
pass
class Pa... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/multiprocess/__init__.py | .py | 921 | 25 | """
Multiprocessing utility library
(parallelization done the way I like it)
Luke Campagnola
2012.06.10
This library provides:
- simple mechanism for starting a new python interpreter process that can be controlled from the original process
(this allows, for example, displaying and manipulating plots in a remo... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/multiprocess/bootstrap.py | .py | 1,725 | 48 | """For starting up remote processes"""
import sys, pickle, os
if __name__ == '__main__':
if hasattr(os, 'setpgrp'):
os.setpgrp() ## prevents signals (notably keyboard interrupt) being forwarded from parent to this process
if sys.version[0] == '3':
#name, port, authkey, ppid, targetStr, path, p... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/multiprocess/processes.py | .py | 22,127 | 505 | import subprocess, atexit, os, sys, time, random, socket, signal, inspect
import multiprocessing.connection
try:
import cPickle as pickle
except ImportError:
import pickle
from .remoteproxy import RemoteEventHandler, ClosedError, NoResultError, LocalObjectProxy, ObjectProxy
from ..Qt import QT_LIB
from ..util ... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/dockarea/DockDrop.py | .py | 4,087 | 129 | # -*- coding: utf-8 -*-
from ..Qt import QtCore, QtGui
class DockDrop(object):
"""Provides dock-dropping methods"""
def __init__(self, allowedAreas=None):
object.__init__(self)
if allowedAreas is None:
allowedAreas = ['center', 'right', 'left', 'top', 'bottom']
self.allowedA... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/dockarea/Container.py | .py | 9,003 | 284 | # -*- coding: utf-8 -*-
from ..Qt import QtCore, QtGui
import weakref
class Container(object):
#sigStretchChanged = QtCore.Signal() ## can't do this here; not a QObject.
def __init__(self, area):
object.__init__(self)
self.area = area
self._container = None
self._stretch =... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/dockarea/__init__.py | .py | 53 | 2 | from .DockArea import DockArea
from .Dock import Dock | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/dockarea/Dock.py | .py | 11,570 | 350 | from ..Qt import QtCore, QtGui
from .DockDrop import *
from ..widgets.VerticalLabel import VerticalLabel
from ..python2_3 import asUnicode
class Dock(QtGui.QWidget, DockDrop):
sigStretchChanged = QtCore.Signal()
sigClosed = QtCore.Signal(object)
def __init__(self, name, area=None, size=(10, 10),... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/dockarea/DockArea.py | .py | 14,065 | 386 | # -*- coding: utf-8 -*-
import weakref
from ..Qt import QtCore, QtGui
from .Container import *
from .DockDrop import *
from .Dock import Dock
from .. import debug as debug
from ..python2_3 import basestring
class DockArea(Container, QtGui.QWidget, DockDrop):
def __init__(self, parent=None, temporary=False, home=N... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/dockarea/tests/test_dockarea.py | .py | 6,186 | 190 | # -*- coding: utf-8 -*-
import pytest
import pyqtgraph as pg
from pyqtgraph.ordereddict import OrderedDict
pg.mkQApp()
import pyqtgraph.dockarea as da
def test_dockarea():
a = da.DockArea()
d1 = da.Dock("dock 1")
a.addDock(d1, 'left')
assert a.topContainer is d1.container()
assert d1.container()... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/dockarea/tests/test_dock.py | .py | 669 | 29 | # -*- coding: utf-8 -*-
#import sip
#sip.setapi('QString', 1)
import pyqtgraph as pg
pg.mkQApp()
import pyqtgraph.dockarea as da
def test_dock():
name = pg.asUnicode("évènts_zàhéér")
dock = da.Dock(name=name)
# make sure unicode names work correctly
assert dock.name() == name
# no surprises in re... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/tests/test_reload.py | .py | 3,536 | 118 | import tempfile, os, sys, shutil
import pyqtgraph as pg
import pyqtgraph.reload
pgpath = os.path.join(os.path.dirname(pg.__file__), '..')
pgpath_repr = repr(pgpath)
# make temporary directory to write module code
path = None
def setup_module():
# make temporary directory to write module code
global path
... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/tests/test_exit_crash.py | .py | 2,006 | 81 | # -*- coding: utf-8 -*-
import os
import sys
import subprocess
import tempfile
import pyqtgraph as pg
import six
import pytest
import textwrap
import time
code = """
import sys
sys.path.insert(0, '{path}')
import pyqtgraph as pg
app = pg.mkQApp()
w = pg.{classname}({args})
"""
skipmessage = ('unclear why this test is... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/tests/test_configparser.py | .py | 832 | 37 | from pyqtgraph import configfile
import numpy as np
import tempfile, os
def test_longArrays():
"""
Test config saving and loading of long arrays.
"""
tmp = tempfile.mktemp(".cfg")
arr = np.arange(20)
configfile.writeConfigFile({'arr':arr}, tmp)
config = configfile.readConfigFile(tmp)
... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/tests/ui_testing.py | .py | 2,920 | 76 | import time
from ..Qt import QtCore, QtGui, QtTest, QT_LIB
def resizeWindow(win, w, h, timeout=2.0):
"""Resize a window and wait until it has the correct size.
This is required for unit testing on some platforms that do not guarantee
immediate response from the windowing system.
"""
QtGui.QAp... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/tests/test_functions.py | .py | 14,754 | 416 | # -*- coding: utf-8 -*-
import pyqtgraph as pg
import numpy as np
import sys
from copy import deepcopy
from collections import OrderedDict
from numpy.testing import assert_array_almost_equal, assert_almost_equal
import pytest
np.random.seed(12345)
def testSolve3D():
p1 = np.array([[0,0,0,1],
... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/tests/test_stability.py | .py | 3,567 | 161 | """
PyQt/PySide stress test:
Create lots of random widgets and graphics items, connect them together randomly,
the tear them down repeatedly.
The purpose of this is to attempt to generate segmentation faults.
"""
from pyqtgraph.Qt import QtTest
import pyqtgraph as pg
from random import seed, randint
import sys, gc, ... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/tests/__init__.py | .py | 165 | 3 | from .image_testing import assertImageApproved, TransposedImageItem
from .ui_testing import resizeWindow, mousePress, mouseMove, mouseRelease, mouseDrag, mouseClick
| Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/tests/image_testing.py | .py | 23,728 | 653 | # Image-based testing borrowed from vispy
"""
Procedure for unit-testing with images:
1. Run unit tests at least once; this initializes a git clone of
pyqtgraph/test-data in ~/.pyqtgraph.
2. Run individual test scripts with the PYQTGRAPH_AUDIT environment variable set:
$ PYQTGRAPH_AUDIT=1 python pyqtgraph... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/tests/test_qt.py | .py | 796 | 27 | # -*- coding: utf-8 -*-
import pyqtgraph as pg
import gc, os
import pytest
app = pg.mkQApp()
def test_isQObjectAlive():
o1 = pg.QtCore.QObject()
o2 = pg.QtCore.QObject()
o2.setParent(o1)
del o1
assert not pg.Qt.isQObjectAlive(o2)
@pytest.mark.skipif(pg.Qt.QT_LIB == 'PySide', reason='pysideuic do... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/tests/test_srttransform3d.py | .py | 1,339 | 40 | import pyqtgraph as pg
from pyqtgraph.Qt import QtCore, QtGui
import numpy as np
from numpy.testing import assert_array_almost_equal, assert_almost_equal
testPoints = np.array([
[0, 0, 0],
[1, 0, 0],
[0, 1, 0],
[0, 0, 1],
... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_plot/pyqtgraph/tests/test_ref_cycles.py | .py | 2,433 | 87 | # -*- coding: utf-8 -*-
"""
Test for unwanted reference cycles
"""
import pyqtgraph as pg
import numpy as np
import gc, weakref
import six
import pytest
app = pg.mkQApp()
skipreason = ('This test is failing on pyside and pyside2 for an unknown reason.')
def assert_alldead(refs):
for ref in refs:... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/__init__.py | .py | 0 | 0 | null | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/base_protocols.py | .py | 11,553 | 280 | # Copyright 2020 by Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
"""
Module implementing a base class for "PyMod protoc... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/modeling_protocols/loop_refinement.py | .py | 23,179 | 560 | # Copyright 2020 by Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
"""
Module implementing a loop modeling protocol using... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/modeling_protocols/__init__.py | .py | 0 | 0 | null | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/modeling_protocols/homology_modeling/__init__.py | .py | 144,446 | 2,679 | # Copyright 2020 by Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
"""
Module for performing homology modeling with MODEL... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/modeling_protocols/homology_modeling/_gui_qt.py | .py | 90,207 | 2,002 | # Copyright 2020 by Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
"""
GUI for MODELLER in PyMod.
"""
import multiproces... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/structural_analysis_protocols/structural_divergence_plot.py | .py | 15,403 | 340 | # Copyright 2020 by Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
"""
Module implementing a protocol for analyzing the s... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/structural_analysis_protocols/psipred.py | .py | 14,917 | 306 | # Copyright 2016 by Chengxin Zhang, Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
import os
from pymod_lib import pymod... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/structural_analysis_protocols/__init__.py | .py | 0 | 0 | null | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/structural_analysis_protocols/dope_assessment.py | .py | 19,833 | 410 | # Copyright 2020 by Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
"""
Module used to compute the DOPE scores (using the ... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/structural_analysis_protocols/secondary_structure_assignment.py | .py | 9,292 | 219 | # Copyright 2016 by Chengxin Zhang, Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
import os
import subprocess
from pymo... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/structural_analysis_protocols/_base_structural_analysis.py | .py | 3,895 | 99 | # Copyright 2020 by Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
"""
Common functions and classes for the structural an... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/structural_analysis_protocols/ramachandran_plot.py | .py | 33,596 | 789 | # Copyright 2016 by Chengxin Zhang, Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
import os
import math
import time
impo... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/structural_analysis_protocols/contact_map_analysis.py | .py | 34,486 | 859 | # Copyright 2020 by Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
"""
Module implementing a protocol for building and an... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/similarity_searches_protocols/local_blast.py | .py | 3,566 | 84 | # Copyright 2020 by Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
"""
Launch BLAST using an executable and databases fou... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/similarity_searches_protocols/psiblast.py | .py | 17,751 | 408 | # Copyright 2020 by Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
"""
Module for running PSI-BLAST in PyMod.
"""
import... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/similarity_searches_protocols/jackhmmer.py | .py | 9,999 | 261 | # Copyright 2020 by Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
"""
Module for performing jackhmmer searches in PyMod.... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/similarity_searches_protocols/ncbi_blast.py | .py | 14,908 | 347 | # Copyright 2020 by Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
"""
Performs a BLAST search by connecting to the NCBI ... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/similarity_searches_protocols/_base_blast.py | .py | 43,167 | 1,005 | # Copyright 2020 by Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
"""
Module with a base class for similarity searches p... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/similarity_searches_protocols/__init__.py | .py | 0 | 0 | null | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/similarity_searches_protocols/phmmer.py | .py | 10,213 | 255 | # Copyright 2020 by Maria Giulia Prado, Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
"""
Module for performing phmmer s... | Python |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.