-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from NSLS-II-PDF/hanukkah-experiment
Hanukkah experiment
- Loading branch information
Showing
6 changed files
with
195 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import numpy as np | ||
import tiled.client.node # noqa: F401 | ||
from bluesky_adaptive.server import register_variable, shutdown_decorator, startup_decorator | ||
from bluesky_queueserver_api.zmq import REManagerAPI | ||
|
||
from pdf_agents.sklearn import ActiveKmeansAgent | ||
|
||
qserver = REManagerAPI(zmq_control_addr="tcp://xf28id1-srv1:60615", zmq_info_addr="tcp://xf28id1-srv1:60625") | ||
agent = ActiveKmeansAgent( | ||
bounds=np.array([(-32, 32), (-32, 32)]), | ||
ask_on_tell=False, | ||
report_on_tell=True, | ||
k_clusters=4, | ||
motor_names=["xstage", "ystage"], | ||
motor_origins=[-154.7682, 48.9615], | ||
qserver=qserver, | ||
) | ||
|
||
|
||
@startup_decorator | ||
def startup(): | ||
agent.start() | ||
|
||
|
||
@shutdown_decorator | ||
def shutdown_agent(): | ||
return agent.stop() | ||
|
||
|
||
register_variable("Tell Cache", agent, "tell_cache") | ||
register_variable("Agent Name", agent, "instance_name") |
Oops, something went wrong.