Did I find the right examples for you? yes no

All Samples(8)  |  Call(6)  |  Derive(0)  |  Import(2)

src/p/y/pyspeckit-0.1.14/pyspeckit/spectrum/models/template.py   pyspeckit(Download)
from ..interpolation import interp,_interp
import numpy as np
import model
 
def spectral_template_generator(template_spectrum, xshift_units='km/s'):
        """
        shift = xarr.x_to_units(xshift, xshift_units)
        model = _interp(xarr, template_spectrum.xarr.as_unit(xarr.units)+shift,
                template_spectrum.data, left=np.nan, right=np.nan) * scale
 

src/p/y/pyspeckit-HEAD/pyspeckit/spectrum/models/template.py   pyspeckit(Download)
from ..interpolation import interp,_interp
import numpy as np
import model
 
def spectral_template_generator(template_spectrum, xshift_units='km/s'):
        """
        shift = xarr.x_to_units(xshift, xshift_units)
        model = _interp(xarr, template_spectrum.xarr.as_unit(xarr.units)+shift,
                template_spectrum.data, left=np.nan, right=np.nan) * scale
 

src/p/y/pyspeckit-0.1.14/pyspeckit/spectrum/smooth.py   pyspeckit(Download)
            OK = True - data.mask
            if OK.sum() > 0:
                data = interpolation._interp(np.arange(len(data)),np.arange(len(data))[OK],data[OK])
            else:
                data = OK
    if np.any(True - np.isfinite(data)):
        OK = np.isfinite(data)
        if OK.sum() > 0:
            data = interpolation._interp(np.arange(len(data)),np.arange(len(data))[OK],data[OK])

src/p/y/pyspeckit-HEAD/pyspeckit/spectrum/smooth.py   pyspeckit(Download)
            OK = True - data.mask
            if OK.sum() > 0:
                data = interpolation._interp(np.arange(len(data)),np.arange(len(data))[OK],data[OK])
            else:
                data = OK
    if np.any(True - np.isfinite(data)):
        OK = np.isfinite(data)
        if OK.sum() > 0:
            data = interpolation._interp(np.arange(len(data)),np.arange(len(data))[OK],data[OK])