Skip to main content

class RACurve

Methods: Attributes:

CrossFromAbove(threshold, result=None)

Returns the domain values where y crosses some threshold from above X’s where:
@param threshold: float : The threshold value in the image @param result: ‘left’, ‘right’ or ‘interp’ : Which result should be returned ‘left’ will return the x value on the left side of the interval ‘right’ will return the x value on the right side of the interval ‘interp’ will return the x value of the linear interpolation of the interval @note: If no result type is given an interpolation will be used @return: list(float or TimeStep) : A list of the domain values

CrossFromBellow(threshold, result=None)

Returns the domain values where y crosses some threshold from bellow X’s where:
@param threshold: float : The threshold value in the image @param result: ‘left’, ‘right’ or ‘interp’ : Which result should be returned ‘left’ will return the x value on the left side of the interval ‘right’ will return the x value on the right side of the interval ‘interp’ will return the x value of the linear interpolation of the interval @note: If no result type is given an interpolation will be used @return: list(float or TimeStep) : A list of the domain values

GetStatistics()

@return: IStatistics : An object will the curve statistics information. @note: Usage : #Minimum value statistics.min
#Maximum value statistics.max
#Sum of all the values statistics.sum
#Sum squared of all the values statistics.sum_squared
#Average of the values statistics.average
#Variance of the values statistics.variance
#Standard deviation of the values statistics.standard_deviation

GetTimeSet()

@return: ITimeSet : The time set domain

GetUnit()

@return: unicode : The unit of the curve image values (y)

GetX()

@return: list(float) or ITimeSet) : The list of values associated with the domain If a different unit is defined a conversion will take place

GetXUnit()

@return: unicode : The unit of the curve image values (y)

GetY()

@return: list(float or ITimeStep) : The list of values associated with the domain If a different unit is defined a conversion will take place

Interpolate(x_value)

Returns the piecewise linear interpolation with given value at discrete data-points. @param x_value: float, tuple or TimeStep : A float defining the elapsed time-step in days A tuple with the year, month, day and optionally the hour and minutes Or a TimeStep

Reset()

Reset all changes to its default values

SetFrequency(days, extend=None)

Change the domain frequency @param days: float : The frequency in days @param extend: bool, optional : If a last value should be included even if outisde the domain

SetUnit(unit)

Change the unit of the curve image values (y) @param unit: unicode : The unit to be set

SetXUnit(unit)

Change the unit of the curve image values (y) @param unit: unicode : The unit to be set

property curve_name

@return: unicode : The name of the element associated to this curve

property element_name

@return: unicode : The name of the element associated to this curve

property simulation_name

@return: unicode : The name of the element associated to this curve

property unit

@return: unicode : The unit of the curve image values (y)

property x

@return: list(float) or ITimeSet) : The list of values associated with the domain If a different unit is defined a conversion will take place

property x_unit

@return: unicode : The unit of the curve image values (y)

property y

@return: list(float or ITimeStep) : The list of values associated with the domain If a different unit is defined a conversion will take place