islatu.stitching

As reflectometry measurements typically consist of multiple scans at different attenutation, we must stitch these together.

islatu.stitching.concatenate(scan_list: List[Scan])[source]

Concatenate each of the datasets together.

Parameters

scans – List of reflectometry scans.

Returns

Containing:
  • q-values.

  • Reflected intensities.

– Errors on reflected intensities.

Return type

tuple

islatu.stitching.rebin(q_vectors, reflected_intensity, new_q=None, rebin_as='linear', number_of_q_vectors=5000)[source]

Rebin the data on a linear or logarithmic q-scale.

Parameters
  • q_vectors – q - the current q vectors.

  • reflected_intensity (tuple) – (I, I_e) - The current reflected intensities, and their errors.

  • new_q (array_like) – Array of potential q-values. Defaults to None. If this argument is not specified, then the new q, R values are binned according to rebin_as and number_of_q_vectors.

  • rebin_as (py:attr:str) – String specifying how the data should be rebinned. Options are “linear” and “log”. This is only used if the new_q are unspecified.

  • number_of_q_vectors (int, optional) – The max number of q-vectors to be using initially in the rebinning of the data. Defaults to 400.

Returns

Containing:
  • q: rebinned q-values.

  • intensity: rebinned intensities.

  • intensity_e: rebinned intensity errors.

Return type

tuple