def fir(timeseries, design):
    X = np.matrix(design)
    y = np.matrix(timeseries)
    h = np.array(linalg.pinv(X.T * X) * X.T * y.T)
    return h
Calculate the FIR (finite impulse response) HRF, according to [Burock2000]_
dataset/ETHPy150Open nipy/nitime/nitime/algorithms/event_related.py/fir