the peaks can be of different type and a background function (polynom) can also be included. def multPeak1d ( x, * args ): """ function to calculate the sum of multiple peaks in 1D. Number ): if x = p ] = ( p + pvr * Lorentz1d ( lx ], p, p, p, 0 ) + ( 1 - pvr ) * Gauss1d ( lx ], p, sigmar, p, 0 )) return f 1 0 means pure Gauss and 1 means pure Lorentz Returns - array-like the value of the PseudoVoigt described by the parameters p at position `x` """ pvl = p if p 0.0 else 0.0 pvr = p if p 0.0 else 0.0 sigmal = p / ( 2 * numpy. def PseudoVoigt1dasym2 ( x, * p ): """ function to calculate an asymmetric pseudo Voigt function as linear combination of asymmetric Gauss and Lorentz peak Parameters - x : naddray coordinate(s) where the function should be evaluated p : list list of parameters of the pseudo Voigt-function ETA: 0. ![]() logical_or ( data + offset mean )) # ensure that only single value are corrected and neighboring are ignored for i in range ( 1, len ( mask ) - 1 ): if mask and mask and mask : mask = False mask = False dataout = mean return dataout logical_or ( data * threshold mean )) if offset : mask = numpy. zeros_like ( data, dtype = bool ) if threshold : mask = numpy. Returns - array-like 1d data-array with spikes removed """ dataout = data. offset : None or float offset value to identify outlier data points. ![]() warning:: Use this function carefully not to manipulate your data! Parameters - data : array-like 1d numpy array with experimental data threshold : float or None threshold factor to identify outlier data points. Such spikes will be replaced by the mean value of the next neighbors. , offset = None ): """ function to smooth **single** data points which differ from the average of the neighboring data points by more than the threshold factor or more than the offset value.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |