scientimate.downsamplex#
x_ds = scientimate.downsamplex(x, RetainRatio)
Description#
Downsample x data and retain given ratio
Inputs#
- x
x data
- RetainRatio=0.5
- Define percentage of data to retain, value between 0 and 1Example: RetainRatio=0.8 means 80% of data are retained
Outputs#
- x_ds
Downsample x data
Examples#
import scientimate as sm
import numpy as np
from numpy import random
rng = np.random.default_rng()
x=10*rng.random((1000,1))
x_ds=sm.downsamplex(x, 0.7)
rng = np.random.default_rng()
xgrid=(-90-(-91))*rng.random((1000,500))+(-91)
x_ds=sm.downsamplex(xgrid, 0.3)