Options
All
  • Public
  • Public/Protected
  • All
Menu

common-spectrum

Index

Type aliases

json

json: Record<string, string>

Variables

JSGraph

JSGraph: { getJSGraph: (analyses: Analysis[], options?: JSGraphOptions) => { axes: { x: { display: boolean; flipped: boolean; label: undefined | string; logScale?: boolean; unit: undefined | string; unitWrapperAfter: string; unitWrapperBefore: string; units?: string }; y: { display: boolean; flipped: boolean; label: undefined | string; logScale?: boolean; unit: undefined | string; unitWrapperAfter: string; unitWrapperBefore: string; units?: string } }; series: Record<string, unknown>[] }; getNormalizationAnnotations: (filter?: AnnotationsFilter, boundary?: { y: { max: string; min: string } }) => { fillColor: string; position: { x: number; y: string }[]; strokeWidth: number; type: string }[] } = ...

Type declaration

  • getJSGraph: (analyses: Analysis[], options?: JSGraphOptions) => { axes: { x: { display: boolean; flipped: boolean; label: undefined | string; logScale?: boolean; unit: undefined | string; unitWrapperAfter: string; unitWrapperBefore: string; units?: string }; y: { display: boolean; flipped: boolean; label: undefined | string; logScale?: boolean; unit: undefined | string; unitWrapperAfter: string; unitWrapperBefore: string; units?: string } }; series: Record<string, unknown>[] }
      • (analyses: Analysis[], options?: JSGraphOptions): { axes: { x: { display: boolean; flipped: boolean; label: undefined | string; logScale?: boolean; unit: undefined | string; unitWrapperAfter: string; unitWrapperBefore: string; units?: string }; y: { display: boolean; flipped: boolean; label: undefined | string; logScale?: boolean; unit: undefined | string; unitWrapperAfter: string; unitWrapperBefore: string; units?: string } }; series: Record<string, unknown>[] }
      • Generate a jsgraph chart format from an array of Analysis

        Parameters

        • analyses: Analysis[]
        • options: JSGraphOptions = {}

        Returns { axes: { x: { display: boolean; flipped: boolean; label: undefined | string; logScale?: boolean; unit: undefined | string; unitWrapperAfter: string; unitWrapperBefore: string; units?: string }; y: { display: boolean; flipped: boolean; label: undefined | string; logScale?: boolean; unit: undefined | string; unitWrapperAfter: string; unitWrapperBefore: string; units?: string } }; series: Record<string, unknown>[] }

        • axes: { x: { display: boolean; flipped: boolean; label: undefined | string; logScale?: boolean; unit: undefined | string; unitWrapperAfter: string; unitWrapperBefore: string; units?: string }; y: { display: boolean; flipped: boolean; label: undefined | string; logScale?: boolean; unit: undefined | string; unitWrapperAfter: string; unitWrapperBefore: string; units?: string } }
          • x: { display: boolean; flipped: boolean; label: undefined | string; logScale?: boolean; unit: undefined | string; unitWrapperAfter: string; unitWrapperBefore: string; units?: string }
            • display: boolean
            • flipped: boolean
            • label: undefined | string
            • Optional logScale?: boolean

              Change the scale to logarihtmic

              default

              false

            • unit: undefined | string
            • unitWrapperAfter: string
            • unitWrapperBefore: string
            • Optional units?: string
          • y: { display: boolean; flipped: boolean; label: undefined | string; logScale?: boolean; unit: undefined | string; unitWrapperAfter: string; unitWrapperBefore: string; units?: string }
            • display: boolean
            • flipped: boolean
            • label: undefined | string
            • Optional logScale?: boolean

              Change the scale to logarihtmic

              default

              false

            • unit: undefined | string
            • unitWrapperAfter: string
            • unitWrapperBefore: string
            • Optional units?: string
        • series: Record<string, unknown>[]
  • getNormalizationAnnotations: (filter?: AnnotationsFilter, boundary?: { y: { max: string; min: string } }) => { fillColor: string; position: { x: number; y: string }[]; strokeWidth: number; type: string }[]
      • (filter?: AnnotationsFilter, boundary?: { y: { max: string; min: string } }): { fillColor: string; position: { x: number; y: string }[]; strokeWidth: number; type: string }[]
      • Parameters

        • filter: AnnotationsFilter = {}
        • boundary: { y: { max: string; min: string } } = ...
          • y: { max: string; min: string }
            • max: string
            • min: string

        Returns { fillColor: string; position: { x: number; y: string }[]; strokeWidth: number; type: string }[]

Functions

autoPeakPicking

fromJcamp

  • fromJcamp(jcamp: string | ArrayBuffer, options?: {}): Analysis
  • Creates a new Analysis from a JCAMP string

    Parameters

    • jcamp: string | ArrayBuffer

      String containing the JCAMP data

    • options: {} = {}

      Returns Analysis

      • New class element with the given data

    fromText

    • fromText(data: string | ArrayBuffer, options?: {}): Analysis
    • Convert strings into JCAMP and add extra information

      Parameters

      • data: string | ArrayBuffer

        values to add to the file, usually a csv or tsv values

      • options: {} = {}

        Returns Analysis

        JCAMP of the input

      getNormalizedSpectrum

      getReactPlotJSON

      • getReactPlotJSON(analyses: Analysis[], query: SpectrumSelector, options?: ReactPlotOptions): PlotObjectType & { meta: Record<string, string>[] }

      peakPicking

      • peakPicking(spectrum: Spectrum<DoubleArray>, target: number, options?: PeakPickingOptions): undefined | Record<string, number>
      • Based on a x value we will return a peak if you set optimize=True the returned positions will be the closest actual datapoints to the fitted peak location. the x/y of the fitted peak will be in xOptimized and yOptimized

        Parameters

        • spectrum: Spectrum<DoubleArray>
        • target: number
        • options: PeakPickingOptions = {}

        Returns undefined | Record<string, number>

      toJcamp

      • toJcamp(analysis: Analysis, options?: GetJcampOptions): string

      toJcamps

      • toJcamps(analysis: Analysis, options?: GetJcampOptions): any[]

      toText

      • toText(analysis: Analysis, options?: ToTextOptions): string[]