prjemian / epics-docker

Provide EPICS IOCs in docker images
9 stars 4 forks source link

orient9 screen is all white #39

Closed prjemian closed 3 years ago

prjemian commented 3 years ago

The O macro is not correct. Clipboard01

prjemian commented 3 years ago

It is more than just a missing macro argument. The PVs above that are white are missing due to a missing database. They are _p4, _p3, _p2, _p1, _m1, _m2, _m3, _m4 (+4 .. -4) and only _0 is present. There is an iocsh file: https://github.com/epics-modules/optics/blob/master/opticsApp/iocsh/orient.iocsh

prjemian commented 3 years ago

Here are some of the PVs from the orient9 screen:

            <string>$(P)orient_p4:H</string>
            <string>$(P)orient_p3:H</string>
            <string>$(P)orient_p2:H</string>
            <string>$(P)orient_p1:H</string>
            <string>$(P)orient_m1:H</string>
            <string>$(P)orient_m2:H</string>
            <string>$(P)orient_m3:H</string>
            <string>$(P)orient_m4:H</string>
prjemian commented 3 years ago

Not certain how to configure for this screen. @timmmooney : Do you know how to setup the IOC for this orient9 screen? I'm not seeing the database configuration.

prjemian commented 3 years ago

Aside: Compare this 4-circle computation with hklpy (bluesky) and SPEC: https://blueskyproject.io/hklpy/examples/notebooks/tst_e4cv_fourc.html

Or with hklpy computation for Si standard: https://blueskyproject.io/hklpy/examples/notebooks/geo_e4cv.html#add-a-sample-with-a-crystal-structure

prjemian commented 3 years ago

Tim suggested examination of one of the APS beam lines for a use case. Search turned up this st.cmd configuration:

dbLoadTemplate("orient_soft_motor.substitutions")
### Orientation matrix, four-circle diffractometer (see seq program 'orient' below)
dbLoadRecords("$(OPTICS)/opticsApp/Db/orient.db", "P=$(PREFIX),O=1,PREC=4")
dbLoadRecords("$(OPTICS)/opticsApp/Db/orient.db", "P=$(PREFIX),O=_p1,PREC=4")
dbLoadRecords("$(OPTICS)/opticsApp/Db/orient.db", "P=$(PREFIX),O=_p2,PREC=4")
dbLoadRecords("$(OPTICS)/opticsApp/Db/orient.db", "P=$(PREFIX),O=_p3,PREC=4")
dbLoadRecords("$(OPTICS)/opticsApp/Db/orient.db", "P=$(PREFIX),O=_p4,PREC=4")
dbLoadRecords("$(OPTICS)/opticsApp/Db/orient.db", "P=$(PREFIX),O=_m1,PREC=4")
dbLoadRecords("$(OPTICS)/opticsApp/Db/orient.db", "P=$(PREFIX),O=_m2,PREC=4")
dbLoadRecords("$(OPTICS)/opticsApp/Db/orient.db", "P=$(PREFIX),O=_m3,PREC=4")
dbLoadRecords("$(OPTICS)/opticsApp/Db/orient.db", "P=$(PREFIX),O=_m4,PREC=4")
dbLoadTemplate("orientFan8.substitutions")
dbLoadTemplate("orient_xtals.substitutions")
# Orientation-matrix
seq &orient, "P=$(PREFIX)orient_p1:,PM=$(PREFIX),mTTH=m_p1TTH,mTH=m_p1TH,mCHI=m_p1CHI,mPHI=m_p1PHI"
seq &orient, "P=$(PREFIX)orient_p2:,PM=$(PREFIX),mTTH=m_p2TTH,mTH=m_p2TH,mCHI=m_p2CHI,mPHI=m_p2PHI"
seq &orient, "P=$(PREFIX)orient_p3:,PM=$(PREFIX),mTTH=m_p3TTH,mTH=m_p3TH,mCHI=m_p3CHI,mPHI=m_p3PHI"
seq &orient, "P=$(PREFIX)orient_p4:,PM=$(PREFIX),mTTH=m_p4TTH,mTH=m_p4TH,mCHI=m_p4CHI,mPHI=m_p4PHI"
seq &orient, "P=$(PREFIX)orient_m1:,PM=$(PREFIX),mTTH=m_m1TTH,mTH=m_m1TH,mCHI=m_m1CHI,mPHI=m_m1PHI"
seq &orient, "P=$(PREFIX)orient_m2:,PM=$(PREFIX),mTTH=m_m2TTH,mTH=m_m2TH,mCHI=m_m2CHI,mPHI=m_m2PHI"
seq &orient, "P=$(PREFIX)orient_m3:,PM=$(PREFIX),mTTH=m_m3TTH,mTH=m_m3TH,mCHI=m_m3CHI,mPHI=m_m3PHI"
seq &orient, "P=$(PREFIX)orient_m4:,PM=$(PREFIX),mTTH=m_m4TTH,mTH=m_m4TH,mCHI=m_m4CHI,mPHI=m_m4PHI"
seq &orient, "P=$(PREFIX)orient1:,PM=$(PREFIX),mTTH=SM1,mTH=SM2,mCHI=SM3,mPHI=SM4"
prjemian commented 3 years ago

The setup for orient9 could be an addition to optics:orient.iocsh or a new iocsh file. Work it up here and contribute to optics.

prjemian commented 3 years ago

Changing my mind. Will not support this screen in the VM. It provides 8 extra sets of the 4-circle orientation code and the motivation to provide this extra support is not clear now. The additional sets each require 4 additional motor records.

Will wait on support for this screen until the support is well-motivated. Marking as wontfix.