Bug #1452
Optics examples appear to be producing nonsense beta functions
100%
Description
This is in latest version of trunk - I didn't change anything for a couple of months, what has happened?
Updated by Rogers, Chris over 9 years ago
Looks like something has gotten screwed up in the Polynomial fitting routine
0th Transfer matrix looks like:
[[1, -2.77555756156289e-17, 5.55111512312578e-17, 5.55111512312578e-17, 5.55111512312578e-17, 4.44089209850063e-16], [1.89735380184963e-19, 1.0000000004124, 1.33229261702213e-15, 1.33229261702213e-15, 1.33229219350566e-15, 2.85638203492483e-12], [-1.06581410364015e-14, -1.77635683940025e-15, 0.999999999999998, -2.22044604925031e-15, -2.66453525910038e-15, -2.1316282072803e-14], [-1.81898940354586e-12, -5.6843418860808e-14, 0, 199.007437936864, 0, 0], [2.8421709430404e-14, 0, 1.33226762955019e-15, 1.33226762955019e-15, 1, 1.06581410364015e-14], [6.25277607468888e-13, -1.4210854715202e-14, 7.105427357601e-15, 7.105427357601e-15, 0, 199.990000644285]]
This should be close to unity.
Updated by Rajaram, Durga over 9 years ago
Going through possible changes that might affect the optics calculations....could it be related to the changes at:
http://bazaar.launchpad.net/~maus-maintainers/maus/merge/revision/600.1.165 ?
e.g.
http://bazaar.launchpad.net/~maus-maintainers/maus/merge/revision/600.1.165#src/common_cpp/Optics/CovarianceMatrix.cc
I also see a related change was made to the envelope tool plotter:
http://bazaar.launchpad.net/~maus-maintainers/maus/merge/revision/1023.1.3#bin/utilities/envelope_tool/lib/plotter.py
Updated by Rogers, Chris over 9 years ago
I noticed that the list of primaries is incorrect and will not cancel errors from first derivatives...
Updated by Rogers, Chris over 9 years ago
Found another issue - PolynomialOpticsModel::CalculateTransferMap
is using x'
on input and px
on output, which fails to fit properly.
Updated by Rogers, Chris over 9 years ago
Email to users:
Apologies for the slow reply, I was at KURRI and then on vacation. There was a bug introduced on 28th January, which means that the optics routines do not correctly normalise the momentum vector when calculating beta functions. The workaround is to normalise the momentum by hand in the optics example script. This can be done by modifying line 117 of bin/examples/optics_examples/match_step_4_beta_function.py to replace the line "momentum":{"x":0.0, "y":0.0, "z":1.0} with the line "momentum":{"x":0.0, "y":0.0, "z":self.mom} I checked this against MAUS-v0.8.2. I attach output plots from the fixed code. I will try to get a full fix in ASAP. This will affect versions MAUS-v0.7.7 through MAUS-v0.8.2. Apologies for any inconvenience caused. Please don't hesitate to ask if you have further problems.
Updated by Rogers, Chris over 9 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
Fixed in r1060
Updated by Rajaram, Durga over 9 years ago
- Target version changed from Future MAUS release to MAUS-v0.8.4