Package org.scictrl.csshell.python
Class EmittanceCalculator
java.lang.Object
org.scictrl.csshell.python.PythonRunner
org.scictrl.csshell.python.EmittanceCalculator
Calculates emittance with Python script, written by Thiemo Schmelzer.
- Author:
- igor@scictrl.org
-
Nested Class Summary
Nested classes/interfaces inherited from class org.scictrl.csshell.python.PythonRunner
PythonRunner.Result
-
Field Summary
Fields inherited from class org.scictrl.csshell.python.PythonRunner
PYTHON_BIN
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncalculateEmittance.double
Getter for the fieldenergy
.double
Getter for the fieldlastEmittance
.double
Getter for the fieldlastEmittanceStd
.void
init.void
inputs
(double[] quad_currents, double[] beam_widths, double[] beam_widths_std) inputs.void
setEnergy
(double energy) Setter for the fieldenergy
.Methods inherited from class org.scictrl.csshell.python.PythonRunner
executeArrayTransaction, getDirectory, getLastData, getLastResult, getScript, parseDouble, setDirectory, setScript
-
Constructor Details
-
EmittanceCalculator
public EmittanceCalculator()Constructor for EmittanceCalculator.
-
-
Method Details
-
init
init.
- Parameters:
dir
- a directory asFile
where scripts are Python locatedscript
- a name of Python script to be used
-
setEnergy
public void setEnergy(double energy) Setter for the field
energy
.- Parameters:
energy
- a double
-
getEnergy
public double getEnergy()Getter for the field
energy
.- Returns:
- a double
-
inputs
public void inputs(double[] quad_currents, double[] beam_widths, double[] beam_widths_std) inputs.
- Parameters:
quad_currents
- an array ofinvalid reference
double
beam_widths
- an array ofinvalid reference
double
beam_widths_std
- an array ofinvalid reference
double
-
calculateEmittance
calculateEmittance.
- Returns:
- a Result object
-
getLastEmittance
public double getLastEmittance()Getter for the field
lastEmittance
.- Returns:
- a double
-
getLastEmittanceStd
public double getLastEmittanceStd()Getter for the field
lastEmittanceStd
.- Returns:
- a double
-