diff --git a/README.rst b/README.rst index 82b1566..b2e1f58 100644 --- a/README.rst +++ b/README.rst @@ -11,7 +11,7 @@ A comprehensive data acquisition and analysis tool for Electrospray Ion-Beam Dep :target: https://badge.fury.io/py/esibd-explorer :alt: ESIBD Explorer on PyPI -.. figure:: https://github.com/ioneater/ESIBD-Explorer/blob/main/docs/pages/2023-10_ESIBD_GUI_plain.png +.. figure:: https://github.com/ioneater/ESIBD-Explorer/blob/main/docs/pages/2023-10_ESIBD_GUI_plain.png?raw=true **ESIBD Explorer user interface.** The ESIBD Explorer controls all aspects of an Electrospray Ion-Beam Deposition (ESIBD) experiment, including optimization and characterization of the ion-beam energy, beam intensity, and beam size, as well as monitoring of the deposition. diff --git a/build.bat b/build.bat index e996db3..0541434 100644 --- a/build.bat +++ b/build.bat @@ -56,7 +56,7 @@ twine upload -r testpypi dist/* REM conda create -n "estest" python=3.11 REM conda activate estest REM pip install -i https://test.pypi.org/simple/ esibd-explorer -REM pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ esibd-explorer==0.6.11 # use pypi dependencies that are not present on testpypi +REM pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ esibd-explorer==0.6.12 # use pypi dependencies that are not present on testpypi REM only upload on real pypi after testing! REM twine upload dist/* @@ -66,9 +66,10 @@ REM pyinstaller ::::::::::::::: call rmdir /q /s build +call rmdir /q /s pyinstaller_dist conda create -n "esibdtest" python=3.11 conda activate esibdtest -pip install -i https://pypi.org/simple/ esibd-explorer +pip install esibd-explorer --upgrade pip install pyinstaller REM Run the following line to create initial spec file diff --git a/esibd/core.py b/esibd/core.py index 3ba6421..f864ef5 100644 --- a/esibd/core.py +++ b/esibd/core.py @@ -185,7 +185,6 @@ def loading(self, loading): self._loading +=1 else: self._loading -= 1 - # print('pluginManager', self._loading) def loadPlugins(self, reload=False): """Loads all enabled plugins.""" @@ -1551,7 +1550,7 @@ def initGUI(self, item): self.getParameterByName(name).value = item[name] else: self.getParameterByName(name).value = default[self.VALUE] - if not name in self.tempParameters() and not item == {}: # item == {} -> generating default file + if not name in self.tempParameters() and not len(item) < 2: # len(item) < 2 -> generating default file self.print(f'Added missing parameter {name} to channel {self.name} using default value {default[self.VALUE]}.') line = self.getParameterByName(self.EQUATION).line @@ -1690,7 +1689,6 @@ class FloatValidator(QValidator): def valid_float_string(self, string): match = self._float_re.search(string) - # print(string, match.groups()[0], match.groups()[0] == string, match) return match.groups()[0] == string if match else False def validate(self, string, position): # -> typing.Tuple[State, str, int]: @@ -1939,7 +1937,6 @@ def __init__(self, plugin): def toggleTitleBar(self): """Updates titlebar as dock is changing from floating to docked states.""" - # print('toggleTitleBar', self.plugin.name, self.isFloating()) if self.isFloating(): # dock is floating on its own # self.setWindowFlags(Qt.WindowType.Window) if self.plugin.titleBarLabel is not None: @@ -2476,7 +2473,6 @@ def __init__(self, parent=None, background='default', plotItem=None, **kargs): def mouseMoveEvent(self, ev): pos = QPointF(ev.pos()) if self.getPlotItem().getViewBox().geometry().contains(pos): # add offset - # print(ev.pos(), self.getPlotItem().getViewBox().mapSceneToView(pos)) pos = self.getPlotItem().getViewBox().mapSceneToView(pos) try: if self.getPlotItem().ctrl.logYCheck.isChecked(): @@ -2506,7 +2502,6 @@ class SciAxisItem(pg.AxisItem): def logTickStrings(self, values, scale, spacing): estrings = [f'{x:.0e}' for x in 10 ** np.array(values).astype(float) * np.array(scale)] - # print(estrings, values, scale) convdict = {"0": "⁰", "1": "¹", "2": "²", diff --git a/esibd/plugins.py b/esibd/plugins.py index 9327582..66ce618 100644 --- a/esibd/plugins.py +++ b/esibd/plugins.py @@ -159,7 +159,6 @@ def loading(self, loading): self._loading +=1 else: self._loading -= 1 - # print(self.name, self._loading) def test(self): """Runs :meth:`~esibd.plugins.Plugin.runTestParallel` in parallel thread.""" @@ -1049,7 +1048,6 @@ def updateLivePlot(self): return # otherwise toogle visibility is sufficient for channel in self.device.channels: - # print(channel.name, channel.display) if channel.display: channel.plotCurve.setPen(pg.mkPen(QColor(channel.color), width=int(channel.linewidth))) channel.plotCurve.opts['name'] = channel.name @@ -1475,7 +1473,8 @@ def loadConfiguration(self, file=None, default=False): else: # Generate default settings file if file was not found. # To update files with new parameters, simply delete the old file and the new one will be generated. self.print(f'Generating default config file {file}') - self.addChannel(item={}) + for i in range(9): + self.addChannel(item={Parameter.NAME : f'{self.name}{i+1}'}) self.exportConfiguration(file, default=True) else: # file.suffix == EsibdCore.FILE_H5: with h5py.File(name=file, mode='r', track_order=True) as f: @@ -1827,7 +1826,6 @@ def updateValues(self, N=2, apply=False): if self.updating or self.pluginManager.closing: return self.updating = True # prevent recursive call caused by changing values from here - # print(self.name,'updateValues rand:', np.random.rand()) channels = self.pluginManager.DeviceManager.channels(inout=INOUT.IN) if self.inout == INOUT.IN else self.pluginManager.DeviceManager.channels(inout=INOUT.BOTH) for _ in range(N): # go through parsing N times, in case the dependencies are not ordered for channel in [c for c in self.channels if not c.active and c.equation != '']: # ignore if no equation defined @@ -3702,13 +3700,11 @@ def stop(self): self.recording = False for d in self.getDevices(): d.stop() - print(f'stopped {d.name}') self.stopScans() def stopScans(self): for s in self.pluginManager.getPluginsByType(PluginManager.TYPE.SCAN): s.recording = False # stop all running scans - print(f'stopped {s.name}') def exportOutputData(self, file=None): self.pluginManager.Settings.measurementNumber += 1 diff --git a/esibd/plugins_internal/displays/Displays.py b/esibd/plugins_internal/displays/Displays.py index 4a6d2fc..f3893ee 100644 --- a/esibd/plugins_internal/displays/Displays.py +++ b/esibd/plugins_internal/displays/Displays.py @@ -183,12 +183,9 @@ def downsample(self, ax): xdata = self.origXData[mask] ydata = self.origYData[mask] cutoff = abs(0.0001*(ymax-ymin)) - # print('xdata before ', len(xdata),'cutoff: ', cutoff) while [abs(ydata[i] - ydata[i-1]) > cutoff for i in range(len(ydata))].count(True) > self.max_points: cutoff *= 4 - # print([abs(ydata[i] - ydata[i-1]) > cutoff for i, v in enumerate(ydata)].count(True), self.max_points, cutoff) mask = [abs(ydata[i] - ydata[i-1]) > cutoff for i in range(len(ydata))] - # print('xdata cleaned ', len(xdata[mask]),'cutoff', cutoff) return xdata[mask], ydata[mask] def update(self, ax): @@ -420,7 +417,6 @@ def loadData(self, file, _show=True): self.raiseDock(_show) def mapSliderToData(self, slider, data): - # print(slider.value(), data.min(), data.max(), data.min() + slider.value()/100*(data.max() - data.min())) return data.min() + slider.value()/100*(data.max() - data.min()) def drawSurface(self, angle=True): diff --git a/pyproject.toml b/pyproject.toml index bb8fc71..ab97564 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "esibd-explorer" # package name can include hyphens, module names should be lower case without hyphens. requires-python = ">=3.11" -version = "0.6.12" +version = "0.6.14" description = "A comprehensive data acquisition and analysis tool for Electrospray Ion-Beam Deposition experiments and beyond." license = {file = "LICENSE"} readme = "README.rst"