dyna.functions package

Submodules

dyna.functions.Functions module

Functions.

@author: Stephane Grenier, Institut Néel, CNRS, France TODO : keep M matrices in memory so as to not have to recalculate them for Transmittance or Kerr.

dyna.functions.Functions.F0(_Sequence, _Sample, _XRange, _EnergyRange, _AngleRangeRad, _SF_SIM)[source]

F0 : Parratt formalism.

\left({\frac{h}{\pi}}\right)^2

_Factor = (cst.h/np.pi)**2/(4*cst.epsilon_0)/cst.m_e * 1e30 / np.square(_EnergyRange) 2*2*np.pi/(cst.h*cst.c)*cst.e *1e-10 = 1.01355 e-3, in A-1

Parameters

_SequenceTYPE

contains the sequence of the multilayer

_SampleTYPE

DESCRIPTION.

_XRange : TYPE

_EnergyRangeTYPE

DESCRIPTION.

_AngleRangeRadTYPE

DESCRIPTION.

_SF: TYPE

Scattering Factors for the current simulation Shape is [len(Sample), len(energy), 2]

Returns

Reflectivity ndarray shape (len(XRange), 2)

dyna.functions.Functions.F0F1Farad(_Sequence, _Sample, _XRange, _EnergyRange, _AngleRangeRad, _SF, _pi_incident)[source]

F0F1Farad calculates the Faraday effect.

This is supposing that the rotation and the ellipticity are small enough to justifiy the expression. One needs to check this accordingly.

Parameters

_SequenceTYPE

DESCRIPTION.

_SampleTYPE

DESCRIPTION.

_XRangeTYPE

DESCRIPTION.

_EnergyRangeTYPE

DESCRIPTION.

_AngleRangeRadTYPE

DESCRIPTION.

_SF: TYPE

DESCRIPTION.

Returns

TYPE

DESCRIPTION.

dyna.functions.Functions.F0F1Kerr(_Sequence, _Sample, _XRange, _EnergyRange, _AngleRangeRad, _SF, _pi_incident)[source]

F0F1Kerr calculates the Kerr effect.

this is supposing that the rotation and the ellipticity are small enough to justifiy the expression. One needs to check this accordingly.

Parameters

sequence, Sample structure, xrange, energyrange, structure factors, pi_incident condition

Returns

rotation angle and ellipticity

dyna.functions.Functions.F0F1Kerr_exact(_Sequence, _Sample, _XRange, _EnergyRange, _AngleRangeRad, _SF, _pi_incident)[source]

F0F1Kerr_exact calculates the Kerr effect.

calculations are exact with respect to the elliptic parameters

Parameters

sequence, Sample structure, xrange, energyrange, structure factors, pi_incident condition

Returns

rotation angle and ellipticity

dyna.functions.Functions.F0F1Ref(_Sequence, _Sample, _XRange, _EnergyRange, _AngleRangeRad, _SF)[source]

F0F1Ref.

Parameters

_SequenceTYPE

DESCRIPTION.

_SampleTYPE

DESCRIPTION.

_XRangeTYPE

DESCRIPTION.

_EnergyRangeTYPE

DESCRIPTION.

_AngleRangeRadTYPE

DESCRIPTION.

_SF: TYPE

DESCRIPTION.

Returns

TYPE

DESCRIPTION.

dyna.functions.Functions.F0F1SampleLoop(_Sample, dim_XRange, _EnergyRange, _AngleRangeRad, _SF)[source]

F0F1SampleLoop.

calculates the propagation and boundary matrices, P and A, for each layer _Sample :

Parameters

_SampleTYPE

DESCRIPTION.

dim_XRangeTYPE

DESCRIPTION.

_EnergyRangeTYPE

DESCRIPTION.

_AngleRangeRadTYPE

DESCRIPTION.

_SFTYPE

= fp - i fpp with fpp positive

Returns

ATYPE

Boundary Matrix.

APhiTYPE

Boundary Matrix, magnetization inverted.

PTYPE

Propagation Matrix.

PPhiTYPE

Propagation Matrix, magnetization inverted.

kzTYPE

DESCRIPTION.

dyna.functions.Functions.F0F1Trans(_Sequence, _Sample, _XRange, _EnergyRange, _AngleRangeRad, _SF)[source]

F0F1Trans calculates the transmitivity matrix.

Parameters

_SequenceTYPE

DESCRIPTION.

_SampleTYPE

DESCRIPTION.

_XRangeTYPE

DESCRIPTION.

_EnergyRangeTYPE

DESCRIPTION.

_AngleRangeRadTYPE

DESCRIPTION.

_SF: TYPE

DESCRIPTION.

Returns

TYPE

DESCRIPTION.

dyna.functions.Functions.F0F1XRangeLoop(_Sequence, _Sample, _XRange, A, APhi, P, PPhi, kz)[source]

F0F1XRangeLoop.

Runs through the sequence of layers and actually calculates the reflectivity final M matrix

Parameters

_SequenceTYPE

DESCRIPTION.

_SampleTYPE

DESCRIPTION.

_XRangeTYPE

DESCRIPTION.

ATYPE

DESCRIPTION.

APhiTYPE

DESCRIPTION.

PTYPE

DESCRIPTION.

PPhiTYPE

DESCRIPTION.

kzTYPE

DESCRIPTION.

Returns

MTYPE

DESCRIPTION.

MPhiTYPE

DESCRIPTION.

dyna.functions.MakeSequence module

Created on Mon Feb 26 14:31:07 2024

@author: stephane

dyna.functions.MakeSequence.MakeSequence(_Sample) -> (<class 'str'>, <class 'list'>)[source]

establishes the multilayer sequence to be used by calc Functions and type the string list of the layers to appear in GUI

dyna.functions.OptimFunctions module

Created on Mon Jan 23 15:50:07 2023

@author: stephane

dyna.functions.OptimFunctions.OptimCalc(_Sim, _Sample, _Sequence, _SF_cf, _SF_mf)[source]

OptimCalc calls _Sim.Func and Post

dyna.functions.OptimFunctions.OptimDistance(_OptParam, _OptParamListIndices, _ConstParamListIndices, _Sim, _Sample, _Sequence, _SF_cf, _SF_mf) float[source]

Objective function to minimize

dyna.functions.OptimFunctions.OptimMinimize(_OptMethod, _OptMethodParam, _p_ini, _OptParamListIndices, _ConstParamListIndices, _bounds, _Sim, _Sample, _Sequence, _SF_cf, _SF_mf)[source]

dyna.functions.SFFunctions module

dyna.functions.XrayFunc module

Created on Mon Feb 19 14:00:27 2024

@author: stephane.grenier

dyna.functions.XrayFunc.Circ2Lin(Mat)[source]

Parameters

MatTYPE

a 2x2 matrix on the circular basis.

Returns

TYPE

the 2x2 matrix onto the linear basis.

dyna.functions.post module

dyna.functions.roughness module

Module contents