Page 1 of 1

Import low energy distribution (issue on longitudinal plane)

Posted: Thu 23 Mar 2023 16:54
by Fred Bouly
Hi,

I am trying to import, from an ASCII file, an electron beam distribution, with a low kinetic energy (2.65043 keV) and a large energy spread.

once .dst file generated by Plotwin, transverse plane is ok, see attached image.

While on the longitudinal plane the distribution seems to be "distorted", see attached image . \delta coordinates seem to be ok, but not in Z?

when importing other distribution at higher energies > 100 keV, I do not have the problem anymore.

I also attach the ASCII distribution file.

Could you help me with that?

cheers

Re: Import low energy distribution (issue on longitudinal plane)

Posted: Thu 23 Mar 2023 17:28
by Didier
Dear Fred,

The problem here is paraxality. The particles in the DST file are defined using the phase energy and not Z-Dp/p, because that is how partran works. When you import the file, the conversion is linear without taking into account the transverse divergence of the particles and considering an average energy. This is sufficient for most beams, but not in your case. You must therefore use the second type of import defined in the PlotWin documentation where the energy and phase of the particles will be used and defined.
But whatever your choice between defining a beam via E-P or Z-Dp, the 2 phase space plots will never be satisfactory at the same time, this is the limit of the current historical codes, partan works in E-P and TraceWin in Z-Dp/p.

See chapter : "Conversions between [z-z’], [z-δ] and [Δφ-ΔW] phase planes" of TraveWin manual

Regards,

Didier

Re: Import low energy distribution (issue on longitudinal plane)

Posted: Fri 24 Mar 2023 17:06
by Fred Bouly
Hello ,

Many Thanks Didier for your feedback.

I tried with the second type of import file. Indeed it remains the same for plots with Z. But Time and phase are OK.
See attached images, just FYI.

cheers,
fred

Re: Import low energy distribution (issue on longitudinal plane)

Posted: Mon 27 Mar 2023 09:45
by Didier
Dear Fred,

Could you attached your second file?
I'll have a look about it.

Regards,

Didier

Re: Import low energy distribution (issue on longitudinal plane)

Posted: Tue 28 Mar 2023 11:28
by Didier
Dear Fred,

Finally, I modified PlotWin code to let the user select or not the paraxlity option when the imported file is only defined via [Z-Dp/p].

Regards,

Didier

Re: Import low energy distribution (issue on longitudinal plane)

Posted: Tue 28 Mar 2023 15:05
by Fred Bouly
Dear Didier,

Thanks a lot for adding the option.
I tested it with type 1 ascii file. The "shape" in the Z-Zp plane or Z-delta is OK, but I notice a shift (about 1 mm) in the Z position as regard to the value I put in the ascii file. see attached image.

It is still confusing for me why there is this 'Shape difference' in Z-Zp and phi-W planes, compare to the first picture I sent where I compute the particles positions with the conversions formula that are used in the Tracewin help.

I also attached both type of ascii files I used.

cheers,
fred

Re: Import low energy distribution (issue on longitudinal plane)

Posted: Tue 28 Mar 2023 16:32
by Didier
Dear Fred,

Whatever file used I read Zo=-0.106 mm. Same result for dst files with ou with paraxality option for the first one.
For your second remark, I think we have to discuss.

Regards,

Didier