AmplitudeTime

class nexus.AmplitudeTime(experiment, time_length=200, time_step=0.2, electronic=False, fft_window='auto', id='')

Bases: Measurement

Constructor for the AmplitudeTime class. Class to calculate the time-dependent scattering amplitudes of the experiment. Only possible for a properly set Jones Vector of the Beam.

Parameters:
  • id (string) – User identifier.

  • experiment (Experiment) – Experiment.

  • time_length (float) – Length of the calculation (nanoseconds).

  • time_step (float) – Step size of the calculation in (nanoseconds).

  • electronic (bool) – If True electronic scattering is also included.

  • fft_window (string) –

    A window function that is applied during the Fourier transformation from energy to time. Options are

    • auto (default) - no window, equal to none.

    • Hann

    • Hamming

    • Sine

    • Welch

    • Kaiser2 - \(\alpha = 2\)

    • Kaiser25 - \(\alpha = 2.5\)

    • Kaiser3 - \(\alpha = 3\)

    • none

    New in version 1.0.4.

id

User identifier.

Type:

string

experiment

Experiment.

Type:

Experiment

time_length

Length of the calculation (nanoseconds).

Type:

float

time_step

Step size of the calculation (nanoseconds).

Type:

float

electronic

If True electronic scattering is also included.

Type:

bool

fft_window

A window function that is applied during the Fourier transformation from energy to time. Options are

  • auto (default) - no window, equal to none.

  • Hann

  • Hamming

  • Sine

  • Welch

  • Kaiser2 - \(\alpha = 2\)

  • Kaiser25 - \(\alpha = 2.5\)

  • Kaiser3 - \(\alpha = 3\)

  • none

New in version 1.0.4.

Type:

string

result

List of Jones vectors in units of (\(\sqrt(\Gamma / ns)\).

Type:

list

Calculate()

Calculates the class method. Also callable via operator ().

Returns:

Time array of float values. ndarray: Amplitude array of Jones vectors.

Return type:

ndarray

Plot(sigma=True, pi=True, polar=False, unwrap=True, name=None)

Plot the AmplitudeTime.

. versionadded:: 1.0.3

Parameters:
  • sigma (bool) – Select if \(\sigma\) component should be plot.

  • pi (bool) – Select if \(\pi\) component should be plot.

  • phase (bool) – If True absolute and phase are plotted instead of real and imaginary parts.

  • unwrap (bool) – Select if phase should be unwrapped.

  • name (string) –

    If given, the plot is saved under this name.

    New in version 1.1.0.