finesse.analysis.actions.axes module
Axes Actions such as xaxis, noaxais, etc.
- class finesse.analysis.actions.axes.Noxaxis(pre_step: Action | None = None, post_step: Action | None = None, name: str = 'noxaxis')[source]
Bases:
SweepThe default Action for a model when no action is specified. Solves the model without changing any parameters. Will return a solution with a single value for every detector in the model.
Parameters
- pre_stepAction | None, optional
An action to perform before the Noxaxis is run, by default None
- post_stepAction | None, optional
An action to perform after the Noxaxis is run, by default None
- namestr, optional
Name of the action, used to find the solution in the final output, by default “noxaxis”
- class finesse.analysis.actions.axes.X2axis(parameter1: Parameter | ParameterRef | str, mode1: Literal['lin', 'log'], start1: float, stop1: float, steps1: int, parameter2: Parameter | ParameterRef | str, mode2: Literal['lin', 'log'], start2: float, stop2: float, steps2: int, relative: bool = False, *, pre_step: Action | None = None, post_step: Action | None = None, name: str = 'x2axis')[source]
Bases:
XNaxisTwo-dimensional version of the Xaxis action. Will solve the model for every point on a grid of values defined by the two sets of sweep arguments. Returns a solution with a two-dimensional array for every detector in the model.
Significantly faster than calling Xaxis in a Python for loop.
Parameters
- parameter1Parameter | ParameterRef | str
Parameter to sweep over.
- mode1Literal[‘lin’, ‘log’]
Whether to sweep linearly or logarithmically
- start1float
Starting value of the parameter sweep
- stop1float
Final value of the parameter sweep.
- steps1int
Number of steps in the sweep. Solution arrays will contain ‘steps+1’ values
- parameter2Parameter | ParameterRef | str
Parameter to sweep over.
- mode2Literal[‘lin’, ‘log’]
Whether to sweep linearly or logarithmically
- start2float
Starting value of the parameter sweep
- stop2float
Final value of the parameter sweep.
- steps2int
Number of steps in the sweep. Solution arrays will contain ‘steps+1’ values
- relativebool, optional
Whether to apply the changes to the parameter value on top of the current value or ignore the current value of the parameter, by default False, by default False
- pre_stepAction | None, optional
An action to perform before each step is computed, by default None
- post_stepAction | None, optional
An action to perform after each step is computed, by default None
- namestr, optional
Name of the action, used to find the solution in the final output, by default “x2axis”
- class finesse.analysis.actions.axes.X3axis(parameter1: Parameter | ParameterRef | str, mode1: Literal['lin', 'log'], start1: float, stop1: float, steps1: int, parameter2: Parameter | ParameterRef | str, mode2: Literal['lin', 'log'], start2: float, stop2: float, steps2: int, parameter3: Parameter | ParameterRef | str, mode3: Literal['lin', 'log'], start3: float, stop3: float, steps3: int, relative: bool = False, *, pre_step: Action | None = None, post_step: Action | None = None, name='x3axis')[source]
Bases:
XNaxisThree-dimensional version of the Xaxis action. Will solve the model for every point on a cube of values defined by the three sets of sweep arguments. Returns a solution with a three-dimensional array for every detector in the model.
Significantly faster than calling Xaxis in a nested Python for loop.
Parameters
- parameter1Parameter | ParameterRef | str
Parameter to sweep over.
- mode1Literal[‘lin’, ‘log’]
Whether to sweep linearly or logarithmically
- start1float
Starting value of the parameter sweep
- stop1float
Final value of the parameter sweep.
- steps1int
Number of steps in the sweep. Solution arrays will contain ‘steps+1’ values
- parameter2Parameter | ParameterRef | str
Parameter to sweep over.
- mode2Literal[‘lin’, ‘log’]
Whether to sweep linearly or logarithmically
- start2float
Starting value of the parameter sweep
- stop2float
Final value of the parameter sweep.
- steps2int
Number of steps in the sweep. Solution arrays will contain ‘steps+1’ values
- parameter3Parameter | ParameterRef | str
Parameter to sweep over.
- mode3Literal[‘lin’, ‘log’]
Whether to sweep linearly or logarithmically
- start3float
Starting value of the parameter sweep
- stop3float
Final value of the parameter sweep.
- steps3int
Number of steps in the sweep. Solution arrays will contain ‘steps+1’ values
- relativebool, optional
Whether to apply the changes to the parameter value on top of the current value or ignore the current value of the parameter, by default False, by default False
- pre_stepAction | None, optional
An action to perform before each step is computed, by default None
- post_stepAction | None, optional
An action to perform after each step is computed, by default None
- namestr, optional
Name of the action, used to find the solution in the final output, by default “x3axis”
- class finesse.analysis.actions.axes.XNaxis(*args, relative: bool = False, pre_step: Action | None = None, post_step: Action | None = None, name: str = 'XNaxis')[source]
Bases:
SweepN-dimensional version of Xaxis allows for multi-dimensional parameter sweep of arbitrary dimension N. You need to provide a set of ‘parameter, mode, start, stop, steps’ arguments for every dimension you want to sweep over.
Parameters
- relativebool, optional
Whether to apply the changes to the parameter value on top of the current value or ignore the current value of the parameter, by default False, by default False
- pre_stepAction | None, optional
An action to perform before each step is computed, by default None
- post_stepAction | None, optional
An action to perform after each step is computed, by default None
- namestr, optional
Name of the action, used to find the solution in the final output, by default “XNaxis”
- class finesse.analysis.actions.axes.Xaxis(parameter: Parameter | ParameterRef | str, mode: Literal['lin', 'log'], start: float, stop: float, steps: int, relative: bool = False, *, pre_step: Action | None = None, post_step: Action | None = None, name: str = 'xaxis')[source]
Bases:
XNaxisSweeps a parameter and solves the model for every value in the sweep. Will a solution with an array of values for every detector in the model.
Parameters
- parameterParameter | ParameterRef | str
Parameter to sweep over.
- modeLiteral[‘lin’, ‘log’]
Whether to sweep linearly or logarithmically
- startfloat
Starting value of the parameter sweep
- stopfloat
Final value of the parameter sweep.
- stepsint
Number of steps in the sweep. Solution arrays will contain ‘steps+1’ values
- relativebool, optional
Whether to apply the changes to the parameter value on top of the current value or ignore the current value of the parameter, by default False
- pre_stepAction | None, optional
An action to perform before each step is computed, by default None
- post_stepAction | None, optional
An action to perform after each step is computed, by default None
- namestr, optional
Name of the action, used to find the solution in the final output, by default “xaxis”