@ALDDerivedClass @ALDAOperator(genericExecutionMode=ALL, level=APPLICATION) public class SmoothData1D extends ALDOperator
ExperimentalData1D
.Modifier and Type | Class and Description |
---|---|
static class |
SmoothData1D.SmoothingMethod |
ALDOperator.HidingMode, ALDOperator.HistoryConstructionMode
Modifier and Type | Field and Description |
---|---|
protected ExperimentalData1D |
experiment
1D Experiment
|
(package private) Float |
sigma
Standard deviation of Gaussian
|
protected ExperimentalData1D |
smoothedExperiment
Smoothed 1D Experiment
|
(package private) SmoothData1D.SmoothingMethod |
smoothingMethod
Smoothing method
|
(package private) Integer |
width
Window width
|
completeDAG, name, operatorExecutionEventlistenerList, portHashAccess, verbose, versionProvider
Constructor and Description |
---|
SmoothData1D()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
private Double[] |
convolve(Double[] data,
Double[] kernel)
Convolve
data with the kernel . |
ExperimentalData1D |
getExperiment() |
Float |
getSigma() |
ExperimentalData1D |
getSmoothedExperiment() |
SmoothData1D.SmoothingMethod |
getSmoothingMethod() |
Integer |
getWidth() |
private Double[] |
median(Double[] data,
Integer width)
Compute the median of
data within a window of width width . |
protected void |
operate()
This method does the actual work and needs to be implemented by every
subclass.
|
void |
setExperiment(ExperimentalData1D experiment) |
void |
setSigma(Float sigma) |
void |
setSmoothingMethod(SmoothData1D.SmoothingMethod smoothingMethod) |
void |
setWidth(Integer width) |
private Double[] |
smoothByConvolution()
Smooth the data by convolution, either with a gaussian or a mean filter
|
private void |
smoothingMethodChanged()
Callback routine to change parameters on change of smoothing method.
|
addOperatorExecutionProgressEventListener, addParameter, addParameter, addParameterUnconditioned, fieldContained, fireOperatorExecutionProgressEvent, getALDPortHashAccessKey, getConstructionMode, getDocumentation, getHidingMode, getInactiveParameterNames, getInInoutNames, getInInoutNames, getInNames, getInOutNames, getMissingRequiredInputs, getName, getNumParameters, getOutInoutNames, getOutNames, getParameter, getParameterDescriptor, getParameterDescriptorUnconditioned, getParameterNames, getParameterUnconditioned, getSupplementalNames, getVerbose, getVersion, handleOperatorExecutionProgressEvent, hasInOutParameters, hasParameter, isAnnotatedParameter, isConfigured, print, print, print, printInterface, printInterface, readHistory, readResolve, reinitializeParameterDescriptors, removeOperatorExecutionProgressEventListener, removeParameter, runOp, runOp, runOp, setConstructionMode, setConstructionMode, setConstructionMode, setHidingMode, setName, setParameter, setParameterUnconditioned, setVerbose, toStringVerbose, unconfiguredItems, validate, validateCustom, validateGeneric, writeHistory, writeHistory, writeHistory
@Parameter(label="1D Experiment", required=true, direction=IN, description="1D Experiment", dataIOOrder=1) protected ExperimentalData1D experiment
@Parameter(label="Smoothing method", required=true, direction=IN, callback="smoothingMethodChanged", description="Smoothing method", paramModificationMode=MODIFIES_INTERFACE, dataIOOrder=2) SmoothData1D.SmoothingMethod smoothingMethod
@Parameter(label="Window width", required=true, direction=IN, description="Window width (should be uneven)", dataIOOrder=3) Integer width
@Parameter(label="Standdard deviation of Gaussian", required=true, direction=IN, description="Standdard deviation of Gaussian", dataIOOrder=3) Float sigma
@Parameter(label="Smothed 1D Experiment", direction=OUT, description="Smothed1D Experiment", dataIOOrder=1) protected ExperimentalData1D smoothedExperiment
public SmoothData1D() throws ALDOperatorException
ALDOperatorException
protected void operate()
ALDOperator
operate
in class ALDOperator
private Double[] median(Double[] data, Integer width)
data
within a window of width width
. Values outside the range
of data
are ignored.
Ties and windows with even width are handled simplistic.
data
- width
- private Double[] smoothByConvolution()
private Double[] convolve(Double[] data, Double[] kernel)
data
with the kernel
. Values outside the range
of data
are ignored.data
- kernel
- private void smoothingMethodChanged() throws ALDOperatorException
ALDOperatorException
public ExperimentalData1D getExperiment()
public void setExperiment(ExperimentalData1D experiment)
experiment
- the experiment to setpublic SmoothData1D.SmoothingMethod getSmoothingMethod()
public void setSmoothingMethod(SmoothData1D.SmoothingMethod smoothingMethod)
smoothingMethod
- the smoothingMethod to setpublic Integer getWidth()
public void setWidth(Integer width)
width
- the width to setpublic Float getSigma()
public void setSigma(Float sigma)
sigma
- the sigma to setpublic ExperimentalData1D getSmoothedExperiment()
Copyright © 2010–2021 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.