After running TraceWin on my .dat file, I can create a Hofmann chart of the lattice periods in my linac as shown below.
I was wondering if there is a way to extract the lattice period data from the chart, i.e. the coordinates (kz/kxy, kxy/kxy0), for external analysis? There seems to be an option to generate a table (shown below) using the 4th menu option, but I don't know what this data is and it doesn't seem to match what is plotted -- there should be ~50 lines for the ~50 periods in my lattice (most of the periods are currently off the chart as the linac is not yet optimized).
If possible, I would like to be able to extract the lattice period data using the non-GUI version of TraceWin (TraceWin_noGUI.exe). I imagine there could be some option in the .ini file that I could set so that an ascii file of the data can be generated when running the non-GUI version.
Extracting Hofmann chart data for analysis
Re: Extracting Hofmann chart data for analysis
Dear Sir,
I haven't your project, so it’s a bit complex, but the table appears to show the coordinates of the yellow points, which correspond to the periods where your HWR cavities are located.
I’m not entirely sure what you want to save to a file. Is it the set of pixels in the [400x400] grid, or more, depending on the resolution you’ve chosen for your diagram?
Sorry, but the non-graphical version isn't capable of calculating this type of data.
Regards,
Didier
I haven't your project, so it’s a bit complex, but the table appears to show the coordinates of the yellow points, which correspond to the periods where your HWR cavities are located.
I’m not entirely sure what you want to save to a file. Is it the set of pixels in the [400x400] grid, or more, depending on the resolution you’ve chosen for your diagram?
Sorry, but the non-graphical version isn't capable of calculating this type of data.
Regards,
Didier
Re: Extracting Hofmann chart data for analysis
Dear Didier,
I am trying to save just the coordinates of the lattice period points in the entire Hofmann chart. I've attached the full Hofmann chart below. Earlier I zoomed into the default axis scales.
My ultimate goal is to be able to scan different lattice parameters (magnet settings, cavity phases, drift lengths, phase advances, etc.) and correlate them with the positions of the lattice periods in the Hofmann chart so I can see their effect, then determine the optimal parameters that ensure the lattice periods remain within the stability regions. To help speed up analysis, I was hoping to perform batch runs of TraceWin using the non-GUI version with python so that I can easily scan the parameters. If I cannot get the lattice period data directly with the non-GUI version, is there some other way to get this data?
Let me know if you'd like me to send you my TraceWin project.
Thanks,
Josh
I am trying to save just the coordinates of the lattice period points in the entire Hofmann chart. I've attached the full Hofmann chart below. Earlier I zoomed into the default axis scales.
My ultimate goal is to be able to scan different lattice parameters (magnet settings, cavity phases, drift lengths, phase advances, etc.) and correlate them with the positions of the lattice periods in the Hofmann chart so I can see their effect, then determine the optimal parameters that ensure the lattice periods remain within the stability regions. To help speed up analysis, I was hoping to perform batch runs of TraceWin using the non-GUI version with python so that I can easily scan the parameters. If I cannot get the lattice period data directly with the non-GUI version, is there some other way to get this data?
Let me know if you'd like me to send you my TraceWin project.
Thanks,
Josh
Re: Extracting Hofmann chart data for analysis
Dear Josh,
Is it the data shown in the two graphs below that you’re looking for, if I’ve understood correctly?
Regards,
Didier
Is it the data shown in the two graphs below that you’re looking for, if I’ve understood correctly?
Regards,
Didier
Re: Extracting Hofmann chart data for analysis
Dear Didier,
I looked at the underlying data for the two plots. From what I can tell (and please correct me if I'm wrong), the "structure" plot contains the phase advances without space charge and the "beam" plot contains phase advances with space charge. The variables in the two plots are different ("k" in the structure plot and "sigma" in the beam plot), but from what I can tell, one can use the plot data and take the ratios kz/kxy and kxy/kxy0 and generate the points in the Hofmann chart correctly.
Two questions:
1. When opening either plot in the GUI, a txt file "Chart_Phaseadvance(deg).txt" is generated. The file name is the same regardless of the plot and thus this text file gets overwritten each time a plot is generated. Could the filenames be different for each plot type so that they don't get overwritten?
2. Is it possible to generate these text files using the non-GUI version of TraceWin? If so, I could work with these and it would solve my problem.
Thanks,
Josh
I looked at the underlying data for the two plots. From what I can tell (and please correct me if I'm wrong), the "structure" plot contains the phase advances without space charge and the "beam" plot contains phase advances with space charge. The variables in the two plots are different ("k" in the structure plot and "sigma" in the beam plot), but from what I can tell, one can use the plot data and take the ratios kz/kxy and kxy/kxy0 and generate the points in the Hofmann chart correctly.
Two questions:
1. When opening either plot in the GUI, a txt file "Chart_Phaseadvance(deg).txt" is generated. The file name is the same regardless of the plot and thus this text file gets overwritten each time a plot is generated. Could the filenames be different for each plot type so that they don't get overwritten?
2. Is it possible to generate these text files using the non-GUI version of TraceWin? If so, I could work with these and it would solve my problem.
Thanks,
Josh

