class WaveguideModeOverlap(SimOutput): """Represents a waveguide mode. The waveguide is assumed to be axis-aligned. Attributes: center: Waveguide center. wavelength: Wavelength at which to evaluate overlap. extents: Width and height of waveguide mode region. normal: Normal direction of the waveguide. Note that this is also the mode propagation direction. mode_num: Mode number. The mode with largest propagation constant is mode 0, the mode with second largest propagation constant is mode 1, etc. power: The transmission power of the mode. normalize: If `True`, normalize the overlap by the square of the total power emitted at the `wavelength`. """ type = goos.ModelNameType("overlap.waveguide_mode") wavelength = goos.types.FloatType() center = goos.Vec3d() extents = goos.Vec3d() normal = goos.Vec3d() mode_num = goos.types.IntType() power = goos.types.FloatType() normalize = goos.types.BooleanType(default=True) class Attributes: output_type = goos.Function
class WaveguideModeSource(SimSource): """Represents a waveguide mode. The waveguide is assumed to be axis-aligned. The time-domain profile is assumed to be Gaussian centered at wavelength `wavelength` and width of `bandwidth`. Attributes: center: Waveguide center. extents: Width and height of waveguide mode region. normal: Normal direction of the waveguide. Note that this is also the mode propagation direction. mode_num: Mode number. The mode with largest propagation constant is mode 0, the mode with second largest propagation constant is mode 1, etc. power: The transmission power of the mode. wavelength: Center wavelength of the mode source. bandwidth: Bandwidth of the Gaussian pulse. """ type = goos.ModelNameType("source.waveguide_mode") center = goos.Vec3d() extents = goos.Vec3d() normal = goos.Vec3d() mode_num = goos.types.IntType() power = goos.types.FloatType() wavelength = goos.types.FloatType() bandwidth = goos.types.FloatType()
class GaussianSource(SimSource): """Represents a gaussian source. Attributes: type: Must be "source.gaussian_beam". normalize_by_sim: If `True`, normalize the power by running a simulation. """ type = goos.ModelNameType("source.gaussian_beam") w0 = goos.types.FloatType() center = goos.Vec3d() beam_center = goos.Vec3d() extents = goos.Vec3d() normal = goos.Vec3d() theta = goos.types.FloatType() psi = goos.types.FloatType() polarization_angle = goos.types.FloatType() power = goos.types.FloatType() normalize_by_sim = goos.types.BooleanType(default=False)
class DipoleSource(SimSource): """Represents a dipole source. Attributes: position: Position of the dipole (will snap to grid). axis: Direction of the dipole (x:0, y:1, z:2). phase: Phase of the dipole source (in radian). power: Power assuming uniform dielectric space with the permittivity. """ type = goos.ModelNameType("source.dipole_source") position = goos.Vec3d() axis = goos.types.IntType() phase = goos.types.FloatType() power = goos.types.FloatType()
class StopWhenFieldsDecayed(StopCondition): type = goos.ModelNameType("stop.stop_when_fields_decayed") time_increment = goos.types.IntType() component = goos.types.IntType() pos = goos.Vec3d() threshold = goos.types.FloatType()