Reusing identical random errors for a second simulation in TraceWin  [SOLVED]

https://www.dacm-logiciels.fr/tracewin
Post Reply
Korea, Republic ofJiyoung Choi
Novice
Novice
Posts: 3
Joined: Wed 22 Oct 2025 09:12
Country:
Korea, Republic of (kr)
Korea, Republic of

Reusing identical random errors for a second simulation in TraceWin

Post by Korea, Republic ofJiyoung Choi »

Dear Dr. Didier,

I am performing a machine error study using the following command:
ERROR_QUAD_NCPL_STAT 200 2 0.1 0.1 0.5 0.5 0.5 1

I successfully ran the simulation with the first input beam.
Now, I would like to run the same simulation with another beam (only the input beam parameters are different) under exactly the same random error conditions as the first one.

However, I couldn’t find a way in TraceWin to reuse or load the previously generated random errors.
My goal is to apply the identical Gaussian-distributed errors from the first simulation to the second simulation.

Is there any way to do this?

Best regards,
Jiyoung Choi.

P.S. 'ERROR_STAT_FILE'
I tried to reuse the Error_Data.txt file generated from the first simulation in the second simulation, but I encountered two issues:
1. I want to set 'Nbr of steps' to 10, but it only runs with 1 step.
2. When I load the first simulation’s result file 'Error_Datas.txt' using 'ERROR_STAT_FILE' an error message appears "Error_Datas000001.txt not found". However, the first simulation only produced a single file named 'Error_Data.txt'. There is no file called 'Error_Datas000001.txt'
User avatar
FranceDidier
Administrator
Administrator
Posts: 1154
Joined: Wed 26 Aug 2020 14:40
Country:
France (fr)
France

Re: Reusing identical random errors for a second simulation in TraceWin  [SOLVED]

Post by FranceDidier »

Dear Dr. Jiyoung,

(1) I made some change in order to accept serveral step in errors study with the command ERROR_XXXX_FILE.
(2) If your define ERROR_STAT_FILE with file name as "Error_Datas.txt", you have to create N files with the name "Error_Datas000001.txt" to "Error_Datas00000N.txt"

To create the initial set of files, you can perform an error study with ‘Nbr of Step’ = 1 and the command ‘ERROR_QUAD_NCPL_STAT’ and selecting ‘Keep all result files’ option. This will generate a set of files named ‘Error_Datas_X.txt’ in the calculation path.
Then simply rename them ‘Error_Datas00000X.txt’.

Regards,

Didier
Korea, Republic ofJiyoung Choi
Novice
Novice
Posts: 3
Joined: Wed 22 Oct 2025 09:12
Country:
Korea, Republic of (kr)
Korea, Republic of

Re: Reusing identical random errors for a second simulation in TraceWin

Post by Korea, Republic ofJiyoung Choi »

Dear Dr. Didier,

Thank you for your help!

Best regards,
Jiyoung Choi
Post Reply