maxwelllink.measurements.dummy_measurement module¶
- class maxwelllink.measurements.dummy_measurement.DummyMeasurement[source]¶
Bases:
objectA dummy light-induced measurement for demonstration purposes.
This class serves as a template for implementing light-induced measurements, which excite an EM solver (plus its molecules) with light pulses and turn the recorded response into user-facing observables.
Every measurement splits into three steps:
reference(): the excitation baseline, computed analytically (e.g. the spectrum of a known laser pulse) or by a molecule-free reference simulation (e.g. the FDTD normalization run);signal_run(): excite the full system and collect the raw response signals;postprocess(reference, signals): combine both into the observable arrays.
run()chains the three steps and is the single user-facing entry point.- __init__(omega_min, omega_max, units='cm-1', nfreq=200, molecules=None)[source]¶
Initialize the necessary attributes of a light-induced measurement.
Notes
This method should be overridden by subclasses to store their solver-specific inputs; call
super().__init__(omega_min, omega_max, units, nfreq, molecules)first.- Parameters:
omega_min (float) – Spectral window of the measurement in
units.omega_max (float) – Spectral window of the measurement in
units.units (str, default: "cm-1") – Units of the window: “cm-1”, “eV”, “au”, “nm”, or “um”.
nfreq (int, default: 200) – Number of frequency points of the observables.
molecules (sequence or None, optional) – Molecules probed by the measurement (may be empty).
- postprocess(reference, signals)[source]¶
Combine the reference and the raw signals into observable arrays.
Notes
This method must be overridden by subclasses. Implementations end with
return self._assemble_result(omega_cminv, **observables).- Parameters:
reference (object) – The return value of
reference().signals (object) – The return value of
signal_run().
- reference()[source]¶
Return the excitation baseline of the measurement.
Depending on the EM solver, this is computed analytically (e.g. the Fourier transform of a known laser pulse) or by a molecule-free reference simulation (e.g. the FDTD normalization run).
Notes
This method must be overridden by subclasses.
- run()[source]¶
Run the measurement: the reference first, then the signal run, then the combination. Subclasses may pass state between the steps via attributes (e.g. fields recorded in the reference run).
Notes
This method should not be overridden by subclasses.
- Returns:
The frequency axes plus the observables of the measurement.
- Return type:
dict