APS-4ID-POLAR / APS-4ID-POLAR/ipython-polar

Failed to read BestEffortCallback peaks

Open
#94 0 comments 0 reactions 1 assignee Claimed by @gfabbris View on GitHub
bug
Dominant language
Python
Stars
1
Forks
3
PR merge metrics
No merged PRs in 30d

Description

During the measurements we came along this error during a macro:

```python
in moveWL3()
83
84 yield from mv(energy, _energy)
---> 85 yield from align_mono()
86 yield from align_pr(_energy, _offset)
87

in align_mono()
17 # Scan thf2, move to max
18 yield from lup(mono.thf2, -6, 6, 40, 0.3)
---> 19 yield from maxi(mono.thf2)
20
21 # Scan chi2, move to cen

~/.ipython/profile_bluesky/startup/instrument/plans/center_maximum.py in maxi(positioner, detector)
66 "1 detector was plotted")
67 else:
---> 68 pos = peaks['max'][list(peaks['cen'].keys())[0]][0]
69 else:
70 pos = peaks['max'][detector][0]

IndexError: list index out of range
```

This plan (`moveWL3()`) was ran several times during the week and this issue never came up. I also ran the same scans again (both `RE(maxi(mono.thf2))` and `moveWL3()`) right after the error, and it was not reproduced.

My guess is that the fitting in the `BestEffortCallback.peaks` was not done when `pos = peaks['max'][list(peaks['cen'].keys())[0]][0]` was called. But not sure if the `RE` moves on even if the `BestEffortCallback` is not done.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.