# preprocess.smooth_capacity()

Savitzky-Golay smoothing of a capacity sequence.

Usage

[Source](https://github.com/lornearnold/driven-pile/blob/main/src/driven_pile/preprocess.py#L68-L93)

``` python
preprocess.smooth_capacity(
    capacity,
    window,
    order,
)
```

## Parameters

`capacity: array_like`  
Capacity per foot in grid order, kips.

`window: int`  
Window length in feet; reduced to an odd number no longer than the sequence when the sequence is shorter.

`order: int`  
Polynomial order of the local fit.

## Returns

`ndarray`  
Smoothed capacity; the input unchanged when the window does not exceed the polynomial order.
