xml2optr issueshttps://gitlab.triumf.ca/hla/acc-utilities/xml2optr/-/issues2022-03-08T08:02:57-08:00https://gitlab.triumf.ca/hla/acc-utilities/xml2optr/-/issues/4lxml error on macOS - for documentation2022-03-08T08:02:57-08:00Olivier Shelbayalxml error on macOS - for documentationI'm running macOS Monterey 12.1 and continually getting the following error when trying to run xml2optr:
10:47:17 oshelb@Oliviers-MacBook-Pro:/tmp xml2optr -tf tf/rick.xml ite-tm4-sis-ily-yield
Traceback (most recent call last):
File ...I'm running macOS Monterey 12.1 and continually getting the following error when trying to run xml2optr:
10:47:17 oshelb@Oliviers-MacBook-Pro:/tmp xml2optr -tf tf/rick.xml ite-tm4-sis-ily-yield
Traceback (most recent call last):
File "/Users/oshelb/hla/src/xml2optr/bin/run-xml2optr", line 6, in <module>
from lxml import etree
ImportError: No module named lxml
@baartman @pjung @sradel @khwen12 - documenting here for awareness. I'm troubleshooting this and will post a solution when found.Olivier ShelbayaOlivier Shelbayahttps://gitlab.triumf.ca/hla/acc-utilities/xml2optr/-/issues/1ISAC steerers with non-zero length not being converted correctly2021-05-04T13:33:07-07:00Spencer KiyISAC steerers with non-zero length not being converted correctlyFor elements of type 'ecb' with a non-zero length, xml2optr appears to subtract that length equally from downstream and upstream drifts to 'make space' for the steerer (seems like that is what it does for quads). HOWEVER, it does not add...For elements of type 'ecb' with a non-zero length, xml2optr appears to subtract that length equally from downstream and upstream drifts to 'make space' for the steerer (seems like that is what it does for quads). HOWEVER, it does not add the necessary drift that would represent the steerer's length. The end result is that the length of the steerer is subtracted from the model everywhere that there is one, making the model incorrect.
@tplanche @oshelb you should be aware of this. @pjung can you fix it?Paul JungPaul Junghttps://gitlab.triumf.ca/hla/acc-utilities/xml2optr/-/issues/3Setup xml2optr to handle fringeQ calls2021-04-30T09:50:27-07:00Spencer KiySetup xml2optr to handle fringeQ callsFor discussion on Tuesday. I think we should include the Wollnick integrals in the optr tag of each quad. xml2optr should place a fringeQ call in sy.f only prior to the first quad, and then anytime it changes. Something like this:
```
...For discussion on Tuesday. I think we should include the Wollnick integrals in the optr tag of each quad. xml2optr should place a fringeQ call in sy.f only prior to the first quad, and then anytime it changes. Something like this:
```
<element id="IOS:Q1" type="eq" s="91.48*mm" l="48.92*mm">
<layout x="311.80775*mm" y="66377.769*mm" z="7906.9095*mm"/>
<epics>
<setpoint pv="IOS:Q1:POS:VOL" pol="pos" unit="V" min="0.0" max="10000.0"/>
</epics>
<optr eltrdv="-IOS:Q1:POS:VOL" effl="48.92*mm" aperr="2.540*cm" i_1="0.087" i_2="0.005" i_3="0.033" i_4="-0.234"/>
</element>
```
<beampath xmlns:xi='http://www.w3.org/2001/XInclude'>
We should also consider one more level of abstraction and putting quad types in a config so they can be changed more easily in future:
```
<element id="IOS:Q1" type="eq" s="91.48*mm" l="48.92*mm">
<layout x="311.80775*mm" y="66377.769*mm" z="7906.9095*mm"/>
<epics>
<setpoint pv="IOS:Q1:POS:VOL" pol="pos" unit="V" min="0.0" max="10000.0"/>
</epics>
<optr eltrdv="-IOS:Q1:POS:VOL">
<xi:include href='../quad/eq_isis_type1.xml' />
</optr>
</element>
```
```
<!-- Electrostatic quad. Skimmer radius 0.5"
<quad effl="48.92*mm" aperr="2.540*cm" i_1="0.087" i_2="0.005" i_3="0.033" i_4="-0.234"/>
```
We should also consider refusing to run xml2optr without fringe field specified.