Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ _autosummary


# Testing
.cov/
.coverage
.tox/
*,cover
Expand Down
1 change: 1 addition & 0 deletions doc/changelog.d/653.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Intensitysensor
1 change: 1 addition & 0 deletions doc/changelog.d/673.test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Further updates/support for intensity sensor
20 changes: 19 additions & 1 deletion src/ansys/speos/core/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
SensorCamera,
SensorIrradiance,
SensorRadiance,
SensorXMPIntensity,
)
from ansys.speos.core.simulation import (
SimulationDirect,
Expand Down Expand Up @@ -315,7 +316,9 @@ def create_sensor(
description: str = "",
feature_type: type = SensorIrradiance,
metadata: Optional[Mapping[str, str]] = None,
) -> Union[SensorCamera, SensorRadiance, SensorIrradiance, Sensor3DIrradiance]:
) -> Union[
SensorCamera, SensorRadiance, SensorIrradiance, Sensor3DIrradiance, SensorXMPIntensity
]:
"""Create a new Sensor feature.

Parameters
Expand Down Expand Up @@ -361,6 +364,13 @@ def create_sensor(
description=description,
metadata=metadata,
)
case "SensorXMPIntensity":
feature = SensorXMPIntensity(
project=self,
name=name,
description=description,
metadata=metadata,
)
case "SensorRadiance":
feature = SensorRadiance(
project=self,
Expand Down Expand Up @@ -835,6 +845,13 @@ def _fill_features(self):
sensor_instance=ssr_inst,
default_values=False,
)
elif ssr_inst.HasField("intensity_properties"):
ssr_feat = SensorXMPIntensity(
project=self,
name=ssr_inst.name,
sensor_instance=ssr_inst,
default_values=False,
)
elif ssr_inst.HasField("camera_properties"):
ssr_feat = SensorCamera(
project=self,
Expand Down Expand Up @@ -970,6 +987,7 @@ def _create_speos_feature_preview(
SensorRadiance,
SensorCamera,
Sensor3DIrradiance,
SensorXMPIntensity,
SourceLuminaire,
SourceRayFile,
SourceSurface,
Expand Down
Loading