- Author:
- nima <nafs080@aucklanduni.ac.nz>
- Date:
- 2020-09-30 10:07:25+13:00
- Desc:
- SEDML file
- Permanent Source URI:
- http://models.cellml.org/workspace/572/rawfile/59488c15178b09bcb5b11f795383b1435f7b7ef1/SEDML_files/plot_func.py
def smooth_func(x,y,fil,order,kind='linear'):
import numpy as np
from scipy.signal import savgol_filter
from scipy.interpolate import interp1d
xx = np.linspace(x.min(),x.max(), 1000)
itp = interp1d(x,y, kind=kind)
window_size, poly_order = fil, order
yy_sg = savgol_filter(itp(xx), window_size, poly_order)
return xx, yy_sg