- description: sddsbrightness computes undulator brightness curves using Twiss parameter data from elegant or sddsanalyzebeam. Several calculation methods are available.
- examples:
sddsbrightness run.twi run.bri -harmonics=3 -Krange=start=0.2,end=2.2,points=100

-current=0.1 -totalLength=2.4 -periodLength=0.027 -coupling=0.01sddsanalyzebeam run.out -pipe=out -correctedOnly

| sddsbrightness -pipe=in run.bri -harmonics=3 -Krange=start=0.2,end=2.2,points=100

-current=0.1 -totalLength=2.4 -periodLength=0.027 -coupling=0.01 - synopsis:
sddsbrightness [-pipe=[input][,output]] [twissFile] [SDDSoutputfile] -harmonics=integer -Krange=start=value,end=value,points=integer -current=Amps -totalLength=meters -periodLength=meters [-emittanceRatio=value | -coupling=value] [-noSpectralBroadening] [-method=string,device=string,neks=value]]

- files:
- twissFile — A Twiss output file from elegant, with radiation integral calculations included, or an output from sddsanalyzebeam. In the latter case, the -correctedOnly option should be used.
- SDDSoutputFile — Contains the brightness data in column form. For each requested harmonic i, there are columns photonEnergyi, wavelengthi, and Brightnessi.

- switches:
- pipe — The standard SDDS Toolkit pipe option.
- harmonics — The number of harmonics to compute.
- Krange=start=value,end=value,points=integer — The range of the K parameter for the undulator and the number of points to compute on that range.
- -current=Amps — The current in amperes. If one gives the average current, one gets the average brightness.
- -totalLength=meters — The total length of the undulator, in meters.
- -periodLength=meters — The period length of the undulator, in meters.
- -emittanceRatio=value | -coupling=value — In the case of a twiss output file from
elegant, which does not contain the vertical emittance, one must supply one of these
options. If -emittanceRatio=R is given, ϵ
_{y}= ϵ_{0}* R and ϵ_{x}= ϵ_{0}; this isn’t how things work physically, but is provided for historical reasons. If -coupling=k is given, ϵ_{x}= ϵ_{0}∕(1 + Jy * k∕Jx) and ϵ_{y}= k * ϵ_{x}. ϵ_{0}is the equilibrium emittance from the twiss output of elegant.In the case of twiss output from sddsanalyzebeam, both emittances are present and these options are ignored.

- -method=string,device=string,neks=value] — Choose which method to use for brightness
calculations. Options are
- borland — M. Borland’s approximation method. Fast, but not as reliable as others.
- dejus — R. Dejus’ non-zero emittance, infinite-N+convolution method. This is the default.
- walkerinfinite — R. Walker’s method. Dejus’ method is derived from this method.
- walkerfinite — R. Walker’s method using finite N without convolution. This is quite slow.

The device qualifier may be planar or helical. neks is used to change the number of points used for finding the peak of the distribution.

- authors: M. Borland, H. Shang, R. Dejus (ANL).

sddsbunchingfactor