Package pulse.baseline
Class SinusoidalBaseline
-
- All Implemented Interfaces:
Serializable,Optimisable,Descriptive,Reflexive
public class SinusoidalBaseline extends LinearBaseline
A multiple-harmonic baseline. Replaces the Sinusoidal baseline in previous version.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class pulse.baseline.Baseline
MIN_BASELINE_POINTS
-
-
Constructor Summary
Constructors Constructor Description SinusoidalBaseline()Creates a sinusoidal baseline with default properties.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidassign(ParameterVector output)Assigns parameter values of thisProblemusing the optimisation vectorparams.Baselinecopy()voidfitTo(DiscreteInput input)CallsfitTousing the default time range for the data:-Infinity < t < ZERO_LEFT, where the upper bound is a small negative constant.List<Harmonic>getHarmonics()NumericPropertygetHiFreqMax()NumericPropertygetLowFreqMax()Set<NumericPropertyKeyword>listedKeywords()Lists theinterceptas accessible property for thisFlatBaseline.voidoptimisationVector(ParameterVector output)Calculates the vector argument defined on to the scalar objective function for thisOptimisable.voidset(NumericPropertyKeyword type, NumericProperty property)An abstract method, which must be overriden to gain access over setting the values of all relevant (selected by the programmer)NumericProperties in subclasses ofAccessible.voidsetHiFreqMax(NumericProperty maxHarmonics)voidsetLowFreqMax(NumericProperty maxHarmonics)List<Group>subgroups()Tries to access getter methods to retrieve allAccessibleinstances belonging to this object.StringtoString()doublevalueAt(double x)Calculates the linear functiong(x) = intercept + slope*time-
Methods inherited from class pulse.baseline.LinearBaseline
doFit
-
Methods inherited from class pulse.baseline.AdjustableBaseline
getIntercept, getSlope, mean, setIntercept, setSlope
-
Methods inherited from class pulse.baseline.Baseline
fitTo, getDescriptor
-
Methods inherited from class pulse.util.PropertyHolder
addListener, areDetailsHidden, data, describe, firePropertyChanged, getListeners, getPrefix, ignoreSiblings, initListeners, isListedNumericType, isListedParameter, listedTypes, numericData, parameterListChanged, removeListeners, setPrefix, updateProperties, updateProperty
-
Methods inherited from class pulse.util.Accessible
accessibleChildren, genericProperties, genericProperty, numericProperties, numericProperty, property, update, update
-
Methods inherited from class pulse.util.Group
access, children, contents, getSimpleName
-
Methods inherited from class pulse.util.UpwardsNavigable
addHierarchyListener, getHierarchyListeners, getParent, identify, removeHierarchyListener, removeHierarchyListeners, setParent, specificAncestor, tellParent
-
-
-
-
Method Detail
-
valueAt
public double valueAt(double x)
Description copied from class:AdjustableBaselineCalculates the linear functiong(x) = intercept + slope*time- Overrides:
valueAtin classAdjustableBaseline- Parameters:
x- the argument of the linear function- Returns:
- the result of this simple calculation
-
copy
public Baseline copy()
- Overrides:
copyin classLinearBaseline
-
optimisationVector
public void optimisationVector(ParameterVector output)
Description copied from interface:OptimisableCalculates the vector argument defined on to the scalar objective function for thisOptimisable.- Specified by:
optimisationVectorin interfaceOptimisable- Overrides:
optimisationVectorin classLinearBaseline- Parameters:
output- the output vector where the result will be stored
-
assign
public void assign(ParameterVector output)
Description copied from class:LinearBaselineAssigns parameter values of thisProblemusing the optimisation vectorparams. Only those parameters will be updated, the types of which are listed as indices in theparamsvector.- Specified by:
assignin interfaceOptimisable- Overrides:
assignin classLinearBaseline- Parameters:
output- the optimisation vector, containing a similar set of parameters to thisProblem- See Also:
PropertyHolder.listedTypes()
-
listedKeywords
public Set<NumericPropertyKeyword> listedKeywords()
Description copied from class:AdjustableBaselineLists theinterceptas accessible property for thisFlatBaseline.- Overrides:
listedKeywordsin classLinearBaseline- Returns:
- a set containing
BASELINE_INTERCEPTandBASELINE_SLOPEkeywords - See Also:
PropertyHolder
-
subgroups
public List<Group> subgroups()
Description copied from class:GroupTries to access getter methods to retrieve all
Accessibleinstances belonging to this object. Ignores any methods that return instances of the same class asthisone.
-
getHiFreqMax
public NumericProperty getHiFreqMax()
-
setHiFreqMax
public void setHiFreqMax(NumericProperty maxHarmonics)
-
getLowFreqMax
public NumericProperty getLowFreqMax()
-
setLowFreqMax
public void setLowFreqMax(NumericProperty maxHarmonics)
-
set
public void set(NumericPropertyKeyword type, NumericProperty property)
Description copied from class:AccessibleAn abstract method, which must be overriden to gain access over setting the values of all relevant (selected by the programmer)
NumericProperties in subclasses ofAccessible. Typically this involves aswitchstatement that goes through the different options for thetypeand invokes differentset(...)methods to update the matchingNumericPropertywithproperty.- Overrides:
setin classLinearBaseline- Parameters:
type- the type, which must be equal by definition toproperty.getType().property- the property, which contains new information.
-
fitTo
public void fitTo(DiscreteInput input)
Description copied from class:BaselineCallsfitTousing the default time range for the data:-Infinity < t < ZERO_LEFT, where the upper bound is a small negative constant.
-
toString
public String toString()
- Overrides:
toStringin classLinearBaseline
-
-