SourceRayFile#

class ansys.speos.core.source.SourceRayFile(project, name, description='', metadata=None, source_instance=None, default_values=True)#

Bases: BaseSource

RayFile Source.

By default, flux and spectrum from ray file are selected.

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, {}.

default_valuesbool

Uses default values when True.

Parameters:
  • project (SourceRayFile.__init__.project)

  • name (str)

  • description (str)

  • metadata (Optional[Mapping[str, str]])

  • source_instance (Optional[ansys.speos.core.kernel.scene.ProtoScene.SourceInstance])

  • default_values (bool)

Overview#

set_ray_file_uri

Set ray file.

set_flux_from_ray_file

Take flux from ray file provided.

set_flux_luminous

Set luminous flux.

set_flux_radiant

Set radiant flux.

set_spectrum_from_ray_file

Take spectrum from ray file provided.

set_spectrum

Set spectrum of the Source.

set_axis_system

Set position of the source.

set_exit_geometries

Set exit geometries.

Import detail#

from ansys.speos.core.source import SourceRayFile

Method detail#

SourceRayFile.set_ray_file_uri(uri)#

Set ray file.

Parameters:
uristr

Rayfile format file uri (.ray or .tm25ray files expected).

Returns:
ansys.speos.core.source.SourceRayFile

RayFile source.

SourceRayFile.set_flux_from_ray_file()#

Take flux from ray file provided.

Returns:
ansys.speos.core.source.SourceRayFile

RayFile source.

SourceRayFile.set_flux_luminous(value=683)#

Set luminous flux.

Parameters:
valuefloat

Luminous flux in lumens. By default, 683.0.

Returns:
ansys.speos.core.source.SourceRayFile

RayFile source.

SourceRayFile.set_flux_radiant(value=1)#

Set radiant flux.

Parameters:
valuefloat

Radiant flux in watts. By default, 1.0.

Returns:
ansys.speos.core.source.SourceRayFile

RayFile source.

SourceRayFile.set_spectrum_from_ray_file()#

Take spectrum from ray file provided.

Returns:
ansys.speos.core.source.SourceRayFile

RayFile source.

SourceRayFile.set_spectrum()#

Set spectrum of the Source.

Returns:
ansys.speos.core.spectrum.Spectrum

Spectrum.

SourceRayFile.set_axis_system(axis_system=None)#

Set position of the source.

Parameters:
axis_systemOptional[List[float]]

Position of the source [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:
ansys.speos.core.source.SourceRayFile

RayFile Source.

SourceRayFile.set_exit_geometries(exit_geometries=None)#

Set exit geometries.

Parameters:
exit_geometriesList[ansys.speos.core.geo_ref.GeoRef]

Exit Geometries that will use this rayfile source. By default, [].

Returns:
ansys.speos.core.source.SourceRayFile

RayFile Source.