toolbox_scs.routines.Reflectivity

Toolbox for SCS.

Various utilities function to quickly process data measured at the SCS instrument.

Copyright (2019-) SCS Team.

Module Contents

Functions

reflectivity(data[, Iokey, Irkey, delaykey, binWidth, ...])

Computes the reflectivity R = 100*(Ir/Io[pumped] / Ir/Io[unpumped] - 1)

toolbox_scs.routines.Reflectivity.reflectivity(data, Iokey='FastADC5peaks', Irkey='FastADC3peaks', delaykey='PP800_DelayLine', binWidth=0.05, positionToDelay=True, origin=None, invert=False, pumpedOnly=False, alternateTrains=False, pumpOnEven=True, Ioweights=False, plot=True, plotErrors=True, units='mm')[source]

Computes the reflectivity R = 100*(Ir/Io[pumped] / Ir/Io[unpumped] - 1) as a function of delay. Delay can be a motor position in mm or an optical delay in ps, with possibility to convert from position to delay. The default scheme is alternating pulses pumped/unpumped/… in each train, also possible are alternating trains and pumped only. If fitting is enabled, attempts a double exponential (default) or step function fit.

Parameters:
  • data (xarray Dataset) – Dataset containing the Io, Ir and delay data

  • Iokey (str) – Name of the Io variable

  • Irkey (str) – Name of the Ir variable

  • delaykey (str) – Name of the delay variable (motor position in mm or optical delay in ps)

  • binWidth (float) – width of bin in units of delay variable

  • positionToDelay (bool) – If True, adds a time axis converted from position axis according to origin and invert parameters. Ignored if origin is None.

  • origin (float) – Position of time overlap, shown as a vertical line. Used if positionToDelay is True to convert position to time axis.

  • invert (bool) – Used if positionToDelay is True to convert position to time axis.

  • pumpedOnly (bool) – Assumes that all trains and pulses are pumped. In this case, Delta R is defined as Ir/Io.

  • alternateTrains (bool) – If True, assumes that trains alternate between pumped and unpumped data.

  • pumpOnEven (bool) – Only used if alternateTrains=True. If True, even trains are pumped, if False, odd trains are pumped.

  • Ioweights (bool) – If True, computes the ratio of the means instead of the mean of the ratios Irkey/Iokey. Useful when dealing with large intensity variations.

  • plot (bool) – If True, plots the results.

  • plotErrors (bool) – If True, plots the 95% confidence interval.

  • Output

  • ------ – xarray Dataset containing the binned Delta R, standard deviation, standard error, counts and delays, and the fitting results if full is True.