Second-order NLTMM¶
Main class¶
- class NonlinearTMM.SecondOrderNLTMM(mode)¶
Bases:
object
This class calculates second-order nonliner processes (e.g. sum-frequency, difference frequency generation and SPDC) in layered structures. Relies on the functionality of NonlinearTMM class.
- Parameters:
- modestr {‘sfg’, ‘dfg’, ‘spdc’}
- Attributes:
- P1
NonlinearTMM
The inctance of the first pump wave TMM.
- P2
NonlinearTMM
The inctance of the second pump wave TMM.
- Gen
NonlinearTMM
The inctance of the generated wave TMM.
- deltaWlSpdcfloat
The spectral collection window (in nanometers) of the SPDC signal. Only used if
mode
is set toSPDC
Default: NaN.- solidAngleSpdcfloat
The collection solid angle (srad) of the detector (given in vacuum). Only used if
mode
is set toSPDC
Default: NaN.- deltaThetaSpdcfloat
The horizontal collection window (rad) of the detector (given in vacuum). It is used to calculate the vertical span of the detector. Only used if
mode
is set toSPDC
Default: NaN.
- P1
Methods
AddLayer
(d, material)Adds layer to SecondOrderNLTMM.
Returns the intensities and amplitutes of incident, reflected and transmitted wave for
P1
,P2
andGen
.SetParams
(**kwargs)Helper method to set the values of all the attributes.
Solve
()Solves the structure.
Sweep
(paramStr, valuesP1, valuesP2[, ...])Solves the structure for series of
valuesP1
andvaluesP2
of paramparamStr
.Forces the update of the wavelength and beta of the generated beam
Gen
.WaveGetFields2D
(zs, xs[, dirStr])Calculates 2D electric and magnetic fields of beam propagating in the structure.
WaveGetPowerFlows
(layerNr[, x0, x1, z])Analogous to the
GetIntensities
, but calculates the powers of the beams instead of the intensities of the plane-waves.WaveSweep
(paramStr, valuesP1, valuesP2[, ...])Solves the structure for waves for series of
valuesP1
andvaluesP2
of paramparamStr
.- AddLayer(d, material)¶
Adds layer to SecondOrderNLTMM. Equivalent of adding layer to P1, P2 and Gen.
- Parameters:
- dfloat
layer thickness (m)
- materialMaterial
The class containing the material parameters.
- GetIntensities()¶
Returns the intensities and amplitutes of incident, reflected and transmitted wave for
P1
,P2
andGen
. The structure must be solved first.- Returns:
_SecondOrderNLIntensities
Helper class to hold intensity data.
- SetParams(**kwargs)¶
Helper method to set the values of all the attributes. See the docstring of Second-order NLTMM.
- Solve()¶
Solves the structure.
- Sweep(paramStr, valuesP1, valuesP2, layerNr=0, layerZ=0.0, outPwr=True, outAbs=False, outEnh=False, outP1=True, outP2=True, outGen=True)¶
Solves the structure for series of
valuesP1
andvaluesP2
of paramparamStr
. Using this function is more confortable and faster than just changing params and solving the structure (parallelized with OpenMP).- Parameters:
- paramStrstr
- ‘wl’:
Wavelength in meters
- ‘beta’:
normalized tangential wavevector
- ‘I0’:
intensity of the wave
‘d_i’: thikness of layer i (0..N-1)
- valuesP1ndarray of floats
Correspondig values of param
paramStr
forP1
.- valuesP2ndarray of floats
Correspondig values of param
paramStr
forP2
.- layerNrint
Specifies layer, where electrical field enhancment is calculated.
- layerZdouble
Specifies z-coordinate of enchncment calculation inside
layerNr
.- outPwrbool
Turns calculation of intensities on/off.
- outAbsbool
Turns calculation of absoprtiopn in the entire structure on/off.
- outEnhbool
Turns calculation of enhancment in layer
layerNr
at distancelayerZ
on/off.values- outP1bool
Turns calculation of the
P1
on/off.- outP2bool
Turns calculation of the
P2
on/off.- outGenbool
Turns calculation of the
Gen
on/off.
- Returns:
_SweepResultSecondOrderNLTMM
Helper class to store the result.
- UpdateGenParams()¶
Forces the update of the wavelength and beta of the generated beam
Gen
.
- WaveGetFields2D(zs, xs, dirStr='total')¶
Calculates 2D electric and magnetic fields of beam propagating in the structure. Analogous to the
GetFields2D
of plane waves. Only for the calculation of the power of generated beam. For pump beams use the same method ofNonlinearTMM
.- Parameters:
- zsndarray of floats
Points on z-axis where to calculate the fields. The beginning of the first layer is at z = 0.
- xsndarray of floats
Points on x-axis where to calculate the fields.
- dir{‘total’, ‘forward’, ‘backward’}
Specifies the components of the output fields.
- Returns:
_FieldsZX
Helper class to store electric and magnetic fields in regular grid.
- WaveGetPowerFlows(layerNr, x0=float('nan'), x1=float('nan'), z=0.0)¶
Analogous to the
GetIntensities
, but calculates the powers of the beams instead of the intensities of the plane-waves. Only for the calculation of the power of generated beam. For pump beams use the same method ofNonlinearTMM
.- Parameters:
- layerNrint
Specifies layer number where to calculate the power of the beam.
- x0float
Specifies the starting point of the integration of the power in the x-direction. By default this parameter is selected by the
_Wave
class.- x1float
Specifies the end point of the integration of the power in the x-direction. By default this parameter is selected by the
_Wave
class.- zfloat
Specifies the z-position of the line through which the integration of the power of the beam is done.
- Returns:
- tuple of floats (PB, PF)
PB is the power propageted into netagtive infinity and PF denotes the power propagation to the positive direction of z-axis.
- WaveSweep(paramStr, valuesP1, valuesP2, layerNr=0, layerZ=0.0, outPwr=True, outR=False, outT=False, outEnh=False, outP1=True, outP2=True, outGen=True)¶
Solves the structure for waves for series of
valuesP1
andvaluesP2
of paramparamStr
. Using this function is more confortable and faster than just changing the params and solving the structure. Analogous toSweep
.- Parameters:
- paramStrstr
- ‘wl’:
Wavelength in meters
- ‘beta’:
normalized tangential wavevector
- ‘I0’:
intensity of the wave
- ‘d_i’:
thikness of layer i (0..N-1)
- ‘w0’:
waist size of the input beam
- valuesP1ndarray of floats
Correspondig values of param
paramStr
forP1
.- valuesP2ndarray of floats
Correspondig values of param
paramStr
forP2
.- layerNrint
Specifies layer, where electrical field enhancment is calculated.
- layerZdouble
Specifies z-coordinate of enchncment calculation inside
layerNr
.- outPwrbool
Turns calculation of all powers on/off.
- outRbool
Turns calculation of reflected power on/off.
- outTbool
Turns calculation of transmitted power on/off.
- outEnhbool
Turns calculation of enhancment in layer layerNr at distance
layerZ
on/off.- outP1bool
Turns calculation of the
P1
on/off.- outP2bool
Turns calculation of the
P2
on/off.- outGenbool
Turns calculation of the
Gen
on/off.
- Returns:
_WaveSweepResultSecondOrderNLTMM
Helper class to store the result.
Helper classes¶
- class NonlinearTMM._WaveSweepResultSecondOrderNLTMM¶
Bases:
object
Helper class for SecondOrderNLTMM. Stores the results of WaveSweep method.
- Attributes:
- P1
_WaveSweepResultNonlinearTMM
The sweep result of the first input beam.
- P1
_WaveSweepResultNonlinearTMM
The sweep result of the second input beam.
- Gen
_WaveSweepResultNonlinearTMM
The sweep result of the generated beam.
- wlsGenndarray of floats
Stores the wavelength of the generated wave.
- betasGenndarray of floats
Stores the normalized tangential wave vector the generated wave.
- P1
- class NonlinearTMM._SweepResultSecondOrderNLTMM¶
Bases:
object
Helper class for SecondOrderNLTMM. Stores the results of Sweep method.
- Attributes:
- P1
_SweepResultNonlinearTMM
Sweep results for the first input wave.
- P2
_SweepResultNonlinearTMM
Sweep results for the second input wave.
- Gen
_SweepResultNonlinearTMM
Sweep results for the generated wave.
- wlsGenndarray of floats
Stores the wavelength of the generated wave.
- betasGenndarray of floats
Stores the normalized tangential wave vector the generated wave.
- P1
- class NonlinearTMM._SecondOrderNLIntensities¶
Bases:
object
This is a helper class for SecondOrderNLTMM. It stores the results of GetIntensities.
- Attributes:
- P1
_Intensities
Instance of _Intensities class and holds the intensities of second inuput wave.
- P2
_Intensities
Instance of _Intensities class and holds the intensities of first inuput wave.
- Gen
_Intensities
Instance of _Intensities class and holds the intensities of generated wave.
- P1