Skip to content

Commit

Permalink
Start setting up
Browse files Browse the repository at this point in the history
  • Loading branch information
noemifrisina committed May 22, 2023
1 parent 7b439aa commit e8d08e1
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
Empty file added src/mx_bluesky/I24/__init__.py
Empty file.
30 changes: 30 additions & 0 deletions src/mx_bluesky/I24/exercise_smaract_motors.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
from __future__ import annotations

from collections import namedtuple

import bluesky.plan_stubs as bps
from bluesky import RunEngine

from .smaract import SmarAct

Point3D = namedtuple("Point3D", ("x", "y", "z"))


def move_xz_motors(smaract_motors: SmarAct, pos):
yield from bps.mv()


def move_omega(smaract_motors: SmarAct):
yield from bps.mv(smaract_motors.omega, 45)


def exercise_plan():
pass


def main():
RE = RunEngine()
RE(exercise_plan())


main()
17 changes: 17 additions & 0 deletions src/mx_bluesky/I24/smaract.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from ophyd import Component as Cpt
from ophyd import EpicsMotor
from ophyd.epics_motor import MotorBundle


class SmarAct(MotorBundle):
x: EpicsMotor = Cpt(EpicsMotor, "-MO-VGON-01:PINX")
z: EpicsMotor = Cpt(EpicsMotor, "-MO-VGON-01:PINZ")
yh: EpicsMotor = Cpt(EpicsMotor, "-MO-VGON-01:PINYH")
omega: EpicsMotor = Cpt(EpicsMotor, "-MO-VGON-01:OMEGA")
kappa: EpicsMotor = Cpt(EpicsMotor, "-MO-VGON-01:KAPPA")
phi: EpicsMotor = Cpt(EpicsMotor, "-MO-VGON-01:PHI")

# SmarAct
xs: EpicsMotor = Cpt(EpicsMotor, "-MO-VGON-01:PINXS")
ys: EpicsMotor = Cpt(EpicsMotor, "-MO-VGON-01:PINXS")
zs: EpicsMotor = Cpt(EpicsMotor, "-MO-VGON-01:PINZS")

0 comments on commit e8d08e1

Please sign in to comment.