# Class IntegralData

java.lang.Object
java.util.AbstractCollection<Measurement>
java.util.AbstractList<Measurement>
java.util.ArrayList<Measurement>
javajs.util.Lst<Measurement>
jspecview.common.MeasurementData
jspecview.common.IntegralData

All Implemented Interfaces:
  `Serializable, Cloneable, Iterable<Measurement>, Collection<Measurement>, List<Measurement>, RandomAccess, SequencedCollection<Measurement>, AnnotationData`

public class IntegralData extends MeasurementData
from IntegralGraph a data structure for integration settings

Author:
  Bob Hanson hansonr@stolaf.edu
See Also:
  - Serialized Form

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static enum`
`IntegralData.IntMode`

## Field Summary

Fields
Modifier and Type
Field
Description
`static final double`
`DEFAULT_MINY`
`static final double`
`DEFAULT_OFFSET`
`static final double`
`DEFAULT_RANGE`

### Fields inherited from class MeasurementData

`myParams, precision, spec, units`

### Fields inherited from class AbstractList

`modCount`

## Constructor Summary

Constructors
Constructor
Description
`IntegralData(double integralMinY, double integralOffset, double integralRange, Spectrum spec)`
`IntegralData(Spectrum spec, Parameters p)`

## Method Summary

Modifier and Type
Method
Description
`Integral`
`addIntegralRegion(double x1, double x2)`
`void`
`addMarks(String ppms)`
INTEGRATION MARK list where list is a comma-separated list of ppm1-ppm2 with :x.x added to normalize one of them and starting with 0-0 clears the integration
`void`
`autoIntegrate()`
`Coordinate[]`
`calculateIntegral()`
`void`
`clear()`
`void`
`dispose()`
`BS`
`getBitSet()`
`String[]`
`getDataHeader()`
`void`
`getInfo(Map<String,Object> info)`
`double`
`getIntegralFactor()`
`static Lst<Annotation>`
`getIntegrationRatiosFromString(Spectrum spec, String key_values)`
Parses x-coordinates and values from a string and returns them as `IntegrationRatio` objects
`String[][]`
`getMeasurementListArray(String units)`
`double[][]`
`getMeasurementListArrayReal(String units)`
`double`
`getPercentMinimumY()`
`double`
`getPercentOffset()`
`double`
`getPercentYValueAt(double x)`
`Coordinate[]`
`getXYCoords()`
`Measurement`
`remove(int i)`
`void`
`setMinimumIntegral(double val)`
`void`
`setSelectedIntegral(Measurement integral, double val)`
`void`
`setSpecShift(double dx)`
`void`
`shiftY(int yOld, int yNew, int yPixel0, int yPixels)`
`void`
`update(double integralMinY, double integralOffset, double integralRange)`
minY is ignored
`void`
`update(Parameters parameters)`

### Methods inherited from class MeasurementData

`clear, find, getAType, getData, getGraphSetKey, getParameters, getSpectrum, getState, isDialog, isVisible, setGraphSetKey, setState`

### Methods inherited from class Lst

`add, add, addLast, remove, removeItemAt, removeObj`

### Methods inherited from class ArrayList

`addAll, addAll, addFirst, clone, contains, ensureCapacity, equals, forEach, get, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, removeAll, removeFirst, removeIf, removeLast, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize`

### Methods inherited from class AbstractCollection

`containsAll, toString`

### Methods inherited from class Object

`finalize, getClass, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface Collection

`parallelStream, stream, toArray`

### Methods inherited from interface List

`containsAll, reversed`

## Field Details

### DEFAULT_OFFSET

public static final double DEFAULT_OFFSET

See Also:
  - Constant Field Values

### DEFAULT_RANGE

public static final double DEFAULT_RANGE

See Also:
  - Constant Field Values

### DEFAULT_MINY

public static final double DEFAULT_MINY

See Also:
  - Constant Field Values

## Constructor Details

### IntegralData

public IntegralData(double integralMinY, double integralOffset, double integralRange, Spectrum spec)

Parameters:
  `integralMinY` - not used
  `integralOffset` -
  `integralRange` -
  `spec` -

### IntegralData

public IntegralData(Spectrum spec, Parameters p)

## Method Details

### getPercentMinimumY

public double getPercentMinimumY()

### getPercentOffset

public double getPercentOffset()

### getIntegralFactor

public double getIntegralFactor()

### update

public void update(Parameters parameters)

### update

public void update(double integralMinY, double integralOffset, double integralRange)
minY is ignored

Parameters:
  `integralMinY` -
  `integralOffset` -
  `integralRange` -

### addIntegralRegion

public Integral addIntegralRegion(double x1, double x2)

Parameters:
  `x1` - NaN to clear
  `x2` - NaN to split
Returns:
  new integral region or null

### setSpecShift

public void setSpecShift(double dx)

Specified by:
  `setSpecShift` in interface `AnnotationData`
Overrides:
  `setSpecShift` in class `MeasurementData`

### addMarks

public void addMarks(String ppms)
INTEGRATION MARK list where list is a comma-separated list of ppm1-ppm2 with :x.x added to normalize one of them and starting with 0-0 clears the integration

Parameters:
  `ppms` -

### calculateIntegral

public Coordinate[] calculateIntegral()

### getIntegrationRatiosFromString

public static Lst<Annotation> getIntegrationRatiosFromString(Spectrum spec, String key_values)
Parses x-coordinates and values from a string and returns them as `IntegrationRatio` objects

Parameters:
  `spec` -
  `key_values` - "x:value,x:value,x:value..."
Returns:
  JmolList<IntegrationRatio> object representing integration ratios

### getXYCoords

public Coordinate[] getXYCoords()

### getPercentYValueAt

public double getPercentYValueAt(double x)

Parameters:
  `x` -
Returns:
  FRACTIONAL value * 100

### dispose

public void dispose()

### setSelectedIntegral

public void setSelectedIntegral(Measurement integral, double val)

### clear

public void clear()

Specified by:
  `clear` in interface `Collection<Measurement>`
Specified by:
  `clear` in interface `List<Measurement>`
Overrides:
  `clear` in class `ArrayList<Measurement>`

### remove

public Measurement remove(int i)

Specified by:
  `remove` in interface `List<Measurement>`
Overrides:
  `remove` in class `Lst<Measurement>`

### getBitSet

public BS getBitSet()

### getMeasurementListArray

public String[][] getMeasurementListArray(String units)

Overrides:
  `getMeasurementListArray` in class `MeasurementData`

### getMeasurementListArrayReal

public double[][] getMeasurementListArrayReal(String units)

### getDataHeader

public String[] getDataHeader()

Overrides:
  `getDataHeader` in class `MeasurementData`

### shiftY

public void shiftY(int yOld, int yNew, int yPixel0, int yPixels)

### autoIntegrate

public void autoIntegrate()

### getInfo

public void getInfo(Map<String,Object> info)

### setMinimumIntegral

public void setMinimumIntegral(double val)