How to use the rampy.smooth function in rampy

To help you get started, we’ve selected a few rampy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github charlesll / rampy / rampy / spectranization.py View on Github external
Options
    =======
    smoothing : bool
        True or False. Smooth the signals with arguments provided as kwargs. Default method is whittaker smoothing. See the rampy.smooth function for smoothing options and arguments.
        
    Returns
    =======
    centroid : Numpy array, n samples
        signal centroid(s)
    """
    
    y_ = y.copy()
    
    if smoothing == True:
        for i in range(x.shape[1]):
            y_[:,i] = rampy.smooth(x[:,i],y[:,i],**kwargs)
        
    return np.sum(y_/np.sum(y_,axis=0)*x,axis=0)

rampy

A Python module containing functions to treat spectroscopic (XANES, Raman, IR...) data

GPL-2.0
Latest version published 2 months ago

Package Health Score

75 / 100
Full package analysis