Closed prjemian closed 1 year ago
from apstools.synApps import Optics2Slit2D_HV
IOC = "gp:"
slit1 = Optics2Slit2D_HV(f"{IOC}Slit1", name="slit1")
which has this structure:
slit1
h
xp, xn, size, center
v
xp, xn, size, center
The motor assignments should already be set in the IOC as part of the 2slit.db database.
### Slits (If not supplied, RELTOCENTER defaults to zero)
dbLoadRecords("$(OPTICS)/opticsApp/Db/2slit.db","P=$(PREFIX),SLIT=Slit1V,mXp=m3,mXn=m4,RELTOCENTER=0")
dbLoadRecords("$(OPTICS)/opticsApp/Db/2slit.db","P=$(PREFIX),SLIT=Slit1H,mXp=m5,mXn=m6,RELTOCENTER=0")
In the template code shown, the motors are: $(PREFIX)m3
to $(PREFIX)m6
. Your motor assignments may be different.
or
from apstools.synApps import Optics2Slit2D_InbOutBotTop
IOC = "gp:"
slit1 = Optics2Slit2D_InbOutBotTop(f"{IOC}Slit1", name="slit1")
which has this structure:
slit1
top
bot
out
inb
hsize
hcenter
vsize
vcenter
There are two implementations, corresponding to differing and competing opinions of how the support should be implemented.
See the documentation: https://bcda-aps.github.io/apstools/latest/api/synApps/_db_2slit.html#module-apstools.synApps.db_2slit
Add the four motor slit as an example: https://bcda-aps.github.io/apstools/latest/api/_devices.html#slits
Motor assignments here: https://github.com/prjemian/epics-docker/tree/main/v1.1/n5_custom_synApps
Thanks @cpchuang, @pken for the suggestion!