Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

lineup_and_center() plan could accept any movable #103

Closed
prjemian opened this issue Nov 6, 2019 · 2 comments
Closed

lineup_and_center() plan could accept any movable #103

prjemian opened this issue Nov 6, 2019 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@prjemian
Copy link
Collaborator

prjemian commented Nov 6, 2019

The lineup_and_center() macro (in 50-controls.py) accepts a scaler channel, or EpicsSignal (any readable) and a motor. The code could/should be generalized to accept any movable Signal.

This plan would be a valuable to apstools.plans.

Also, it has code that, given some readable signal, identifies if it is from a ScalerCH object and that returns that object. While this is nice code that can be extracted to its own function, seems that the scaler should channels should already provide this information directly. (motivation: Sometimes, one wishes to modify the count time or other aspect of the scaler object when using a scaler channel as a detector.)

@prjemian
Copy link
Collaborator Author

prjemian commented Nov 6, 2019

That same pattern of a channel identifying its containing object should be applied in other multichannel device support such as EpicsScaler, usersCalcs, userCalcouts, ...

Usually, channel.parent points to some structure that is a below the containing object. In the case of ScalerCH, the channels are three levels below. That is, channel.parent.parent.parent is the ScalerCH object.

@prjemian prjemian self-assigned this Nov 6, 2019
@prjemian prjemian added the enhancement New feature or request label Nov 6, 2019
@prjemian prjemian added this to the 2019-11 day long test milestone Nov 6, 2019
@prjemian
Copy link
Collaborator Author

prjemian commented Nov 23, 2019

Note (bluesky/bluesky#1267 (comment)): the kind="hinted" attribute is important.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant