Skip to content

RectangularTimeSeries

RectangularTimeSeries

RectangularTimeSeries(tStart: float = 0.0, tEnd: float = 1.0, period: float = 1.0, factor: float = 1.0, shift: float = 0.0)

Bases: TimeSeries

Rectangular-wave load-factor time series.

This time series applies a load factor that switches between zero and factor over repeating intervals defined by tStart, tEnd, and period.

Tcl form

timeSeries Rectangular <tag> <tStart> <tEnd> <period> -shift <shift> -factor <factor>

Attributes:

Name Type Description
tStart

Start time when the wave first becomes active.

tEnd

End time when the wave last remains active.

period

Duration of one rectangular-wave cycle.

factor

Load-factor amplitude when the wave is active.

shift

Phase shift applied to the wave.

Example
from femora.core.model import Model

model = Model()
ts = model.time_series.rectangular(
    tStart=0.2,
    tEnd=1.2,
    period=0.5,
    factor=1.5,
)
pattern = model.pattern.plain(time_series=ts)
print(ts.tag)

Create a rectangular wave time series.

Parameters:

Name Type Description Default
tStart float

Start time when the wave first becomes active.

0.0
tEnd float

End time when the wave last remains active.

1.0
period float

Duration of one rectangular-wave cycle.

1.0
factor float

Load-factor amplitude when the wave is active.

1.0
shift float

Phase shift applied to the wave.

0.0

Raises:

Type Description
ValueError

If numeric arguments are invalid, if tStart is not less than tEnd, or if period is not positive.