OneSimulation docs Website Free books Plans on Gumroad

Docs › Physics API reference › onesim.physics.optics

A.14 onesim.physics.optics

adapt_optics_result function

adapt_optics_result(result: OpticsResult, *, result_id: str = 'waves.optics.result', plan_reference: ArtifactReference | None = None, diagnostics: Sequence[str] = ()) -> SimulationResultSet

Publish a complex paraxial envelope and intensity on transverse nodes.

adapt_photonics_result function

adapt_photonics_result(result: PhotonicsResult, *, result_id: str = 'waves.photonics.result', plan_reference: ArtifactReference | None = None, diagnostics: Sequence[str] = ()) -> SimulationResultSet

Publish photon density plus the delegated optical observables.

ComplexParaxialEnvelope class

ComplexParaxialEnvelope(*, domain: object, model_id: str = <factory>, wavenumber: float, group_speed: float, permittivity: float, reference_index: float = 1.0, refractive_index_perturbation: float = 0.0, absorption: float = 0.0, source: object = 0.0) -> None

One genuinely complex electric-envelope field in the travelling frame.

Declared fields. envelope (V/m, differential), intensity (W/m^2, derived), driving (V/m/s, input).

OpticsConfiguration class

OpticsConfiguration(provider: str = 'waves.optics', mesh: str = 'core.coordinate_projection.1d', discretization: str = 'paraxial_finite_difference', time_integration: str = 'classical_rk4', solver: str = 'scalar_paraxial_envelope', parameters: Mapping[str, object] = <factory>) -> None

Select Core propagation contracts and optical parameters.

Selected methods.

to_numerical_configuration() -> NumericalConfiguration

Translate to common Core numerical configuration.

OpticsProvider class

OpticsProvider(*, cell_count: int = 64, wavenumber: float = 1.0, reference_index: float = 1.0, refractive_index_perturbation: FieldSource = 0.0, absorption: FieldSource = 0.0, source_real: FieldSource = 0.0, source_imaginary: FieldSource = 0.0, initial_real: np.ndarray | None = None, initial_imaginary: np.ndarray | None = None, propagation_distance: float = 0.0, step_size: float = 0.0001, time_integration: str = 'classical_rk4', **unknown: object) -> None

Propagate a scalar paraxial envelope with Core spatial/time infrastructure.

Selected methods.

as_spatial_operator(*, method_id: str = 'spatial-method:fdm.optics') -> CallableSpatialOperator

Expose paraxial envelope propagation through the common Study.

execute(problem: object | None = None) -> OpticsResult

Propagate real/imaginary envelope components along optical distance.

OpticsPublicApi class

OpticsPublicApi(*, provider_registry=None) -> None

Validate and execute optics through the waves registry.

Selected methods.

validate(c: OpticsConfiguration) -> tuple[str, ...]
run(c: OpticsConfiguration)

Validate and execute optics provider.

OpticsResult class

OpticsResult(coordinates: np.ndarray, state: OpticsState, distance: float, step_count: int, intensity: np.ndarray, power: float, residual: float) -> None

Paraxial field, intensity, power and propagation residual.

Selected methods.

to_mapping() -> dict[str, object]

Return copied envelope components, intensity and diagnostics.

OpticsState class

OpticsState(real: np.ndarray, imaginary: np.ndarray) -> None

Complex envelope represented by finite real and imaginary 1D fields.

ParaxialEnvelope class

ParaxialEnvelope(*, domain: object, model_id: str = <factory>, wavenumber: float, group_speed: float, permittivity: float, reference_index: float = 1.0, refractive_index_perturbation: float = 0.0, absorption: float = 0.0, source: object = 0.0) -> None

Envelope in a frame travelling distance z=group_speed*t.

Declared fields. real (V/m, differential), imaginary (V/m, differential), intensity (W/m^2, derived), driving (V/m/s, input).

PhotonEnvelope class

PhotonEnvelope(*, domain: object, model_id: str = <factory>, wavenumber: float, group_speed: float, permittivity: float, reference_index: float = 1.0, refractive_index_perturbation: float = 0.0, absorption: float = 0.0, source: object = 0.0, photon_energy: float) -> None

Advance the paraxial envelope with a photon-energy scale for related observables.

Declared fields. real (V/m, differential), imaginary (V/m, differential), intensity (W/m^2, derived), driving (V/m/s, input), photon_flux_density (1/m^2/s, derived), photon_density (1/m^3, derived).

PhotonicsConfiguration class

PhotonicsConfiguration(provider: str = 'waves.photonics', mesh: str = 'core.coordinate_projection.1d', discretization: str = 'delegated_paraxial_photonics', time_integration: str = 'classical_rk4', solver: str = 'optics_provider_composition', parameters: Mapping[str, object] = <factory>) -> None

Select delegated optics contracts and photon normalization.

Selected methods.

to_numerical_configuration() -> NumericalConfiguration

Translate to the shared Core numerical configuration.

PhotonicsProvider class

PhotonicsProvider(*, photon_energy: float = 1.0, **optics_parameters: object) -> None

Evaluate photon observables by delegating field propagation to Optics.

Selected methods.

execute(problem: object | None = None) -> PhotonicsResult

Delegate optical propagation and convert intensity to photon observables.

as_spatial_operator(*, method_id: str = 'spatial-method:fdm.photonics') -> CallableSpatialOperator

Expose delegated optics and photon observables through Core.

PhotonicsPublicApi class

PhotonicsPublicApi(*, provider_registry=None) -> None

Validate and execute photonics via the waves registry.

Selected methods.

validate(c: PhotonicsConfiguration) -> tuple[str, ...]
run(c: PhotonicsConfiguration)

Validate and execute selected photonics provider.

PhotonicsResult class

PhotonicsResult(state: PhotonicsState, optics_result: OpticsResult, photon_energy: float) -> None

Optical solution plus photon density, flux and number.

Selected methods.

to_mapping() -> dict[str, object]

Return photon observables together with the delegated optical result.

PhotonicsState class

PhotonicsState(photon_density: np.ndarray) -> None

Photon-density field derived from an optical envelope state.