pymgipsim.InputGeneration.waves


Functions

create_square_wave

Creates a scenario signal based on event start times, durations, and amounts.

create_square_wave(time: ndarray, start_times: ndarray, durations: ndarray, amounts: ndarray, sampling_time: float) ndarray[source]

Creates a scenario signal based on event start times, durations, and amounts.

Parameters: - time: np.ndarray

Time array for the signal.

  • start_times: np.ndarray

    3D array of start times for each event.

  • durations: np.ndarray

    3D array of durations for each event.

  • amounts: np.ndarray

    3D array of amounts for each event.

  • sampling_time: float

    Sampling time for the signal.

Returns: - np.ndarray

3D array representing the generated scenario signal.