openlifu.plan.target_constraints.TargetConstraints

class openlifu.plan.target_constraints.TargetConstraints(dim: Annotated[str, OpenLIFUFieldData(name='Constrained dimension ID', description='The dimension ID being constrained')] = 'x', name: Annotated[str, OpenLIFUFieldData(name='Constrained dimension name', description='The name of the dimension being constrained')] = 'dim', units: Annotated[str, OpenLIFUFieldData(name='Dimension units', description='The units of the dimension being constrained')] = 'm', min: Annotated[float, OpenLIFUFieldData(name='Minimum allowed value', description='The minimum value of the dimension')] = -inf, max: Annotated[float, OpenLIFUFieldData(name='Maximum allowed value', description='The maximum value of the dimension')] = inf)[source]

Bases: DictMixin

A class for storing target constraints.

Target constraints are used to define the acceptable range of positions for a target. For example, a target constraint could be used to define the acceptable range of values for the x position of a target.

check_bounds(pos: float)[source]

Check if the given position is within bounds.

dim: Annotated[str, OpenLIFUFieldData(name='Constrained dimension ID', description='The dimension ID being constrained')] = 'x'

The dimension ID being constrained

max: Annotated[float, OpenLIFUFieldData(name='Maximum allowed value', description='The maximum value of the dimension')] = inf

The maximum value of the dimension

min: Annotated[float, OpenLIFUFieldData(name='Minimum allowed value', description='The minimum value of the dimension')] = -inf

The minimum value of the dimension

name: Annotated[str, OpenLIFUFieldData(name='Constrained dimension name', description='The name of the dimension being constrained')] = 'dim'

The name of the dimension being constrained

units: Annotated[str, OpenLIFUFieldData(name='Dimension units', description='The units of the dimension being constrained')] = 'm'

The units of the dimension being constrained