From 726e8a2bfe3ba049919c8074db72b3f0ef5c8cbb Mon Sep 17 00:00:00 2001 From: Jeremy David Webster Date: Mon, 30 Oct 2023 10:19:05 -0600 Subject: [PATCH] added info to about window --- InfraView/widgets/IPApplicationWindow.py | 12 ++++++++---- InfraView/widgets/IPPlotItem.py | 20 +++++++++++++------- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/InfraView/widgets/IPApplicationWindow.py b/InfraView/widgets/IPApplicationWindow.py index b3c18f4..f4f1e38 100644 --- a/InfraView/widgets/IPApplicationWindow.py +++ b/InfraView/widgets/IPApplicationWindow.py @@ -72,7 +72,7 @@ def __init__(self, qApp, progname, progversion): # initialize the multiproccessor pool self.mp_pool = mp.ProcessingPool(cpu_count() - 1) - print("cpu count = {}".format(cpu_count())) + #print("cpu count = {}".format(cpu_count())) self.buildUI() @@ -595,19 +595,23 @@ def __init__(self, progname, progversion): def buildUI(self, name, version): self.setWindowTitle("InfraView: About") - info_label = QLabel(name + '\nVersion: ' + version + '\nCopyright 2018 Los Alamos National Laboratory\n') + info_label = QLabel('\n' + name + '\nVersion: ' + version + '\nCopyright 2018 Los Alamos National Laboratory\n') label_font = info_label.font() - label_font.setPixelSize(14) + label_font.setPixelSize(12) info_label.setFont(label_font) image_path = Path(Path(__file__).parent.parent.parent, 'infrapy', 'resources', 'PNG', 'LANL_Logo_Ultramarine.png') logo_pixmap = QPixmap(str(image_path)) logo_label = QLabel(self) logo_label.setPixmap(logo_pixmap) + + cpu_label = QLabel('Total CPU Count: ' + str(cpu_count()) + '\nCPUs Used: ' + str(cpu_count() -1)) + cpu_label.setFont(label_font) layout = QVBoxLayout() - layout.addWidget(info_label) layout.addWidget(logo_label) + layout.addWidget(info_label) + layout.addWidget(cpu_label) self.setLayout(layout) diff --git a/InfraView/widgets/IPPlotItem.py b/InfraView/widgets/IPPlotItem.py index 9b6f7f6..789c0ea 100644 --- a/InfraView/widgets/IPPlotItem.py +++ b/InfraView/widgets/IPPlotItem.py @@ -85,13 +85,7 @@ class IPPlotItem(pg.PlotItem): sigSignalRegionChanged = pyqtSignal(tuple) sigFreqRegionChanged = pyqtSignal(tuple) - noise_region = None - signal_region = None - freq_region = None - - pickable = False - - labi = None + def __init__(self, mode='plain', y_label_format=None, pickable=False, est=None): ''' @@ -100,6 +94,14 @@ def __init__(self, mode='plain', y_label_format=None, pickable=False, est=None): pickable: (bool) Can you click on plot to make a pick ''' + self.noise_region = None + self.signal_region = None + self.freq_region = None + + self.pickable = False + + self.labi = None + if y_label_format == 'nonscientific': super().__init__(axisItems={'left': NonScientific(orientation='left')}) else: @@ -114,6 +116,10 @@ def __init__(self, mode='plain', y_label_format=None, pickable=False, est=None): else: super().__init__() + #self.autoDownsample = True + #self.setDownsampling(auto=True, ds=1000) + self.setClipToView(True) + # this will tell the widget if you can click on it and generate a 'pick' self.pickable = pickable