Error study with and without error files

https://www.dacm-logiciels.fr/tracewin
Post Reply
GermanyRubin
Beginner
Beginner
Posts: 6
Joined: Mon 8 Mar 2021 14:23
Country:
Germany (de)
Germany

Error study with and without error files

Post by GermanyRubin »

Dear Didier,

I would like to do following:
- fix quads errors (shift and rotation) ones for all runs in error study
- change other errors for each run independently

For that I put in .dat file commands:

ERROR_CAV_NCPL_STAT 20000 1 0 0 0 0 1.0 1.0 0
ERROR_BEAM_STAT 1, 0, 0, 0, 0, 0, 1, 15, 15, 15, 10, 10, 10, 5
ERROR_QUAD_NCPL_STAT_FILE Error_Quad.txt


File Error_Quad.txt has following view (copied from the TRACEWIN output error file and modified just for quads) and it is placed at the same directory.

QUAD_ERROR dx(mm),dy(mm),drx(°),dry(°),drz(°),dG(%),L(mm),dG3(%),dG4(%),dG5(%),dG6(%)
CAV_ERROR dx(mm),dy(mm),drx(°),dry(°),drz(°),dE(%),dPhase(°),L(mm)
BEND ERROR dx(mm),dy(mm),drx(°),dry(°),drz(°),dg(%),dz(mm)
BEAM_ERROR dx(mm),dy(mm),dφ(°),dxp(mrad),dyp(mrad),de(MeV),dEx(%),dEy(%),dEz(%),mx(%),my(%),mz(%),dib(mA),αxx’_min,αxx’_max,βxx’_min(mm/mrad),βxx’_max(mm/mrad),αyy’_min,αyy’_max,βyy’_min(mm/mrad),βyy’_max(mm/mrad),αzdp_min,αzdp_max,βzdp_min(mm/mrad),βzdp_max(mm/mrad)

QUAD_ERROR [2] 0.110907 0.105804 -0.884976 -0.151432 0.282726 0 96 0 0 0 0
QUAD_ERROR [3] -0.0950807 0.0384054 0.293608 -0.730693 0.314091 0 96 0 0 0 0
QUAD_ERROR [4] 0.0713264 -0.133442 0.822767 -0.88562 0.565643 0 96 0 0 0 0
QUAD_ERROR [5] -0.106505 -0.031903 -0.730138 0.818697 0.0510322 0 96 0 0 0 0

The code starts and then shows Statistic_Errors_1[1][1]= +1.000 Error!!

Problem comes definitely from the quads errors description with file.
ERROR_QUAD_NCPL_STAT (instead of ERROR_QUAD_NCPL_STAT_FILE Error_Quad.txt) works properly.
Just quads errors (with file) without other errors lead to error.
I tried to remove the first lines from Error_Quad.txt, didn't help.

Could you please give me an advice what should I change?

Thank you in advance!

Best regards,
Anna
User avatar
FranceDidier
Administrator
Administrator
Posts: 872
Joined: Wed 26 Aug 2020 14:40
Country:
France (fr)
France

Re: Error study with and without error files

Post by FranceDidier »

Dear Anna,

Be carreful. What you want to do is correct but only using the rigth commands:
"ERROR_STAT_FILE" or "ERROR_DYN_FILE"

"QUAD_NCPL_STAT_FILE file" is somthing else completely different. This is described in the explanation of "ERROR_QUAD_NCPL_STAT_FILE" below.
The fifth command uses a file to set errors. This file is located by default in structure file (*.dat) path. It contains lines like the following syntax (be careful to Z unit):

Z0(m) r(0/1/2) dx(mm) dy(mm) φx(°) φy(°) φz(°) dG(%) dz(mm), dG3(%), dG4(%), dG5(%), dG6(%)
Z1(m) r(0/1/2) dx(mm) dy(mm) φx(°) φy(°) φz(°) dG(%) dz(mm), dG3(%), dG4(%), dG5(%), dG6(%)

Zn(m) r(0/1/2) dx(mm) dy(mm) φx(°) φy(°) φz(°) dG(%) dz(mm), dG3(%), dG4(%), dG5(%), dG6(%)
An interpolation is performed to define errors applied to an element at a given position. It’s not the case for ‘r’ parameter which is defined without interpolation.
Regards,

Didier
GermanyRubin
Beginner
Beginner
Posts: 6
Joined: Mon 8 Mar 2021 14:23
Country:
Germany (de)
Germany

Re: Error study with and without error files

Post by GermanyRubin »

Thank you Didier!

My idea was simply to fix quads errors ones for all runs (in a file) and randomly change other errors...

As far as I understood, if i use ERROR_STAT_FILE for N linacs, I have to create N files (for each run). These files should contain all errors (quadrupoles, cavities, beam). I cannot use this description just for quads (and for cavities ERROR_CAV_NCPL_STAT), right?

Should Z in ERROR_QUAD_NCPL_STAT_FILE be the middle of the quadrupole?

Best regards!
Anna
User avatar
FranceDidier
Administrator
Administrator
Posts: 872
Joined: Wed 26 Aug 2020 14:40
Country:
France (fr)
France

Re: Error study with and without error files

Post by FranceDidier »

Dear Anna,

Code: Select all

As far as I understood, if i use ERROR_STAT_FILE for N linacs, I have to create N files (for each run). These files should contain all errors (quadrupoles, cavities, beam). I cannot use this description just for quads (and for cavities ERROR_CAV_NCPL_STAT), right?
Yes, exactly, it's not possible to use usual error commands mixed with ERROR_STAT_FILE.

Code: Select all

Should Z in ERROR_QUAD_NCPL_STAT_FILE be the middle of the quadrupole?
No, the positions considered are at the beginning of the elements

Regards,

Didier
Post Reply