Octupole magnet strengths are set using the formula for Decapoles
Summary
In the course of trying to get Opal to agree with another code, Finn O'Shea discovered that the normal component of the octupole strength is set using the formula for decapoles. Line 114 of Multipole.cpp shows that the OCTUPOLE case is combined with the DECAPOLE case:
Steps to reproduce
will ask for input file(s)
What is the current bug behavior?
OCTUPOLE behaves like a DECAPOLE, see also the attached file with the trace win "reference" solution, provided by Finn O'Shea.
What is the expected correct behavior?
see below
Relevant logs and/or screenshots
case OCTUPOLE:
case DECAPOLE:
NormalComponents[n - 1] = (v + vError) / 24;
NormalComponentErrors[n - 1] = vError / 24;
break;
Possible fixes
case OCTUPOLE:
NormalComponents[n - 1] = (v + vError) / 6;
NormalComponentErrors[n - 1] = vError / 6;
break;
case DECAPOLE:
NormalComponents[n - 1] = (v + vError) / 24;
NormalComponentErrors[n - 1] = vError / 24;
break;
Edited by adelmann