Next: touschekLifetime Up: Specialized Tools for Use Previous: sddsurgent

## smoothDist6

• description: Increases the number of particles in a particle input file by sampling a simplified distribution based the input file. Intended to be used to increase the number of particles produced by a photoinjector simulation to improve stability of CSR and LSC simulations. Can also add energy and density modulations for performing gain studies.

The algorithm is as follows:

1. Fit a 12-order polynomial to as a function of . Evaluate the polynomial at 10,000 equispaced points to generate a lookup table for the momentum variation with time.
2. Compute the standard deviation of the momentum for blocks of 2,000 successive particles. Fit this data with a 12-order polynomial and evaluate it a 10,000 equispaced points to generate a lookup table for as a function of .
3. Create a histogram of and smooth it with a low-pass filter having a cutoff at 0.1 THz. This may resulting in ringing at the ends of the histogram, which is clipped off by masking with the original histogram.
4. Optionally modulate the histogram H(t) with a sinusoid, by multiplying the histogram by , where is the modulation depth and is the modulation wavelength. For non-zero , this will result in a longitudinal-density-modulated distribution when the histogram is used as a probability distribution and sampled to create time coordinates.
5. Sample the time histogram times using a quiet start'' Halton sequence with radix 2, where is the number of desired particles. The sampling operation is performed by first numerically computing the cumulative distribution function . Inverting this to obtain , we generate each sample from by evaluating , where is a quantity on the interval [0, 1] generated from the Halton sequence.
6. Create samples for other coordinates by quiet-sampling of gaussian distributions:
1. Scaled transverse coordinates , , , and using Halton radices 3, 5, 7, and 11, respectively. For convenience in scaling (step 9), these are defined such that the standard deviation of each coordinate is and all coordinates are uncorrelated.
2. Scaled fractional momentum deviation using Halton radix 13, with unit standard deviation.
7. Interpolate the look-up tables to determine the mean and standard deviation of the momentum at each particle's time coordinate. Use these to compute the individual particle momenta using .
8. Compute the projected transverse rms emittances and Twiss parameters for the original beam.
9. Transform the scaled transverse phase-space coordinates to give the desired projected Twiss parameters in the x and y planes. The x and y planes are assumed to be uncorrelated.

• synopsis:
smoothDist6 -input name -output name -factor number -rippleAmplitude % -rippleWavelength microns -smoothPasses num(500) -energyMod % -betaSlices n

• files:
• input -- A particle distribution file, such as might be used with sdds_beam.
• output -- A particle distribution file, such as might be used with sdds_beam.

• switches:
• -factor number -- Factor by which to multiply the number of particles.
• -rippleAmplitude value -- Density ripple amplitude, in percent.
• -energyMod value -- Energy modulation amplitude, in percent. The wavelength is fixed at 1 m.
• -rippleWavelength value -- Density ripple and energy modulation wavelength, in microns.
• -betaSlices n -- Number of longitudinal slices to use for analysis of twiss parameters. The twiss parameters of the beam will vary step-wise from slice to slice. This discontinuous variation may cause problems (e.g., unstable behavior).
• -smoothPases num -- Presently ignored.

• author: M. Borland, ANL/APS.

Next: touschekLifetime Up: Specialized Tools for Use Previous: sddsurgent
Robert Soliday 2013-05-28