diff options
author | Picca Frédéric-Emmanuel <picca@synchrotron-soleil.fr> | 2019-05-28 08:16:16 +0200 |
---|---|---|
committer | Picca Frédéric-Emmanuel <picca@synchrotron-soleil.fr> | 2019-05-28 08:16:16 +0200 |
commit | a763e5d1b3921b3194f3d4e94ab9de3fbe08bbdd (patch) | |
tree | 45d462ed36a5522e9f3b9fde6c4ec4918c2ae8e3 /silx/math/fit/filters.pyx | |
parent | cebdc9244c019224846cb8d2668080fe386a6adc (diff) |
New upstream version 0.10.1+dfsg
Diffstat (limited to 'silx/math/fit/filters.pyx')
-rw-r--r-- | silx/math/fit/filters.pyx | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/silx/math/fit/filters.pyx b/silx/math/fit/filters.pyx index 1a7aa3b..da1f6f5 100644 --- a/silx/math/fit/filters.pyx +++ b/silx/math/fit/filters.pyx @@ -1,6 +1,6 @@ # coding: utf-8 #/*########################################################################## -# Copyright (C) 2016-2017 European Synchrotron Radiation Facility +# Copyright (C) 2016-2018 European Synchrotron Radiation Facility # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -40,6 +40,19 @@ Smoothing functions: - :func:`smooth2d` - :func:`smooth3d` +References: +----------- + +.. [Morhac97] Miroslav Morháč et al. + Background elimination methods for multidimensional coincidence γ-ray spectra. + Nucl. Instruments and Methods in Physics Research A401 (1997) 113-132. + https://doi.org/10.1016/S0168-9002(97)01023-1 + +.. [Ryan88] C.G. Ryan et al. + SNIP, a statistics-sensitive background treatment for the quantitative analysis of PIXE spectra in geoscience applications. + Nucl. Instruments and Methods in Physics Research B34 (1988) 396-402*. + https://doi.org/10.1016/0168-583X(88)90063-8 + API documentation: ------------------- @@ -55,7 +68,7 @@ import numpy _logger = logging.getLogger(__name__) cimport cython -cimport filters_wrapper +cimport silx.math.fit.filters_wrapper as filters_wrapper def strip(data, w=1, niterations=1000, factor=1.0, anchors=None): @@ -127,13 +140,9 @@ def strip(data, w=1, niterations=1000, factor=1.0, anchors=None): def snip1d(data, snip_width): """Estimate the baseline (background) of a 1D data vector by clipping peaks. - Implementation of the algorithm SNIP in 1D is described in *Miroslav - Morhac et al. Nucl. Instruments and Methods in Physics Research A401 - (1997) 113-132*. - - The original idea for 1D and the low-statistics-digital-filter (lsdf) come - from *C.G. Ryan et al. Nucl. Instruments and Methods in Physics Research - B34 (1988) 396-402*. + Implementation of the algorithm SNIP in 1D is described in [Morhac97]_. + The original idea for 1D and the low-statistics-digital-filter (lsdf) comes + from [Ryan88]_. :param data: Data array, preferably 1D and of type *numpy.float64*. Else, the data array will be flattened and converted to @@ -171,9 +180,7 @@ def snip1d(data, snip_width): def snip2d(data, snip_width): """Estimate the baseline (background) of a 2D data signal by clipping peaks. - Implementation of the algorithm SNIP in 2D described in - *Miroslav Morhac et al. Nucl. Instruments and Methods in Physics Research - A401 (1997) 113-132.* + Implementation of the algorithm SNIP in 2D described in [Morhac97]_. :param data: 2D array :type data: numpy.ndarray @@ -216,9 +223,7 @@ def snip2d(data, snip_width): def snip3d(data, snip_width): """Estimate the baseline (background) of a 3D data signal by clipping peaks. - Implementation of the algorithm SNIP in 2D described in - *Miroslav Morhac et al. Nucl. Instruments and Methods in Physics Research - A401 (1997) 113-132.* + Implementation of the algorithm SNIP in 3D described in [Morhac97]_. :param data: 3D array :type data: numpy.ndarray |