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 asantenna
are directly attributes ofSample
. - 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 intetrax.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 theEigenResult
as it should be. - Post-processing like linewidth and absorption are now methods on the
EigenResult
class. Absorption also returns a plottableAbsorptionResult
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
rel.plot()
spectrum = experiments.eigenmodes(layer,num_cpus=-1,num_modes=5,Nk=81)
spectrum
spectrum.plot()
spectrum = experiments.eigenmodes(layer,num_cpus=-1,num_modes=5,Nk=81)
absorb = spectrum.absorption(experiments.CPWAntenna(200,10,20))
absorb.plot()
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