SensorHumanEye#
- class ansys.speos.core.sensor.SensorHumanEye(project, name, description='', metadata=None, sensor_instance=None, default_parameters=None)#
Bases:
BaseSensorSensor feature: Human Eye.
A human eye sensor simulates the light perceived by a human eye looking from an observer point to a target point. The spectral range is fixed from 360 nm to 830 nm, only the wavelength sampling can be changed. By default, a colorimetric sensor with a wavelength sampling of 13, a pupil diameter of 4 mm, a horizontal field of view from -20 to 20 degrees (sampling 2352), a vertical field of view from -10 to 10 degrees (sampling 1176), no layer separation, the origin axis system and no focal length (target point not defined) are chosen.
- Parameters:
- project
ansys.speos.core.project.Project Project that will own the feature.
- name
str Name of the feature.
- description
str Description of the feature. By default,
"".- metadata
Optional[Mapping[str,str]] Metadata of the feature. By default,
{}.- sensor_instance
ansys.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_parameters
ansys.speos.core.generic.parameters.HumanEyeSensorParameters,optional If defined the values in the sensor instance will be overwritten by the values of the dataclass. By default,
None.
- project
- Parameters:
project (SensorHumanEye.__init__.project)
name (str)
description (str)
sensor_instance (Optional[ansys.speos.core.kernel.scene.ProtoScene.SensorInstance])
default_parameters (Optional[ansys.speos.core.generic.parameters.HumanEyeSensorParameters])
Notes
This feature only exists in sensor template version 2 and requires a Speos server 2027 R1 SP0 or above.
The position of the sensor is defined by an observer point, a target point and a top direction. The sensor axis system has its origin at the observer point, its Z axis along the sight direction (from observer to target), its Y axis along the top direction (orthogonalized against the sight direction) and its X axis equal to
Y x Z. The focal length is the distance between the observer and the target points.
Overview#
Set type colorimetric. |
|
Set type spectral. |
|
Set the field of view and sampling of the sensor. |
|
Save feature: send the local data to the speos server database. |
|
Set layer separation to None (no layer separation). |
|
Set layer separation to by source. |
Type of the sensor. |
|
Number of wavelengths taken into account between 360 nm and 830 nm. |
|
Diameter of the pupil. |
|
Axis system of the sensor. |
|
Focal length - distance between the observer point and the target point (mm). |
|
Position of the eye. |
|
Point looked at by the eye. |
|
Top direction of the eye. |
|
Current layer separation type. |
|
Property containing human eye sensor visualization data. |
Fixed minimum wavelength of the human eye sensor (nm). |
|
Fixed maximum wavelength of the human eye sensor (nm). |
Import detail#
from ansys.speos.core.sensor import SensorHumanEye
Property detail#
- property SensorHumanEye.wavelength_sampling: None | int#
Number of wavelengths taken into account between 360 nm and 830 nm.
- property SensorHumanEye.axis_system: list[float]#
Axis system of the sensor.
O corresponds to the observer (eye point), Y to the top direction and Z to the sight direction. Prefer
set_view()or theobserver_point,target_pointandtop_directionproperties to position the sensor.
- property SensorHumanEye.focal: float | None#
Focal length - distance between the observer point and the target point (mm).
- property SensorHumanEye.visual_data: ansys.speos.core.generic.visualization_methods._VisualData#
Property containing human eye sensor visualization data.
The viewing cone is represented by a sphere section of radius equal to the focal length, centered on the observer point and covering the field of view, closed by triangles to the observer point.
- Returns:
ansys.speos.core.generic.visualization_methods._VisualDataInstance of VisualData Class for pyvista.PolyData of feature faces, coordinate_systems.
Attribute detail#
- SensorHumanEye.WAVELENGTH_START = 360.0#
Fixed minimum wavelength of the human eye sensor (nm).
- SensorHumanEye.WAVELENGTH_END = 830.0#
Fixed maximum wavelength of the human eye sensor (nm).
Method detail#
- SensorHumanEye.set_type_colorimetric()#
Set type colorimetric.
The sensor generates color results without any spectral data. The wavelength sampling is preserved when switching type.
- Returns:
ansys.speos.core.sensor.SensorHumanEyeHuman eye sensor.
- SensorHumanEye.set_type_spectral()#
Set type spectral.
The sensor generates color results and spectral data separated by wavelength. The wavelength sampling is preserved when switching type.
- Returns:
ansys.speos.core.sensor.SensorHumanEyeHuman eye sensor.
- SensorHumanEye.set_dimensions()#
Set the field of view and sampling of the sensor.
X corresponds to the horizontal direction, Y to the vertical direction.
- Returns:
ansys.speos.core.sensor.BaseSensor.AngularRangeAngular range object.
- SensorHumanEye.commit()#
Save feature: send the local data to the speos server database.
- Returns:
ansys.speos.core.sensor.SensorHumanEyeHuman eye sensor feature.
- Raises:
ValueErrorIf the focal length is not defined. Set it with
focal,target_pointorset_view()before committing.
- SensorHumanEye.set_layer_type_none()#
Set layer separation to None (no layer separation).
- Returns:
ansys.speos.core.sensor.SensorHumanEyeHuman eye sensor.
- SensorHumanEye.set_layer_type_source()#
Set layer separation to by source.
- Returns:
ansys.speos.core.sensor.SensorHumanEyeHuman eye sensor.