SQw

A class for the total dynamic structure factor

Calculation is done in the respective FQt object, and this is just a reference to get the correct FQt object.

SQw.calculate_dt() float

Calculates the time separation of frames required by the experimental dataset, assuming uniform spacing. Note that this may be different from the time separation that the user has given as an input, as it only depends on the current values for self.E. The relationship between time and energy comes from the numpy implementation of the FFT for 2 * nE points where:

\[\begin{split}\nu_{max} &=& \frac{n_E - 1}{2 n_E \Delta t} \\\\ \therefore \Delta t &=& \frac{h (n_E - 1)}{2 n_E E_{max}}\end{split}\]
Returns

The time separation required by the current values of self.E

Return type

float

static SQw.calculate_E(nE: int, dt: float) numpy.ndarray

Calculates an array of nE uniformly spaced energy values from the time separation of the CompactTrajectory frames, dt. The frequencie are determined by the Fast Fourier Transform, as implemented by numpy, for 2 * nE points in time which we then crop to only include nE positive frequencies. As we are dealing with frequency rather than angular frequency here, the relation to between energy is given by:

\[E = h \nu\]
Parameters
  • nE (int) – The number of energy values to be calculated

  • dt (float) – The step size between frames in fs

Returns

An array of float specifying the energy in units of meV

Return type

numpy.ndarray