Skip to content
  • Samuel Rowlinson's avatar
    Implementing GeometricParameter class for efficient updating of ABCD matrices · 6bd96f79
    Samuel Rowlinson authored
    Connector ABCD matrices were previously getting updated when a dependent parameter
    changed via the post_set handle passed to the model_parameter decorator; where this
    post_set method was Connector._evaluate_abcd_matrices. This meant that a Python call
    had to be performed whenever changing a geometric type parameter.
    
    As this method was getting the devil beaten out of it during any simulation where a
    RoC, focal length, etc. was changing, having this as a Python call was not ideal.
    
    A new GeometricParameter class (deriving from Parameter) has been created to fix this
    inefficiency. Now the GeometricParameter.update_abcd_matrices method (a C function) is
    called whenever the value of the parameter changes.
    6bd96f79