Skip to content

Commit

Permalink
Merge pull request #260 from BCDA-APS/bugfixes
Browse files Browse the repository at this point in the history
bugfixes
  • Loading branch information
prjemian authored Nov 22, 2019
2 parents fced530 + abdb556 commit e462b9e
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ issue*.py
build_log.txt

.ipython_*.log*
.vscode/
.logs/
16 changes: 15 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,21 @@
Change History
##############

:1.1.15: expected by *tba* :
:1.1.16: expected by *tba* :

:1.1.15: expected by *2019-11-29* : bug fixes

* `#259 <https://github.com/prjemian/spec2nexus/issues/259>`_
resolve AssertionError from setup_lorentzian_swait

* `#258 <https://github.com/prjemian/spec2nexus/issues/258>`_
swait record does not units, some other fields

* `#255 <https://github.com/prjemian/spec2nexus/issues/255>`_
plans: resolve indentation error

* `#252 <https://github.com/prjemian/spec2nexus/issues/252>`_
synApps: add asyn record support

:1.1.14: released *2019-09-03* : bug fixes, more synApps support

Expand Down
2 changes: 1 addition & 1 deletion apstools/plans.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def addDeviceDataAsStream(devices, label):
devices = [devices]
for d in devices:
yield from bps.read(d)
yield from bps.save()
yield from bps.save()


def execute_command_list(filename, commands, md={}):
Expand Down
9 changes: 7 additions & 2 deletions apstools/synApps/swait.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
DynamicDeviceComponent as DDC,
FormattedComponent as FC)
from ophyd import EpicsSignal, Signal
from ophyd.signal import EpicsSignalBase

from ._common import EpicsRecordDeviceCommonAll, EpicsRecordFloatFields
from .. import utils as APS_utils
Expand Down Expand Up @@ -90,7 +91,7 @@ def _swait_channels(channel_list):
return defn


class SwaitRecord(EpicsRecordFloatFields, EpicsRecordDeviceCommonAll):
class SwaitRecord(EpicsRecordDeviceCommonAll):
"""
synApps swait record: used as $(P):userCalc$(N)
Expand All @@ -99,6 +100,10 @@ class SwaitRecord(EpicsRecordFloatFields, EpicsRecordDeviceCommonAll):
~reset
"""
precision = Cpt(EpicsSignal, ".PREC")
high_operating_range = Cpt(EpicsSignal, ".HOPR")
low_operating_range = Cpt(EpicsSignal, ".LOPR")

calculated_value = Cpt(EpicsSignal, ".VAL")
calculation = Cpt(EpicsSignal, ".CALC")

Expand Down Expand Up @@ -224,7 +229,7 @@ def _setup_peak_swait_(calc, desc, swait, ref_signal, center=0, width=1, scale=1
"""
# consider a noisy background, as well (needs a couple calcs)
assert(isinstance(swait, SwaitRecord))
assert(isinstance(ref_signal, Signal))
assert(isinstance(ref_signal, EpicsSignalBase))
assert(width > 0)
assert(0.0 <= noise <= 1.0)
swait.reset()
Expand Down

0 comments on commit e462b9e

Please sign in to comment.