Hallo,

How do I simulate a wiggler with 9 poles (+2*2 end-poles) with gfwiggler (or cwiggler)? Do I have to add a phase θ=π in the sdds-file or phase_{1,2,3,4}=3.14? Or do I have to move the center of my wiggler (X0), too?

Can I define another ratio of field strength for the end-poles?

Thanks in advance

Julian

## GFwiggler with odd number of poles

**Moderators:** cyao, michael_borland

### Re: GFwiggler with odd number of poles

Hi Julian,

There is no needs to shift or changing the phase (They are ONLY used for varying polarization modes).

First, you need to figure out what's the period length and equivalent period number. Use this information as input of CWIGGLER.

For GWIGGLER, it assums you have pole being arranged as 0.25 -0.75 1 -1 1 -1 0.75 -0.25 for a 4 period wiggler. In your case it might be 4 periods or 5 periods.

aimin

There is no needs to shift or changing the phase (They are ONLY used for varying polarization modes).

First, you need to figure out what's the period length and equivalent period number. Use this information as input of CWIGGLER.

For GWIGGLER, it assums you have pole being arranged as 0.25 -0.75 1 -1 1 -1 0.75 -0.25 for a 4 period wiggler. In your case it might be 4 periods or 5 periods.

aimin

### Re: GFwiggler with odd number of poles

Hi aimin,

But is there no way to realize a wiggler with +0.25 -0.75 1 -1 1 -1 1 -1 1 -1 1 -0.75 +0.25? I thought it was a common wiggler.

Thanks for your answers so far.

Julian

But is there no way to realize a wiggler with +0.25 -0.75 1 -1 1 -1 1 -1 1 -1 1 -0.75 +0.25? I thought it was a common wiggler.

Thanks for your answers so far.

Julian

### Re: GFwiggler with odd number of poles

Julian,

In your configuration, you will have half period wiggler excluding ending poles, which is OK in practice. But the code has to use integer periods for calculation. To solving this, you can scale your wiggler strength correspondingly. For example:

-0.25 0.75 -1 1 -0.75 0.25 (6 poles) = 2 x normal periods (elegant input 3 periods, B0)

-0.25 0.75 -1 1 -1 0.75 -0.25 (7 poles) = 2.5 x normal periods (elegant input 3 periods, 2.5/2 B0)

Just a remember, the total length of wiggler has to be integer of your normal period length, you can not use the actual length.

aimin

In your configuration, you will have half period wiggler excluding ending poles, which is OK in practice. But the code has to use integer periods for calculation. To solving this, you can scale your wiggler strength correspondingly. For example:

-0.25 0.75 -1 1 -0.75 0.25 (6 poles) = 2 x normal periods (elegant input 3 periods, B0)

-0.25 0.75 -1 1 -1 0.75 -0.25 (7 poles) = 2.5 x normal periods (elegant input 3 periods, 2.5/2 B0)

Just a remember, the total length of wiggler has to be integer of your normal period length, you can not use the actual length.

aimin