GroundMotion
GroundMotion(self, accel, dt, name='None')Ground Motion Record.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| accel | np.ndarray or list | Ground motion acceleration record in g. | required |
| dt | float | Time step of the record (s). | required |
| name | str | Name of the record (default is ‘None’). | 'None' |
Attributes
| Name | Type | Description |
|---|---|---|
| accel | np.ndarray | Ground motion acceleration record in g. |
| dt | float | Time step of the record (s). |
| name | str | Name of the record. |
| pga | float | Peak ground acceleration in g. |
| mean_period | float | Mean period of the ground motion. |
Methods
| Name | Description |
|---|---|
| invert | Invert the ground motion. |
| plot | Plots desired ground motion parameters. |
| scale | Scale the ground motion using desired method. Does nothing if more than one method is selected. |
| uninvert | Uninverts the ground motion. |
| unscale | Unscales the ground motion. |
invert
GroundMotion.invert()Invert the ground motion.
Returns
| Name | Type | Description |
|---|---|---|
| None |
plot
GroundMotion.plot(acc=True, vel=True, disp=True, enable=True, called=False)Plots desired ground motion parameters.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| acc | bool | Plot acceleration. | True |
| vel | bool | Plot velocity. | True |
| disp | bool | Plot displacement. | True |
| enable | bool | Enable plotting of ground parameters. Used if called from a RigidBlock object. | True |
| called | bool | True if called from a RigidBlock object. | False |
Returns
| Name | Type | Description |
|---|---|---|
| fig | plt.figure | Figure object if called from a RigidBlock object. |
| ax | plt.axis | Axis object if called from a RigidBlock object. |
scale
GroundMotion.scale(pga=False, scale_factor=False)Scale the ground motion using desired method. Does nothing if more than one method is selected.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| pga | float | Desired peak ground acceleration in g. | False |
| scale_factor | float | Desired scale factor. | False |
Returns
| Name | Type | Description |
|---|---|---|
| None |
uninvert
GroundMotion.uninvert()Uninverts the ground motion.
Returns
| Name | Type | Description |
|---|---|---|
| None |
unscale
GroundMotion.unscale()Unscales the ground motion.
Returns
| Name | Type | Description |
|---|---|---|
| None |