summaryrefslogtreecommitdiff
path: root/silx/math/fit/filters.pyx
diff options
context:
space:
mode:
Diffstat (limited to 'silx/math/fit/filters.pyx')
-rw-r--r--silx/math/fit/filters.pyx35
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