eradiate.scenes.measure.TargetRectangle#

class eradiate.scenes.measure.TargetRectangle(xmin, xmax, ymin, ymax, z=0.0)[source]#

Bases: Target

Rectangle target origin specification.

This class defines an axis-aligned rectangular zone where ray targets will be sampled or ray origins will be projected.

Parameters:
  • xmin (quantity or float) – Lower bound on the X axis.

    Unit-enabled field (default: ucc[‘length’]).

  • xmax (quantity or float) – Upper bound on the X axis.

    Unit-enabled field (default: ucc[‘length’]).

  • ymin (quantity or float) – Lower bound on the Y axis.

    Unit-enabled field (default: ucc[‘length’]).

  • ymax (quantity or float) – Upper bound on the Y axis.

    Unit-enabled field (default: ucc[‘length’]).

  • z (quantity or float, default: 0.0) – Altitude of the plane enclosing the rectangle.

    Unit-enabled field (default: ucc[‘length’]).

Fields:
  • xmin (quantity) – Lower bound on the X axis.

  • xmax (quantity) – Upper bound on the X axis.

  • ymin (quantity) – Lower bound on the Y axis.

  • ymax (quantity) – Upper bound on the Y axis.

  • z (quantity) – Altitude of the plane enclosing the rectangle.

static convert(value)#

Object converter method.

If value is a dictionary, this method uses new() to instantiate a Target child class based on the "type" entry it contains.

If value is a 3-vector, this method returns a TargetPoint instance.

Otherwise, it returns value.

kernel_item()[source]#

Return kernel item.

static new(target_type, *args, **kwargs)#

Instantiate one of the supported child classes. This factory requires manual class registration. All position and keyword arguments are forwarded to the constructed type.

Currently supported classes:

Parameters:

target_type ({"point", "rectangle"}) – Identifier of one of the supported child classes.

Returns:

Target