SensorPolarIntensity#

class ansys.speos.core.sensor.SensorPolarIntensity(project, name, description='', metadata=None, sensor_instance=None, default_parameters=None)#

Bases: BaseSensor

Class for polar intensity sensor.

A polar intensity sensor generates a photometric file (IESNA A/B/C or Eulumdat) from a simulation. It supports both far-field (integration angle) and near-field (cell distance + diameter) configurations as well as explicit dimensional sampling or adaptive sampling from a file.

By default, IESNA C format, explicit dimensions (360 × 90), far-field with integration angle of 5 degrees, and the origin axis system are used.

Parameters:
projectansys.speos.core.project.Project

Project that will own the feature.

namestr

Name of the feature.

descriptionstr

Description of the feature. By default, "".

metadataOptional[Mapping[str, str]]

Metadata of the feature. By default, {}.

sensor_instanceansys.api.speos.scene.v2.scene_pb2.Scene.SensorInstance, optional

Sensor instance to provide if the feature does not have to be created from scratch. By default, None, means that the feature is created from scratch.

default_parametersansys.speos.core.generic.parameters.PolarIntensitySensorParameters, optional

If defined the values in the sensor instance will be overwritten by the values of the dataclass. By default, None.

Parameters:

Notes

PolarIntensityProperties in the scene proto only contains an axis_system field – there is no layer-type separation for polar intensity sensors.

Overview#

set_format_iesna_a

Set output format to IESNA type A.

set_format_iesna_b

Set output format to IESNA type B.

set_format_iesna_c

Set output format to IESNA type C.

set_format_eulumdat

Set output format to Eulumdat.

set_constant_sampling

Use constant samplign instead of an adaptive-sampling file.

set_adaptive_sampling

Use an adaptive-sampling file instead of explicit dimensions.

set_far_field

Configure the sensor for far-field measurement.

set_near_field

Configure the sensor for near-field measurement.

adaptive_sampling_file

Location of the adaptive-sampling file.

horizontal_sampling

Number of horizontal samples.

vertical_sampling

Number of vertical samples.

integration_angle

Far-field integration angle in degrees.

cell_distance

Distance of the measurement cell from the sensor origin in mm.

cell_diameter

Diameter of the measurement cell in mm.

axis_system

Position of the sensor.

Import detail#

from ansys.speos.core.sensor import SensorPolarIntensity

Property detail#

property SensorPolarIntensity.adaptive_sampling_file: pathlib.Path | None#

Location of the adaptive-sampling file.

Parameters:
uriUnion[str, Path]

Path to the adaptive-sampling file.

Returns:
Union[Path, None]

Path to the adaptive-sampling file, or None if constant sampling is active.

property SensorPolarIntensity.horizontal_sampling: int | None#

Number of horizontal samples.

Parameters:
valueint

Number of horizontal samples of the intensity file.

Returns:
Union[int, None]

Horizontal sampling count, or None if adaptive sampling is active.

property SensorPolarIntensity.vertical_sampling: int | None#

Number of vertical samples.

Parameters:
valueint

Number of vertical samples of the intensity file.

Returns:
Union[int, None]

Vertical sampling count, or None if adaptive sampling is active.

property SensorPolarIntensity.integration_angle: float | None#

Far-field integration angle in degrees.

Parameters:
valuefloat

Integration angle (degrees).

Returns:
Union[float, None]

Integration angle, or None when the sensor is in near-field mode.

property SensorPolarIntensity.cell_distance: float | None#

Distance of the measurement cell from the sensor origin in mm.

Parameters:
valuefloat

Cell distance in mm.

Returns:
Union[float, None]

Cell distance, or None when the sensor is in far-field mode.

property SensorPolarIntensity.cell_diameter: float | None#

Diameter of the measurement cell in mm.

The diameter is derived from cell_distance and the stored cell_integration_angle via 2 * cell_distance * tan(cell_integration_angle).

Parameters:
valuefloat

Cell diameter in mm.

Returns:
Union[float, None]

Cell diameter, or None when the sensor is in far-field mode.

property SensorPolarIntensity.axis_system: list[float]#

Position of the sensor.

Parameters:
valuelist[float]

Position [Ox Oy Oz Xx Xy Xz Yx Yy Yz Zx Zy Zz]. By default, [0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1].

Returns:
list[float]

Current axis system.

Notes

PolarIntensityProperties contains only an axis_system; there is no layer-type separation for polar intensity sensors.

Method detail#

SensorPolarIntensity.set_format_iesna_a()#

Set output format to IESNA type A.

Returns:
ansys.speos.core.sensor.SensorPolarIntensity

This polar intensity sensor.

SensorPolarIntensity.set_format_iesna_b()#

Set output format to IESNA type B.

Returns:
ansys.speos.core.sensor.SensorPolarIntensity

This polar intensity sensor.

SensorPolarIntensity.set_format_iesna_c()#

Set output format to IESNA type C.

Returns:
ansys.speos.core.sensor.SensorPolarIntensity

This polar intensity sensor.

SensorPolarIntensity.set_format_eulumdat()#

Set output format to Eulumdat.

Returns:
ansys.speos.core.sensor.SensorPolarIntensity

This polar intensity sensor.

SensorPolarIntensity.set_constant_sampling()#

Use constant samplign instead of an adaptive-sampling file.

Returns:
ansys.speos.core.sensor.SensorPolarIntensity

This polar intensity sensor.

SensorPolarIntensity.set_adaptive_sampling()#

Use an adaptive-sampling file instead of explicit dimensions.

Returns:
ansys.speos.core.sensor.SensorPolarIntensity

This polar intensity sensor.

SensorPolarIntensity.set_far_field()#

Configure the sensor for far-field measurement.

Returns:
ansys.speos.core.sensor.SensorPolarIntensity

This polar intensity sensor.

SensorPolarIntensity.set_near_field()#

Configure the sensor for near-field measurement.

Default cell distance is 10 mm and default cell diameter is 0.3491 mm.

Returns:
ansys.speos.core.sensor.SensorPolarIntensity

This polar intensity sensor.