Package pulse
Class AbstractData
-
- All Implemented Interfaces:
Serializable,Descriptive
- Direct Known Subclasses:
ExperimentalData,HeatingCurve,NumericPulseData
public abstract class AbstractData extends PropertyHolder
A named collection of time and temperature values, with user-adjustable number of entries.The notion of temperature is loosely used here, and this can represent just the detector signal in mV. Unless explicitly specified otherwise, the unit of the temperature can be arbitrary, and only the shape of the heating curve matters when calculating the reverse solution of the heat problem.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description AbstractData()Creates anAbstractDatawith the default number of points (set in the corresponding XML file).protectedAbstractData(List<Double> time, String name)AbstractData(AbstractData d)Copy constructor.AbstractData(NumericProperty count)Creates aAbstractData, where the number of elements in thetimeandtemperaturecollections are set tocount.getValue().
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intactualNumPoints()The actual number of points, explicitly calculated as the size of the internal lists.voidaddPoint(double time, double sgn)Adds a time-signal pair to the lists.doubleapparentMaximum()Calculates the simple maximum signal.voidclear()Clears all elements from the threeListobjects, thus releasing memory.booleanequals(Object o)StringgetName()NumericPropertygetNumPoints()Getter method providing accessibility to thecount NumericProperty.List<Double>getSignalData()List<Double>getTimeSequence()booleanignoreSiblings()ShouldAccessibles that belong to thisPropertyHolderbe ignored when thisPropertyHolderis displayed in a table?protected voidincrementCount()booleanisFull()Set<NumericPropertyKeyword>listedKeywords()ListsNUM_POINTSas an accessible property of thisPropertyHolder.voidremove(int i)Removes a time-value pair that is present under the indexi.voidset(NumericPropertyKeyword type, NumericProperty property)Provides general setter accessibility for the number of points of thisAbstractData.voidsetName(String name)voidsetNumPoints(NumericProperty c)Sets the number of points for this baseline.voidsetSignalAt(int index, double t)Sets the signaltat the positionindexof thesignal List.voidsetTimeAt(int index, double t)Sets the timetat the positionindexof thetime List.doublesignalAt(int index)Retrieves the signal value corresponding to the indexindex.doubletimeAt(int index)Retrieves an element from thetime Listspecified byindexdoubletimeLimit()Retrieves the last element of thetime List.StringtoString()-
Methods inherited from class pulse.util.PropertyHolder
addListener, areDetailsHidden, data, describe, firePropertyChanged, getDescriptor, getListeners, getPrefix, 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.UpwardsNavigable
addHierarchyListener, getHierarchyListeners, getParent, identify, removeHierarchyListener, removeHierarchyListeners, setParent, specificAncestor, tellParent
-
-
-
-
Constructor Detail
-
AbstractData
public AbstractData(AbstractData d)
Copy constructor. Copies all data and assigns the same name tothis.- Parameters:
d- another instance of this class
-
AbstractData
public AbstractData()
Creates anAbstractDatawith the default number of points (set in the corresponding XML file).
-
AbstractData
public AbstractData(NumericProperty count)
Creates aAbstractData, where the number of elements in thetimeandtemperaturecollections are set tocount.getValue().- Parameters:
count- TheNumericPropertythat is derived from theNumericPropertyKeyword.NUMPOINTS.
-
-
Method Detail
-
actualNumPoints
public int actualNumPoints()
The actual number of points, explicitly calculated as the size of the internal lists.- Returns:
- an integer size equal to the real number of elements (pairs)
-
clear
public void clear()
Clears all elements from the threeListobjects, thus releasing memory.
-
getNumPoints
public final NumericProperty getNumPoints()
Getter method providing accessibility to thecount NumericProperty.- Returns:
- a
NumericPropertyderived fromNumericPropertyKeyword.NUMPOINTSwith the value ofcount
-
setNumPoints
public final void setNumPoints(NumericProperty c)
Sets the number of points for this baseline.The
Listdata objects, containing time, temperature, and baseline-subtracted temperature are filled with zeroes.- Parameters:
c-
-
timeAt
public double timeAt(int index)
Retrieves an element from thetime Listspecified byindex- Parameters:
index- the index of the element to be returned- Returns:
- a time value corresponding to
index
-
timeLimit
public double timeLimit()
Retrieves the last element of thetime List. This is used e.g. by theDifferenceSchemeto set the calculation limit for the finite-difference scheme.- Returns:
- a double, equal to the last element of the
time List. - See Also:
DifferenceScheme
-
signalAt
public double signalAt(int index)
Retrieves the signal value corresponding to the indexindex. Is overriden by subclasses.- Parameters:
index- the index of the element- Returns:
- a double, representing the signal at
index
-
addPoint
public void addPoint(double time, double sgn)Adds a time-signal pair to the lists.- Parameters:
time- the time valuesgn- the signal value attime
-
incrementCount
protected final void incrementCount()
-
setTimeAt
public final void setTimeAt(int index, double t)Sets the timetat the positionindexof thetime List.- Parameters:
index- the indext- the new time value at this index
-
setSignalAt
public final void setSignalAt(int index, double t)Sets the signaltat the positionindexof thesignal List.- Parameters:
index- the indext- the new signal value at this index
-
apparentMaximum
public final double apparentMaximum()
Calculates the simple maximum signal.- Returns:
- the maximum signal value
- See Also:
java.util.Collections.max
-
getName
public String getName()
-
setName
public void setName(String name)
-
set
public void set(NumericPropertyKeyword type, NumericProperty property)
Provides general setter accessibility for the number of points of thisAbstractData.- Specified by:
setin classAccessible- Parameters:
type- must be equal toNumericPropertyKeyword.NUMPOINTSproperty- the property of the typeNumericPropertyKeyword.NUMPOINTS
-
listedKeywords
public Set<NumericPropertyKeyword> listedKeywords()
ListsNUM_POINTSas an accessible property of thisPropertyHolder.- Overrides:
listedKeywordsin classPropertyHolder- Returns:
- a set of
NumericPropertyKeywordinstances, which have been explicitly marked as a listed parameter for thisPropertyHolder.
-
remove
public void remove(int i)
Removes a time-value pair that is present under the indexi.- Parameters:
i- the element to be removed
-
ignoreSiblings
public boolean ignoreSiblings()
Description copied from class:PropertyHolderShouldAccessibles that belong to thisPropertyHolderbe ignored when thisPropertyHolderis displayed in a table?- Overrides:
ignoreSiblingsin classPropertyHolder- Returns:
- true
- See Also:
PropertyHolderTable
-
isFull
public boolean isFull()
-
-