Skip to content

PathTimeSeries

PathTimeSeries

PathTimeSeries(dt: Optional[float] = None, values: Optional[Union[str, Sequence[float]]] = None, filePath: Optional[str] = None, factor: float = 1.0, useLast: bool = False, prependZero: bool = False, startTime: float = 0.0, time: Optional[Union[str, Sequence[float]]] = None, fileTime: Optional[str] = None)

Bases: TimeSeries

Path-based time series for recorded or tabulated histories.

This time series represents user-defined path data for dynamic loading or ground-motion records. Values may be supplied inline or from a file, and time may be defined through a constant dt, inline time values, or a time file.

Tcl form

timeSeries Path <tag> <-dt dt | -time {...} | -fileTime file> <-values {...} | -filePath file> [options...]

Note
  • PathTimeSeries is the usual input for acceleration histories passed to model.ground_motion.plain(...) or uniform excitation patterns.
  • Exactly one value source and exactly one time source must be provided.
Example
from femora.core.model import Model

model = Model()
accel = model.time_series.path(
    dt=0.01,
    values=[0.0, 0.1, -0.05, 0.0],
    factor=1.0,
)
gm = model.ground_motion.plain(accel=accel)
print(accel.tag, gm.tag)

Create a path time series.

Parameters:

Name Type Description Default
dt Optional[float]

Constant time step. Mutually exclusive with time and fileTime.

None
values Optional[Union[str, Sequence[float]]]

Inline path values as a sequence or comma-separated string. Mutually exclusive with filePath.

None
filePath Optional[str]

File containing path values. Mutually exclusive with values.

None
factor float

Scale factor applied to values.

1.0
useLast bool

Whether OpenSees should hold the final value after the path ends.

False
prependZero bool

Whether OpenSees should prepend a zero value.

False
startTime float

Start time offset.

0.0
time Optional[Union[str, Sequence[float]]]

Inline time values. Mutually exclusive with dt and fileTime.

None
fileTime Optional[str]

File containing time values. Mutually exclusive with dt and time.

None

Raises:

Type Description
ValueError

If exactly one value source and exactly one time source are not provided, or if supplied values are invalid.