Skip to content

Commit 2d07562

Browse files
committed
prevents smoothing extra device curves using rate of rise variables
1 parent 9d63f96 commit 2d07562

File tree

4 files changed

+26
-10
lines changed

4 files changed

+26
-10
lines changed
2.2 KB
Binary file not shown.

doc/help_dialogs/Output_html/symbolic_help.html

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,25 +144,31 @@
144144
</tr>
145145
<tr>
146146
<td>R1</td>
147-
<td>ET rate of rise</td>
147+
<td>ET rate of rise (smoothed)</td>
148148
<td>Yes</td>
149149
</tr>
150150
<tr>
151151
<td>R2</td>
152-
<td>BT rate of rise</td>
152+
<td>BT rate of rise (smoothed)</td>
153153
<td>Yes</td>
154154
</tr>
155155
<tr>
156156
<td>RB1</td>
157-
<td>Background ET rate of rise</td>
157+
<td>Background ET rate of rise (smoothed)</td>
158158
<td>Yes</td>
159159
</tr>
160160
<tr>
161161
<td>RB2</td>
162-
<td>Background BT rate of rise</td>
162+
<td>Background BT rate of rise (smoothed)</td>
163163
<td>Yes</td>
164164
</tr>
165165
</tbody>
166+
</table><table width="100%" border="1" padding="1" border-collapse="collapse">
167+
<tbody>
168+
<tr>
169+
<td>Note: Smoothing is normally applied to all Extra Devices. Smoothing is not applied when an Extra Device symbolic equation includes a rate of rise variable (R1, R2, RB1 or RB2). Rate of rise variables already have smoothing applied.</td>
170+
</tr>
171+
</tbody>
166172
</table><br/><br/><b>SHIFTED SYMBOLIC VARIABLES</b><table width="100%" border="1" padding="1" border-collapse="collapse">
167173
<tbody>
168174
<tr>

src/artisanlib/canvas.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10850,7 +10850,10 @@ def redraw(self, recomputeAllDeltas:bool = True, re_smooth_foreground:bool = Tru
1085010850
timexi_lin = None
1085110851
try:
1085210852
if self.aw.extraCurveVisibility1[i]:
10853-
if not self.flagon and (re_smooth_foreground or len(self.extrastemp1[i]) != len(self.extratimex[i])):
10853+
# Rate of rise variables already have smoothing applied. We don't smooth equations that use them.
10854+
if any(x in self.extramathexpression1[i] for x in ['R1', 'RB1']):
10855+
self.extrastemp1[i] = self.extratemp1[i]
10856+
elif not self.flagon and (re_smooth_foreground or len(self.extrastemp1[i]) != len(self.extratimex[i])):
1085410857
self.extrastemp1[i] = self.smooth_list(self.extratimex[i],
1085510858
(fill_gaps(self.extratemp1[i]) if self.interpolateDropsflag else self.extratemp1[i]),
1085610859
window_len=self.curvefilter,
@@ -10895,7 +10898,10 @@ def redraw(self, recomputeAllDeltas:bool = True, re_smooth_foreground:bool = Tru
1089510898
self.adderror((QApplication.translate('Error Message','Exception:') + ' redraw() {0}').format(str(ex)),getattr(exc_tb, 'tb_lineno', '?'))
1089610899
try:
1089710900
if self.aw.extraCurveVisibility2[i]:
10898-
if not self.flagon and (re_smooth_foreground or len(self.extrastemp2[i]) != len(self.extratimex[i])):
10901+
# Rate of rise variables already have smoothing applied. We don't smooth equations that use them.
10902+
if any(x in self.extramathexpression2[i] for x in ['R2', 'RB2']):
10903+
self.extrastemp2[i] = self.extratemp2[i]
10904+
elif not self.flagon and (re_smooth_foreground or len(self.extrastemp2[i]) != len(self.extratimex[i])):
1089910905
self.extrastemp2[i] = self.smooth_list(self.extratimex[i],
1090010906
(fill_gaps(self.extratemp2[i]) if self.interpolateDropsflag else self.extratemp2[i]),
1090110907
window_len=self.curvefilter,

src/help/symbolic_help.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,15 @@ def content() -> str:
4545
tbl_SymbolicVariables.add_row(['E3',QApplication.translate('HelpDlg','Last event value of the third event type'),'&#160;'])
4646
tbl_SymbolicVariables.add_row(['E4',QApplication.translate('HelpDlg','Last event value of the fourth event type'),'&#160;'])
4747
tbl_SymbolicVariables.add_row(['&#160;','&#160;','&#160;'])
48-
tbl_SymbolicVariables.add_row(['R1',QApplication.translate('HelpDlg','ET rate of rise'),QApplication.translate('HelpDlg','Yes')])
49-
tbl_SymbolicVariables.add_row(['R2',QApplication.translate('HelpDlg','BT rate of rise'),QApplication.translate('HelpDlg','Yes')])
50-
tbl_SymbolicVariables.add_row(['RB1',QApplication.translate('HelpDlg','Background ET rate of rise'),QApplication.translate('HelpDlg','Yes')])
51-
tbl_SymbolicVariables.add_row(['RB2',QApplication.translate('HelpDlg','Background BT rate of rise'),QApplication.translate('HelpDlg','Yes')])
48+
tbl_SymbolicVariables.add_row(['R1',QApplication.translate('HelpDlg','ET rate of rise (smoothed)'),QApplication.translate('HelpDlg','Yes')])
49+
tbl_SymbolicVariables.add_row(['R2',QApplication.translate('HelpDlg','BT rate of rise (smoothed)'),QApplication.translate('HelpDlg','Yes')])
50+
tbl_SymbolicVariables.add_row(['RB1',QApplication.translate('HelpDlg','Background ET rate of rise (smoothed)'),QApplication.translate('HelpDlg','Yes')])
51+
tbl_SymbolicVariables.add_row(['RB2',QApplication.translate('HelpDlg','Background BT rate of rise (smoothed)'),QApplication.translate('HelpDlg','Yes')])
5252
strlist.append(tbl_SymbolicVariables.get_html_string(attributes={'width':'100%','border':'1','padding':'1','border-collapse':'collapse'}))
53+
tbl_SymbolicVariablesbottom = prettytable.PrettyTable()
54+
tbl_SymbolicVariablesbottom.header = False
55+
tbl_SymbolicVariablesbottom.add_row([QApplication.translate('HelpDlg','Note: Smoothing is normally applied to all Extra Devices. Smoothing is not applied when an Extra Device symbolic equation includes a rate of rise variable (R1, R2, RB1 or RB2). Rate of rise variables already have smoothing applied.')])
56+
strlist.append(tbl_SymbolicVariablesbottom.get_html_string(attributes={'width':'100%','border':'1','padding':'1','border-collapse':'collapse'}))
5357
strlist.append('<br/><br/><b>')
5458
strlist.append(QApplication.translate('HelpDlg','SHIFTED SYMBOLIC VARIABLES'))
5559
strlist.append('</b>')

0 commit comments

Comments
 (0)