Closed qzhang234 closed 4 years ago
@prjemian Also it seems like I don't have the permission to assign people to this issue yet
It's OK to paste the full text of an error message into an issue. The attached .txt
file must be downloaded and viewed in a separate tool and that's just more steps. If the error message gets really long, you can enclose in a dropdown section following this advice: https://gist.github.com/prjemian/06650476c965929d1fd487935e8ea352
The problem here is that a scaler channel with no name is still included as an active channel, even though the tutorial calls: scaler.select_channels(None)
.
The fix should be included in that call and it seems the fix is not there. I'll have to fix it in ophyd but for now, replace the cell (two cells after the scaler.wait_for_connection()
that reads:
scaler.select_channels(None)
scaler.read()
with this content
from apstools.devices import use_EPICS_scaler_channels
scaler.select_channels(None)
use_EPICS_scaler_channels(scaler)
scaler.read()
before the fix:
OrderedDict([('', {'value': 0.0, 'timestamp': 1589830782.781853}),
('scint', {'value': 7.0, 'timestamp': 1589830782.781853}),
('roi1', {'value': 8.0, 'timestamp': 1589830782.781853}),
('scaler_time', {'value': 1.6, 'timestamp': 1589830782.781853})])
after the fix
OrderedDict([('scint', {'value': 7.0, 'timestamp': 1589830782.781853}),
('roi1', {'value': 8.0, 'timestamp': 1589830782.781853}),
('scaler_time', {'value': 1.6, 'timestamp': 1589830782.781853})])
And, until I fix the lesson, replace every instance of
scaler.select_channels(None)
with
# scaler.select_channels(None)
use_EPICS_scaler_channels(scaler)
See https://github.com/bluesky/ophyd/issues/692 yet something funny happened on the to the release (https://github.com/bluesky/ophyd/issues/714) and it seems this still does not work as intended.
The error only shows up now since I just (last week) removed the call to apstools.devices.use_EPICS_scaler_channels()
from the tutorials. That's all it took to expose there is still a fix needed for this in ophyd.
On a different workstation, different installation of the framework, not seeing this error. The lesson1.ipynb notebook correctly removes the scaler channel with the blank name. Version difference?
Here's a view from the workstation with no problem:
Here's the same view from workstation snow at your beam line:
Aha! On snow, channel 1 is not named where the other (successful) workstation has given name clock
to channel 1. When channel 1 has a name, both workstations are successful using only scaler.select_channels()
. When the notebook is started and channel 1 does not have a name, both workstations reported the same error as noted above.
For now, no changes are needed in the notebook but give channel 1 (of the scaler) a name before you start the notebook. The name clock is appropriate.
caput sky:scaler1.NM1 clock
The underlying ophyd support needs a bug fix.
I got another error message on use_EPICS_scaler_channels()
on talc this time:
Toggle the comments back to read:
scaler.select_channels(None)
# use_EPICS_scaler_channels(scaler)
scaler.read()
Once a BUG is filed with ophyd, this issue can be closed.
I downloaded the newest version of the Bluesky lesson from Box (https://anl.box.com/s/34d4rqn6334j16iym38815c61tnxsrpt) and placed it at
/home/beams10/8IDIUSER/lessons
on 8idiuser@talc.When I tried to run
RE(bp.count([scaler]))
inlesson1.ipynb
, I got the following error, see run_error.txt@prjemian any suggestions?