Class ExperimentalData
- java.lang.Object
-
- pulse.util.UpwardsNavigable
-
- pulse.util.Group
-
- pulse.util.Accessible
-
- pulse.util.PropertyHolder
-
- pulse.AbstractData
-
- pulse.input.ExperimentalData
-
- All Implemented Interfaces:
Serializable,DiscreteInput,Descriptive
public class ExperimentalData extends AbstractData implements DiscreteInput
An
ExperimentalDataobject is essentially aAbstractDatawith adjustable range and linkedMetadata. It is used to store experimental data points loaded with one of the availableCurveReaders. Any manipulation (e.g. truncation) of the data triggers an event associated with thisExperimentalData.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static doubleCUTOFF_FACTORThis is the cutoff factor which is used as a criterion for data truncation.-
Fields inherited from class pulse.AbstractData
signal, time
-
-
Constructor Summary
Constructors Constructor Description ExperimentalData()Constructs anExperimentalDataobject using the superclass constructor and creating a new list of data listeners.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDataListener(DataListener listener)voidaddPoint(double time, double signal)Addstimeandtemperatureto the respectiveLists.voidclearDataListener()booleanequals(Object o)voidfireDataChanged(DataEvent dataEvent)doublegetEffectiveEndTime()Gets the time sequence element corresponding to the upper bound of the index rangedoublegetEffectiveStartTime()Gets the time sequence element corresponding to the lower bound of the index rangeHalfTimeCalculatorgetHalfTimeCalculator()IndexRangegetIndexRange()Gets the index range of this data.MetadatagetMetadata()Retrieves theMetadataobject for thisExperimentalData.RangegetRange()Gets the dimensional timeRangeof this data.List<Double>getX()List<Double>getY()voidinitListeners()booleanisAcquisitionTimeSensible()Checks if the acquisition time used to collect thisExperimentalDatais sensible.voidpreprocess()voidresetRanges()Calls reset for both theIndexRangeandRangeobjects using the current time sequence.voidsetMetadata(Metadata metadata)Sets a newMetadataobject for thisExperimentalData.voidsetRange(Range range)Sets the range, assigningthisto its parent, and forcing changes to theindexRange.doubletimeLimit()Retrieves the time limit.StringtoString()voidtruncate()Truncates therangeandindexRangeof thisExperimentalDataabove a certain threshold, NOT removing any data elements.-
Methods inherited from class pulse.AbstractData
actualNumPoints, apparentMaximum, clear, getName, getNumPoints, getSignalData, getTimeSequence, ignoreSiblings, incrementCount, isFull, listedKeywords, remove, set, setName, setNumPoints, setSignalAt, setTimeAt, signalAt, timeAt
-
Methods inherited from class pulse.util.PropertyHolder
addListener, areDetailsHidden, data, describe, firePropertyChanged, getDescriptor, getListeners, getPrefix, 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
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface pulse.DiscreteInput
bounds
-
-
-
-
Field Detail
-
CUTOFF_FACTOR
public static final double CUTOFF_FACTOR
This is the cutoff factor which is used as a criterion for data truncation. Described in Lunev, A., & Heymer, R. (2020). Review of Scientific Instruments, 91(6), 064902.- See Also:
- Constant Field Values
-
-
Method Detail
-
initListeners
public void initListeners()
- Overrides:
initListenersin classPropertyHolder
-
addDataListener
public final void addDataListener(DataListener listener)
-
clearDataListener
public final void clearDataListener()
-
fireDataChanged
public final void fireDataChanged(DataEvent dataEvent)
-
resetRanges
public final void resetRanges()
Calls reset for both theIndexRangeandRangeobjects using the current time sequence.
-
toString
public String toString()
- Overrides:
toStringin classAbstractData
-
addPoint
public void addPoint(double time, double signal)Addstimeandtemperatureto the respectiveLists. Increments the counter of points. Note that no baseline correction is performed.- Overrides:
addPointin classAbstractData- Parameters:
time- the next time valuesignal- the next signal value
-
getMetadata
public Metadata getMetadata()
Retrieves theMetadataobject for thisExperimentalData.- Returns:
- the linked
Metadata
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classAbstractData- Returns:
trueonly ifois anAbstractDatacontaining all the elements of the time and signal lists ofthisobject.
-
isAcquisitionTimeSensible
public boolean isAcquisitionTimeSensible()
Checks if the acquisition time used to collect thisExperimentalDatais sensible.The acquisition time is essentially the last element in the
time List. By default, it is deemed sensible if that last element is less than 7.2*halfRiseTime.- Returns:
trueif the acquisition time is below the truncation threshold,falseotherwise.
-
truncate
public void truncate()
Truncates therangeandindexRangeof thisExperimentalDataabove a certain threshold, NOT removing any data elements.The threshold is calculated based on the
halfRiseTimevalue and is set by default to 7.2*halfRiseTime. ADataEventwill be created and passed to thedataListeners(if any) with theDataEventType.TRUNCATEDas argument.- See Also:
halfRiseTime,DataEvent,fireDataChanged(pulse.input.listeners.DataEvent)
-
setMetadata
public void setMetadata(Metadata metadata)
Sets a newMetadataobject for thisExperimentalData.The
pulseWidthproperty recorded inMetadatawill be used to set the time range for the reverse problem solution. Whenever this property is changed in themetadata, a listener will ensure an updated range is used.- Parameters:
metadata- the new Metadata object- See Also:
PropertyHolderListener
-
getEffectiveStartTime
public double getEffectiveStartTime()
Gets the time sequence element corresponding to the lower bound of the index range- Returns:
- the time (in seconds) associated with
indexRange.getLowerBound()
-
getEffectiveEndTime
public double getEffectiveEndTime()
Gets the time sequence element corresponding to the upper bound of the index range- Returns:
- the time (in seconds) associated with
indexRange.getUpperBound()
-
getRange
public Range getRange()
Gets the dimensional timeRangeof this data.- Returns:
- the range
-
getIndexRange
public IndexRange getIndexRange()
Gets the index range of this data.- Specified by:
getIndexRangein interfaceDiscreteInput- Returns:
- the index range
-
setRange
public void setRange(Range range)
Sets the range, assigningthisto its parent, and forcing changes to theindexRange.- Parameters:
range- the range
-
timeLimit
public double timeLimit()
Retrieves the time limit.- Overrides:
timeLimitin classAbstractData- Returns:
- a double, equal to the last element of the
time List. - See Also:
DifferenceScheme
-
getHalfTimeCalculator
public HalfTimeCalculator getHalfTimeCalculator()
-
preprocess
public void preprocess()
-
getX
public List<Double> getX()
- Specified by:
getXin interfaceDiscreteInput
-
getY
public List<Double> getY()
- Specified by:
getYin interfaceDiscreteInput
-
-