BCDA-APS / apstools

various tools for use with Bluesky at the APS
https://bcda-aps.github.io/apstools/latest/
Other
16 stars 9 forks source link

aps_undulator.py #973

Open prjemian opened 2 months ago

prjemian commented 2 months ago

There are 6 types of ID:

canismarko commented 1 month ago

I got started on this in Haven, FYI.

I want energy, gap, etc to be positioners so I diverged from the apstools version, the other signals should be fine, though.

Plan to test this on real hardware once our PV gateway gets updated.

https://github.com/spc-group/haven/blob/3d9720c59d6d8f33a3272c6fd8d880fdc67425e6/src/haven/instrument/xray_source.py#L29

prjemian commented 1 month ago

Need to make a list of the full set of undulators to be available. See the ID_Main.adl screen from the storage ring for reference.

prjemian commented 1 month ago

From here: image

Choose ID_Main image

prjemian commented 1 month ago

How different are the controls (and PVs) for these different insertion devices? Is there a common subclass?

The S29ID-IEX insertion device control screen is not like the others. The revolver looks like it has some additions to features found in the others.

Perhaps consider the Planar as the base class, then look at 2M, 4M, STI, and Revolver as possible variations. Might learn that all can augment a common subclass.

prjemian commented 1 month ago

Of these designs, only the 4M is not associated with a feature beam line (or an early beam line such as 29ID).

prjemian commented 1 month ago

I got started on this in Haven, FYI.

I want energy, gap, etc to be positioners so I diverged from the apstools version, the other signals should be fine, though.

Plan to test this on real hardware once our PV gateway gets updated.

https://github.com/spc-group/haven/blob/3d9720c59d6d8f33a3272c6fd8d880fdc67425e6/src/haven/instrument/xray_source.py#L29

This is for the STI insertion device (#977)?

prjemian commented 1 month ago

NOTE: To get to these displays, log into an account and workstation on the oxygen network and run /usr/local/epics/bin/xfd-display &. I use my own account and workstation tin.

canismarko commented 1 month ago

@prjemian I'm not sure actually. I wrote it against the Planar undulator, but I don't know if that's what we have. Is there a way to know which style of undulator we have at 25-ID?

I sorted our the positioner bits. I can read the 4 positioner components, and every signal connects at 25-ID. I like the positioner approach because it makes the gap and tapers scannable.

Since we can't move our ID yet, I haven't testing any of the set() features.

https://github.com/spc-group/haven/blob/7145a93b0e2240a8e8ce242de2abbc25fb9a2db2/src/haven/instrument/xray_source.py#L40

prjemian commented 1 month ago

The storage ring provides an ID_Main.adl screen which color-codes all the insertion devices. Here's a picture from the apstools issue:

image

Show the color code of "Planar" for the ID at 25-ID. as the screen shows, that's the most common design.

canismarko commented 1 month ago

Makes sense. I also confirmed this with Marty Smith. I wrote the Device class assuming a planar undulator, so that's good. Anyway, let me know if you want it turned into a PR or anything.

The positioner-style undulator device I wrote would NOT be backwards compatible with the apstools ApsUndulator Device.

prjemian commented 1 month ago

I recognize that the ApsUndulator is for the APS Undulator A. Not guaranteed to be a good base class or model for APS-U. It shares some basic ideas, but you (and we) want to make changes not. Primarily, energy and gap will be SoftPositioner subclasses. Most of the new undulators share this PV set. Others, notably, the Revolver, used at 8-ID and 34-ID, is different.

prjemian commented 1 month ago

A PR is most welcome, for issue #978.

gfabbris commented 5 days ago

Pre-upgrade the undulator EPICS support did not include energy backlash motion. Does anybody know if this changed? We had to implement it in Bluesky before (link), which is not ideal.

prjemian commented 5 days ago

Pre-upgrade the undulator EPICS support did not include energy backlash motion. Does anybody know if this changed? We had to implement it in Bluesky before (link), which is not ideal.

I'll ask the group (on Teams).