pepper-pot emittance measurement

Moderators: cyao, michael_borland

QJohn
Posts: 19
Joined: 08 Dec 2015, 10:49

Re: pepper-pot emittance measurement

Post by QJohn » 12 Dec 2015, 23:36

michael_borland wrote:The root of all the problems is that the beam is not upright in phase space at the entrance to the RCOL element. This causes the computations to fail because it violates one of the assumptions of the pepper pot method. When the calculation produces an invalid value (square root of a negative number) that subsequently generates the error about too few items on the stack.

You put alpha_x=0 and alpha_y=0 in the &bunched_beam command, but that controls the beam parameters at the start of the simulation, not at the entrance to the pepper pot plate. Look at the before.out file and you'll see that the beam is a tilted stripe in (x, x') and (y, y') phase space. The pepper pot method won't work in this case. If you tune the two quadrupoles to give the required conditions alpha_x=0 and alpha_y=0 at the entrance to the RCOL element, it should all work fine.

As for before.out and before.sig being too large to upload: you inserted two WATCH elements (W1 and W2) into the lattice. In the default mode, they dump the coordinates of all the particles that they see into the named files (before.out and before.sig, respectively). I suspect you don't want that, particularly since the two files will contain exactly the same data. Consult the manual to see proper use of the WATCH element.

--Michael
Hi, Michael, I adjusted the beam line as follows:

Code: Select all

ec: ecol,x_max=0.8e-5,y_max=0.8e-5,l=1.5e-4
q1: quad,l=0.1,k1=4.5
d0: drift,l=0.5
d1: drift,l=0.7
d2: drift,l=0.7
bl: line=(ec,d1)
and the .ele file is :

Code: Select all

&run_setup
        lattice = lattice.lte
        use_beamline="bl"
        p_central_mev = 400
        output = %s.out
        final = %s.fin
&end

&run_control
        n_indices = 2
&end

&vary_element name=EC, item=DX, initial=-3.75e-3, final=3.75e-3, index_number=0, index_limit=11 &end
&vary_element name=EC, item=DY, initial=-3.75e-3, final=3.75e-3, index_number=1, index_limit=11 &end

&bunched_beam
        n_particles_per_bunch = 10000000
        one_random_bunch = 1
        beta_x = 5.0e-3
        beta_y = 5.0e-3
        emit_x = 1.25e-9
        emit_y = 1.25e-9
        alpha_x=0
        alpha_y=0
        distribution_type[0] = 2*"gaussian"
        distribution_cutoff[0] = 2*3
&end

&track &end
That is to say, I already set the alpha_x=alpha_y=0 when the electorn beam reached the pepper mask. When I run the script, I also got that errors:
error: squre root of negative number
*stop*
too few items on stack(divide)
*stop*
Error for G:\SDDS Toolkit \sddsprocess.exe:
unable to compute rpn expression-- rpn error (SDDS_ComputerDefinedColumn)

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

Re: pepper-pot emittance measurement

Post by michael_borland » 12 Dec 2015, 23:40

The collimator opening is extremely small (8 microns), so you may have very poor statistics that give invalid calculations. Try increasing the collimator opening. Also, look at the Particles parameter in the .fin file to ascertain if you have a reasonable number (several thousand at least) particles at each grid point.

--Michael

QJohn
Posts: 19
Joined: 08 Dec 2015, 10:49

Re: pepper-pot emittance measurement

Post by QJohn » 12 Dec 2015, 23:59

michael_borland wrote:The collimator opening is extremely small (8 microns), so you may have very poor statistics that give invalid calculations. Try increasing the collimator opening. Also, look at the Particles parameter in the .fin file to ascertain if you have a reasonable number (several thousand at least) particles at each grid point.

--Michael
Hi,Michael, In my experiments, our electron beam has only 2.5um, the initial rms emittance is only about 1.25e-9. I had refernced other pepper-pot method articles, they all set the collimator radius about sevral microns. So, i think these conditions could not to be adjusted. do you think these erros are attributed to the particles number? Thank you very much!

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

Re: pepper-pot emittance measurement

Post by michael_borland » 13 Dec 2015, 00:01

Since the software works with larger collimator size, I think the problem is likely to be poor statistics resulting from having too few particles. You might also check whether the range through which you are sweeping the RCOL position is too large. If you move it too far from the beam center, you might not get any particles through.

--Michael

QJohn
Posts: 19
Joined: 08 Dec 2015, 10:49

Re: pepper-pot emittance measurement

Post by QJohn » 13 Dec 2015, 00:11

michael_borland wrote:Since the software works with larger collimator size, I think the problem is likely to be poor statistics resulting from having too few particles. You might also check whether the range through which you are sweeping the RCOL position is too large. If you move it too far from the beam center, you might not get any particles through.

--Michael
OK, thank you,Michael, I try to increase my particles number. Here I have another question, If I set the quadrupoles in the beamline, and the strengh of the quads colud not be adjusted.how can I set the initial alpha_x and alpha_y parameters to insure that the alpha_x=alpha_y=0 when the bunch beam reach the pepper-pot mask? Is there any relationship between the alpha and the quadrupoles?

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

Re: pepper-pot emittance measurement

Post by michael_borland » 13 Dec 2015, 11:40

There is definitely a relationship between the quadrupole strengths, drift lengths, etc. and alpha_x and alpha_y at the pepper pot plot. If you want to control the beam properties at the pepper pot plate using quadrupoles, you need to use elegant's optimization feature. There are examples in the examples file collection. Also, various textbooks on beam dynamics (e.g., volume 1 of Wiedemann's book) will cover this.

--Michael

QJohn
Posts: 19
Joined: 08 Dec 2015, 10:49

Re: pepper-pot emittance measurement

Post by QJohn » 16 Dec 2015, 20:53

michael_borland wrote:The collimator opening is extremely small (8 microns), so you may have very poor statistics that give invalid calculations. Try increasing the collimator opening. Also, look at the Particles parameter in the .fin file to ascertain if you have a reasonable number (several thousand at least) particles at each grid point.

--Michael
Hi, Michael, there is all the same the question about pepepr-pot method measure emittance. I found that, If I keep the collimator opnening invariant, only to increase the distance L bettween fluorescent screen and the pepper-pot mask, we can get the output answer, namely, the emittance output. usually, the distance L is about tens meters. I don't know if this L is necessary for the practical experiment or just the software's problem.
Meanwhile, if I want to have a postprocess to this method, I need the output files of every holes. But in my .ele file, the output file run.out contains all the holes' data. If I want to every sigle hole has a single output file, how can I realize it? Thank you very much, Michael.

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

Re: pepper-pot emittance measurement

Post by michael_borland » 16 Dec 2015, 22:29

If you want to process the .out file, you don't need to split it into separate files for each beamlet. SDDS tools can operate on each page of a multi-page file without any problem. See the attached script. (I used gzip to compress it so the forum software will accept it.)

--Michael
Attachments
procScript.gz
(522 Bytes) Downloaded 316 times

QJohn
Posts: 19
Joined: 08 Dec 2015, 10:49

Re: pepper-pot emittance measurement

Post by QJohn » 16 Dec 2015, 23:09

michael_borland wrote:If you want to process the .out file, you don't need to split it into separate files for each beamlet. SDDS tools can operate on each page of a multi-page file without any problem. See the attached script. (I used gzip to compress it so the forum software will accept it.)

--Michael
Hi, Michael, as the question I asked before you replied, I said, I need to set the distance L tens of meters. Is this large distance just this software's requirement or the practical experiments' request?

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

Re: pepper-pot emittance measurement

Post by michael_borland » 17 Dec 2015, 08:22

Having to set the distance to 10's of meters isn't an issue with the software, but the simulation parameters. I don't think it is normal for pepper pot systems to require this, so there may still be some other adjustments you need to make in the input parameters and beam optics upstream of the collimator.

--Michael

Post Reply