A Closer Look at the Controls Class#
We have already seen in previous sections that once the problem has been defined in the projectClass, it is necessary to define a controls class which, as its name suggests, tells RAT what we want to do with the project.
Making an instance of the controls class is quite simple:-
controls = controlsClass();
controls = RAT.Controls()
This then creates an instance of controls class with a number of options defined:
controlsClass with properties:
parallel: 'single'
procedure: 'calculate'
calcSldDuringFit: 0
display: 'iter'
resampleMinAngle: 0.9000
resampleNPoints: 50
+------------------+-----------+
| Property | Value |
+------------------+-----------+
| procedure | calculate |
| parallel | single |
| calcSldDuringFit | False |
| resampleMinAngle | 0.9 |
| resampleNPoints | 50 |
| display | iter |
+------------------+-----------+
We will look at each of these in more detail below. Note that the options that are visible depend on the algorithm selected. So, at the moment the controls are set to ‘calculate’, which will simply calculate the reflectivity and SLD with any associated problem. If we select ‘simplex’ as the algorithm, a different set of options appears:-
controls.procedure = 'simplex';
controls = RAT.Controls(procedure='simplex')
controlsClass with properties:
parallel: 'single'
procedure: 'simplex'
calcSldDuringFit: 0
display: 'iter'
xTolerance: 1.0000e-06
funcTolerance: 1.0000e-06
maxFuncEvals: 10000
maxIterations: 1000
updateFreq: 1
updatePlotFreq: 20
resampleMinAngle: 0.9000
resampleNPoints: 50
+------------------+---------+
| Property | Value |
+------------------+---------+
| procedure | simplex |
| parallel | single |
| calcSldDuringFit | False |
| resampleMinAngle | 0.9 |
| resampleNPoints | 50 |
| display | iter |
| xTolerance | 1e-06 |
| funcTolerance | 1e-06 |
| maxFuncEvals | 10000 |
| maxIterations | 1000 |
| updateFreq | 1 |
| updatePlotFreq | 20 |
+------------------+---------+
which allow the user to set things such as tolerance targets and so on. There is a different set of options for each algorithm. We will now look at each of the available options in turn.
Methods for the controls class#
Parallel#
TODO
Procedure#
TODO
calcSldDuringFit#
TODO
display#
TODO
resamPars#
TODO