Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Mantid::Kernel::FilteredTimeSeriesProperty< HeldType > Class Template Reference

Templated class that defines a filtered time series but still gives access to the original data. More...

#include <FilteredTimeSeriesProperty.h>

Inheritance diagram for Mantid::Kernel::FilteredTimeSeriesProperty< HeldType >:
Mantid::Kernel::TimeSeriesProperty< HeldType > Mantid::Kernel::Property Mantid::Kernel::ITimeSeriesProperty

Public Member Functions

void clearFilter () const
 Restores the property to the unsorted state.
 
FilteredTimeSeriesProperty< HeldType > * clone () const override
 "Virtual" copy constructor
 
std::vector< Types::Core::DateAndTime > filteredTimesAsVector () const override
 
std::vector< Types::Core::DateAndTime > filteredTimesAsVector (const Kernel::TimeROI *roi) const override
 Get filtered times as a vector.
 
 FilteredTimeSeriesProperty ()=delete
 Disable default constructor.
 
 FilteredTimeSeriesProperty (const FilteredTimeSeriesProperty &prop)
 
 FilteredTimeSeriesProperty (const std::string &name)
 Constructor.
 
 FilteredTimeSeriesProperty (const std::string &name, const std::vector< Types::Core::DateAndTime > &times, const std::vector< HeldType > &values)
 
 FilteredTimeSeriesProperty (std::unique_ptr< const TimeSeriesProperty< HeldType > > seriesProp, const TimeSeriesProperty< bool > &filterProp)
 Construct with a source time series to take ownership of & a filter property.
 
 FilteredTimeSeriesProperty (TimeSeriesProperty< HeldType > *seriesProp)
 
 FilteredTimeSeriesProperty (TimeSeriesProperty< HeldType > *seriesProp, const TimeSeriesProperty< bool > &filterProp)
 Construct with a source time series & a filter property.
 
std::vector< HeldType > filteredValuesAsVector () const override
 
std::vector< HeldType > filteredValuesAsVector (const Kernel::TimeROI *roi) const override
 Get filtered values as a vector.
 
void filterWith (const TimeROI &filter)
 Divide the property into allowed and disallowed time intervals according to a filter.
 
void filterWith (const TimeSeriesProperty< bool > *filter)
 Divide the property into allowed and disallowed time intervals according to a filter.
 
std::vector< Mantid::Kernel::TimeIntervalgetTimeIntervals () const override
 If filtering by log, get the time intervals for splitting.
 
const Kernel::TimeROIgetTimeROI () const
 
bool isFiltered () const override
 
TimeInterval nthInterval (int n) const override
 Returns n-th valid time interval, in a very inefficient way.
 
Types::Core::DateAndTime nthTime (int n) const override
 Returns n-th time. NOTE: Complexity is order(n)! regardless of filter.
 
HeldType nthValue (int n) const override
 Returns n-th value of n-th interval in an incredibly inefficient way.
 
bool operator== (const Property &right) const override
 Deep comparison.
 
bool operator== (const TimeSeriesProperty< HeldType > &right) const override
 
int size () const override
 Return the size of this property.
 
double timeAverageValue (const TimeROI *) const
 Returns the calculated time weighted average value.
 
double timeAverageValue (const TimeROI *timeRoi=nullptr) const override
 Returns the calculated time weighted average value.
 
const TimeSeriesProperty< HeldType > * unfiltered () const
 Access the unfiltered log.
 
 ~FilteredTimeSeriesProperty () override
 Destructor.
 
- Public Member Functions inherited from Mantid::Kernel::TimeSeriesProperty< HeldType >
void addValue (const std::string &time, const HeldType &value)
 Add a value to the map using a string time.
 
void addValue (const std::time_t &time, const HeldType &value)
 Add a value to the map using a time_t.
 
void addValue (const Types::Core::DateAndTime &time, const HeldType &value)
 Add a value to the map using a DateAndTime object.
 
void addValues (const std::vector< Types::Core::DateAndTime > &times, const std::vector< HeldType > &values)
 Adds vectors of values to the map.
 
void clear () override
 Deletes the series of values in the property.
 
void clearOutdated () override
 Deletes all but the 'last entry' in the property.
 
TimeSeriesProperty< HeldType > * clone () const override
 "Virtual" copy constructor
 
PropertycloneInTimeROI (const TimeROI &timeROI) const override
 Create a partial copy according to TimeROI.
 
PropertycloneWithTimeShift (const double timeShift) const override
 "Virtual" copy constructor with a time shift in seconds
 
void countSize () const
 Updates size()
 
void create (const std::vector< Types::Core::DateAndTime > &new_times, const std::vector< HeldType > &new_values)
 Clears and creates a TimeSeriesProperty from these parameters.
 
void create (const Types::Core::DateAndTime &start_time, const std::vector< double > &time_sec, const std::vector< HeldType > &new_values)
 Clears and creates a TimeSeriesProperty from these parameters.
 
double durationInSeconds (const Kernel::TimeROI *roi=nullptr) const
 Returns the duration of the time series, possibly restricted by a TimeROI object.
 
void eliminateDuplicates ()
 Detects whether there are duplicated entries (of time) in property & eliminates them.
 
void expandFilterToRange (std::vector< SplittingInterval > &, double, double, const TimeInterval &) const
 Function specialization for TimeSeriesProperty<std::string>
 
void expandFilterToRange (std::vector< SplittingInterval > &split, double min, double max, const TimeInterval &range) const override
 Make sure an existing filter covers the full time range given.
 
double extractStatistic (Math::StatisticType selection, const TimeROI *roi) const
 Function specialization for TimeSeriesProperty<std::string>
 
double extractStatistic (Math::StatisticType selection, const TimeROI *roi=nullptr) const override
 Calculate a particular statistical quantity from the values of the time series.
 
Types::Core::DateAndTime firstTime () const
 Returns the first time regardless of filter.
 
HeldType firstValue () const
 Returns the first value regardless of filter.
 
HeldType firstValue (const Kernel::TimeROI &roi) const
 Returns the first value in the TimeROI.
 
std::string getDefault () const override
 Returns the default value.
 
std::unique_ptr< TimeSeriesProperty< double > > getDerivative () const
 Return time series property, containing time derivative of current property.
 
std::unique_ptr< TimeSeriesProperty< double > > getDerivative () const
 time series derivative specialization for string type
 
size_t getMemorySize () const override
 Return the memory used by the property, in bytes.
 
HeldType getSingleValue (const Types::Core::DateAndTime &t) const
 Returns the value at a particular time.
 
HeldType getSingleValue (const Types::Core::DateAndTime &t, int &index) const
 Returns the value at a particular time.
 
TimeSeriesPropertyStatistics getStatistics (const Kernel::TimeROI *roi=nullptr) const override
 Return a TimeSeriesPropertyStatistics object.
 
TimeSeriesPropertyStatistics getStatistics (const TimeROI *) const
 Return a TimeSeriesPropertyStatistics object.
 
void histogramData (const Types::Core::DateAndTime &tMin, const Types::Core::DateAndTime &tMax, std::vector< double > &counts) const
 generate constant time-step histogram from the property values
 
void histogramData (const Types::Core::DateAndTime &tMin, const Types::Core::DateAndTime &tMax, std::vector< double > &counts) const
 
bool isDefault () const override
 Returns if the value is at the default.
 
bool isFiltered () const override
 
std::string isValid () const override
 This doesn't check anything -we assume these are always valid.
 
Types::Core::DateAndTime lastTime () const
 Returns the last time.
 
HeldType lastValue () const
 Returns the last value.
 
HeldType lastValue (const Kernel::TimeROI &roi) const
 Returns the last value in the TimeROI.
 
TimeROI makeFilterByValue (double min, double max, bool expand=false, const TimeInterval &expandRange=TimeInterval(0, 1), double TimeTolerance=0.0, bool centre=false, const TimeROI *existingROI=nullptr) const override
 Fill a SplittingIntervalVec that will filter the events by matching.
 
TimeROI makeFilterByValue (double, double, bool, const TimeInterval &, double, bool, const TimeROI *) const
 Function specialization for TimeSeriesProperty<std::string>
 
void makeFilterByValue (std::vector< SplittingInterval > &, double, double, double, bool) const
 Function specialization for TimeSeriesProperty<std::string>
 
void makeFilterByValue (std::vector< SplittingInterval > &split, double min, double max, double TimeTolerance=0.0, bool centre=false) const override
 Fill a SplittingIntervalVec that will filter the events by matching.
 
HeldType maxValue () const
 Returns the maximum value found in the series.
 
double mean () const
 Returns the mean value found in the series.
 
TimeSeriesProperty< HeldType > & merge (Property *rhs) override
 Merge the given property with this one.
 
HeldType minValue () const
 Returns the minimum value found in the series.
 
virtual bool operator!= (const Property &right) const
 Deep comparison (not equal).
 
virtual bool operator!= (const TimeSeriesProperty< HeldType > &right) const
 Deep comparison (not equal).
 
TimeSeriesPropertyoperator+= (Property const *right) override
 Add the value of another property.
 
virtual bool operator== (const TimeSeriesProperty< HeldType > &right) const
 Deep comparison.
 
int realSize () const override
 Returns the real size of the time series property map:
 
void removeDataOutsideTimeROI (const TimeROI &timeRoi) override
 Remove time values outside of TimeROI regions each defined as [roi_begin,roi_end].
 
void replaceValues (const std::vector< Types::Core::DateAndTime > &times, const std::vector< HeldType > &values)
 Replaces the time series with new values time series values.
 
void reserve (size_t size)
 Reserve memory for efficient adding values to existing property makes sense only when you have reasonably precise estimate of the total size you'll need easily available in advance.
 
void saveProperty (Nexus::File *file)
 Helper function to save a TimeSeriesProperty<>
 
void saveProperty (Nexus::File *file)
 Helper function to save a TimeSeriesProperty<bool> At the time of writing NeXus does not support boolean directly.
 
void saveProperty (Nexus::File *file) override
 
std::string setDataItem (const std::shared_ptr< DataItem > &) override
 Set a property from a DataItem.
 
void setName (const std::string &name)
 Set name of property.
 
std::string setValue (const std::string &) override
 Set a property from a string.
 
std::string setValueFromJson (const Json::Value &) override
 Set a property from a string.
 
int size () const override
 Returns the number of values at UNIQUE time intervals in the time series.
 
std::vector< std::string > time_tValue () const
 New method to return time series value pairs as std::vector<std::string>
 
double timeAverageValue (const TimeROI *) const
 Returns the calculated time weighted average value.
 
double timeAverageValue (const TimeROI *timeRoi=nullptr) const override
 Returns the calculated time weighted average value.
 
std::pair< double, double > timeAverageValueAndStdDev (const Kernel::TimeROI *) const
 Function specialization for timeAverageValueAndStdDev<std::string>
 
std::pair< double, double > timeAverageValueAndStdDev (const Kernel::TimeROI *timeRoi=nullptr) const override
 Returns the calculated time weighted mean and standard deviation values.
 
std::vector< Types::Core::DateAndTime > timesAsVector () const override
 Return the time series's times as a vector<DateAndTime>
 
std::vector< double > timesAsVectorSeconds () const
 Return the series as list of times, where the time is the number of seconds since the start.
 
std::vector< double > timesAsVectorSeconds (Types::Core::DateAndTime start) const
 Return the series as list of times, where the time is the number of seconds since the start.
 
 TimeSeriesProperty (const std::string &name)
 Constructor.
 
 TimeSeriesProperty (const std::string &name, const std::vector< Types::Core::DateAndTime > &times, const std::vector< HeldType > &values)
 Constructor.
 
std::string toString () const
 Stringize the property.
 
std::string value () const override
 Get the time series property as a string of 'time value'.
 
std::map< Types::Core::DateAndTime, HeldType > valueAsCorrectMap () const
 Return the time series as a correct C++ map<DateAndTime, TYPE>.
 
Json::Value valueAsJson () const override
 
std::map< Types::Core::DateAndTime, HeldType > valueAsMap () const
 Return the time series as a C++ map<DateAndTime, TYPE>
 
std::multimap< Types::Core::DateAndTime, HeldType > valueAsMultiMap () const
 Return the time series as a correct C++ multimap<DateAndTime, TYPE>.
 
std::vector< HeldType > valuesAsVector () const
 Return the time series's values (unfiltered) as a vector<TYPE>
 
 ~TimeSeriesProperty () override
 Virtual destructor.
 
- Public Member Functions inherited from Mantid::Kernel::Property
virtual std::vector< std::string > allowedValues () const
 Returns the set of valid values for this property, if such a set exists.
 
bool autoTrim () const
 Returns if the property is set to automatically trim string unput values of whitespace.
 
void clearSettings ()
 Deletes the PropertySettings object contained.
 
virtual const PropertyHistory createHistory () const
 Create a PropertyHistory object representing the current state of the Property.
 
void createTemporaryValue ()
 Create a temporary value for this property.
 
unsigned int direction () const
 returns the direction of the property
 
bool disableReplaceWSButton () const
 Returns if the property is set to disable the creation of the "Replace Workspace" button.
 
const std::string & documentation () const
 Get the property's documentation string.
 
const std::string & getGroup ()
 
IPropertySettingsgetSettings ()
 
const IPropertySettingsgetSettings () const
 
bool hasTemporaryValue () const
 Property is using a temporary value for this property.
 
bool isDynamicDefault () const
 Returns a flag indicating that the property's value has been set programmatically, for example, if the property has a default value which depends on the value of an upstream property.
 
virtual bool isMultipleSelectionAllowed ()
 Is Multiple Selection Allowed.
 
virtual bool isValueSerializable () const
 Whether the string returned by value() can be used for serialization.
 
const std::string & name () const
 Get the property's name.
 
bool remember () const
 Whether to save input values.
 
void setAutoTrim (const bool &setting)
 Sets if the property is set to automatically trim string unput values of whitespace.
 
void setDisableReplaceWSButton (const bool &disable)
 Sets the property to disable the creation of the "Replace Workspace" button.
 
void setDocumentation (const std::string &documentation)
 Sets the user level description of the property.
 
void setGroup (const std::string &group)
 Set the group this property belongs to.
 
void setIsDynamicDefault (const bool &flag)
 Set or clear the flag indicating whether or not the property's value has been set programmatically.
 
void setName (const std::string &name)
 Set the property's name.
 
void setRemember (bool)
 Set wheter to remeber this property input.
 
void setSettings (std::unique_ptr< IPropertySettings > settings)
 Set the PropertySettings object.
 
virtual void setUnits (const std::string &unit)
 Sets the units of the property, as a string.
 
const std::string type () const
 Returns the type of the property as a string.
 
const std::type_info * type_info () const
 Get the property type_info.
 
virtual const std::string & units () const
 Returns the units of the property, if any, as a string.
 
virtual std::string valueAsPrettyStr (const size_t maxLength=0, const bool collapseLists=true) const
 Returns the value of the property as a pretty printed string.
 
virtual ~Property ()
 Virtual destructor.
 
- Public Member Functions inherited from Mantid::Kernel::ITimeSeriesProperty
virtual ~ITimeSeriesProperty ()=default
 Virtual destructor.
 

Private Member Functions

void applyFilter () const
 Apply a filter.
 
void clearFilterCache () const
 Clear out the applied filter.
 
void countSize () const
 Updates size()
 
TimeROIintersectFilterWithOther (const TimeROI *other) const
 Combines the currently held filter with the supplied one as an intersection.
 
std::string setValueFromProperty (const Property &right) override
 Set a value from another property.
 

Private Attributes

std::unique_ptr< TimeROIm_filter
 The filter.
 
bool m_filterApplied
 True if a filter has been applied.
 
std::vector< TimeIntervalm_filterIntervals
 Cached values for the time intervals inside the filter.
 
std::vector< size_t > m_filterMap
 Maps the index supplied to nthValue and nthInterval to values in m_value.
 

Additional Inherited Members

- Static Public Member Functions inherited from Mantid::Kernel::TimeSeriesProperty< HeldType >
static bool isTimeString (const std::string &str)
 Check if str has the right time format.
 
- Protected Member Functions inherited from Mantid::Kernel::TimeSeriesProperty< HeldType >
int findIndex (Types::Core::DateAndTime t) const
 Find the index of the entry of time t in the mP vector (sorted)
 
Types::Core::DateAndTime getFakeEndTime () const
 Returns an end time that will have the same spacing to the right of the last value as the last non-zero time does to the left.
 
void saveTimeVector (Nexus::File *file)
 Saves the time vector has time + start attribute.
 
std::string setValueFromProperty (const Property &right) override
 Set a value from another property.
 
void sortIfNecessary () const
 Sort the property into increasing times, if not already sorted.
 
int upperBound (Types::Core::DateAndTime t, int istart, int iend) const
 Find the upper_bound of time t in container.
 
- Protected Member Functions inherited from Mantid::Kernel::Property
 Property (const Property &right)
 Copy constructor.
 
 Property (std::string name, const std::type_info &type, const unsigned int &direction=Direction::Input)
 Constructor.
 
- Protected Attributes inherited from Mantid::Kernel::TimeSeriesProperty< HeldType >
TimeSeriesSortStatus m_propSortedFlag
 Flag to state whether mP is sorted or not.
 
int m_size
 The number of values (or time intervals) in the time series.
 
std::vector< TimeValueUnit< HeldType > > m_values
 Holds the time series data.
 
- Protected Attributes inherited from Mantid::Kernel::Property
std::string m_name
 The name of the property.
 

Detailed Description

template<typename HeldType>
class Mantid::Kernel::FilteredTimeSeriesProperty< HeldType >

Templated class that defines a filtered time series but still gives access to the original data.

Definition at line 23 of file FilteredTimeSeriesProperty.h.

Constructor & Destructor Documentation

◆ FilteredTimeSeriesProperty() [1/7]

template<typename TYPE >
Mantid::Kernel::FilteredTimeSeriesProperty< TYPE >::FilteredTimeSeriesProperty ( const std::string &  name)
explicit

Constructor.

Parameters
name:: The name to assign to the property

Definition at line 30 of file FilteredTimeSeriesProperty.cpp.

◆ FilteredTimeSeriesProperty() [2/7]

template<typename HeldType >
Mantid::Kernel::FilteredTimeSeriesProperty< HeldType >::FilteredTimeSeriesProperty ( TimeSeriesProperty< HeldType > *  seriesProp,
const TimeSeriesProperty< bool > &  filterProp 
)

Construct with a source time series & a filter property.

Parameters
seriesProp:: A pointer to a property to filter.
filterProp:: A boolean series property to filter on

Definition at line 39 of file FilteredTimeSeriesProperty.cpp.

◆ FilteredTimeSeriesProperty() [3/7]

template<typename HeldType >
Mantid::Kernel::FilteredTimeSeriesProperty< HeldType >::FilteredTimeSeriesProperty ( const std::string &  name,
const std::vector< Types::Core::DateAndTime > &  times,
const std::vector< HeldType > &  values 
)

Definition at line 48 of file FilteredTimeSeriesProperty.cpp.

◆ FilteredTimeSeriesProperty() [4/7]

template<typename HeldType >
Mantid::Kernel::FilteredTimeSeriesProperty< HeldType >::FilteredTimeSeriesProperty ( TimeSeriesProperty< HeldType > *  seriesProp)

Definition at line 55 of file FilteredTimeSeriesProperty.cpp.

◆ FilteredTimeSeriesProperty() [5/7]

template<typename HeldType >
Mantid::Kernel::FilteredTimeSeriesProperty< HeldType >::FilteredTimeSeriesProperty ( std::unique_ptr< const TimeSeriesProperty< HeldType > >  seriesProp,
const TimeSeriesProperty< bool > &  filterProp 
)

Construct with a source time series to take ownership of & a filter property.

Construct with a source time series & a filter property.

Parameters
seriesProp:: A smart pointer to take ownership of pointer to a property to filter.
filterProp:: A boolean series property to filter on

Definition at line 66 of file FilteredTimeSeriesProperty.cpp.

◆ FilteredTimeSeriesProperty() [6/7]

template<typename HeldType >
Mantid::Kernel::FilteredTimeSeriesProperty< HeldType >::FilteredTimeSeriesProperty ( const FilteredTimeSeriesProperty< HeldType > &  prop)

Definition at line 82 of file FilteredTimeSeriesProperty.cpp.

◆ ~FilteredTimeSeriesProperty()

template<typename HeldType >
Mantid::Kernel::FilteredTimeSeriesProperty< HeldType >::~FilteredTimeSeriesProperty ( )
overridedefault

Destructor.

◆ FilteredTimeSeriesProperty() [7/7]

template<typename HeldType >
Mantid::Kernel::FilteredTimeSeriesProperty< HeldType >::FilteredTimeSeriesProperty ( )
delete

Disable default constructor.

Member Function Documentation

◆ applyFilter()

template<typename TYPE >
void Mantid::Kernel::FilteredTimeSeriesProperty< TYPE >::applyFilter ( ) const
private

Apply a filter.

Definition at line 308 of file FilteredTimeSeriesProperty.cpp.

◆ clearFilter()

template<typename TYPE >
void Mantid::Kernel::FilteredTimeSeriesProperty< TYPE >::clearFilter ( ) const

Restores the property to the unsorted state.

Restores the property to the unsorted & unfiltered state.

Definition at line 270 of file FilteredTimeSeriesProperty.cpp.

◆ clearFilterCache()

template<typename TYPE >
void Mantid::Kernel::FilteredTimeSeriesProperty< TYPE >::clearFilterCache ( ) const
private

Clear out the applied filter.

Definition at line 275 of file FilteredTimeSeriesProperty.cpp.

◆ clone()

template<typename HeldType >
FilteredTimeSeriesProperty< HeldType > * Mantid::Kernel::FilteredTimeSeriesProperty< HeldType >::clone ( ) const
overridevirtual

"Virtual" copy constructor

Implements Mantid::Kernel::Property.

Definition at line 77 of file FilteredTimeSeriesProperty.cpp.

◆ countSize()

template<typename TYPE >
void Mantid::Kernel::FilteredTimeSeriesProperty< TYPE >::countSize ( ) const
private

Updates size()

Definition at line 284 of file FilteredTimeSeriesProperty.cpp.

References m_size.

◆ filteredTimesAsVector() [1/2]

template<typename TYPE >
std::vector< DateAndTime > Mantid::Kernel::FilteredTimeSeriesProperty< TYPE >::filteredTimesAsVector ( ) const
overridevirtual

◆ filteredTimesAsVector() [2/2]

template<typename TYPE >
std::vector< DateAndTime > Mantid::Kernel::FilteredTimeSeriesProperty< TYPE >::filteredTimesAsVector ( const Kernel::TimeROI roi) const
overridevirtual

Get filtered times as a vector.

Return the time series's filtered times as a vector<DateAndTime>

Returns
A vector of DateAndTime objects

Reimplemented from Mantid::Kernel::TimeSeriesProperty< HeldType >.

Definition at line 120 of file FilteredTimeSeriesProperty.cpp.

References Mantid::Kernel::TimeSeriesProperty< TYPE >::filteredTimesAsVector().

◆ filteredValuesAsVector() [1/2]

template<typename TYPE >
std::vector< TYPE > Mantid::Kernel::FilteredTimeSeriesProperty< TYPE >::filteredValuesAsVector ( ) const
overridevirtual

◆ filteredValuesAsVector() [2/2]

template<typename TYPE >
std::vector< TYPE > Mantid::Kernel::FilteredTimeSeriesProperty< TYPE >::filteredValuesAsVector ( const Kernel::TimeROI roi) const
overridevirtual

Get filtered values as a vector.

Get a vector of values taking the filter into account.

Values will be excluded if their times lie in a region where the filter is false.

Returns
:: Vector of included values only

Reimplemented from Mantid::Kernel::TimeSeriesProperty< HeldType >.

Definition at line 99 of file FilteredTimeSeriesProperty.cpp.

◆ filterWith() [1/2]

template<typename TYPE >
void Mantid::Kernel::FilteredTimeSeriesProperty< TYPE >::filterWith ( const TimeROI filter)

Divide the property into allowed and disallowed time intervals according to a filter.

Definition at line 250 of file FilteredTimeSeriesProperty.cpp.

References Mantid::Kernel::TimeROI::useAll().

◆ filterWith() [2/2]

template<typename TYPE >
void Mantid::Kernel::FilteredTimeSeriesProperty< TYPE >::filterWith ( const TimeSeriesProperty< bool > *  filter)

◆ getTimeIntervals()

template<typename TYPE >
std::vector< TimeInterval > Mantid::Kernel::FilteredTimeSeriesProperty< TYPE >::getTimeIntervals ( ) const
overridevirtual

If filtering by log, get the time intervals for splitting.

Get a list of the splitting intervals, if filtering is enabled.

Otherwise the interval is just first time - last time.

Returns
:: Vector of splitting intervals

Reimplemented from Mantid::Kernel::TimeSeriesProperty< HeldType >.

Definition at line 427 of file FilteredTimeSeriesProperty.cpp.

References Mantid::Kernel::TimeSeriesProperty< TYPE >::getTimeIntervals().

◆ getTimeROI()

template<typename TYPE >
const Kernel::TimeROI & Mantid::Kernel::FilteredTimeSeriesProperty< TYPE >::getTimeROI ( ) const

Definition at line 418 of file FilteredTimeSeriesProperty.cpp.

◆ intersectFilterWithOther()

template<typename TYPE >
Kernel::TimeROI * Mantid::Kernel::FilteredTimeSeriesProperty< TYPE >::intersectFilterWithOther ( const TimeROI other) const
private

Combines the currently held filter with the supplied one as an intersection.

This assumes caller is responsible for memory.

Definition at line 411 of file FilteredTimeSeriesProperty.cpp.

References Mantid::Kernel::TimeROI::update_or_replace_intersection().

◆ isFiltered()

template<typename HeldType >
bool Mantid::Kernel::FilteredTimeSeriesProperty< HeldType >::isFiltered ( ) const
inlineoverridevirtual

Implements Mantid::Kernel::ITimeSeriesProperty.

Definition at line 73 of file FilteredTimeSeriesProperty.h.

◆ nthInterval()

template<typename TYPE >
TimeInterval Mantid::Kernel::FilteredTimeSeriesProperty< TYPE >::nthInterval ( int  n) const
overridevirtual

Returns n-th valid time interval, in a very inefficient way.

Here are some special cases (1) If empty property, throw runtime_error (2) If double or more entries, skip! (3) If n = size of property, use dt from last interval (4) If n > size of property, return Interval = 0

Parameters
n:: index
Returns
n-th time interval

Reimplemented from Mantid::Kernel::TimeSeriesProperty< HeldType >.

Definition at line 142 of file FilteredTimeSeriesProperty.cpp.

References Mantid::Kernel::Logger::debug(), error, Mantid::Kernel::DateAndTimeHelpers::g_log, n, name, Mantid::Kernel::TimeSeriesProperty< TYPE >::nthInterval(), and std::to_string().

◆ nthTime()

template<typename TYPE >
Types::Core::DateAndTime Mantid::Kernel::FilteredTimeSeriesProperty< TYPE >::nthTime ( int  n) const
overridevirtual

Returns n-th time. NOTE: Complexity is order(n)! regardless of filter.

Returns n-th time, or the last time if fewer than n entries.

Special cases: There is no special cases

Parameters
n:: index
Returns
DateAndTime

Reimplemented from Mantid::Kernel::TimeSeriesProperty< HeldType >.

Definition at line 170 of file FilteredTimeSeriesProperty.cpp.

References n.

◆ nthValue()

template<typename TYPE >
TYPE Mantid::Kernel::FilteredTimeSeriesProperty< TYPE >::nthValue ( int  n) const
overridevirtual

Returns n-th value of n-th interval in an incredibly inefficient way.

The algorithm is migrated from mthInterval()

Parameters
n:: index
Returns
Value

Reimplemented from Mantid::Kernel::TimeSeriesProperty< HeldType >.

Definition at line 181 of file FilteredTimeSeriesProperty.cpp.

References Mantid::Kernel::Logger::debug(), error, Mantid::Kernel::DateAndTimeHelpers::g_log, n, name, Mantid::Kernel::TimeSeriesProperty< TYPE >::nthValue(), and value.

◆ operator==() [1/2]

template<typename HeldType >
bool Mantid::Kernel::FilteredTimeSeriesProperty< HeldType >::operator== ( const Property right) const
overridevirtual

Deep comparison.

Parameters
rightThe other property to compare to.
Returns
true if the are equal.

Reimplemented from Mantid::Kernel::TimeSeriesProperty< HeldType >.

Definition at line 478 of file FilteredTimeSeriesProperty.cpp.

References Mantid::Kernel::operator==(), and right.

◆ operator==() [2/2]

template<typename HeldType >
bool Mantid::Kernel::FilteredTimeSeriesProperty< HeldType >::operator== ( const TimeSeriesProperty< HeldType > &  right) const
override

◆ setValueFromProperty()

template<typename TYPE >
std::string Mantid::Kernel::FilteredTimeSeriesProperty< TYPE >::setValueFromProperty ( const Property right)
overrideprivatevirtual

Set a value from another property.

Set the value of the property via a reference to another property.

If the value is unacceptable the value is not changed but a string is returned. The value is only accepted if the other property has the same type as this

Parameters
right:: A reference to a property.

Implements Mantid::Kernel::Property.

Definition at line 392 of file FilteredTimeSeriesProperty.cpp.

References m_size, Mantid::Kernel::TimeSeriesProperty< TYPE >::m_values, and right.

◆ size()

template<typename TYPE >
int Mantid::Kernel::FilteredTimeSeriesProperty< TYPE >::size ( ) const
overridevirtual

Return the size of this property.

Single-Value properties return 1. TimeSeriesProperties return the # of entries.

Returns
the size of the property

Reimplemented from Mantid::Kernel::Property.

Definition at line 295 of file FilteredTimeSeriesProperty.cpp.

References m_size.

◆ timeAverageValue() [1/2]

double Mantid::Kernel::FilteredTimeSeriesProperty< std::string >::timeAverageValue ( const TimeROI timeRoi) const
virtual

Returns the calculated time weighted average value.

Parameters
timeRoiObject that holds information about when the time measurement was active.
Returns
The time-weighted average value of the log when the time measurement was active.

Implements Mantid::Kernel::ITimeSeriesProperty.

Definition at line 450 of file FilteredTimeSeriesProperty.cpp.

◆ timeAverageValue() [2/2]

template<typename HeldType >
double Mantid::Kernel::FilteredTimeSeriesProperty< HeldType >::timeAverageValue ( const TimeROI timeRoi = nullptr) const
overridevirtual

Returns the calculated time weighted average value.

Parameters
timeRoiObject that holds information about when the time measurement was active.
Returns
The time-weighted average value of the log when the time measurement was active.

Implements Mantid::Kernel::ITimeSeriesProperty.

Definition at line 441 of file FilteredTimeSeriesProperty.cpp.

References Mantid::Kernel::TimeSeriesProperty< TYPE >::firstValue(), and Mantid::Kernel::TimeSeriesProperty< TYPE >::timeAverageValue().

◆ unfiltered()

template<typename TYPE >
const TimeSeriesProperty< TYPE > * Mantid::Kernel::FilteredTimeSeriesProperty< TYPE >::unfiltered ( ) const

Access the unfiltered log.

Definition at line 262 of file FilteredTimeSeriesProperty.cpp.

References name.

Member Data Documentation

◆ m_filter

template<typename HeldType >
std::unique_ptr<TimeROI> Mantid::Kernel::FilteredTimeSeriesProperty< HeldType >::m_filter
mutableprivate

◆ m_filterApplied

template<typename HeldType >
bool Mantid::Kernel::FilteredTimeSeriesProperty< HeldType >::m_filterApplied
mutableprivate

True if a filter has been applied.

Definition at line 109 of file FilteredTimeSeriesProperty.h.

◆ m_filterIntervals

template<typename HeldType >
std::vector<TimeInterval> Mantid::Kernel::FilteredTimeSeriesProperty< HeldType >::m_filterIntervals
mutableprivate

Cached values for the time intervals inside the filter.

Definition at line 107 of file FilteredTimeSeriesProperty.h.

◆ m_filterMap

template<typename HeldType >
std::vector<size_t> Mantid::Kernel::FilteredTimeSeriesProperty< HeldType >::m_filterMap
mutableprivate

Maps the index supplied to nthValue and nthInterval to values in m_value.

Definition at line 105 of file FilteredTimeSeriesProperty.h.


The documentation for this class was generated from the following files: