Optimization¶
Merit function columns, Optimization Wizard setting names, and the algorithm and cycle names local optimization accepts.
Merit function¶
Merit Function Editor operands and calculation.
- class MeritFunction(attributes: tuple[Attribute, ...])¶
Merit Function Editor columns copied for every operand.
Data columns depend on the operand type.
read()includes the active ones.- edit(editor, action: str, number: int | None, values: dict[str, object] | None) None¶
Change, insert, or remove one operand.
addinserts atnumberand then writesvalues.typechanges the operand type before the other keys.parametersmaps column names such asParam1to new values.- Parameters:
- Raises:
ValueError – The action, number, or values cannot be applied.
- read(editor, operand: int | None = None) dict[str, object]¶
Read every operand, or one operand.
- Parameters:
editor – The ZOS-API merit function editor.
operand (int | None) – One 1-based operand number.
Nonereads every operand.
- Returns:
operands, or the one requested operand. Each operand includesparametersfor the columns its type uses.target,weight,value, andcontributionare omitted when the operand does not use them.- Return type:
- Raises:
ValueError –
operandis outside the editor.
- MERIT¶
Columns copied from every Merit Function Editor operand.
Optimization Wizard¶
Optimization Wizard controls.
- SETTING_NAMES: tuple[str, ...] = ('criterion', 'type', 'reference', 'spatial_frequency', 'xs_weight', 'yt_weight', 'pupil_integration', 'rings', 'arms', 'obscuration', 'grid_size', 'delete_vignetted', 'use_glass_boundaries', 'glass_min', 'glass_max', 'glass_edge', 'use_air_boundaries', 'air_min', 'air_max', 'air_edge', 'start_at', 'overall_weight', 'use_all_configurations', 'configuration', 'use_all_fields', 'field', 'assume_axial_symmetry', 'ignore_lateral_color', 'add_favorite_operands', 'optimize_for_best_nominal_performance', 'optimize_for_manufacturing_yield', 'manufacturing_yield_weight', 'use_maximum_distortion', 'maximum_distortion')¶
Optimization Wizard control names, in dialog order.
Local optimization¶
Local optimization for the open lens.