This is where I summarize everything I've done with the bcm calibrations.
Part 1

I perfomed the first global bcm calibration in November and it's described in log entry 51
The next entry, 53, shows all the plots produced by the global calibration script. In the plot below, we can see from the non-random scatter of the points that the Unser zero drifts over the length of the calibration run.


This drifting zero affects the calibration of both bcms. It was decided that the bcm calibration script should be altered so that instead of averaging all the beam-off periods to obtain an average unser zero for the whole run, we should use the most recent available one.


Part 2
Then, some time passed. No one knows how to program in PHYSICA and no one wants to learn.

Finally, I implented a half-ass solution. Instead of making a sophisticated script that can figure out what "time" a beam-on period happens and then search through the beam-off periods for a close one, I did something else. There is no way to keep an index of "time" in the script the way it's currently written, so the easiest thing to do would be to make sure that for each beam-on period, there is a beam-off period with the same numerical index (it just counts them: 1, 3, 5, and so on). I altered the code slightly to do that, and the user now has to select an equal number of beam-on and -off periods and hopefully make sure that they're close to each other. I did that, and this is the result:



You can clearly see some outliers here. I figured out which runs those came from, went back to those runs, and reanalyzed them again. I was too ambitious the first time around, and used more beam-off periods than I should have, i.e. I picked ones that weren't always flat or spike- free in the hope of maximizing useful beam-on periods. Once redone, these points fall into line with the rest.


The interesting thing is that the actual calibration numbers hardly change. Here they are:

gain factors for three cavity monitors (original)
gbcm1_gain = 0.00032889 ; microA/Hz
gbcm2_gain = 0.00038301 ; microA/Hz
zero offsets for BCM s
gbcm1_offset = 250507. ; Hz
gbcm2_offset = 250517. ; Hz

gain factors for three cavity monitors (redone with #beam_offs=#beam_ons)
gbcm1_gain = 0.00032870 ; microA/Hz
gbcm2_gain = 0.00038280 ; microA/Hz
zero offsets for BCM s
gbcm1_offset = 250495. ; Hz
gbcm2_offset = 250509. ; Hz

gain factors for three cavity monitors (outliers removed)
gbcm1_gain = 0.00032893 ; microA/Hz
gbcm2_gain = 0.00038307 ; microA/Hz
zero offsets for BCM s
gbcm1_offset = 250510. ; Hz
gbcm2_offset = 250522. ; Hz

Finally, here are the other plots for the global calibration:






Part 2.1
Dave wanted to see a histogram of the residual current (uA) for both BCMs using the original calibration code and then using the local unser zero code.

Original (Ave Zero) With Local Zero


To compare them, I fitted a gaussian (doesn't really look like one), and the RMS values are pretty similar, but the old ones are just a tad higher.