fit_signal_flat_bck

Fit a Gaussian peak.

Parameters:
  • x (list) –

    List of x values.

  • y (list) –

    List of y values.

  • x_min (int, default: 110 ) –

    Start index of the list of points, by default 110.

  • x_max (int, default: 170 ) –

    End index of the list of points, by default 170.

  • center (float, default: None ) –

    Estimated center position, by default None.

  • sigma (float, default: None ) –

    If provided, the sigma will be fixed to the given value, by default None.

  • background (float, default: None ) –

    If provided, the value will be subtracted from y, by default None.

Returns:
  • c( float ) –

    Fitted center position of the Gaussian peak.

  • width( float ) –

    Fitted width (sigma) of the Gaussian peak.

  • fit( ModelResult ) –

    The result of the fit.

process_data

Process a Mantid workspace to extract counts vs pixel.

Parameters:
  • workspace (Mantid workspace) –

    The Mantid workspace to process.

  • summed (bool, default: True ) –

    If True, the x pixels will be summed (default is True).

  • tof_step (int, default: 200 ) –

    The TOF bin size (default is 200).

Returns:
  • tuple

    A tuple containing: - tof : numpy.ndarray The time-of-flight values. - _x : numpy.ndarray The pixel indices. - _y : numpy.ndarray The summed counts for each pixel.