tga-spectrum
    Preparing search index...

    Class Analysis

    Class allowing to store and manipulate an analysis. An analysis may contain one or more spectra that can be selected based on their units

    Index

    Constructors

    • Parameters

      • Optionaloptions: AnalysisOptions

      Returns Analysis

    Properties

    id: string
    label: string
    spectra: MeasurementXY<DoubleArray>[]
    spectrumCallback: undefined | SpectrumCallback

    Methods

    • Parameters

      • __namedParameters: { filter: { ids?: string[] } }

      Returns Analysis

    • Parameters

      • Optionaloptions: NormalizedOptions

      Returns MeasurementXY<DoubleArray>[]

    • Return the data object for specific x/y units with possibly some normalization options

      Parameters

      • Optionaloptions: NormalizedOptions
        • selector.xUnits

          // if undefined takes the first variable

        • selector.yUnits

          // if undefined takes the second variable

      Returns undefined | MeasurementXY<DoubleArray>

    • Returns the first spectrum. This method could be improved in the future

      Returns MeasurementXY<DoubleArray>

    • Returns the xLabel

      Parameters

      • selector: SpectrumSelector
        • xUnits

          // if undefined takes the first variable

        • yUnits

          // if undefined takes the second variable

      Returns undefined | string

    • Retrieve a xy object

      Parameters

      • Optionalselector: SpectrumSelector
        • units

          Units separated by vs like for example "g vs °C"

        • xUnits

          if undefined takes the first variable

        • yUnits

          if undefined takes the second variable

      Returns undefined | { x: DoubleArray; y: DoubleArray }

    • Retrieve spectra matching selector

      Parameters

      • Optionalselector: SpectrumSelector

      Returns MeasurementXY<DoubleArray>[]

    • Retrieve a MeasurementXY based on x/y units

      Parameters

      • Optionalselector: SpectrumSelector

      Returns undefined | MeasurementXY<DoubleArray>

    • Returns the yLabel

      Parameters

      • selector: SpectrumSelector
        • xUnits

          // if undefined takes the first variable

        • yUnits

          // if undefined takes the second variable

      Returns undefined | string

    • Add a spectrum in the internal spectra variable

      Parameters

      • variables: MeasurementXYVariables
      • Optionaloptions: Omit<MeasurementXY<DoubleArray>, "variables">

      Returns void

    • Returns { id: string; label: string; spectra: any }

    • Parameters

      • json: any

      Returns Analysis