Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AssertionError from APD_devices.setup_lorentzian_swait #259

Closed
prjemian opened this issue Nov 22, 2019 · 1 comment · Fixed by #260
Closed

AssertionError from APD_devices.setup_lorentzian_swait #259

prjemian opened this issue Nov 22, 2019 · 1 comment · Fixed by #260
Assignees
Labels
Milestone

Comments

@prjemian
Copy link
Contributor

fails here:

~/Apps/anaconda/envs/db-test/lib/python3.7/site-packages/apstools/synApps/swait.py in _setup_peak_swait_(calc, desc, swait, ref_signal, center, width, scale, noise)
    225     # consider a noisy background, as well (needs a couple calcs)
    226     assert(isinstance(swait, SwaitRecord))
--> 227     assert(isinstance(ref_signal, EpicsSignal))
    228     assert(width > 0)
    229     assert(0.0 <= noise <= 1.0)

from this call:

APS_devices.setup_lorentzian_swait(
    calcs.calc1,
    m1.user_readback,
    center = 2*np.random.random() - 1,
    width = 0.015 * np.random.random(),
    scale = 10000 * (9 + np.random.random()),
    noise=0.05,
)
@prjemian prjemian added the bug label Nov 22, 2019
@prjemian prjemian added this to the 1.1.15 milestone Nov 22, 2019
@prjemian prjemian self-assigned this Nov 22, 2019
@prjemian
Copy link
Contributor Author

The swait.py code needs this import:

from ophyd.signal import EpicsSignalBase

and this replacement for line 227 shown above:

assert(isinstance(ref_signal, EpicsSignalBase))

@prjemian prjemian mentioned this issue Nov 22, 2019
prjemian added a commit that referenced this issue Nov 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant