Skip to content

TrigTimeSeries

TrigTimeSeries

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

Bases: TimeSeries

Sinusoidal load-factor time series for cyclic excitation.

This time series generates a sinusoidal load factor between tStart and tEnd. Use it for cyclic excitation where amplitude, period, and phase shift must be controlled explicitly.

Tcl form

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

Attributes:

Name Type Description
tStart

Start time of the sinusoidal series.

tEnd

End time of the sinusoidal series.

period

Period of the sinusoidal cycle.

factor

Scale factor for the sinusoidal amplitude.

shift

Phase shift applied to the sinusoidal cycle.

Example
from femora.core.model import Model

model = Model()
ts = model.time_series.trig(
    tStart=0.0,
    tEnd=10.0,
    period=2.0,
    factor=1.5,
    shift=0.25,
)
pattern = model.pattern.plain(time_series=ts)
print(ts.tag)

Create a trigonometric time series.

Parameters:

Name Type Description Default
tStart float

Start time of the sinusoidal series.

0.0
tEnd float

End time of the sinusoidal series.

1.0
period float

Period of the sinusoidal cycle.

1.0
factor float

Scale factor for the sinusoidal amplitude.

1.0
shift float

Phase shift applied to the sinusoidal cycle.

0.0

Raises:

Type Description
ValueError

If tStart is not less than tEnd or if period is not greater than 0.