The scaling program allows the particle energy, particle species, and other such parameters to be changed. The current values of the machine parameters can be retrieved from the running database, changed, and sent back to the running database. Alternately, parameters saved from a previous run may be scaled and sent to the running database.
The preacceleration components may be changed seperately from the post acceleration and machine components, thus allowing the injection energy to be changed to obtain a "match" into the accelerator.
Preacceleration and ion source parameters from a run may be combined with post acceleration parameters from another run in order to create a run on a new target beamline.
The scaling process is divided into three parts:
Obtaining the current parameter values.
Scaling the values.
Sending the newly scaled values to the running database.
The scaling process uses parameter lists to do its job. A parameter list is a disk file with lines of text containing the tag name and value of the parameters. The scaling program reads the parameter list file and outputs a new file with the same format containing the newly scaled values.
Parameter lists to be scaled may be obtained from three sources:
A retrieved list from the running database using the "request" command.
A previously retrieved list from the "request" command.
A previously saved database from either the "up" or "updaemon" command. In order to use this source, the "extract" command must be run to convert the saved database to the proper format.
When the scaling program is invoked, a copy of the entire database is read into memory. As each parameter in the list is processed, a scaling key is looked up in the database. The scaling key tells how to process the parameter to obtain the new value.
The scaling program must be provided with information that tells it the current particle energy, mass, and other needed values in order to function properly. This information is read in from a file called "MACHval" when the program is invoked. The file is obtained from the running database by typing "request MACH" or from a database save by "up" or "updaemon" by typing "extract MACH". Either way, it must be present in the current directory for the program to run correctly.
The program changes parameters such as the charge state, mass, and particle energy via a menu.
The accelerator is divided into three regions: preacceleration, machine, and post acceleration. Each region has a particle energy, charge state, and mass associated with it.
The energy relationship between the areas is TotalPartE = InjPartE + MachPartE. The scaling program allows any one of the three variables to be manipulated in the following way:
If a new value is entered, InjPartE remains constant. MachPartE = TotPartE(new value) - InjPartE
If a new value is entered, InjPartE remains constant. TotPartE = MachPartE(new value) + InjPartE
If a new value is entered, MachPartE remains constant. TotPartE = MachPartE + InjPartE(new value)
The preacceleration region contains all of the beamline components from the ion source to the entrance of the accelerator. When components in this machine region are scaled, the values of all components affected by a change in InjPartE are recalculated. This includes the bending magnets, einzel lenses, and steerers. Also, the cathode, extractor, and deck bias for a SNICS source. For an RF source, the focus, extractor, and deck bias.
The machine region contains the components needed to set the machine to a given terminal voltage. When components in this machine region are scaled, the values of all components affected by a change in MachPartE are recalculated. This includes TRV and corona probe position. The charging voltage is reset to the value needed for no beam operation if it is included in the list to be processed. (The charging voltage is not currently in the parameter lists, therefore it should be reset by hand).
The post acceleration region contains all of the beamline components after the machine region. When components in this machine region are scaled, the values of all components affected by a change in TotPartE are recalculated. This includes all post acceleration optics and the in tank quads and steerers.
The TRV setting is reset by changes in MachPartE. In turn, when TRV is changed, the corona probe position is recalculated. If TRV is changed by a large amount upward, it may be wise to put in a preacceeleration cup and turn off the chains before sending the new values. Wait for the corona probe to reach its new position before turning the chains back on. This prevents unnecessary sparking while the probe is moving to the new position.
The field strength of the magnets is calculated on the basis of MfieldR (the current hall probe value) and the new value is MfieldC (the magnetic field setting value). When the new MfieldC values are written into the running database, the magnet autotune routine is invoked causing the magnets to be retuned to the new field strength.
InjPartM is used to calculate preacceleration optics. TotalPartM is used to calculate post acceleration optics.
The runtime system calculates:
InjPartE = InjPartV * abs(InjChgState)
MachPartE = (GVM * (OutPartM / InjPartM) * abs(InjChgState)) + (GVM * abs(OutChgState))
TotalPartE = InjPartE + MachPartE
InjChgState, OutChgState, InjPartM and OutPartM are entered by the operator as part of the machine setup information.
This is an example of how to do a scaling run. We are going to reduce TotalPartE by changing the terminal voltage. Ion source S2 and beamline L6 are being used for the run.
The initial conditions are:
TotalPartE = 12.2 MeV
InjPartE = 0.055 MeV
MachPartE = 12.145 MeV
OutChgState = 3+
InjPartM = 197
OutPartM = 197
TRV = 3.036 MV
The steps are:
Make an empty directory.
Change to the directory just created.
Check to make sure particle mass, ion source selection, etc have been entered on the machine setup page.
Type "request MACH" to obtain the current machine operation values.
Type "request L6" to obtain the current post acceleration component values.
Type "scale L6" to enter the scaling program and scale the post acceleration components.
Type "a" to select TotPartE from the menu.
Type "12.0<cr>" to enter the new value.
Type "r" to scale the L6 parameter list.
Type "x" to exit the scaling program.
Type "scale MACH" to enter the scaling program and scale the machine components.
Type "r" to scale the MACH parameter list.
Type "x" to exit the scaling program.
Type "send MACH" to send the new machine operation values.
Type "send L6" to send the new post acceleration component values.
It is not necessary to reenter the desired particle energy after the first invokation of "scale". When "scale" is exited, a file named "scaenv" is written into the current directory. This file contains the setup information for the scaling program. If the file is present, it is reloaded the next time "scale" is invoked.
If the scaling process is repeated by using "request" to obtain new values from the running database, "scaenv" should be removed before invoking "scale".
This is another example of how to do a scaling run. In this example we are going to reduce the injection energy by 5 KeV. The initial conditions are the same as the last example.
The steps are:
Make an empty directory.
Change to the directory just created.
Check to make sure particle mass, ion source selection, etc have been entered on the machine setup page.
Type "request S2" to obtain the current preacceleration component values.
Type "request MACH" to obtain the current machine operation values.
Type "request L6" to obtain the current post acceleration component values.
Type "scale S2" to enter the scaling program and scale the preacceleration components.
Type "c" to select InjPartE from the menu.
Type "0.050<cr>" to enter the new value.
Type "r" to scale the S2 parameter list.
Type "x" to exit the scaling program.
Type "scale L6" to enter the scaling program and scale the post acceleration components.
Type "r" to scale the L6 parameter list.
Type "x" to exit the scaling program.
Type "send S2" to send the new preacceleration component values.
Type "send L6" to send the new post acceleration component values.