neutronpy.data.Data.estimate_background

Data.estimate_background(bg_params)[source]

Estimate the background according to type specified.

Parameters:
bg_params : dict
Input dictionary has keys ‘type’ and ‘value’. Types are
  • ‘constant’ : background is the constant given by ‘value’
  • ‘percent’ : background is estimated by the bottom x%, where x is value
  • ‘minimum’ : background is estimated as the detector counts
Returns:
background : float or ndarray

Value determined to be the background. Will return ndarray only if ‘type’ is ‘constant’ and ‘value’ is an ndarray