**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.01`sddsanalyzebeam 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`photonEnergy`,*i*`wavelength`, and*i*`Brightness`.*i*

**switches:**`pipe`-- The standard SDDS Toolkit pipe option.`harmonics`-- The number of harmonics to compute.`Krange=start=`-- The range of the K parameter for the undulator and the number of points to compute on that range.*value*,end=*value*,points=*integer*`-current=`-- The current in amperes. If one gives the average current, one gets the average brightness.*Amps*`-totalLength=`-- The total length of the undulator, in meters.*meters*`-periodLength=`-- The period length of the undulator, in meters.*meters*`-emittanceRatio=`-- In the case of a twiss output file from*value*| -coupling=*value*`elegant`, which does not contain the vertical emittance, one must supply one of these options. If`-emittanceRatio=`is given, and . If*R*`-coupling=`is given, and . is the equilibrium emittance from the twiss output of*k*`elegant`.In the case of twiss output from

`sddsanalyzebeam`, both emittances are present and these options are ignored.`-method=`-- Choose which method to use for brightness calculations. Options are*string*,device=*string*,neks=*value*]`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.

`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).