This module is for spectroscopy specific tools (spectrum fitting etc).
Parameters: | energy_list : iterable of ndarrays
counts_list : iterable of ndarrays
pk_find_fun : function or None
|
---|---|
Returns: | out_e : list of ndarray
out_c : list of ndarray
|
Finds and estimates the location, width, and height of the largest peak. Assumes the top of the peak can be approximated as a Gaussian. Finds the peak properties using least-squares fitting of a parabola to the log of the counts.
The region around the peak can be approximated by Y = Y0 * exp(- (X - X0)**2 / (2 * sigma **2))
Parameters: | x : ndarray
y : ndarary
window : int, optional
|
---|---|
Returns: | x0 : float
y0 : float
sigma : float
|
Integrate region(s) of input data.
If x_min and x_max are arrays/lists they must be equal in length. The values contained in the ‘x’ must be monotonic (up or down). The returned value is the sum of all the regions and a single scalar value is returned. Each region is computed independently, if regions overlap the overlapped area will be included multiple times in the final sum.
This function assumes that y is a function of x sampled at x.
Parameters: | x : array
y : array
x_min : float or array
x_max : float or array
|
---|---|
Returns: | float :
|
Integrate region(s) of histogram.
If x_min and x_max are arrays/lists they must be equal in length. The values contained in the ‘x_value_array’ must be monotonic (up or down). The returned value is the sum of all the regions and a single scalar value is returned. Each region is computed independently, if regions overlap the overlapped area will be included multiple times in the final sum.
bin_edges is an array of the left edges and the final right edges of the bins. counts is the value in each of those bins.
The bins who’s centers fall with in the integration limits are included in the sum.
Parameters: | bin_edges : array
counts : array
x_min : float or array
x_max : float or array
|
---|---|
Returns: | float :
|