synApps swait record#
The swait
record is part of the calc
module:
https://htmlpreview.github.io/?https://raw.githubusercontent.com/epics-modules/calc/R3-6-1/documentation/swaitRecord.html
see the synApps calc
module suppport:
epics-modules/calc
Ophyd support for the EPICS synApps swait record
EXAMPLES:
import apstools.synApps
calcs = apstools.synApps.UserCalcsDevice("xxx:", name="calcs")
calc1 = calcs.calc1
apstools.synApps.setup_random_number_swait(calc1)
apstools.synApps.setup_incrementer_swait(calcs.calc2)
calc1.reset()
|
Single instance of the userCalcN database. |
|
EPICS synApps XXX IOC setup of userCalcs: |
|
EPICS synApps swait record: used as |
|
EPICS synApps synApps swait record: single channel [A-L] |
|
setup swait record to generate random numbers |
|
setup swait for noisy Gaussian |
|
setup swait record for noisy Lorentzian |
|
setup swait record as an incrementer |
- class apstools.synApps.swait.SwaitRecord(*args: Any, **kwargs: Any)[source]#
EPICS synApps swait record: used as
$(P):userCalc$(N)
reset
()set all fields to default values
- class apstools.synApps.swait.SwaitRecordChannel(*args: Any, **kwargs: Any)[source]#
EPICS synApps synApps swait record: single channel [A-L]
- class apstools.synApps.swait.UserCalcN(*args: Any, **kwargs: Any)[source]#
Single instance of the userCalcN database.
- class apstools.synApps.swait.UserCalcsDevice(*args: Any, **kwargs: Any)[source]#
EPICS synApps XXX IOC setup of userCalcs:
$(P):userCalc$(N)
reset
()set all fields to default values
- apstools.synApps.swait.setup_gaussian_swait(swait, ref_signal, center=0, width=1, scale=1, noise=0.05)[source]#
setup swait for noisy Gaussian
calculation: $D*(0.95+E*RNDM)/exp(((A-B)/C)^2)$
PARAMETERS
- swait
object : instance of
SwaitRecord
- ref_signal
object : instance of
EpicsSignal
used as $A$- center
float : instance of
EpicsSignal
used as $B$, default = 0- width
float : instance of
EpicsSignal
used as $C$, default = 1- scale
float : instance of
EpicsSignal
used as $D$, default = 1- noise
float : instance of
EpicsSignal
used as $E$, default = 0.05
- apstools.synApps.swait.setup_incrementer_swait(swait, scan=None, limit=100000)[source]#
setup swait record as an incrementer
PARAMETERS
- swait
object : instance of
SwaitRecord
- scan
text or int or
None
any of the EPICS record.SCAN
values, or the index number of the value, set to default ifNone
, default:.1 second
- limit
int or
None
set the incrementer back to zero when this number is reached (or passed), default: 100000
- apstools.synApps.swait.setup_lorentzian_swait(swait, ref_signal, center=0, width=1, scale=1, noise=0.05)[source]#
setup swait record for noisy Lorentzian
calculation: $D*(0.95+E*RNDM)/(1+((A-B)/C)^2)$
PARAMETERS
- swait
object : instance of
SwaitRecord
- ref_signal
object : instance of
EpicsSignal
used as $A$- center
float : instance of
EpicsSignal
used as $B$, default = 0- width
float : instance of
EpicsSignal
used as $C$, default = 1- scale
float : instance of
EpicsSignal
used as $D$, default = 1- noise
float : instance of
EpicsSignal
used as $E$, default = 0.05