Skip to main content

Padding and Cutting

Overview

This operation increases or decreases the signal length by scaling the signal to the desired number of data points before zero and after zero.

Required Inputs

  • Time History Signal
  • Desired number of data points before zero
  • Desired number of data points after zero

Calculation

  1. Checks if number of points before and after zero are greater or equal to zero (error will be raised in input is negative)
  2. Calculates the time step (time between each data point)
  3. Calculates number of data points that need to be added or removed from signal
    • If adding points to signal, the beginning of the new signal is padded with the value of the first point of the original signal
  4. Adjusts signal and time values

Padded Signal Example

Before cut

Before signal is cut

After cut

After signal is cut to 100 seconds before and after zero seconds