Skip to content

Commit 5222053

Browse files
committed
generalize the assertion on ref_signal
1 parent b60d3c3 commit 5222053

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

apstools/synApps/calcout.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@
3131
Device,
3232
Component as Cpt,
3333
DynamicDeviceComponent as DDC,
34-
FormattedComponent as FC)
35-
from ophyd import EpicsSignal, EpicsSignalRO
34+
FormattedComponent as FC,
35+
)
36+
from ophyd import EpicsSignal, EpicsSignalRO, Signal
3637

3738
from ._common import EpicsRecordDeviceCommonAll, EpicsRecordFloatFields
3839
from .. import utils as APS_utils
@@ -220,10 +221,10 @@ def _setup_peak_calcout_(calc, desc, calcout, ref_signal, center=0, width=1, sca
220221
default = 0.05
221222
"""
222223
# to add a noisy background will need another calc
223-
assert(isinstance(calcout, CalcoutRecord))
224-
assert(isinstance(ref_signal, EpicsSignal))
225-
assert(width > 0)
226-
assert(0.0 <= noise <= 1.0)
224+
assert isinstance(calcout, CalcoutRecord)
225+
assert isinstance(ref_signal, Signal)
226+
assert width > 0
227+
assert 0.0 <= noise <= 1.0
227228
calcout.reset()
228229
calcout.scanning_rate.put("Passive")
229230
calcout.description.put(desc)

0 commit comments

Comments
 (0)