emittance measurement quad scan question

Moderators: cyao, michael_borland

Arne
Posts: 2
Joined: 17 Oct 2008, 12:41

Re: emittance measurement quad scan question

Post by Arne » 17 Oct 2008, 13:11

Micheal,
Michele is using the the beam size as measured by a wire scanner. The values used (sigma +/- error) are obtained from a fit to the data (LVM) assuming a Gaussian beam shape with linear background. The raw RMS values (along with errors) are also available from this data and can be used. Typically the beam at JLAB is Gaussian and the sigma from the fit generally agrees with the raw RMS values.

We can try the RMS values, but having looked at the wire scan data, I am fairly sure we'll get the same result. We'll keep working on it, if you think of anything else to try please let us know.

>>If you've taken N measurements of beam size Sx at each point, then the error value should be E=StandardDeviation(Sx)/sqrt(N). sddsemitproc will use E to >>generation random perturbations of the measured values in order to perform error propagation.
I am a bit confused by this statement. Not the statistics, but the "N measurements of beam size". We obtain the beam size and its error with one measurement. We have investigated the errors returned by the correlation matrix and concluded that they are correct. Basically we get a 5-10% measurement of the sigma for a wire scan measurement. If we haven't we should include this error in our simulation to confirm that a 5-10% error on the width measurement is sufficient for our needs.

thanks!!!

michael_borland
Posts: 1933
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: emittance measurement quad scan question

Post by michael_borland » 17 Oct 2008, 13:51

Arne,

We do things differently here: we don't really trust a single measurement of beam size, both because of noise pickup in the images and variation in the beam from pulse to pulse. In any case, the error values that you give sddsemitproc need to be an estimate of the standard deviation of the measured results that you'd observe if the measurement was repeated many times.

I'd suggest, if possible, trying the RMS values. If the sigmas and rms values only typically or generally agree, that could cause problems. The theory behind the measurement is based on rms values.

I suspect this is the root of the problem, since even when I set the errors to very small values, I don't get reasonable fits.

Some other suggestions: the x beam sizes are large on one side of the scan, but don't increase similarly on the other side. While the y data is more parabolic-looking, it suffers from a similar problem. This can cause problems with accuracy (hard to determine the beta function, in the simple one-quad case).

--Michael

simone.dimitri
Posts: 46
Joined: 09 Jun 2008, 01:19

Re: emittance measurement quad scan question

Post by simone.dimitri » 23 Jun 2016, 10:39

Dear Michael and all,
after reading the previous posts, I am still confused about the meaning of variables. In particular, I am simulating a single quad-scan (no dispersion) with predefined error values (following one of the elegantExamples), see my script in attachment. My questions are the following:

1) what does "grnd" do? ( I guess random number generator, but it looks like in [-3,3] range....??)

2) What Ex,Ey are ? And how they will be used by -nErrorSets?

3) Does "-nErrorSets" generate random errors, on the basis of Ex,Ey, to be added to the simulated-measured beam sizes? If so, how does it generate them ?

4) Finally, I plot simulated-measured beam sizes, fit data and corresponding Ex,Ey vs. quad strength. I would like to be sure that, for each quad strength, I am plotting an error bar which is the standard deviation of the simulated-measured data. So, am I doing it correctly?

Thank you in advance,
Simone
Attachments
xquadscan.txt
(1.55 KiB) Downloaded 227 times
qs.fin
(30.69 KiB) Downloaded 214 times

michael_borland
Posts: 1933
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: emittance measurement quad scan question

Post by michael_borland » 24 Jun 2016, 16:46

Simone,
1) what does "grnd" do? ( I guess random number generator, but it looks like in [-3,3] range....??)
It is a gaussian random number generator, but with no limit on the range. To limit the range, one case instead use grndl. E.g., for [-3,3] range use

Code: Select all

3 grndl
2) What Ex,Ey are ? And how they will be used by -nErrorSets?
These are the standard deviations for each measurement of Sx and Sy, respectively. In the example scripts, they are calculated as random numbers to emulate what might happen in a real measurement, where one measures Sx and Sy by averaging many readings and finding the mean and standard deviation. They are used by nErrorSets to determine the width of the distribution of errors to add to the Sx and Sy values in simulating the effect of errors.
3) Does "-nErrorSets" generate random errors, on the basis of Ex,Ey, to be added to the simulated-measured beam sizes? If so, how does it generate them ?
Yes, that's right. The program calculates the sigma matrix (emittances, betas, alphas) based on repeated perturbations of the Sx and Sy values with the assumed gaussian distributed errors Ex and Ey.
4) Finally, I plot simulated-measured beam sizes, fit data and corresponding Ex,Ey vs. quad strength. I would like to be sure that, for each quad strength, I am plotting an error bar which is the standard deviation of the simulated-measured data. So, am I doing it correctly?

Yes, it looks fine to me.

--Michael

simone.dimitri
Posts: 46
Joined: 09 Jun 2008, 01:19

Re: emittance measurement quad scan question

Post by simone.dimitri » 25 Jun 2016, 04:52

Great. Thank you. Cheers,
S.

Jerbe
Posts: 7
Joined: 14 Jun 2016, 09:00

Re: emittance measurement quad scan question

Post by Jerbe » 14 Jun 2017, 09:48

Hi,

I am evaluating a quad scan I recently did using sddsemitproc and I have a small question that goes into the same direction as this post.

I used a quadruple triplet in which the outer two quads have the same current supply, hence same K. When I use sddscollapse and sddsxref with my experimental data everything works fine. Also the sddsemitproc works. But the output file "Scan.emit" does only contain the Q2.K1 values and not the Q13.K1 values (so the middle quadrupole and not the outer ones which I varied for most scans). Am I doing something wrong, or is sddsemitproc only for single quadrupole scans? The evaluation is done using matrix elements, so the value on the fit should be fine nonetheless, right?

Best,
Jan

michael_borland
Posts: 1933
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: emittance measurement quad scan question

Post by michael_borland » 14 Jun 2017, 09:55

Jan,

The analysis doesn't depend on the number of quadrupoles in the scan. However, the program doesn't know which quadrupole is the relevant one, so it takes the first, if I remember. Changing the order of the &vary_element commands might cause it to pick the one you want.

--Michael

Post Reply