man1/ams_BMscale2
Table of Contents
ams_BMscale2 - scale various parameters
ams_BMscale2 <dbman_host>
<mngr_conf> <group> <Imass1> <Omass1> <Imass2> <Omass2>
The program reads
a configuration file to find information about a parameters related to
a magnetic or an electrostatic beamline element.
The configuration file
gives information about what type of element (electostatic or magnetic)
is to be scaled, the parameter used to control the element (for example
the current control for a magnet), a parameter to read to find the present
value of the element, and information about the particle energy.
The starting
and ending masses are selected by arguments on the command line.
The program
is only able to handle post acceleration beamline components at this time.
Electrostatic elements are scaled this way:
num = gvm + injE
num *= Imass2/Omass2
num += gvm * chg_state
num -= Elost1
num -= Elost2
den = gvm + injE
den *= Imass1/Omass1
den += gvm * chg_state
den -= Elost1
den -= Elost2
Vnew = (num/den) * Vold
Magnetic elements are scaled this
way:
num = gvm + injE
num *= Imass2/Omass2
num += gvm * chg_state
num -= Elost1
num -= Elost2
num *= Imass2
den = gvm + injE
den *= Imass1/Omass1
den += gvm * chg_state
den -= Elost1
den -= Elost2
den *= Imass1
Vnew = sqrt(num/den) * Vold
- dbman_host - required
The host where dbman(8)
is running.
- mngr_conf - required
pathname of the configuration file
- group - required
which group in the config file to use.
- Imass1 and Omass1 - required
The starting masses.
- Imass2 and Omass2 - required
The ending masses.
The configuration file uses
the
libmngr(3mngr)
facility to connect internal parameters to the AccelNET
database. The mappings for this program are given below.
Parameters needed
by this program can be combined with parameters belonging to other programs.
The "program name" field in the configuration file differentiates the entries.
ams_BMscale2 uses "ams_BMscale2" as the program name when searching the
file.
Any number of groups may be used. Each group represents the parameters
for scaling one element.
If the parameters marked required are missing from
the configuration file the program will not work. Error messages are printed
to stderr indicating this.
- file1 0 - required
The type of scaling required.
Valid values are mag or elec.
- ctl1 0 - required
The controlled parameter (Vnew).
- read1 0 - required
The value to be scaled to arrive at the new control value (Vold).
Note
that in some cases this may be the same parameter as the control.
- read2
0 - required
The total injection energy (injE).
- read3 0 - required
The terminal voltage (gvm).
- read4 0 - required
The output charge state (chg_state).
- read5 0 - optional
Energy loss input #1
- read5 1 - optional
Energy loss input #2
#
#
this example contains two setups
#
one for a magnetic component
#
one for an electrostatic component
#
# the magnetic component
#
ams_BMscale2|g1|file1 |0|mag |NULL |
ams_BMscale2|g1|ctl1 |0|BM 03-1|MfieldC |
ams_BMscale2|g1|read1 |0|HPB 03-1|MfieldR |
ams_BMscale2|g1|read2 |0|SETUP |TotInjE |
ams_BMscale2|g1|read3 |0|TPS TK-1|GvmVR |
ams_BMscale2|g1|read4 |0|SETUP |ChgState|
#
# the electrostatic component
#
ams_BMscale2|g2|file1 |0|elec |NULL |
ams_BMscale2|g2|ctl1 |0|ECA 04-1|VC |
ams_BMscale2|g2|read1 |0|ECA 04-1|VC |
ams_BMscale2|g2|read2 |0|SETUP |TotInjE |
ams_BMscale2|g2|read3 |0|TPS TK-1|GvmVR |
ams_BMscale2|g2|read4 |0|SETUP |ChgState|
#
#
the examples here use the config file shown above
#
#
scale the magnet
#
ams_BMscale2 localhost MNGRconf g1 9 25 10 26
#
#
#
scale the electrostatic element
#
ams_BMscale2 localhost MNGRconf g2 9 25 10 26
$Id:
ams_BMscale2.1,v 1.1 2009/11/25 15:42:29 kitchen Exp $
Table of Contents