minimize_difference_with_ref module

Define a simple optimization objective.

It is a simple difference over a given quantity between the reference linac and the linac under tuning.

class MinimizeDifferenceWithRef(*args, **kwargs)[source]

Bases: MinimizeDifferenceWithRef

__init__(*args, **kwargs)[source]

Set complementary SimulationOutput.get() flags, reference value.

Parameters:
  • name – A short string to describe the objective and access to it.

  • weight – A scaling constant to set the weight of current objective.

  • get_key – Name of the quantity to get.

  • get_kwargs – Keyword arguments for the SimulationOutput.get() method. We do not check its validity, but in general you will want to define the keys elt and pos. If objective concerns a phase, you may want to precise the to_deg key. You also should explicit the to_numpy key.

  • reference – The reference simulation output from which the ideal value will be taken.

  • descriptor – A longer string to explain the objective.

_abc_impl = <_abc._abc_data object at 0x7318f3e4a000>