for key,value in [('cut side', 'positive'),
('stable', 0.005),
('max cut', 0.2),
- ('min deviation', 5.0),
+ ('min deviations', 5.0),
('min points', 1),
('see double', 10e-9),
]:
for key,value in [('cut side', 'both'),
('stable', 0.005),
('max cut', 0.2),
- ('min deviation', 9.0),
+ ('min deviations', 9.0),
('min points', 4),
('see double', 10e-9),
]:
if value == None: # Use configured default value.
params[key] = self.plugin.config[key]
# TODO: better option parser to do this automatically by Argument.type
- for key in ['max cut', 'min deviation', 'min points', 'see double', 'stable']:
+ for key in ['max cut', 'min deviations', 'min points', 'see double', 'stable']:
params[key] = float(params[key])
# TODO: convert 'see double' from nm to points
return z_data,d_data,params
if mean == None:
mean = data.mean()
if std == None:
- std == data.std()
+ std = data.std()
if side == 'negative':
data = -data
mean = -mean
Select the side of the curve that counts as "above". `positive`,
`negative`, or `both`.
""".strip()),
- Argument('min deviation', type='float', default=5.0, help="""
+ Argument('min deviations', type='float', default=5.0, help="""
Number of standard deviations above the noise to define a peak.
Increase to tighten the filter.
""".strip()),
The input parameters may be any accepted by the above functions.
"""
mask,mean,std,converged = noise(data, **_kwargs(kwargs, noise_arguments))
- mask = above_noise(data, **_kwargs(kwargs, above_noise_arguments))
+ mask = above_noise(data, mean=mean, std=std,
+ **_kwargs(kwargs, above_noise_arguments))
peaks = mask_to_peaks(data, mask)
peaks = merge_double_peaks(
data, peaks, **_kwargs(kwargs, merge_double_peaks_arguments))