Hello Michael,
I have a question in scanning and plotting. I want to vary two quads (say Q1 and Q2) before a chicane and plot the outgoing bunchlength as a 2D plot.
I scanned two quads(Q1 and Q2) using vary_element and tracked the outgoing bunchlength
e.g.
&vary_element name=Q1, item=k1, initial=-20, final=20, index_number=0, index_limit=40 &end
&vary_element name=Q2, item=k1, initial=0, final=10, index_number=0, index_limit=10 &end
Now, I want to plot the bunchlength as a 2D plot i.e. as a function of Q1(x-axis) and Q2(y-axis) with a colorbar in a single plot. (I presume that when i vary Q1, the value in Q2 is fixed and hence i expect a 2D plot)
When I do this e.g. exec sddsplot -layout=1,2 -separate -graph=symbol,scale=3 -parameter=Q2.K1,Ss A0_Xchgr.fin & , I get a single plot with Q2 as x-axis and bunchlength in the y-axis.I am unable to to add parameters to this. Am I missing something?
I appreciate your help? Thanks!
regards,
Charles
plotting and scanning question
Moderators: cyao, michael_borland
-
- Posts: 1933
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: plotting and scanning question
Charles,
The way you set up the vary_elements commands isn't right, because you gave the same index_number for both. Give Q1 index_number=0, and Q2 index_number=1, so they are varied on separate indices.
Once that's done, try this:
% sddscollapse run.fin run.finc
% sddsplot -column=Q1.K1,Q2.K1 run.finc -split=column=St -graph=sym,vary=subtype,scale=3,fill -order=spectral
You can change the "scale" parameter to fill in the graph. (The next release will have an improved version of sddscontour that will make nicer, continuous plots.)
Note that Ss is not the bunch length, but the rms spread in distance traveled. Hence, you should use St. See the manual entry at
http://www.aps.anl.gov/Accelerator_Syst ... ode13.html
--Michael
The way you set up the vary_elements commands isn't right, because you gave the same index_number for both. Give Q1 index_number=0, and Q2 index_number=1, so they are varied on separate indices.
Once that's done, try this:
% sddscollapse run.fin run.finc
% sddsplot -column=Q1.K1,Q2.K1 run.finc -split=column=St -graph=sym,vary=subtype,scale=3,fill -order=spectral
You can change the "scale" parameter to fill in the graph. (The next release will have an improved version of sddscontour that will make nicer, continuous plots.)
Note that Ss is not the bunch length, but the rms spread in distance traveled. Hence, you should use St. See the manual entry at
http://www.aps.anl.gov/Accelerator_Syst ... ode13.html
--Michael
Re: plotting and scanning question
Dear Michael,
It works very nicely! Thanks for pointing out the problem and solving it!!
But i have a question on the colorbar. I would like to get higher resolution on the colorbar. i want a much finer control on the red region (see image attached). Atleast, i want more ticks in the red region of the colorbar to know the precise number on lower limit for the bunchlengh. How do i do this?
It works very nicely! Thanks for pointing out the problem and solving it!!
But i have a question on the colorbar. I would like to get higher resolution on the colorbar. i want a much finer control on the red region (see image attached). Atleast, i want more ticks in the red region of the colorbar to know the precise number on lower limit for the bunchlengh. How do i do this?
-
- Posts: 1933
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: plotting and scanning question
Charles,
Unfortunately, there's no way to control the ticks on the color bar. If you just want to know the minimum St, try
% sddsprocess run.finc -pipe=out -process=St,min,%sMin | sddsprintout -pipe -parameter=StMin
You could also try a log-scale plot
% sddsprocess run.finc -define=col,LogSt,"St 1e-12 / log"
% sddsplot -column=Q1.K1,Q2.K1 run.finc -split=column=LogSt -graph=sym,vary=subtype,scale=3,fill -order=spectral
Also, try -graph=sym,type=2,vary=subtype,scale=3,fill . It may look nicer.
--Michael
Unfortunately, there's no way to control the ticks on the color bar. If you just want to know the minimum St, try
% sddsprocess run.finc -pipe=out -process=St,min,%sMin | sddsprintout -pipe -parameter=StMin
You could also try a log-scale plot
% sddsprocess run.finc -define=col,LogSt,"St 1e-12 / log"
% sddsplot -column=Q1.K1,Q2.K1 run.finc -split=column=LogSt -graph=sym,vary=subtype,scale=3,fill -order=spectral
Also, try -graph=sym,type=2,vary=subtype,scale=3,fill . It may look nicer.
--Michael