analyzing correlation between different distributions
Posted: 05 Apr 2011, 07:44
Hi,
I am running elegant and would like to explore correlation between the final transverse phase space and initial particle energy. I can do this in octave easily but thought would try to do this with the sdds toolbox. Below is what I did and it does not work as I expected.
I have two file monobeamrev.out (my initial distribution) and monobeamfwd.out (the distribution obtained after tracking monobeamrev.out into a beamline). I first rename the columns of monobeamrev.out and delete the standard columns.
sddsprocess monobeamrev.out monobeamrev.outproc \
-define=column,x0,x \
-define=column,xp0,xp \
-define=column,y0,y \
-define=column,yp0,yp \
-define=column,t0,t \
-define=column,p0,p \
-delete=column,x,xp,y,yp,t,p,particleID
I then combine the processed file with my final file and expect the following column x, xp, y, yp, t, p, x0, xp0, y0, yp0, t0, p0, particleID (a sddsquery confirms this)
sddscombine -merge monobeamfwd.out monobeamrev.outproc monobeamfwd.outETbun
finally I try to plot the final transverse phase space and would like to color-code the particle according to their initial fractional momentum spread
sddsplot -graph=dot,vary -order=spect -split=column=p0 -column=x,xp monobeamfwd.outETbun
the latter command gives on one point...
Of course all of this assume the macroparticle order in the file remains unchanged during the tracking (true in elegant but I am not sure about Pelegant -- did not try yet).
Thanks in advance for any help, -- Philippe.
I am running elegant and would like to explore correlation between the final transverse phase space and initial particle energy. I can do this in octave easily but thought would try to do this with the sdds toolbox. Below is what I did and it does not work as I expected.
I have two file monobeamrev.out (my initial distribution) and monobeamfwd.out (the distribution obtained after tracking monobeamrev.out into a beamline). I first rename the columns of monobeamrev.out and delete the standard columns.
sddsprocess monobeamrev.out monobeamrev.outproc \
-define=column,x0,x \
-define=column,xp0,xp \
-define=column,y0,y \
-define=column,yp0,yp \
-define=column,t0,t \
-define=column,p0,p \
-delete=column,x,xp,y,yp,t,p,particleID
I then combine the processed file with my final file and expect the following column x, xp, y, yp, t, p, x0, xp0, y0, yp0, t0, p0, particleID (a sddsquery confirms this)
sddscombine -merge monobeamfwd.out monobeamrev.outproc monobeamfwd.outETbun
finally I try to plot the final transverse phase space and would like to color-code the particle according to their initial fractional momentum spread
sddsplot -graph=dot,vary -order=spect -split=column=p0 -column=x,xp monobeamfwd.outETbun
the latter command gives on one point...
Of course all of this assume the macroparticle order in the file remains unchanged during the tracking (true in elegant but I am not sure about Pelegant -- did not try yet).
Thanks in advance for any help, -- Philippe.