Hello,
I am a new Elegant user so forgive me if this question has already been answered somewhere else.
I am trying to simulate the effect of IBS in a linac and see the evolution throughout the linac. In my current method, I insert IBSCATTER elements with the same output filename throughout the beamline. From the user manual, I was expecting a multipage output, one for each IBSCATTER element because in the manual it says "Each page contains integrated IBS growth rates between IBSCATTERs." However, my output file is only 1 page and includes the last element. It seems to me that rather than writing each IBSCATTER element to its own page in the output file it is instead overwriting the file.
I had a hard time finding examples using the IBSCATTER element, so please let me know if this is not the correct way to use it/I should be writing and interpreting the output files differently. Any examples would be greatly appreciated. Thanks in advance for the replies.
Cheers,
Phia
Possible bug in IBSCATTER writing output
Moderators: michael_borland, soliday
-
- Posts: 2006
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: Possible bug in IBSCATTER writing output
Phia,
Sorry that the manual page is a little unclear. You need to specify a different FILENAME value for each IBSCATTER element. Otherwise, the last one will overwrite the others.
--Michael
Sorry that the manual page is a little unclear. You need to specify a different FILENAME value for each IBSCATTER element. Otherwise, the last one will overwrite the others.
--Michael
Re: Possible bug in IBSCATTER writing output
Hi Michael,
Thanks for clarifying, I will try having a different filename for each IBSCATTER element. Is there any way that you know of to set this up in a page structure (i.e. i do not want 1,000s of output files and I would like to be able to query and plot the beam parameters throughout the linac). Is there a way of doing this take makes the output readable as opposed to having many output files?
Cheers,
Phia
Thanks for clarifying, I will try having a different filename for each IBSCATTER element. Is there any way that you know of to set this up in a page structure (i.e. i do not want 1,000s of output files and I would like to be able to query and plot the beam parameters throughout the linac). Is there a way of doing this take makes the output readable as opposed to having many output files?
Cheers,
Phia
-
- Posts: 2006
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: Possible bug in IBSCATTER writing output
Phia,
For a single-step run, the individual files will be for specific s locations of the IBSCATTER element. Each file will have NSLICES pages. Within each page, you'll find data for the end of each element between this IBSCATTER element and that last. How you combine the files depends on how you want to view the data. If NSLICES=1, you can just do
where "run-????.ibs" matches all the individual files.
You can now plot the differential IBS rate vs s using
If you have NSLICES>1, it is more complicated depending on how you want to view things. If you want to look at the rates for each slice vs s, you can do
This will produce a file with one page for each value of NSlice, which you can again plot. E.g.,
--Michael
For a single-step run, the individual files will be for specific s locations of the IBSCATTER element. Each file will have NSLICES pages. Within each page, you'll find data for the end of each element between this IBSCATTER element and that last. How you combine the files depends on how you want to view the data. If NSLICES=1, you can just do
Code: Select all
sddscombine run-????.ibs -merge -pipe=out | sddssort -pipe=in -column=s runAll.ibs
You can now plot the differential IBS rate vs s using
Code: Select all
sddsplot -column=s,dIBSRate* runAll.ibs -separate
Code: Select all
sddscombine run-????.ibs -pipe=out | sddssort -pipe -parameter=NSlice -parameter=s | sddscombine -pipe=in runAll.ibs -merge=NSlice
Code: Select all
sddsplot -col=s,dIBSRatex runAll.sdds -split=page -graph=line,vary -legend=param=NSlice
Re: Possible bug in IBSCATTER writing output
Hi Michael,
Thank you so much for the fast reply, I will give that a try!
Cheers,
Phia
Thank you so much for the fast reply, I will give that a try!
Cheers,
Phia