sddscontour

Moderators: cyao, michael_borland

Post Reply
Max
Posts: 50
Joined: 31 Jul 2008, 12:16

sddscontour

Post by Max » 16 Mar 2009, 13:26

Can somebody help me in setting up a contour plot ? I am trying to make a contour plot of the projected emittances for various fractions of the number of particles.

Thanks, Max

michael_borland
Posts: 1933
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: sddscontour

Post by michael_borland » 17 Mar 2009, 08:20

Max,

Depending on how the file is structured, the answer will be different. Can you post the file (or send it to me by private email)?

--Michael

michael_borland
Posts: 1933
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: sddscontour

Post by michael_borland » 17 Mar 2009, 16:59

Max,

Attached is a script that may do what you want.

First, save the attachment to your disk. Using cygwin (I'm assuming you are on Windows)
% cd <directoryWhereYouSavedTheFile>
% tar xvf fracEmittance.tar
% chmod +x fracEmittance
% echo $PATH
% mv fracEmittance <somewhere in your path>
where <somewhere in your path> is one of the directories listed when you do "echo $PATH". (I'm guessing at these instructions, since I don't have a windows computer to try it on.)

Example of using the script:
% fracEmittance -input run.out -plane x \
-fractions 20,30,40,50,60,70,80,90,95 -output run.xfilt

This will perform analysis of the beam in run.out, filtering on the x invariant. The cuts take will include 20%, 30%, etc. of the beam, sorted by increasing Jx. You'll get two plots: one showing the particles color-coded by sqrt(Jx). Another showing emittance and other quantities as a function of the fraction included.

You'll need to have installed OAG Tcl/Tk (from our web site) for this script to run.

--Michael
Attachments
fracEmittance.tar
(10 KiB) Downloaded 217 times

michael_borland
Posts: 1933
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: sddscontour

Post by michael_borland » 17 Mar 2009, 17:06

Here are some sample plots.

--Michael
plot2.png
plot1.png

Post Reply