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.

x

The x-coordinate of the field.

Type:

float

y

The y-coordinate of the field.

Type:

float

vx

The vignette factor in the x-direction.

Type:

float

vy

The vignette factor in the y-direction.

Type:

float

weight

The relative importance scalar for this field. Non-negative; 0.0 means excluded from weighted contexts.

Type:

float

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