Magnet layout with CSR elements

Moderators: cyao, michael_borland

Post Reply
tcharles
Posts: 10
Joined: 11 Aug 2014, 20:58

Magnet layout with CSR elements

Post by tcharles » 26 Jun 2016, 21:10

Hi Michael,

It seems that the magnet layout output becomes a little strange when CSR elements are used (namely CSRDRIFT and CSRCSBEND).

For example, here's a section of bunch compressor and you can see that D_SIDE_BC1 starts at s=3.247044e+01 and DIP2_BC1 also starts at s=3.247044e+01. I've attached an image of this plotted and you can see the magnet elements all have a slanted edge.


s ElementName
m
---------------------------------
3.141949e+01 DIP1_BC1
3.196974e+01 DIP1_BC1
3.247044e+01 DIP1_BC1
3.247044e+01 DIP1_BC1
3.196974e+01 DIP1_BC1
3.196974e+01 DIP1_BC1
3.247044e+01 DIP1_BC1
3.247044e+01 W1_BC1
3.247044e+01 D_SIDE_BC1
3.701451e+01 D_SIDE_BC1
3.247044e+01 DIP2_BC1
3.701451e+01 DIP2_BC1
3.751521e+01 DIP2_BC1
3.751521e+01 DIP2_BC1
3.701451e+01 DIP2_BC1
3.701451e+01 DIP2_BC1
3.751521e+01 DIP2_BC1
3.751521e+01 W2_BC1
3.751521e+01 D_CENT_BC1
3.826521e+01 D_CENT_BC1

Is there any reason behind this? And is there a way to plot the magnet layout in it's more standard form?

Thanks in advance,
Tessa
Attachments
MagnetLayout.png
MagnetLayout.png (5.33 KiB) Viewed 5405 times

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

Re: Magnet layout with CSR elements

Post by michael_borland » 27 Jun 2016, 07:59

Tessa,

This is a bug in older versions of elegant. If you update to the latest version, it should be resolved. If not, please let me know.

--Michael

tcharles
Posts: 10
Joined: 11 Aug 2014, 20:58

Re: Magnet layout with CSR elements

Post by tcharles » 11 Jul 2016, 20:44

Hi Michael,

Thanks for your response.

Another related question - is there an easy way to offset the magnet layout plot? I have a plot where the magnet layout profile overlaps some of the data. It would be great if I could just lower the magnet layout profile. Do you know of a way to do this?

Thanks so much,
Tessa

tcharles
Posts: 10
Joined: 11 Aug 2014, 20:58

Re: Magnet layout with CSR elements

Post by tcharles » 11 Jul 2016, 20:50

Nevermind,I found a solution!
For anyone else wondering, 'sddsprocess -define=col,ProfileOffset,"Profile 5 -" xfel.mag', works fine.

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

Re: Magnet layout with CSR elements

Post by michael_borland » 11 Jul 2016, 22:14

Tessa,

You can also do this without modifying the file, e.g.,

Code: Select all

sddsplot -col=s,betax run.twi -unsup=y -col=s,Profile run.mag -offset=ych=-5
Another useful feature of sddsplot is overlays, e.g.,

Code: Select all

sddsplot -col=s,betax run.twi -unsup=y -col=s,Profile run.mag -overlay=xmode=norm,yfactor=0.04 

Post Reply