h2020charisma/ramanchada2

more spectrum filters: resample filter , L2 norm for normalization

Closed this issue · 1 comments

wish list

  • resample filter using scipy.interpolate methods (one or more)
        spline = Akima1DInterpolator(spe.x, spe.y)
        y = np.zeros_like(target_x)
        within_range = (self.x4search >= spe.x.min()) & (self.x4search <= spe.x.max())
       # interpolation only zeroes otherwise
        y[within_range] = spline(target_x[within_range])
        spe_spline = rc2.spectrum.Spectrum(x=target_x,y=y)
  • L1, L2 norm options for the normalize filter

Please make sure that splines are not extrapolated beyond original spectrum range - as in the code example above