@equinor/videx-wellog
    Preparing search index...

    Class DataHelper

    Various utility functions for transforming and processing data sets.

    Index

    Constructors

    Methods

    • Downsamples data by reducing segments that scales to the same approximate range

      Parameters

      • datapoints: PlotData

        data to downsample

      • scale: Scale

        scale to control downsampling

      • reducer: ReducerFunction = DataHelper.minmax

        function to reduce segments

      Returns PlotData

    • Cut data points that are outside the current visible domain. An excess will ensure that panning is smooth

      Parameters

      • datapoints: PlotData
      • domain: Domain
      • overlapFactor: number = 0.5

      Returns PlotData

    • Find the first index that has a finite numeric value

      Parameters

      • data: PlotData

        data to search

      • start: number = 0

        start index to search from

      Returns number

    • Find the first index that has NOT a finite numeric value

      Parameters

      • data: PlotData

        data to search

      • start: number = 0

        start index to search from

      Returns number

    • Test if the data is within the scale's domain

      Parameters

      • scale: Scale
      • datapoints: PlotData

      Returns boolean

    • Reduce multiple points to the its average values.

      Parameters

      • segment: PlotData

      Returns Tuplet<number>[]

    • Trim two data series so that it can be correlated. Used in differential plot.

      Parameters

      • arr1: PlotData
      • arr2: PlotData

      Returns DifferentialPlotData

    • Parameters

      • segment: PlotData

      Returns Tuplet<number>[]

    • In a data set of two values, return the second element of the item where the first item is closest to the query value. The data set is considered to be contineous rather than discrete.

      Parameters

      • queryVal: number
      • data: PlotData

      Returns number

    • In a data set of two values, return the second element of the item where the first item is closest to the query value. The data set is considered to be discrete.

      Parameters

      • queryVal: number
      • data: PlotData
      • threshold: number = 0

      Returns number

    • In a data set of two values, return the second element of the item where the first item is closest to the query value. The data set is considered to be organized such that an item is the end of the previous item and the start of the next (zones).

      Parameters

      • queryVal: number
      • data: PlotData

      Returns number

    • Resample large data series to reduce detail when number of points are greater than the number of pixels to render it to. NOTE: you should pass the data through the DataHelper.trimUndefinedValues before passing it to this function. Also, this function assumes the datapoints are more or less uniformly spaced. The DataHelper.downsample is probably safer and yields better results.

      Parameters

      • datapoints: PlotData

        data to resample

      • ratio: number

        resample ratio

      • reducer: ReducerFunction = DataHelper.mean

        function to reduce segments

      Returns PlotData

    • Remove successive entries of NULL values, leaving only the first NULL value. Required by the resample function.

      Parameters

      • datapoints: PlotData

      Returns PlotData