Skip to content

Commit

Permalink
- adds Comparator phases widget
Browse files Browse the repository at this point in the history
- ensures that relative event buttons work correctly after PID control is turned off
- adds support for San Franciscan machines with Eurotherm PID
- adds support for Dietrich DR series
- hides axis spines and labels along axis ticks if axis step width is set to 0 (or the empty entry)
- fixes a rounding issue of a RoR smoothing parameter that could lead to a small x-axis offset between background curve and recorded curve (Issue #907)
- reduced curve smoothing and limits its settings to the range of 0-5 (Issue #907)
- points Help >> Help item to the help page instead of the QSG on artisan-scope.org
- correctly re-aligns background profile after producing a ranking report
- adds energy defaults for Probat P01E
  • Loading branch information
MAKOMO committed Aug 24, 2022
1 parent c39c327 commit a8d242a
Show file tree
Hide file tree
Showing 71 changed files with 75,337 additions and 54,417 deletions.
12 changes: 6 additions & 6 deletions src/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ The home of its development is on GitHub were all source and binary files are av

<https://github.com/artisan-roaster-scope/artisan>

## MAILING LIST
## DISCUSSION FORUM

<https://lists.einfachkaffee.de/postorius/lists/artisan-user.lists.einfachkaffee.de/>
<https://github.com/artisan-roaster-scope/artisan/discussions>

## ARTISAN BLOG

https://artisan-roasterscope.blogspot.de

## FEATURES

Runs on 64bit Windows 10, macOS 10.15 Catalina (legacy builds support Windows 8 and macOS 10.13 High Sierra), Redhat/Debian Linux (incl. 32bit Raspberry Pi) and supports a large number of devices and roasting machines. See <https://artisan-scope.org/devices/index> for supported devices and <https://artisan-scope.org/machines/index> for supported machines.
Runs on 64bit x64 Windows 10, macOS 10.15 Catalina (legacy builds support Windows 8 x64 and macOS 10.13 High Sierra), Redhat/Debian Linux (incl. 32bit Raspberry Pi) and supports a large number of devices and roasting machines. See <https://artisan-scope.org/devices/index> for supported devices and <https://artisan-scope.org/machines/index> for supported machines.

**Artisan offers**
- Unlimited number of curves.
Expand Down Expand Up @@ -56,13 +56,13 @@ distribution in the file `LICENSE.txt`. An online version is available at
## LIBRARIES

Artisan uses the following libraries in unmodified forms:
- Python 3.x released under the PSF licence http://www.python.org/psf/
- Python released under the PSF licence http://www.python.org/psf/
http://www.python.org/
- QT 5.x under the Qt GNU Lesser General Public License version 2.1 (LGPL)
- QT under the Qt GNU Lesser General Public License version 2.1 (LGPL)
http://qt-project.org/products/licensing
- Numpy and Scipy, Copyright (c) 2005, NumPy Developers; All Rights Reserved
http://www.scipy.org/
- PyQt 5.x and SIP 4.x under the Qt GNU GPL v. 3.0 licence; Copyright (c) 2010 Riverbank Computing Limited
- PyQt under the Qt GNU GPL v. 3.0 licence; Copyright (c) 2010 Riverbank Computing Limited
http://www.riverbankcomputing.co.uk/software/pyqt/
- matplotlib, Copyright (c) 2002-2015 John D. Hunter; All Rights Reserved. Distributed under a licence based on PSF.
http://matplotlib.sourceforge.net
Expand Down
1 change: 1 addition & 0 deletions src/artisan.pro
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ TRANSLATIONS = \
translations/artisan_pl.ts \
translations/artisan_pt_BR.ts \
translations/artisan_pt.ts \
translations/artisan_ru.ts \
translations/artisan_sk.ts \
translations/artisan_sv.ts \
translations/artisan_th.ts \
Expand Down
2 changes: 1 addition & 1 deletion src/artisanlib/colors.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def __init__(self, parent = None, aw = None, activeTab = 0):
self.setWindowTitle(QApplication.translate('Form Caption','Colors'))
titlefont = QFont()
titlefont.setBold(True)
titlefont.setWeight(75)
# titlefont.setWeight(75)
self.commonstyle = 'border-style: solid; border-width: 1px; border-radius: 4px; border-color: black; padding: 4px;'

#TAB0
Expand Down
41 changes: 38 additions & 3 deletions src/artisanlib/comparator.py
Original file line number Diff line number Diff line change
Expand Up @@ -999,15 +999,24 @@ def clearCanvas(self):
if grid_axis is not None:
self.aw.qmc.ax.grid(True,axis=grid_axis,color=self.aw.qmc.palette['grid'],linestyle=self.aw.qmc.gridstyles[self.aw.qmc.gridlinestyle],linewidth = self.aw.qmc.gridthickness,alpha = self.aw.qmc.gridalpha,sketch_params=0,path_effects=[])

self.aw.qmc.ax.spines.top.set_visible(self.aw.qmc.xgrid != 0 and self.aw.qmc.ygrid != 0 and self.aw.qmc.zgrid != 0)
self.aw.qmc.ax.spines.bottom.set_visible(self.aw.qmc.xgrid != 0)
self.aw.qmc.ax.spines.left.set_visible(self.aw.qmc.ygrid != 0)
self.aw.qmc.ax.spines.right.set_visible(self.aw.qmc.zgrid != 0)

prop = self.aw.mpl_fontproperties.copy()
prop.set_size('small')
fontprop_medium = self.aw.mpl_fontproperties.copy()
fontprop_medium.set_size('medium')
fontprop_large = self.aw.mpl_fontproperties.copy()
fontprop_large.set_size('large')

self.aw.qmc.ax.set_ylabel(self.aw.qmc.mode,color=self.aw.qmc.palette['ylabel'],rotation=0,labelpad=10,fontproperties=fontprop_large)
self.aw.qmc.ax.set_xlabel(self.aw.arabicReshape(QApplication.translate('Label', 'min')),color = self.aw.qmc.palette['xlabel'],fontproperties=fontprop_medium)
temp_axis_label = ('' if self.aw.qmc.ygrid == 0 else self.aw.qmc.mode)
self.aw.qmc.ax.set_ylabel(temp_axis_label,color=self.aw.qmc.palette['ylabel'],rotation=0,labelpad=10,fontproperties=fontprop_medium)

#time_axis_label = ("" if self.aw.qmc.xgrid == 0 else self.aw.arabicReshape(QApplication.translate('Label', 'min')))
time_axis_label = '' # always hide as not very productive
self.aw.qmc.set_xlabel(time_axis_label)

tick_dir = 'inout'
self.aw.qmc.ax.tick_params(\
Expand Down Expand Up @@ -1049,7 +1058,10 @@ def clearCanvas(self):
labelbottom=False) # labels along the bottom edge are on

self.aw.qmc.ax.patch.set_visible(True)
self.aw.qmc.delta_ax.set_ylabel(self.aw.qmc.mode + self.aw.arabicReshape(QApplication.translate('Label', '/min')),color = self.aw.qmc.palette['ylabel'],fontproperties=fontprop_large)

delta_axis_label = ('' if self.aw.qmc.zgrid == 0 else self.aw.qmc.mode + self.aw.arabicReshape(QApplication.translate('Label', '/min')))
self.aw.qmc.delta_ax.set_ylabel(delta_axis_label,color = self.aw.qmc.palette['ylabel'],fontproperties=fontprop_medium)

self.aw.qmc.delta_ax.set_ylim(self.aw.qmc.zlimit_min,self.aw.qmc.zlimit)
if self.aw.qmc.zgrid > 0:
self.aw.qmc.delta_ax.yaxis.set_major_locator(ticker.MultipleLocator(self.aw.qmc.zgrid))
Expand Down Expand Up @@ -1336,6 +1348,7 @@ def sectionMoved(self,_logicalIndex, _oldVisualIndex, _newVisualIndex):
self.realign()
self.updateZorders()
self.repaint()
self.aw.qpc.update_phases(self.getPhasesData())

@pyqtSlot(int)
def visibilityChanged(self,state):
Expand All @@ -1344,6 +1357,7 @@ def visibilityChanged(self,state):
self.updateDeltaLimits()
self.autoTimeLimits()
self.repaint()
self.aw.qpc.update_phases(self.getPhasesData())

@pyqtSlot(int,bool)
def flagChanged(self,i,b):
Expand Down Expand Up @@ -1501,6 +1515,7 @@ def updateProfileTableColors(self):
else:
c = QColor.fromRgbF(*p.gray).lighter()
w.setBackground(c)
self.aw.qpc.update_phases(self.getPhasesData())

# align all profiles to the first one w.r.t. to the event self.aw.qmc.compareAlignEvent
# 0:CHARGE, 1:TP, 2:DRY, 3:FCs, 4:FCe, 5:SCs, 6:SCe, 7:DROP
Expand Down Expand Up @@ -1609,6 +1624,7 @@ def addProfileFromURL(self,extractor,url):
self.realign()
self.updateZorders()
self.repaint()
self.aw.qpc.update_phases(self.getPhasesData())
except Exception as ex: # pylint: disable=broad-except
_log.exception(ex)

Expand Down Expand Up @@ -1637,6 +1653,7 @@ def addProfiles(self,filenames):
self.realign()
self.updateZorders()
self.repaint()
self.aw.qpc.update_phases(self.getPhasesData())

def deleteProfile(self,i):
self.profileTable.removeRow(i)
Expand All @@ -1653,6 +1670,7 @@ def deleteProfiles(self,indices):
self.realign()
self.updateZorders()
self.repaint()
self.aw.qpc.update_phases(self.getPhasesData())

### Utility

Expand All @@ -1662,6 +1680,22 @@ def getTopProfileVisualOrder(self):
return p
return None

def getPhasesData(self):
data = []
profiles = self.getProfilesVisualOrder()
for p in reversed(profiles):
if p.visible:
start = p.timex[p.timeindex[0]] if p.timeindex[0] != -1 else p.timex[0]
total = p.timex[p.timeindex[6]] - start if p.timeindex[6] != 0 else p.timex[-1]
dry = p.timex[p.timeindex[1]] - start if p.timeindex[1] != 0 else 0
fcs = p.timex[p.timeindex[2]] - start if p.timeindex[2] != 0 else 0
p1 = dry
p3 = total - fcs if fcs != 0 else 0
p2 = total - p1 - p3 if p1 != 0 and p3 != 0 else 0
c = QColor.fromRgbF(*p.color)
data.append((p.label, total, (p1, p2, p3), p.active, c.name()))
return data

def getProfilesVisualOrder(self):
res = self.profiles[:]
for i,p in enumerate(self.profiles):
Expand Down Expand Up @@ -1718,3 +1752,4 @@ def closeEvent(self, _):
self.aw.ntb.enable_edit_curve_parameters()
except Exception as e: # pylint: disable=broad-except
_log.exception(e)
self.aw.qpc.update_phases(None)
3 changes: 1 addition & 2 deletions src/artisanlib/curves.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ def __init__(self, parent = None, aw = None, activeTab = 0):
#Filter holds the number of pads in filter
self.Filter = QSpinBox()
self.Filter.setSingleStep(1)
self.Filter.setRange(0,10)
self.Filter.setRange(0,5)
self.Filter.setAlignment(Qt.AlignmentFlag.AlignRight)
self.Filter.setValue(int(round((self.aw.qmc.curvefilter - 1)/2)))
self.Filter.editingFinished.connect(self.changeFilter)
Expand Down Expand Up @@ -1553,7 +1553,6 @@ def changedpi(self):
try:
value = self.resolutionSpinBox.value()
self.aw.setdpi(value)
self.aw.qmc.redraw(recomputeAllDeltas=False)
except Exception as e: # pylint: disable=broad-except
_, _, exc_tb = sys.exc_info()
self.aw.qmc.adderror((QApplication.translate('Error Message', 'Exception:') + ' changedpi(): {0}').format(str(e)),getattr(exc_tb, 'tb_lineno', '?'))
Expand Down
1 change: 0 additions & 1 deletion src/artisanlib/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ def __init__(self, parent = None, aw = None, activeTab = 0):

titlefont = QFont()
titlefont.setBold(True)
titlefont.setWeight(75)
self.setWindowTitle(QApplication.translate('Form Caption','Events'))
self.setModal(True)
self.helpdialog = None
Expand Down
Loading

0 comments on commit a8d242a

Please sign in to comment.