- description: Compute generalized gradients [50] from data on a circular-cylinder boundary for use with elegant’s BGGEXP element.
- synopsis:
computeCBGGE -input=<filename>[,z=<colName>][,phi=<colName>][,Brho=<colName>][,Bz=<columnName>][,rho=<paramName>] -normal=<output> [-skew=<output>] [-derivatives=<integer>] [-multipoles=<integer>] [-fundamental=<integer>] [-evaluate=<filename>[,nrho=<integer>][,nphi=<integer>] [-autotune=[,significance=<fieldValue>][,minimize=rms|mav|maximum] [,increaseOnly][,verbose][,log=<filename>]]

- switches:
- input — Specify name of the input file, which by default contains three columns giving z,
phi, and Brho, which specify B
_{ρ}as a function of longitudinal coordinate z and azimuthal angle ϕ. The z, phi, and Brho options may be used to give different names for these columns. The file by default also contains a parameter rho giving the radius of the cylinder. The rho option may be used to give a different name for the parameter. The data must form a uniform grid in z and ϕ. The N_{ϕ}values of ϕ should range from 0 to Δϕ(N_{ϕ}- 1) where Δϕ = 2π∕N_{ϕ}If the Bz qualifier is provided, the named data is used for computation of the solenoidal fields. - normal — Output file for normal-component generalized gradients. Supply to NORMAL_FILENAME parameter of BGGEXP.
- skew — Output file for skew-component generalized gradients. Supply to SKEW_FILENAME
parameter of BGGEXP. NB: if B
_{z}is non-zero on axis, this option is essential in getting valid results. - derivatives — Number of derivatives vs z desired in output. Default: 7
- multipoles — Number of multipoles desired in output. Default: 8
- fundamental — Fundamental multipole of sequence. 0=none (default), 1=dipole, 2=quadrupole, etc.
- evaluate — Asks to evaluate the GGE and place the results in a file. By default, this is done for the cylinder radius and with the same spacing of ϕ values. This can be changed with the nrho and nphi parameters.
- autotune — Optimizes the number of derivaties and multipoles up the to values given with the -derivatives and -multipoles options, in order to minimize the deviation of the GGE-derived fields from the values given in the 3D field map file. The region of evaluation is automatically limited by the bounding planes, even if the 3D field map has a larger extent. By default, minimizes the maximum deviation, but user can ask to minimize the rms or mean-absolute-value deviation. Differences below the significance value are ignored. The user may request verbose output to see results printed to the terminal, and also a log file for a detailed record. The increaseOnly qualifier specifies that the scan over multipoles m and derivatives d is restricted to never be less than the previous optimal values; for example, if the best value so far was obtained with m = 4 and d = 3, the remainder of the scan would be restricted to m ≥ 4 and d ≥ 3; this can save considerable run time.

- input — Specify name of the input file, which by default contains three columns giving z,
phi, and Brho, which specify B
- authors: M. Borland, R. Soliday, R. Lindberg, (ANL/APS).

computeRBGGE