Poly Background Estimator¶
Description¶
This plugin uses peakutils to find peaks in spectra. This is then metadata.
Parameters
in_datasets:
visibility: datasets
dtype: "[list[],list[str]]"
description:
summary: A list of the dataset(s) to process.
verbose: A list of strings, where each string gives the name of a dataset that was either specified by a loader plugin or created as output to a previous plugin. The length of the list is the number of input datasets requested by the plugin. If there is only one dataset and the list is left empty it will default to that dataset.
default: "[]"
out_datasets:
visibility: datasets
dtype: "[list[],list[str]]"
description: Create a list of the dataset(s).
default: "['Peaks']"
n:
visibility: basic
dtype: int
description: max number of polys.
default: "2"
MaxIterations:
visibility: intermediate
dtype: int
description: max number of iterations.
default: "12"
weights:
visibility: intermediate
dtype: "[int, str, float, list]"
description: weightings to apply.
default: 1/data
pvalue:
visibility: intermediate
dtype: float
description: Ratio of variance between successive poly iterations.
default: "0.9"
Key
visibility: The visibility level of the parameter
dtype: The type of data
description: A short explanation of the parameter
default: The default value
options: A list of permitted values
dependency: The name of the parameter and value which this parameter depends upon
range: A guide for the range of the parameter
Citations
No citations
API
-
class
PolyBackgroundEstimator
[source] -
get_max_frames
()[source]
-
poly_background_estimator
(xdata, ydata, n=2, weights=None, maxIterations=12, pvalue=0.9, fixed=False)[source] Background estimator based on orthogonal polynomials
Input: xdata,ydata (numpy arrays of same length) pvalue : ratio of variance in poly to poly value at which to stop. 0.9 default
- Output:
background,polynomial weights, polynomials
S. Steenstrup J. Appl. Cryst. (1981). 14, 226–229 “A Simple Procedure for Fitting a Background to a Certain Class of Measured Spectra”
-
process_frames
(data)[source] This method is called after the plugin has been created by the pipeline framework and forms the main processing step
- Parameters
data (list(np.array)) – A list of numpy arrays for each input dataset.
-
setup
()[source] This method is first to be called after the plugin has been created. It determines input/output datasets and plugin specific dataset information such as the pattern (e.g. sinogram/projection).
-
-
division_zero
(x, y)[source]