fields.field#

Field Module

This module defines the Field class, which represents a field in an optical system.

Kramer Harrison, 2025

Classes

Field([x, y, vignette_factor_x, ...])

Represents a field with specific properties.

class Field(x: float = 0, y: float = 0, vignette_factor_x: float = 0.0, vignette_factor_y: float = 0.0, weight: float = 1.0)[source]#

Represents a field with specific properties.

Variables:
  • x (float) – The x-coordinate of the field.

  • y (float) – The y-coordinate of the field.

  • vx (float) – The vignette factor in the x-direction.

  • vy (float) – The vignette factor in the y-direction.

  • weight (float) – The relative importance scalar for this field. Non-negative; 0.0 means excluded from weighted contexts.

classmethod from_dict(field_dict: dict) Field[source]#

Create a field from a dictionary.

Parameters:

field_dict – A dictionary representation of the field.

Returns:

A field object created from the dictionary.

to_dict() dict[source]#

Convert the field to a dictionary.

Returns:

A dictionary representation of the field.

property weight: float#

Non-negative relative importance scalar for this field.

Type:

float