ml-spectra-processing
    Preparing search index...

    Function xyMedianYAtXs

    • Computes the median of Y values in a sliding window around each target x position. For each value in xValues, the closest index in data.x is found and the median of the surrounding y values (within the window) is returned.

      Parameters

      • data: DataXY

        Object with x (sorted in increasing order) and y arrays of the same length.

      • xValues: NumberArray

        Array of x positions at which to compute the median.

      • options: XYMedianYAtXsOptions = {}

        Options for the median computation.

      Returns DataXY

      A new DataXY with x = xValues and y = computed medians.