Skip to content

Core

AxialDriver

Axial driver class.

Source code in cmtj/core/__init__.pyi
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
class AxialDriver:
    """Axial driver class."""

    @overload
    def __init__(self, x: ScalarDriver, y: ScalarDriver, z: ScalarDriver) -> None:
        """Create an axial driver with three scalar drivers for each axis.
        :param x: driver for the x axis
        :param y: driver for the y axis
        :param z: driver for the z axis
        """
        ...

    @overload
    def __init__(self, axialDrivers: list[ScalarDriver]) -> None:
        """Create an axial driver with a list of scalar drivers.
        :param axialDrivers: list of scalar drivers
        """
        ...

    @overload
    def __init__(self, x: float, y: float, z: float) -> None:
        """Create an axial driver with a list of floats.
        :param x: constant float for the x axis
        :param y: constant float for the y axis
        :param z: constant float for the z axis
        """
        ...

    @overload
    def __init__(self, xyz: CVector) -> None:
        """Create an axial driver with a vector.
        :param xyz: CVector object with x, y, z components
        """
        ...

    @overload
    def __init__(*args, **kwargs) -> Any: ...
    @overload
    def applyMask(self, mask: CVector) -> None:
        """Apply mask to the driver.
        :param mask: mask to be applied"""
        ...

    @overload
    def applyMask(self, mask: list[int]) -> None:
        """Apply mask to the driver.
        :param mask: mask to be applied"""
        ...

    @overload
    def applyMask(*args, **kwargs) -> Any: ...
    def getCurrentAxialDrivers(self, arg0: float) -> CVector: ...
    def getVectorAxialDriver(self, arg0: float, arg1: float) -> AxialDriver: ...

CVector

CVector class. Represents a 3D vector.

Source code in cmtj/core/__init__.pyi
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
class CVector:
    """CVector class. Represents a 3D vector."""

    def __init__(self, x: float, y: float, z: float) -> None:
        """Initialises a 3D vector.
        :param x: x component of the vector
        :param y: y component of the vector
        :param z: z component of the vector"""
        ...

    def length(self) -> float:
        """Returns the length of the vector."""
        ...

    def normalize(self) -> None:
        """Normalizes the vector."""
        ...

    def tolist(self) -> list[float]:
        """Converts the vector to a list."""
        ...

    def __add__(self, arg0: CVector) -> CVector: ...
    def __eq__(self, arg0: CVector) -> bool: ...
    def __getitem__(self, arg0: int) -> float: ...
    def __iter__(self) -> typing.Iterator[float]: ...
    def __iadd__(self, arg0: CVector) -> CVector: ...
    def __imul__(self, arg0: float) -> CVector: ...
    def __isub__(self, arg0: CVector) -> CVector: ...
    def __len__(self) -> int: ...
    def __mul__(self, arg0: float) -> CVector: ...
    def __ne__(self, arg0: CVector) -> bool: ...
    def __rmul__(self, arg0: float) -> CVector: ...
    def __sub__(self, arg0: CVector) -> CVector: ...
    @property
    def x(self) -> float: ...
    @x.setter
    def x(self, val: float) -> None: ...
    @property
    def y(self) -> float: ...
    @y.setter
    def y(self, val: float) -> None: ...
    @property
    def z(self) -> float: ...
    @z.setter
    def z(self, val: float) -> None: ...

__init__(x, y, z)

Initialises a 3D vector.

Parameters:

Name Type Description Default
x float

x component of the vector

required
y float

y component of the vector

required
z float

z component of the vector

required
Source code in cmtj/core/__init__.pyi
185
186
187
188
189
190
def __init__(self, x: float, y: float, z: float) -> None:
    """Initialises a 3D vector.
    :param x: x component of the vector
    :param y: y component of the vector
    :param z: z component of the vector"""
    ...

length()

Returns the length of the vector.

Source code in cmtj/core/__init__.pyi
192
193
194
def length(self) -> float:
    """Returns the length of the vector."""
    ...

normalize()

Normalizes the vector.

Source code in cmtj/core/__init__.pyi
196
197
198
def normalize(self) -> None:
    """Normalizes the vector."""
    ...

tolist()

Converts the vector to a list.

Source code in cmtj/core/__init__.pyi
200
201
202
def tolist(self) -> list[float]:
    """Converts the vector to a list."""
    ...

Junction

Source code in cmtj/core/__init__.pyi
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
class Junction:
    @overload
    def __init__(self, layers: list[Layer]) -> None:
        """"""
        ...

    @overload
    def __init__(self, layers: list[Layer], Rp: float = ..., Rap: float = ...) -> None:
        """Creates a junction with a magnetoresistance.
        :param layers: list of layers

        :param Rp: Parallel magnetoresistance
        :param Rap: Magnetoresistance anti-parallel state
        """
        ...

    @overload
    def __init__(
        self,
        layers: list[Layer],
        Rx0: list[float],
        Ry0: list[float],
        AMR_X: list[float],
        AMR_Y: list[float],
        SMR_X: list[float],
        SMR_Y: list[float],
        AHE: list[float],
    ) -> None:
        """Creates a junction with a STRIP magnetoresistance.
        Each of the Rx0, Ry, AMR, AMR and SMR is list matching the
        length of the layers passed (they directly correspond to each layer).
        Calculates the magnetoresistance as per: __see reference__:
        Spin Hall magnetoresistance in metallic bilayers by Kim, J. et al.
        :param Rx0: Magnetoresistance offset longitudinal
        :param Ry0: Magnetoresistance offset transverse
        :param AMR_X: Anisotropic magnetoresistance longitudinal
        :param AMR_Y: Anisotropic magnetoresistance transverse
        :param SMR_X: Spin magnetoresistance longitudinal
        :param SMR_Y: Spin magnetoresistance transverse
        :param AHE: Anomalous Hall effect resistance offset (transverse only)
        """
        ...

    @overload
    def __init__(*args, **kwargs) -> Any: ...
    def clearLog(self) -> dict[str, Any]:
        """Reset current simulation state."""
        ...

    def getLayerMagnetisation(self, layerId: str) -> CVector:
        """Get the magnetisation of a layer.
        :param layerId: the layer id"""
        ...

    def getLog(self) -> dict[str, list[float]]:
        """Retrieve the simulation log [data]."""
        ...

    def getMagnetoresistance(self) -> list[float]: ...
    def runSimulation(
        self,
        totalTime: float,
        timeStep: float = ...,
        writeFrequency: float = ...,
        persist: bool = ...,
        log: bool = ...,
        calculateEnergies: bool = ...,
    ) -> None:
        """Main run simulation function.
        Use it to run the simulation.
        :param totalTime: total time of a simulation, give it in seconds. Typical length is in ~couple ns.
        :param timeStep: the integration step of the RK45 method. Default is 1e-13
        :param writeFrequency: how often is the log saved to? Must be no smaller than `timeStep`. Default is 1e-11.
        :param persist: whether to save to the filename specified in the Junction constructor. Default is true
        :param log: if you want some verbosity like timing the simulation. Default is false
        :param calculateEnergies: [WORK IN PROGRESS] log energy values to the log. Default is false.
        """
        ...

    def setIECDriver(self, bottomLayer: str, topLayer: str, driver: ScalarDriver) -> None:
        """Set IEC interaction between two layers.
        The names of the params are only for convention. The IEC will be set
        between bottomLyaer or topLayer, order is irrelevant.
        :param bottomLayer: the first layer id
        :param topLayer: the second layer id
        """
        ...

    def setQuadIECDriver(self, bottomLayer: str, topLayer: str, driver: ScalarDriver) -> None:
        """Set secondary (biquadratic term) IEC interaction between two layers.
        The names of the params are only for convention. The IEC will be set
        between bottomLyaer or topLayer, order is irrelevant.
        :param bottomLayer: the first layer id
        :param topLayer: the second layer id
        """
        ...

    def setLayerTemperatureDriver(self, layerId: str, driver: ScalarDriver) -> None:
        """Set a temperature driver for a layer.
        :param layerId: the id of the layer.
        :param driver: the temperature driver to be set.
        """
        ...

    def setLayerAnisotropyDriver(self, layerId: str, driver: ScalarDriver) -> None:
        """Set anisotropy driver for a layer.
        :param layerId: the id of the layer.
        :param driver: the anisotropy driver to be set.
        """
        ...

    def setLayerCurrentDriver(self, layerId: str, driver: ScalarDriver) -> None:
        """Set a current driver for a layer.
        :param layerId: the layer id
        :param driver: the driver
        """
        ...

    def setLayerExternalFieldDriver(self, layerId: str, driver: AxialDriver) -> None:
        """Set an external field driver for a layer.
        :param layerId: the id of the layer.
        :param driver: the field driver to be set.
        """
        ...

    def setLayerMagnetisation(self, layerId: str, mag: CVector) -> None:
        """Set the magnetisation of a layer.
        :param layerId: the layer id
        :param mag: the magnetisation
        """
        ...

    @overload
    def setLayerOerstedFieldDriver(self, layerId: str, driver: AxialDriver) -> None:
        """Set an Oersted field driver for a layer.
        :param layerId: the id of the layer.
        :param driver: the field driver to be set.
        """
        ...

    def setLayerDampingLikeTorqueDriver(self, layerId: str, driver: ScalarDriver) -> None:
        """Set the damping like torque driver for a layer.
        :param layerId: the layer id
        :param driver: the driver
        """
        ...

    def setLayerFieldLikeTorqueDriver(self, layerId: str, driver: ScalarDriver) -> None:
        """Set the field like torque driver for a layer.
        :param layerId: the layer id
        :param driver: the driver
        """
        ...

    def setLayerOneFNoise(self, layerId: str, sources: int, bias: float, scale: float) -> None:
        """Set 1/f noise for a layer.
        :param layerId: the layer id
        :param sources: the number of generation sources (the more the slower, but more acc.)
        :param bias: the bias of the noise (p in the Multinomial distribution)
        :param scale: the scale of the noise, additional scaling factor
        """
        ...

    def getLayer(self, layerId: str) -> Layer:
        """Get a specific layer from the junction. Returns a reference.
        :param layerId: the id of the layer (string) as passed in the init.
        """
        ...

clearLog()

Reset current simulation state.

Source code in cmtj/core/__init__.pyi
274
275
276
def clearLog(self) -> dict[str, Any]:
    """Reset current simulation state."""
    ...

getLayer(layerId)

Get a specific layer from the junction. Returns a reference.

Parameters:

Name Type Description Default
layerId str

the id of the layer (string) as passed in the init.

required
Source code in cmtj/core/__init__.pyi
392
393
394
395
396
def getLayer(self, layerId: str) -> Layer:
    """Get a specific layer from the junction. Returns a reference.
    :param layerId: the id of the layer (string) as passed in the init.
    """
    ...

getLayerMagnetisation(layerId)

Get the magnetisation of a layer.

Parameters:

Name Type Description Default
layerId str

the layer id

required
Source code in cmtj/core/__init__.pyi
278
279
280
281
def getLayerMagnetisation(self, layerId: str) -> CVector:
    """Get the magnetisation of a layer.
    :param layerId: the layer id"""
    ...

getLog()

Retrieve the simulation log [data].

Source code in cmtj/core/__init__.pyi
283
284
285
def getLog(self) -> dict[str, list[float]]:
    """Retrieve the simulation log [data]."""
    ...

runSimulation(totalTime, timeStep=Ellipsis, writeFrequency=Ellipsis, persist=Ellipsis, log=Ellipsis, calculateEnergies=Ellipsis)

Main run simulation function. Use it to run the simulation.

Parameters:

Name Type Description Default
totalTime float

total time of a simulation, give it in seconds. Typical length is in ~couple ns.

required
timeStep float

the integration step of the RK45 method. Default is 1e-13

Ellipsis
writeFrequency float

how often is the log saved to? Must be no smaller than timeStep. Default is 1e-11.

Ellipsis
persist bool

whether to save to the filename specified in the Junction constructor. Default is true

Ellipsis
log bool

if you want some verbosity like timing the simulation. Default is false

Ellipsis
calculateEnergies bool

[WORK IN PROGRESS] log energy values to the log. Default is false.

Ellipsis
Source code in cmtj/core/__init__.pyi
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
def runSimulation(
    self,
    totalTime: float,
    timeStep: float = ...,
    writeFrequency: float = ...,
    persist: bool = ...,
    log: bool = ...,
    calculateEnergies: bool = ...,
) -> None:
    """Main run simulation function.
    Use it to run the simulation.
    :param totalTime: total time of a simulation, give it in seconds. Typical length is in ~couple ns.
    :param timeStep: the integration step of the RK45 method. Default is 1e-13
    :param writeFrequency: how often is the log saved to? Must be no smaller than `timeStep`. Default is 1e-11.
    :param persist: whether to save to the filename specified in the Junction constructor. Default is true
    :param log: if you want some verbosity like timing the simulation. Default is false
    :param calculateEnergies: [WORK IN PROGRESS] log energy values to the log. Default is false.
    """
    ...

setIECDriver(bottomLayer, topLayer, driver)

Set IEC interaction between two layers. The names of the params are only for convention. The IEC will be set between bottomLyaer or topLayer, order is irrelevant.

Parameters:

Name Type Description Default
bottomLayer str

the first layer id

required
topLayer str

the second layer id

required
Source code in cmtj/core/__init__.pyi
308
309
310
311
312
313
314
315
def setIECDriver(self, bottomLayer: str, topLayer: str, driver: ScalarDriver) -> None:
    """Set IEC interaction between two layers.
    The names of the params are only for convention. The IEC will be set
    between bottomLyaer or topLayer, order is irrelevant.
    :param bottomLayer: the first layer id
    :param topLayer: the second layer id
    """
    ...

setLayerAnisotropyDriver(layerId, driver)

Set anisotropy driver for a layer.

Parameters:

Name Type Description Default
layerId str

the id of the layer.

required
driver ScalarDriver

the anisotropy driver to be set.

required
Source code in cmtj/core/__init__.pyi
333
334
335
336
337
338
def setLayerAnisotropyDriver(self, layerId: str, driver: ScalarDriver) -> None:
    """Set anisotropy driver for a layer.
    :param layerId: the id of the layer.
    :param driver: the anisotropy driver to be set.
    """
    ...

setLayerCurrentDriver(layerId, driver)

Set a current driver for a layer.

Parameters:

Name Type Description Default
layerId str

the layer id

required
driver ScalarDriver

the driver

required
Source code in cmtj/core/__init__.pyi
340
341
342
343
344
345
def setLayerCurrentDriver(self, layerId: str, driver: ScalarDriver) -> None:
    """Set a current driver for a layer.
    :param layerId: the layer id
    :param driver: the driver
    """
    ...

setLayerDampingLikeTorqueDriver(layerId, driver)

Set the damping like torque driver for a layer.

Parameters:

Name Type Description Default
layerId str

the layer id

required
driver ScalarDriver

the driver

required
Source code in cmtj/core/__init__.pyi
369
370
371
372
373
374
def setLayerDampingLikeTorqueDriver(self, layerId: str, driver: ScalarDriver) -> None:
    """Set the damping like torque driver for a layer.
    :param layerId: the layer id
    :param driver: the driver
    """
    ...

setLayerExternalFieldDriver(layerId, driver)

Set an external field driver for a layer.

Parameters:

Name Type Description Default
layerId str

the id of the layer.

required
driver AxialDriver

the field driver to be set.

required
Source code in cmtj/core/__init__.pyi
347
348
349
350
351
352
def setLayerExternalFieldDriver(self, layerId: str, driver: AxialDriver) -> None:
    """Set an external field driver for a layer.
    :param layerId: the id of the layer.
    :param driver: the field driver to be set.
    """
    ...

setLayerFieldLikeTorqueDriver(layerId, driver)

Set the field like torque driver for a layer.

Parameters:

Name Type Description Default
layerId str

the layer id

required
driver ScalarDriver

the driver

required
Source code in cmtj/core/__init__.pyi
376
377
378
379
380
381
def setLayerFieldLikeTorqueDriver(self, layerId: str, driver: ScalarDriver) -> None:
    """Set the field like torque driver for a layer.
    :param layerId: the layer id
    :param driver: the driver
    """
    ...

setLayerMagnetisation(layerId, mag)

Set the magnetisation of a layer.

Parameters:

Name Type Description Default
layerId str

the layer id

required
mag CVector

the magnetisation

required
Source code in cmtj/core/__init__.pyi
354
355
356
357
358
359
def setLayerMagnetisation(self, layerId: str, mag: CVector) -> None:
    """Set the magnetisation of a layer.
    :param layerId: the layer id
    :param mag: the magnetisation
    """
    ...

setLayerOneFNoise(layerId, sources, bias, scale)

Set 1/f noise for a layer.

Parameters:

Name Type Description Default
layerId str

the layer id

required
sources int

the number of generation sources (the more the slower, but more acc.)

required
bias float

the bias of the noise (p in the Multinomial distribution)

required
scale float

the scale of the noise, additional scaling factor

required
Source code in cmtj/core/__init__.pyi
383
384
385
386
387
388
389
390
def setLayerOneFNoise(self, layerId: str, sources: int, bias: float, scale: float) -> None:
    """Set 1/f noise for a layer.
    :param layerId: the layer id
    :param sources: the number of generation sources (the more the slower, but more acc.)
    :param bias: the bias of the noise (p in the Multinomial distribution)
    :param scale: the scale of the noise, additional scaling factor
    """
    ...

setLayerTemperatureDriver(layerId, driver)

Set a temperature driver for a layer.

Parameters:

Name Type Description Default
layerId str

the id of the layer.

required
driver ScalarDriver

the temperature driver to be set.

required
Source code in cmtj/core/__init__.pyi
326
327
328
329
330
331
def setLayerTemperatureDriver(self, layerId: str, driver: ScalarDriver) -> None:
    """Set a temperature driver for a layer.
    :param layerId: the id of the layer.
    :param driver: the temperature driver to be set.
    """
    ...

setQuadIECDriver(bottomLayer, topLayer, driver)

Set secondary (biquadratic term) IEC interaction between two layers. The names of the params are only for convention. The IEC will be set between bottomLyaer or topLayer, order is irrelevant.

Parameters:

Name Type Description Default
bottomLayer str

the first layer id

required
topLayer str

the second layer id

required
Source code in cmtj/core/__init__.pyi
317
318
319
320
321
322
323
324
def setQuadIECDriver(self, bottomLayer: str, topLayer: str, driver: ScalarDriver) -> None:
    """Set secondary (biquadratic term) IEC interaction between two layers.
    The names of the params are only for convention. The IEC will be set
    between bottomLyaer or topLayer, order is irrelevant.
    :param bottomLayer: the first layer id
    :param topLayer: the second layer id
    """
    ...

Layer

Source code in cmtj/core/__init__.pyi
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
class Layer:
    def __init__(
        self,
        id: str,
        mag: CVector,
        anis: CVector,
        Ms: float,
        thickness: float,
        cellSurface: float,
        demagTensor: list[CVector],
        temperature: float = ...,
        damping: float = ...,
    ) -> Layer:
        """
        The basic structure is a magnetic layer.
        Its parameters are defined by the constructor and may be altered
        by the drivers during the simulation time.
        If you want STT, remember to set the reference vector for the polarisation of the layer.
        Use `setReferenceLayer` function to do that.
        :param id: identifiable name for a layer -- e.g. "bottom" or "free".
        :param mag: initial magnetisation. Must be normalised (norm of 1). Used for quicker convergence.
        :param anis: anisotropy of the layer. A normalised vector
        :param Ms: magnetisation saturation. Unit: Tesla [T].
        :param thickness: thickness of the layer. Unit: meter [m].
        :param cellSurface: surface of the layer, for volume calculation. Unit: meter^2 [m^2].
        :param damping: often marked as alpha in the LLG equation. Damping of the layer. Default 0.011. Dimensionless
        """
        ...

    @staticmethod
    def createSOTLayer(
        id: str,
        mag: CVector,
        anis: CVector,
        Ms: float,
        thickness: float,
        cellSurface: float,
        demagTensor: list[CVector],
        damping: float = 0.11,
        fieldLikeTorque: float = 0,
        dampingLikeTorque: float = 0,
    ) -> Layer:
        """
        Create SOT layer -- including damping and field-like torques that are
        calculated based on the effective Spin Hall angles.
        :param id: identifiable name for a layer -- e.g. "bottom" or "free".
        :param mag: initial magnetisation. Must be normalised (norm of 1). Used for quicker convergence.
        :param anis: anisotropy of the layer. A normalised vector
        :param Ms: magnetisation saturation. Unit: Tesla [T].
        :param thickness: thickness of the layer. Unit: meter [m].
        :param cellSurface: surface of the layer, for volume calculation. Unit: meter^2 [m^2].
        :param damping: often marked as alpha in the LLG equation. Damping of the layer. Default 0.011. Dimensionless.
        """
        ...

    @staticmethod
    def createSTTLayer(
        id: str,
        mag: CVector,
        anis: CVector,
        Ms: float,
        thickness: float,
        cellSurface: float,
        demagTensor: list[CVector],
        damping: float = 0.011,
        SlonczewskiSpacerLayerParameter: float = 1.0,
        beta: float = 0.0,
        spinPolarisation: float = 0.0,
    ) -> Layer:
        """
        Create STT layer -- with the standard Slomczewski formulation.
        :param id: identifiable name for a layer -- e.g. "bottom" or "free".
        :param mag: initial magnetisation. Must be normalised (norm of 1). Used for quicker convergence.
        :param anis: anisotropy of the layer. A normalised vector
        :param Ms: magnetisation saturation. Unit: Tesla [T].
        :param thickness: thickness of the layer. Unit: meter [m].
        :param cellSurface: surface of the layer, for volume calculation. Unit: meter^2 [m^2].
        :param damping: often marked as alpha in the LLG equation. Damping of the layer. Default 0.011. Dimensionless.
        :param SlonczewskiSpacerLayerParameter: Slomczewski parameter. Often marked as lambda.
        :param beta: beta parameter that scales FL/DL ratio.
        :param spinPolarisation: the spin effectiveness.
        """
        ...

    def createBufferedAlphaNoise(self, bufferSize: int) -> None:
        """Create a buffered alpha noise generator."""
        ...

    def setAlphaNoise(self, alpha: float, std: float, scale: float, axis: Axis = Axis.all) -> None:
        """Set alpha noise for the layer.
        :param alpha: Alpha parameter
        :param std: Standard deviation
        :param scale: Scale
        :param axis: Axis, by default all axes are used
        """
        ...

    def setAnisotropyDriver(self, driver: ScalarDriver) -> None:
        """Set anisotropy driver for the layer.
        It's scalar. The axis is determined in the layer constructor"""
        ...

    def setTemperatureDriver(self, driver: ScalarDriver) -> None:
        """Set a driver for the temperature of the layer.
        Automatically changes the solver to Euler-Heun."""
        ...

    def setExternalFieldDriver(self, driver: AxialDriver) -> None: ...
    def setMagnetisation(self, mag: CVector) -> None:
        """Set the magnetisation of the layer.
        :param mag: the magnetisation to be set."""
        ...

    def setOerstedFieldDriver(self, driver: AxialDriver) -> None:
        """Set an Oersted field driver for the layer.
        :param driver: the field driver to be set."""
        ...

    def setDampingLikeTorqueDriver(self, driver: ScalarDriver) -> None:
        """Set a driver for the damping like torque of the layer.
        :param driver: the driver to be set."""
        ...

    def setFieldLikeTorqueDriver(self, driver: ScalarDriver) -> None:
        """Set a driver for the field like torque of the layer.
        :param driver: the driver to be set."""
        ...

    def setReferenceLayer(self, ref: CVector) -> None:
        """Set a reference layer for the STT.
        :param ref: the reference layer vector."""
        ...

    @overload
    def setReferenceLayer(self, ref: Reference) -> None:  # noqa: F811
        """Set a reference layer for the STT. The reference can be
        FIXED, BOTTOM or TOP. YOu can use another layer as reference
        to this one.
        :param ref: the reference layer vector."""
        ...

    def setTopDipoleTensor(self, tensor: list[CVector]) -> None:
        """Set a dipole tensor from the top layer.
        :param tensor: the dipole tensor to be set.
        """
        ...

    def setBottomDipoleTensor(self, tensor: list[CVector]) -> None:
        """Set a dipole tensor from the bottom layer.
        :param tensor: the dipole tensor to be set.
        """
        ...

    def getId(self) -> str:
        """Get Id of the layer"""
        ...

    def setAlternativeSTT(self, setAlternative: bool) -> None:
        """Switch to an alternative STT forumulation (Taniguchi et al.)
        https://iopscience.iop.org/article/10.7567/APEX.11.013005
        :param setAlternative: whether to set the alternative STT formulation
        """
        ...

    def setKappa(self, kappa: float) -> None:
        """Set the kappa parameter for the layer -- determines SOT mixing
            Hdl * kappa + Hfl
        Allows you to turn off Hdl. Turning Hfl is via beta parameter.
        :param kappa: the kappa parameter
        """
        ...

__init__(id, mag, anis, Ms, thickness, cellSurface, demagTensor, temperature=Ellipsis, damping=Ellipsis)

The basic structure is a magnetic layer. Its parameters are defined by the constructor and may be altered by the drivers during the simulation time. If you want STT, remember to set the reference vector for the polarisation of the layer. Use setReferenceLayer function to do that.

Parameters:

Name Type Description Default
id str

identifiable name for a layer -- e.g. "bottom" or "free".

required
mag CVector

initial magnetisation. Must be normalised (norm of 1). Used for quicker convergence.

required
anis CVector

anisotropy of the layer. A normalised vector

required
Ms float

magnetisation saturation. Unit: Tesla [T].

required
thickness float

thickness of the layer. Unit: meter [m].

required
cellSurface float

surface of the layer, for volume calculation. Unit: meter^2 [m^2].

required
damping float

often marked as alpha in the LLG equation. Damping of the layer. Default 0.011. Dimensionless

Ellipsis
Source code in cmtj/core/__init__.pyi
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
def __init__(
    self,
    id: str,
    mag: CVector,
    anis: CVector,
    Ms: float,
    thickness: float,
    cellSurface: float,
    demagTensor: list[CVector],
    temperature: float = ...,
    damping: float = ...,
) -> Layer:
    """
    The basic structure is a magnetic layer.
    Its parameters are defined by the constructor and may be altered
    by the drivers during the simulation time.
    If you want STT, remember to set the reference vector for the polarisation of the layer.
    Use `setReferenceLayer` function to do that.
    :param id: identifiable name for a layer -- e.g. "bottom" or "free".
    :param mag: initial magnetisation. Must be normalised (norm of 1). Used for quicker convergence.
    :param anis: anisotropy of the layer. A normalised vector
    :param Ms: magnetisation saturation. Unit: Tesla [T].
    :param thickness: thickness of the layer. Unit: meter [m].
    :param cellSurface: surface of the layer, for volume calculation. Unit: meter^2 [m^2].
    :param damping: often marked as alpha in the LLG equation. Damping of the layer. Default 0.011. Dimensionless
    """
    ...

createBufferedAlphaNoise(bufferSize)

Create a buffered alpha noise generator.

Source code in cmtj/core/__init__.pyi
482
483
484
def createBufferedAlphaNoise(self, bufferSize: int) -> None:
    """Create a buffered alpha noise generator."""
    ...

createSOTLayer(id, mag, anis, Ms, thickness, cellSurface, demagTensor, damping=0.11, fieldLikeTorque=0, dampingLikeTorque=0) staticmethod

Create SOT layer -- including damping and field-like torques that are calculated based on the effective Spin Hall angles.

Parameters:

Name Type Description Default
id str

identifiable name for a layer -- e.g. "bottom" or "free".

required
mag CVector

initial magnetisation. Must be normalised (norm of 1). Used for quicker convergence.

required
anis CVector

anisotropy of the layer. A normalised vector

required
Ms float

magnetisation saturation. Unit: Tesla [T].

required
thickness float

thickness of the layer. Unit: meter [m].

required
cellSurface float

surface of the layer, for volume calculation. Unit: meter^2 [m^2].

required
damping float

often marked as alpha in the LLG equation. Damping of the layer. Default 0.011. Dimensionless.

0.11
Source code in cmtj/core/__init__.pyi
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
@staticmethod
def createSOTLayer(
    id: str,
    mag: CVector,
    anis: CVector,
    Ms: float,
    thickness: float,
    cellSurface: float,
    demagTensor: list[CVector],
    damping: float = 0.11,
    fieldLikeTorque: float = 0,
    dampingLikeTorque: float = 0,
) -> Layer:
    """
    Create SOT layer -- including damping and field-like torques that are
    calculated based on the effective Spin Hall angles.
    :param id: identifiable name for a layer -- e.g. "bottom" or "free".
    :param mag: initial magnetisation. Must be normalised (norm of 1). Used for quicker convergence.
    :param anis: anisotropy of the layer. A normalised vector
    :param Ms: magnetisation saturation. Unit: Tesla [T].
    :param thickness: thickness of the layer. Unit: meter [m].
    :param cellSurface: surface of the layer, for volume calculation. Unit: meter^2 [m^2].
    :param damping: often marked as alpha in the LLG equation. Damping of the layer. Default 0.011. Dimensionless.
    """
    ...

createSTTLayer(id, mag, anis, Ms, thickness, cellSurface, demagTensor, damping=0.011, SlonczewskiSpacerLayerParameter=1.0, beta=0.0, spinPolarisation=0.0) staticmethod

Create STT layer -- with the standard Slomczewski formulation.

Parameters:

Name Type Description Default
id str

identifiable name for a layer -- e.g. "bottom" or "free".

required
mag CVector

initial magnetisation. Must be normalised (norm of 1). Used for quicker convergence.

required
anis CVector

anisotropy of the layer. A normalised vector

required
Ms float

magnetisation saturation. Unit: Tesla [T].

required
thickness float

thickness of the layer. Unit: meter [m].

required
cellSurface float

surface of the layer, for volume calculation. Unit: meter^2 [m^2].

required
damping float

often marked as alpha in the LLG equation. Damping of the layer. Default 0.011. Dimensionless.

0.011
SlonczewskiSpacerLayerParameter float

Slomczewski parameter. Often marked as lambda.

1.0
beta float

beta parameter that scales FL/DL ratio.

0.0
spinPolarisation float

the spin effectiveness.

0.0
Source code in cmtj/core/__init__.pyi
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
@staticmethod
def createSTTLayer(
    id: str,
    mag: CVector,
    anis: CVector,
    Ms: float,
    thickness: float,
    cellSurface: float,
    demagTensor: list[CVector],
    damping: float = 0.011,
    SlonczewskiSpacerLayerParameter: float = 1.0,
    beta: float = 0.0,
    spinPolarisation: float = 0.0,
) -> Layer:
    """
    Create STT layer -- with the standard Slomczewski formulation.
    :param id: identifiable name for a layer -- e.g. "bottom" or "free".
    :param mag: initial magnetisation. Must be normalised (norm of 1). Used for quicker convergence.
    :param anis: anisotropy of the layer. A normalised vector
    :param Ms: magnetisation saturation. Unit: Tesla [T].
    :param thickness: thickness of the layer. Unit: meter [m].
    :param cellSurface: surface of the layer, for volume calculation. Unit: meter^2 [m^2].
    :param damping: often marked as alpha in the LLG equation. Damping of the layer. Default 0.011. Dimensionless.
    :param SlonczewskiSpacerLayerParameter: Slomczewski parameter. Often marked as lambda.
    :param beta: beta parameter that scales FL/DL ratio.
    :param spinPolarisation: the spin effectiveness.
    """
    ...

getId()

Get Id of the layer

Source code in cmtj/core/__init__.pyi
551
552
553
def getId(self) -> str:
    """Get Id of the layer"""
    ...

setAlphaNoise(alpha, std, scale, axis=Axis.all)

Set alpha noise for the layer.

Parameters:

Name Type Description Default
alpha float

Alpha parameter

required
std float

Standard deviation

required
scale float

Scale

required
axis Axis

Axis, by default all axes are used

Axis.all
Source code in cmtj/core/__init__.pyi
486
487
488
489
490
491
492
493
def setAlphaNoise(self, alpha: float, std: float, scale: float, axis: Axis = Axis.all) -> None:
    """Set alpha noise for the layer.
    :param alpha: Alpha parameter
    :param std: Standard deviation
    :param scale: Scale
    :param axis: Axis, by default all axes are used
    """
    ...

setAlternativeSTT(setAlternative)

Switch to an alternative STT forumulation (Taniguchi et al.) https://iopscience.iop.org/article/10.7567/APEX.11.013005

Parameters:

Name Type Description Default
setAlternative bool

whether to set the alternative STT formulation

required
Source code in cmtj/core/__init__.pyi
555
556
557
558
559
560
def setAlternativeSTT(self, setAlternative: bool) -> None:
    """Switch to an alternative STT forumulation (Taniguchi et al.)
    https://iopscience.iop.org/article/10.7567/APEX.11.013005
    :param setAlternative: whether to set the alternative STT formulation
    """
    ...

setAnisotropyDriver(driver)

Set anisotropy driver for the layer. It's scalar. The axis is determined in the layer constructor

Source code in cmtj/core/__init__.pyi
495
496
497
498
def setAnisotropyDriver(self, driver: ScalarDriver) -> None:
    """Set anisotropy driver for the layer.
    It's scalar. The axis is determined in the layer constructor"""
    ...

setBottomDipoleTensor(tensor)

Set a dipole tensor from the bottom layer.

Parameters:

Name Type Description Default
tensor list[CVector]

the dipole tensor to be set.

required
Source code in cmtj/core/__init__.pyi
545
546
547
548
549
def setBottomDipoleTensor(self, tensor: list[CVector]) -> None:
    """Set a dipole tensor from the bottom layer.
    :param tensor: the dipole tensor to be set.
    """
    ...

setDampingLikeTorqueDriver(driver)

Set a driver for the damping like torque of the layer.

Parameters:

Name Type Description Default
driver ScalarDriver

the driver to be set.

required
Source code in cmtj/core/__init__.pyi
516
517
518
519
def setDampingLikeTorqueDriver(self, driver: ScalarDriver) -> None:
    """Set a driver for the damping like torque of the layer.
    :param driver: the driver to be set."""
    ...

setFieldLikeTorqueDriver(driver)

Set a driver for the field like torque of the layer.

Parameters:

Name Type Description Default
driver ScalarDriver

the driver to be set.

required
Source code in cmtj/core/__init__.pyi
521
522
523
524
def setFieldLikeTorqueDriver(self, driver: ScalarDriver) -> None:
    """Set a driver for the field like torque of the layer.
    :param driver: the driver to be set."""
    ...

setKappa(kappa)

Set the kappa parameter for the layer -- determines SOT mixing Hdl * kappa + Hfl Allows you to turn off Hdl. Turning Hfl is via beta parameter.

Parameters:

Name Type Description Default
kappa float

the kappa parameter

required
Source code in cmtj/core/__init__.pyi
562
563
564
565
566
567
568
def setKappa(self, kappa: float) -> None:
    """Set the kappa parameter for the layer -- determines SOT mixing
        Hdl * kappa + Hfl
    Allows you to turn off Hdl. Turning Hfl is via beta parameter.
    :param kappa: the kappa parameter
    """
    ...

setMagnetisation(mag)

Set the magnetisation of the layer.

Parameters:

Name Type Description Default
mag CVector

the magnetisation to be set.

required
Source code in cmtj/core/__init__.pyi
506
507
508
509
def setMagnetisation(self, mag: CVector) -> None:
    """Set the magnetisation of the layer.
    :param mag: the magnetisation to be set."""
    ...

setOerstedFieldDriver(driver)

Set an Oersted field driver for the layer.

Parameters:

Name Type Description Default
driver AxialDriver

the field driver to be set.

required
Source code in cmtj/core/__init__.pyi
511
512
513
514
def setOerstedFieldDriver(self, driver: AxialDriver) -> None:
    """Set an Oersted field driver for the layer.
    :param driver: the field driver to be set."""
    ...

setReferenceLayer(ref)

Set a reference layer for the STT.

Parameters:

Name Type Description Default
ref CVector

the reference layer vector.

required
Source code in cmtj/core/__init__.pyi
526
527
528
529
def setReferenceLayer(self, ref: CVector) -> None:
    """Set a reference layer for the STT.
    :param ref: the reference layer vector."""
    ...

setTemperatureDriver(driver)

Set a driver for the temperature of the layer. Automatically changes the solver to Euler-Heun.

Source code in cmtj/core/__init__.pyi
500
501
502
503
def setTemperatureDriver(self, driver: ScalarDriver) -> None:
    """Set a driver for the temperature of the layer.
    Automatically changes the solver to Euler-Heun."""
    ...

setTopDipoleTensor(tensor)

Set a dipole tensor from the top layer.

Parameters:

Name Type Description Default
tensor list[CVector]

the dipole tensor to be set.

required
Source code in cmtj/core/__init__.pyi
539
540
541
542
543
def setTopDipoleTensor(self, tensor: list[CVector]) -> None:
    """Set a dipole tensor from the top layer.
    :param tensor: the dipole tensor to be set.
    """
    ...

NullDriver

Bases: ScalarDriver

Source code in cmtj/core/__init__.pyi
570
571
572
573
574
575
576
class NullDriver(ScalarDriver):
    def __init__(self) -> None:
        """
        An empty driver that does nothing. Use in Axial Driver when
        the axis is to be id.
        """
        ...

__init__()

An empty driver that does nothing. Use in Axial Driver when the axis is to be id.

Source code in cmtj/core/__init__.pyi
571
572
573
574
575
576
def __init__(self) -> None:
    """
    An empty driver that does nothing. Use in Axial Driver when
    the axis is to be id.
    """
    ...

Reference

Reference layer indicator.

Source code in cmtj/core/__init__.pyi
691
692
693
694
695
696
697
class Reference:
    """Reference layer indicator."""

    bottom: ClassVar[Reference] = ...
    fixed: ClassVar[Reference] = ...
    none: ClassVar[Reference] = ...
    top: ClassVar[Reference] = ...

ScalarDriver

Source code in cmtj/core/__init__.pyi
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
class ScalarDriver:
    def __init__(self, *args, **kwargs) -> None: ...
    def getCurrentScalarValue(self, time: float) -> float:
        """
        :param time: time in seconds
        :return: the scalar value of the driver at time.
        """
        ...

    @staticmethod
    def getConstantDriver(constantValue: float) -> ScalarDriver:
        """
        Constant driver produces a constant signal of a fixed amplitude.
        :param constantValue: constant value of the driver (constant offset/amplitude)
        """
        ...

    @staticmethod
    def getPulseDriver(constantValue: float, amplitude: float, period: float, cycle: float) -> ScalarDriver:
        """
        Produces a square pulse of certain period and cycle
        :param constantValue: offset (vertical) of the pulse. The pulse amplitude will be added to this.
        :param amplitude: amplitude of the pulse signal
        :param period: period of the signal in seconds
        :param cycle: duty cycle of the signal -- a fraction between [0 and 1].
        """
        ...

    @staticmethod
    def getSineDriver(constantValue: float, amplitude: ScalarDriver, frequency: float, phase: float) -> Any:
        """
        Produces a sinusoidal signal with some offset (constantValue), amplitude frequency and phase offset.
        :param constantValue: vertical offset. The sine will oscillate around this value.
        :param amplitude: amplitude of the sine wave
        :param frequency: frequency of the sine
        :param phase: phase of the sine in radians.
        """
        ...

    @staticmethod
    def getStepDriver(constantValue: float, amplitude: float, timeStart: float, timeStop: float) -> ScalarDriver:
        """
        Get a step driver. It has amplitude between timeStart and timeStop and 0 elsewhere
        :param constantValue: offset of the pulse (vertical)
        :param amplitude: amplitude that is added on top of the constantValue
        :param timeStart: start of the pulse
        :param timeStop: when the pulse ends
        """
        ...

    @staticmethod
    def getTrapezoidDriver(
        constantValue: float,
        amplitude: float,
        timeStart,
        edgeTime: float,
        steadyTime: float,
    ) -> ScalarDriver:
        """Create Trapezoid driver. Has a rising and a falling edge.
        :param constantValue: offset of the pulse (vertical)
        :param amplitude: amplitude that is added on top of the constantValue
        :param timeStart: start of the pulse
        :param edgeTime: time it takes to reach the maximum amplitude
        :param steadyTime: time it spends in a steady state
        """
        ...

    @staticmethod
    def getGaussianImpulseDriver(constantValue: float, amplitude: float, t0: float, sigma: float) -> ScalarDriver:
        """Gaussian impulse driver. It has amplitude starts at t0 and falls off with sigma.

        Formula:
        A * exp(-((t - t0) ** 2) / (2 * sigma ** 2))

        :param constantValue: offset of the pulse (vertical)
        :param amplitude: amplitude that is added on top of the constantValue
        :param t0: start of the pulse
        :param sigma: fall-off of the Gaussian pulse
        """
        ...

    @staticmethod
    def getGaussianStepDriver(constantValue: float, amplitude: float, t0: float, sigma: float) -> ScalarDriver:
        """Gaussian step driver (erf function). It has amplitude starts at t0 and falls off with sigma.

        Formula:
        f(t) = constantValue + amplitude * (1 + erf((t - t0) / (sigma * sqrt(2))))

        :param constantValue: offset of the pulse (vertical)
        :param amplitude: amplitude that is added on top of the constantValue
        :param t0: start of the pulse
        :param sigma: fall-off of the Gaussian pulse
        """
        ...

    @staticmethod
    def getPosSineDriver(constantValue: float, amplitude: float, frequency: float, phase: float) -> ScalarDriver:
        """Produces a positive sinusoidal signal with some offset (constantValue), amplitude frequency and phase offset.
        :param constantValue: vertical offset. The sine will oscillate around this value.
        :param amplitude: amplitude of the sine wave
        :param frequency: frequency of the sine
        :param phase: phase of the sine in radians.
        """
        ...

getConstantDriver(constantValue) staticmethod

Constant driver produces a constant signal of a fixed amplitude.

Parameters:

Name Type Description Default
constantValue float

constant value of the driver (constant offset/amplitude)

required
Source code in cmtj/core/__init__.pyi
587
588
589
590
591
592
593
@staticmethod
def getConstantDriver(constantValue: float) -> ScalarDriver:
    """
    Constant driver produces a constant signal of a fixed amplitude.
    :param constantValue: constant value of the driver (constant offset/amplitude)
    """
    ...

getCurrentScalarValue(time)

Parameters:

Name Type Description Default
time float

time in seconds

required

Returns:

Type Description
float

the scalar value of the driver at time.

Source code in cmtj/core/__init__.pyi
580
581
582
583
584
585
def getCurrentScalarValue(self, time: float) -> float:
    """
    :param time: time in seconds
    :return: the scalar value of the driver at time.
    """
    ...

getGaussianImpulseDriver(constantValue, amplitude, t0, sigma) staticmethod

Gaussian impulse driver. It has amplitude starts at t0 and falls off with sigma.

Formula: A * exp(-((t - t0) 2) / (2 * sigma 2))

Parameters:

Name Type Description Default
constantValue float

offset of the pulse (vertical)

required
amplitude float

amplitude that is added on top of the constantValue

required
t0 float

start of the pulse

required
sigma float

fall-off of the Gaussian pulse

required
Source code in cmtj/core/__init__.pyi
645
646
647
648
649
650
651
652
653
654
655
656
657
@staticmethod
def getGaussianImpulseDriver(constantValue: float, amplitude: float, t0: float, sigma: float) -> ScalarDriver:
    """Gaussian impulse driver. It has amplitude starts at t0 and falls off with sigma.

    Formula:
    A * exp(-((t - t0) ** 2) / (2 * sigma ** 2))

    :param constantValue: offset of the pulse (vertical)
    :param amplitude: amplitude that is added on top of the constantValue
    :param t0: start of the pulse
    :param sigma: fall-off of the Gaussian pulse
    """
    ...

getGaussianStepDriver(constantValue, amplitude, t0, sigma) staticmethod

Gaussian step driver (erf function). It has amplitude starts at t0 and falls off with sigma.

Formula: f(t) = constantValue + amplitude * (1 + erf((t - t0) / (sigma * sqrt(2))))

Parameters:

Name Type Description Default
constantValue float

offset of the pulse (vertical)

required
amplitude float

amplitude that is added on top of the constantValue

required
t0 float

start of the pulse

required
sigma float

fall-off of the Gaussian pulse

required
Source code in cmtj/core/__init__.pyi
659
660
661
662
663
664
665
666
667
668
669
670
671
@staticmethod
def getGaussianStepDriver(constantValue: float, amplitude: float, t0: float, sigma: float) -> ScalarDriver:
    """Gaussian step driver (erf function). It has amplitude starts at t0 and falls off with sigma.

    Formula:
    f(t) = constantValue + amplitude * (1 + erf((t - t0) / (sigma * sqrt(2))))

    :param constantValue: offset of the pulse (vertical)
    :param amplitude: amplitude that is added on top of the constantValue
    :param t0: start of the pulse
    :param sigma: fall-off of the Gaussian pulse
    """
    ...

getPosSineDriver(constantValue, amplitude, frequency, phase) staticmethod

Produces a positive sinusoidal signal with some offset (constantValue), amplitude frequency and phase offset.

Parameters:

Name Type Description Default
constantValue float

vertical offset. The sine will oscillate around this value.

required
amplitude float

amplitude of the sine wave

required
frequency float

frequency of the sine

required
phase float

phase of the sine in radians.

required
Source code in cmtj/core/__init__.pyi
673
674
675
676
677
678
679
680
681
@staticmethod
def getPosSineDriver(constantValue: float, amplitude: float, frequency: float, phase: float) -> ScalarDriver:
    """Produces a positive sinusoidal signal with some offset (constantValue), amplitude frequency and phase offset.
    :param constantValue: vertical offset. The sine will oscillate around this value.
    :param amplitude: amplitude of the sine wave
    :param frequency: frequency of the sine
    :param phase: phase of the sine in radians.
    """
    ...

getPulseDriver(constantValue, amplitude, period, cycle) staticmethod

Produces a square pulse of certain period and cycle

Parameters:

Name Type Description Default
constantValue float

offset (vertical) of the pulse. The pulse amplitude will be added to this.

required
amplitude float

amplitude of the pulse signal

required
period float

period of the signal in seconds

required
cycle float

duty cycle of the signal -- a fraction between [0 and 1].

required
Source code in cmtj/core/__init__.pyi
595
596
597
598
599
600
601
602
603
604
@staticmethod
def getPulseDriver(constantValue: float, amplitude: float, period: float, cycle: float) -> ScalarDriver:
    """
    Produces a square pulse of certain period and cycle
    :param constantValue: offset (vertical) of the pulse. The pulse amplitude will be added to this.
    :param amplitude: amplitude of the pulse signal
    :param period: period of the signal in seconds
    :param cycle: duty cycle of the signal -- a fraction between [0 and 1].
    """
    ...

getSineDriver(constantValue, amplitude, frequency, phase) staticmethod

Produces a sinusoidal signal with some offset (constantValue), amplitude frequency and phase offset.

Parameters:

Name Type Description Default
constantValue float

vertical offset. The sine will oscillate around this value.

required
amplitude ScalarDriver

amplitude of the sine wave

required
frequency float

frequency of the sine

required
phase float

phase of the sine in radians.

required
Source code in cmtj/core/__init__.pyi
606
607
608
609
610
611
612
613
614
615
@staticmethod
def getSineDriver(constantValue: float, amplitude: ScalarDriver, frequency: float, phase: float) -> Any:
    """
    Produces a sinusoidal signal with some offset (constantValue), amplitude frequency and phase offset.
    :param constantValue: vertical offset. The sine will oscillate around this value.
    :param amplitude: amplitude of the sine wave
    :param frequency: frequency of the sine
    :param phase: phase of the sine in radians.
    """
    ...

getStepDriver(constantValue, amplitude, timeStart, timeStop) staticmethod

Get a step driver. It has amplitude between timeStart and timeStop and 0 elsewhere

Parameters:

Name Type Description Default
constantValue float

offset of the pulse (vertical)

required
amplitude float

amplitude that is added on top of the constantValue

required
timeStart float

start of the pulse

required
timeStop float

when the pulse ends

required
Source code in cmtj/core/__init__.pyi
617
618
619
620
621
622
623
624
625
626
@staticmethod
def getStepDriver(constantValue: float, amplitude: float, timeStart: float, timeStop: float) -> ScalarDriver:
    """
    Get a step driver. It has amplitude between timeStart and timeStop and 0 elsewhere
    :param constantValue: offset of the pulse (vertical)
    :param amplitude: amplitude that is added on top of the constantValue
    :param timeStart: start of the pulse
    :param timeStop: when the pulse ends
    """
    ...

getTrapezoidDriver(constantValue, amplitude, timeStart, edgeTime, steadyTime) staticmethod

Create Trapezoid driver. Has a rising and a falling edge.

Parameters:

Name Type Description Default
constantValue float

offset of the pulse (vertical)

required
amplitude float

amplitude that is added on top of the constantValue

required
timeStart

start of the pulse

required
edgeTime float

time it takes to reach the maximum amplitude

required
steadyTime float

time it spends in a steady state

required
Source code in cmtj/core/__init__.pyi
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
@staticmethod
def getTrapezoidDriver(
    constantValue: float,
    amplitude: float,
    timeStart,
    edgeTime: float,
    steadyTime: float,
) -> ScalarDriver:
    """Create Trapezoid driver. Has a rising and a falling edge.
    :param constantValue: offset of the pulse (vertical)
    :param amplitude: amplitude that is added on top of the constantValue
    :param timeStart: start of the pulse
    :param edgeTime: time it takes to reach the maximum amplitude
    :param steadyTime: time it spends in a steady state
    """
    ...

SolverMode

SolverMode Indicator

Source code in cmtj/core/__init__.pyi
683
684
685
686
687
688
689
class SolverMode:
    """SolverMode Indicator"""

    DormandPrice: ClassVar[SolverMode] = ...
    EulerHeun: ClassVar[SolverMode] = ...
    RK4: ClassVar[SolverMode] = ...
    Heun: ClassVar[SolverMode] = ...

c_dot(arg0, arg1)

Compute dot (scalar) product of two CVectors.

Source code in cmtj/core/__init__.pyi
10
11
12
def c_dot(arg0: CVector, arg1: CVector) -> float:
    """Compute dot (scalar) product of two CVectors."""
    ...

constantDriver(constant)

Constant driver produces a constant signal of a fixed amplitude.

Parameters:

Name Type Description Default
constant float

constant value of the driver (constant offset/amplitude)

required
Source code in cmtj/core/__init__.pyi
14
15
16
17
18
19
def constantDriver(constant: float) -> ScalarDriver:
    """
    Constant driver produces a constant signal of a fixed amplitude.
    :param constant: constant value of the driver (constant offset/amplitude)
    """
    ...

gaussianImpulseDriver(constantValue, amplitude, t0, sigma)

Gaussian impulse driver. It starts with an max amplitude at t0 and falls off with sigma.

Formula:

\(A \exp(-(t - t_0)^2 / (2\sigma^2))\)

Parameters:

Name Type Description Default
constantValue float

offset of the pulse (vertical)

required
amplitude float

amplitude that is added on top of the constantValue

required
t0 float

start of the pulse

required
sigma float

fall-off of the Gaussian pulse

required
Source code in cmtj/core/__init__.pyi
31
32
33
34
35
36
37
38
39
40
41
42
43
44
def gaussianImpulseDriver(constantValue: float, amplitude: float, t0: float, sigma: float) -> ScalarDriver:
    """
    Gaussian impulse driver. It starts with an max amplitude at t0 and falls off with sigma.

    Formula:

    $A \exp(-(t - t_0)^2 / (2\sigma^2))$

    :param constantValue: offset of the pulse (vertical)
    :param amplitude: amplitude that is added on top of the constantValue
    :param t0: start of the pulse
    :param sigma: fall-off of the Gaussian pulse
    """
    ...

gaussianStepDriver(constantValue, amplitude, t0, sigma)

Gaussian step driver (erf function). It starts at t0 and falls off with sigma.

Formula:

\(f(t) = c + A + A\mathrm{erf}((t - t_0) / (\sigma \sqrt(2)))\)

Parameters:

Name Type Description Default
constantValue float

offset of the pulse (vertical)

required
amplitude float

amplitude that is added on top of the constantValue

required
t0 float

start of the pulse

required
sigma float

fall-off of the Gaussian pulse

required
Source code in cmtj/core/__init__.pyi
46
47
48
49
50
51
52
53
54
55
56
57
58
def gaussianStepDriver(constantValue: float, amplitude: float, t0: float, sigma: float) -> ScalarDriver:
    """Gaussian step driver (erf function). It starts at t0 and falls off with sigma.

    Formula:

    $f(t) = c + A + A\mathrm{erf}((t - t_0) / (\sigma \sqrt(2)))$

    :param constantValue: offset of the pulse (vertical)
    :param amplitude: amplitude that is added on top of the constantValue
    :param t0: start of the pulse
    :param sigma: fall-off of the Gaussian pulse
    """
    ...

posSineDriver(constantValue, amplitude, frequency, phase)

Produces a positive sinusoidal signal with some offset (constantValue), amplitude frequency and phase offset.

Parameters:

Name Type Description Default
constantValue float

vertical offset. The sine will oscillate around this value.

required
amplitude float

amplitude of the sine wave

required
frequency float

frequency of the sine

required
phase float

phase of the sine in radians.

required
Source code in cmtj/core/__init__.pyi
60
61
62
63
64
65
66
67
def posSineDriver(constantValue: float, amplitude: float, frequency: float, phase: float) -> ScalarDriver:
    """Produces a positive sinusoidal signal with some offset (constantValue), amplitude frequency and phase offset.
    :param constantValue: vertical offset. The sine will oscillate around this value.
    :param amplitude: amplitude of the sine wave
    :param frequency: frequency of the sine
    :param phase: phase of the sine in radians.
    """
    ...

pulseDriver(constantValue, amplitude, period, cycle)

Produces a square pulse of certain period and cycle

Parameters:

Name Type Description Default
constantValue float

offset (vertical) of the pulse. The pulse amplitude will be added to this.

required
amplitude float

amplitude of the pulse signal

required
period float

period of the signal in seconds

required
cycle float

duty cycle of the signal -- a fraction between [0 and 1].

required
Source code in cmtj/core/__init__.pyi
69
70
71
72
73
74
75
76
77
def pulseDriver(constantValue: float, amplitude: float, period: float, cycle: float) -> ScalarDriver:
    """
    Produces a square pulse of certain period and cycle
    :param constantValue: offset (vertical) of the pulse. The pulse amplitude will be added to this.
    :param amplitude: amplitude of the pulse signal
    :param period: period of the signal in seconds
    :param cycle: duty cycle of the signal -- a fraction between [0 and 1].
    """
    ...

sineDriver(constantValue, amplitude, frequency, phase)

Produces a sinusoidal signal with some offset (constantValue), amplitude frequency and phase offset.

Parameters:

Name Type Description Default
constantValue float

vertical offset. The sine will oscillate around this value.

required
amplitude float

amplitude of the sine wave

required
frequency float

frequency of the sine

required
phase float

phase of the sine in radians.

required
Source code in cmtj/core/__init__.pyi
21
22
23
24
25
26
27
28
29
def sineDriver(constantValue: float, amplitude: float, frequency: float, phase: float) -> ScalarDriver:
    """
    Produces a sinusoidal signal with some offset (constantValue), amplitude frequency and phase offset.
    :param constantValue: vertical offset. The sine will oscillate around this value.
    :param amplitude: amplitude of the sine wave
    :param frequency: frequency of the sine
    :param phase: phase of the sine in radians.
    """
    ...

stepDriver(constantValue, amplitude, timeStart, timeStop)

Get a step driver. It has amplitude between timeStart and timeStop and 0 elsewhere

Parameters:

Name Type Description Default
constantValue float

offset of the pulse (vertical)

required
amplitude float

amplitude that is added on top of the constantValue

required
timeStart float

start of the pulse

required
timeStop float

when the pulse ends

required
Source code in cmtj/core/__init__.pyi
79
80
81
82
83
84
85
86
87
def stepDriver(constantValue: float, amplitude: float, timeStart: float, timeStop: float) -> ScalarDriver:
    """
    Get a step driver. It has amplitude between timeStart and timeStop and 0 elsewhere
    :param constantValue: offset of the pulse (vertical)
    :param amplitude: amplitude that is added on top of the constantValue
    :param timeStart: start of the pulse
    :param timeStop: when the pulse ends
    """
    ...

trapezoidDriver(constantValue, amplitude, timeStart, edgeTime, steadyTime)

Create Trapezoid driver. Has a rising and a falling edge.

Parameters:

Name Type Description Default
constantValue float

offset of the pulse (vertical)

required
amplitude float

amplitude that is added on top of the constantValue

required
timeStart

start of the pulse

required
edgeTime float

time it takes to reach the maximum amplitude

required
steadyTime float

time it spends in a steady state

required
Source code in cmtj/core/__init__.pyi
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
def trapezoidDriver(
    constantValue: float,
    amplitude: float,
    timeStart,
    edgeTime: float,
    steadyTime: float,
) -> ScalarDriver:
    """Create Trapezoid driver. Has a rising and a falling edge.
    :param constantValue: offset of the pulse (vertical)
    :param amplitude: amplitude that is added on top of the constantValue
    :param timeStart: start of the pulse
    :param edgeTime: time it takes to reach the maximum amplitude
    :param steadyTime: time it spends in a steady state
    """
    ...