Skip to content

Resolve "New architecture for experiments"

There is no more experimental result. The following major changes have been applied

  • external_field or its alias (Bext), as well as antenna are directly attributes of Sample.
  • top-level numerical experiments relax(sample), eigenmodes(sample) (in the future, also, evolve) are now functions that are called on the sample and are found in tetrax.experiments
  • Each experiment returns a result object that can be used for post-processing and plotting.
  • stuff like show_mode() is now a method of the EigenResult as it should be.
  • Post-processing like linewidth and absorption are now methods on the EigenResult class. Absorption also returns a plottable AbsorptionResult object.

Example

Showing some of the new functionality

import matplotlib.pyplot as plt
from tetrax import Sample, vectorfields, geometries, experiments

layer = Sample(geometries.layer.monolayer(50,1),name="new_dispersion_sample")
layer.external_field = (0,0,0)
layer.mag = (1,0.1,0)

rel = experiments.relax(layer)
rel

Screen_Shot_2023-11-11_at_14.31.50

rel.plot()

Screen_Shot_2023-11-11_at_14.39.38

spectrum = experiments.eigenmodes(layer,num_cpus=-1,num_modes=5,Nk=81)
spectrum

Screen_Shot_2023-11-11_at_14.33.08

spectrum.plot()

Screen_Shot_2023-11-11_at_14.39.03

spectrum = experiments.eigenmodes(layer,num_cpus=-1,num_modes=5,Nk=81)
absorb = spectrum.absorption(experiments.CPWAntenna(200,10,20))
absorb.plot()

Screen_Shot_2023-11-11_at_14.37.35

Major stuff that is still missing

  • The plotting, in general, needs to be cleaned up. Refer to #45 (closed).
  • At any time, results should be saveable and loadable. Refer to #41 (closed).

Closes #39 (closed)

Edited by Koerber, Lukas (FWIN-C) - 108045

Merge request reports