aps-8id-dys / bluesky

XPCS bluesky instrument configuration
Other
2 stars 0 forks source link

ENH #15 add HHL Mirrors: mr1 & mr2 #16

Closed prjemian closed 2 months ago

prjemian commented 2 months ago
prjemian commented 2 months ago

I tested this in an IPython console session. After merge, this will need to be pulled to the beam line's account. (I created the branch offline from the beam line.)

In [2]: mr1.connected
Out[2]: True

In [3]: mr2.connected
Out[3]: True

In [4]: mr1.read()
Out[4]: 
OrderedDict([('mr1_x',
              {'value': 1540.3944000000001, 'timestamp': 1717442261.539049}),
             ('mr1_x_user_setpoint',
              {'value': 1540.41145, 'timestamp': 1717442252.604055}),
             ('mr1_y', {'value': 1246.96295, 'timestamp': 1717442261.539026}),
             ('mr1_y_user_setpoint',
              {'value': 1246.96215, 'timestamp': 1717442259.957363}),
             ('mr1_coarse_pitch',
              {'value': 0.28169, 'timestamp': 1717442261.539074}),
             ('mr1_coarse_pitch_user_setpoint',
              {'value': 0.3072078, 'timestamp': 1717442249.027314}),
             ('mr1_fine_pitch', {'value': 0.0145, 'timestamp': 631152000.0}),
             ('mr1_fine_pitch_user_setpoint',
              {'value': 0.0145, 'timestamp': 631152000.0}),
             ('mr1_flag',
              {'value': 899.9992500000001, 'timestamp': 1717442259.033352}),
             ('mr1_flag_user_setpoint',
              {'value': 899.9992500000001, 'timestamp': 1717442248.552952})])
prjemian commented 2 months ago

Bluesky connects to the motor PVs. Device .read() method works. I'm convinced this should work as expected.

prjemian commented 2 months ago

Since the fine_pitch and the flag have different PV patterns, the best-fit prefix was just the IOC. Also, could not subclass Mirror2 from Mirror1 without some other gymnastics. This is so simple, it was not worth doing that.

prjemian commented 2 months ago

@MDecarabas Thanks. I fixed the typo, too.