DataPoint

 The DataPoint class describes a data point. Its members are:
 - key: the X-axis coordinate
 - val: the Y-axis coordinate

  DataPoint()

    Constructor of a DataPoint object

    Ex:
    var dp = new DataPoint;
    dp.key; // --> NaN
    dp.val; // --> NaN
    dp.isValid(); // --> false


  DataPoint(xyLine)

    Constructor of a DataPoint object initialized using the xy-formatted line.

    xyLine: <String> holding the key,val pair in the format key<sep>val, with
    <sep> being any character not a cipher nor a decimal point.

    Ex:
    var dp = new DataPoint("123.321,456.654");
    dp.key; // --> 123.321
    dp.val; // --> 456.654
    dp.isValid(); // --> true


  DataPoint(dataPoint)

    Constructor of a DataPoint object initialized with another DataPoint object

    dataPoint: <DataPoint> object used to initialize this object.

    Ex:
    var dp1 = new DataPoint(dp);


  DataPoint(key, val)

    Constructor of a DataPoint object initialized with the numerical
    parameters.

    key: key (X-value)
    val: value (Y-value)

    Ex:
    var dp = DataPoint(123.321, 456.654);


  <DataPoint>.key

    Return the key <Number> property.

    Ex:
    var dp = new DataPoint(123.321, 456.654);
    var mz = dp.key;
    mz // --> 123.321


  <DataPoint>.val

    Return the val <Number> property.

    Ex:
    var dp = new DataPoint(123.321, 456.654);
    var i = dp.val;
    i // --> 456.654


  DataPoint.initialize(other)

    Initialize this DataPoint object with a <DataPoint> object

    other: <DataPoint> object

    Ex:
    var newDp = new DataPoint(123.321,456.654);
    var otherDp = new DataPoint();
    otherDp.initialize(newDp);
    otherDp.key; // --> 123.321
    otherDp.val; // --> 456.654
    otherDp.isValid(); // --> true


  DataPoint.initialize(key, val)

    Initialize this DataPoint object with two <Number> entities

    key: <Number> holding the key of this DataPoint
    val: <Number> holding the value of this DataPoint

    Ex:
    var dp = new DataPoint();
    dp.initialize(123.321,456.654);
    dp.key; // --> 123.321
    dp.val; // --> 456.654
    dp.isValid(); // --> true


  DataPoint.isValid()

    Return if this <DataPoint> object is valid.

    Ex:
    var dp = new DataPoint();
    dp.initialize(123.321,456.654);
    dp.key; // --> 123.321
    dp.val; // --> 456.654
    dp.isValid(); // --> true


SavGolParams

 This class handles the parameters of a Savitzy-Golay filter.

 A SavGolParams object contains the following member data:
 - nl: <Number> of points on the left of the filtered point;
 - nR: <Number of points on the right of the filtered point;
 - m: <Number> (order) of the polynomial to use in the regression analysis
   leading to the Savitzky-Golay coefficients (typically between 2 and 6);
 - lD: <Number> specifying the order of the derivative to extract from the
   Savitzky-Golay smoothing algorithm (for regular smoothing, use 0)
 - convolveWithNr <Boolean>  Set to false for best results
 

  SavGolParams()

    Constructor of a SavGolParams object

    Ex:

    var sgp1 = new SavGolParams();
    sgp1.nL; // --> default 15
    sgp1.nR; // --> default 15
    sgp1.m; // --> default 4
    sgp1.lD; // --> default 0
    sgp1.convolveWithNr; // --> default false


  SavGolParams(savGolParams)

    Constructor of a SavGolParams object using a <SavGolParams> object as
    template

    Ex:

    var sgp1 = new SavGolParams();
    sgp1.nL = 10;
    sgp1.nR = 10;
    sgp1.m; // --> 4
    sgp1.lD; // --> 0
    sgp1.convolveWithNr; // --> false

    var sgp2 = new SavGolParams(sgp1);

    sgp2.nL; // --> 10
    sgp2.nR; // --> 10
    sgp2.m; // --> 4
    sgp2.lD; // --> 0
    sgp2.convolveWithNr; // --> false


  SavGolParams(savGolFilter)

    Constructor of a SavGolParams object using a <SavGolFilter> object as
    template

    Ex:

    var sgf1 = new SavGolFilter();
    sgf1.nL = 10;
    sgf1.nR = 10;
    sgf1.m; // --> 4
    sgf1.lD; // --> 0
    sgf1.convolveWithNr; // --> false

    var sgp2 = new SavGolParams(sgf1);

    sgp2.nL; // --> 10
    sgp2.nR; // --> 10
    sgp2.m; // --> 4
    sgp2.lD; // --> 0
    sgp2.convolveWithNr; // --> false


  SavGolParams(nL, nR, m, lD, convolveWithNr)

    Constructor of a SavGolParams object using the various configurations
    <Number> and <Boolean> parameters.

    Ex:

    var sgf1 = new SavGolParams(10, 10, 6, 0, true);
    sgf1.nL; // --> 10
    sgf1.nR; // --> 10;
    sgf1.m; // --> 6
    sgf1.lD; // --> 0
    sgf1.convolveWithNr; // --> true


SavGolFilter

 This class handles the parameterization of the Savitzky-Golay
 filter. This filter is an efficient way to remove noise from noisy mass
 spectra and can be automatically applied after any mass spectrum
 combination processing.

 A SavGolFilter object contains the following member data as members of a
 <SavGolParams> object (see documentation for SavGolParams):
 - nl: <Number> of points on the left of the filtered point;
 - nR: <Number of points on the right of the filtered point;
 - m:	 <Number> (order) of the polynomial to use in the regression analysis
   leading to the Savitzky-Golay coefficients (typically between 2 and 6);
 - lD: <Number> specifying the order of the derivative to extract from the
   Savitzky-Golay smoothing algorithm (for regular smoothing, use 0)
 - convolveWithNr <Boolean>  Set to false for best results
 

  SavGolFilter()

    Constructor of a SavGolFilter object

    Ex:
    var sgf1 = new SavGolFilter();
    sgf1.nL; // --> 15
    sgf1.nR; // --> 15
    sgf1.m; // --> 4
    sgf1.lD; // --> 0
    sgf1.convolveWithNr; // --> false


  SavGolFilter(savGolParams)

    Constructor of a SavGolFilter object initialized using a <SavGolParams>
    object

    Ex:

    var sgp1 = new SavGolParams();

    sgp1.nL = 10; --> 10
    sgp1.nR = 10; --> 10
    sgp1.lD = 0; --> 0
    sgp1.m = 5; --> 5

    var sgf1 = new SavGolFilter(sgp1);
    sgf1.asText(); --> output is:

    Savitzy-Golay filter parameters:
    nL: 10 ; nR: 10 ; m: 5 ; lD: 0 ; convolveWithNr : false
    savGolParams: <SavGolParams> object to be used to initialize this object's SavGolParams


  SavGolFilter(nL, nR, m, lD, convolveWithNr)

    Constructor of a SavGolFilter object initialized using parameters that
    initialize the SavGolParams member object

    nL: number of data points on the left of the point being filtered (default * 15)

    nR: number of data points on the right of the point being filtered (default * 15)

    m: order of the polynomial to use in the regression analysis
    leading to the Savitzky-Golay coefficients (typicall [2-6], default 4)

    lD: order of the derivative to extract from the Savitzky-Golay
    smoothing algorithm (for regular smoothing, use 0, the default);

    Ex:

    var sgf1 = new SavGolFilter(10, 10, 6, 0, true);

    sgf1.asText(); --> output is:

    Savitzy-Golay filter parameters:
    nL: 10 ; nR: 10 ; m: 6 ; lD: 0 ; convolveWithNr : true

    convolveWithNr: set to false for best results (default false)


  SavGolFilter(savGolFilter)

    Constructor of a SavGolFilter object

    Ex:

    var sgf1 = new SavGolFilter();
    sgf1.asText(); --> output is:

    Savitzy-Golay filter parameters:
    nL: 15 ; nR: 15 ; m: 4 ; lD: 0 ; convolveWithNr : false*

    sgf1.nL = 10;
    sgf1.nR = 10;
    sgf1.m= 6;

    var sgf2 = new SavGolFilter(sgf1);
    sgf2.asText(); --> output is:

    Savitzy-Golay filter parameters:
    nL: 10 ; nR: 10 ; m: 6 ; lD: 0 ; convolveWithNr : false

    savGolFilter: <SavGolFilter> object to be used to initialize this object


  SavGolFilter.initialize(other)

    Initialize this SavGolFilter object with another
    <SavGolFilter> object

    other: <SavGolFilter> object used to initialize this object


  SavGolFilter.initialize(nL, nR, m, lD, convolveWithNr)

    Initialize this SavGolFilter object with parameters to configure the
    SavGolParams member object

    nL: number of data points on the left of the point being filtered
    nR: number of data points on the right of the point being filtered
    m: order of the polynomial to use in the regression analysis
    leading to the Savitzky-Golay coefficients (typicall [2-6])
    lD: order of the derivative to extract from the Savitzky-Golay
    smoothing algorithm (for regular smoothing, use 0);
    convolveWithNr: set to false for best results


  SavGolFilter.asText()

    Return a <String> object containing a textual representation of all the
    member data of this SavGolFilter object.


MzIntegrationParams

 The MzIntegrationParams class provides an interface to all the
 parameters that are required to configure all the integrations of mass
 spectral data that combine into a MassSpectrum object.

 When combining multiple mass spectra into a single one, the process might
 involve the creation of bins according to specific parameters measured on
 the whole set of the spectra to be combined into the combination spectrum.
 These parameters are configured using a MzIntegrationParams object. Its
 members are:

 -binningType: <Number> type of the binning. The type of binning specifies
  if binning is arbitrary or data-based (refer to msXpS::BinningType for
  details). It might also specify that no binning is required.

 -binSize: <Number> size of the bins. A typical bin size would be 0.005 for
  a high resolution mass spectrometer with unit m/z.

 -binSizeType: <Number> type of the bin size. The bin size type specifies if
  the binSize value is to be considered a m/z value or a atomic mass unit
  value or a resolution value or a part-per-million value (refer to
  msXpS::MassToleranceType for details)

 -binSizeTypeString: <String> type of the bin size. This member datum hold a
  textual representation of the binSizeType member datum, like "PPM" or
  "RES" or "AMU" or "MZ".

 -applyMzShift: <Boolean> value that tells if the m/z shift correction
  should be applied.

 -removeZeroValDataPoints: <Boolean> that tells if the 0-val m/z data points
  should be removed from the combination spectrum once all the source mass
  spectra have been effectively combined into the combination spectrum.

 - applySavGolFilter: <Boolean> that tells if a Savitzky-Golay filtering is
   to be applied to the combination spectrum after all the source mass
   spectra have been combined to the combination spectrum.

 - savGolParams: <SavGolParams> object holding the configuration of a
   Savitzky-Golay filtering process.

  MzIntegrationParams()

    Construct a MzIntegrationParams instance with default values.

    Ex:

    var mzip1 = new MzIntegrationParams();

    mzip1.binningType; // --> 0
    mzip1.binningTypeString; // --> NONE


  MzIntegrationParams(binningType, binSize, binSizeType,
    applyMzShift, removeZeroValDataPoints)

    Construct a MzIntegrationParams instance using specified values.

    binningType: <Number> type of the binning (refer to msXpS::BinningType for details)
    binSize: <Number> size of the bins
    binSizeType: <Number> type of the bin size (refer to msXpS::MassToleranceType for details)
    applyMzShift: <Boolean> tells if the m/z shift correction should be applied
    removeZeroValDataPoints: <Boolean> tells if the 0-val m/z data points should be removed

    Ex:

    var mzip1 = new MzIntegrationParams(1, 0.0055, 2, false, true);

    mzip1.binningTypeString; // --> DATA_BASED
    mzip1.binSize; // --> 0.0055
    mzip1.binSizeType; // --> 2
    mzip1.binSizeTypeString; // --> MZ
    mzip1.applyMzShift; // --> false
    mzip1.removeZeroValDataPoints; // --> true


  MzIntegrationParams(mzIntegrationParams)

    Construct a MzIntegrationParams object using a <MzIntegrationParams>
    template object.

    Ex:

    var mzip1 = new MzIntegrationParams(1, 0.0055, 2, false, true);

    mzip1.binningTypeString; // --> DATA_BASED
    mzip1.binSize; // --> 0.0055
    mzip1.binSizeType; // --> 2
    mzip1.binSizeTypeString; // --> MZ
    mzip1.applyMzShift; // --> false
    mzip1.removeZeroValDataPoints; // --> true

    var mzip2 = new MzIntegrationParams(mzip1);

    mzip2.binningTypeString; // --> DATA_BASED
    mzip2.binSize; // --> 0.0055
    mzip2.binSizeType; // --> 2
    mzip2.binSizeTypeString; // --> MZ
    mzip2.applyMzShift; // --> false
    mzip2.removeZeroValDataPoints; // --> true

    mzIntegrationParams: <MzIntegrationParams> to be used to initialize this object


  MzIntegrationParams(savGolParams)

    Construct a MzIntegrationParams object using a SavGolParams template
    object.

    Ex:

    var sgp1 = new SavGolParams(10, 10, 6, 0, true);
    var mzip1 = new MzIntegrationParams(sgp1);

    mzip1.savGolParams.nL; // --> 10
    mzip1.savGolParams.nR; // --> 10
    mzip1.savGolParams.m; // --> 6
    mzip1.savGolParams.lD; // --> 0

    savGolParams: <SavGolParams> object to be used to initialize this object's SavGolParams


  <MzintegrationParams>.binningType

    Return the binningType property of the object as a <Number>

    Ex:

    var mzip1 = new MzIntegrationParams();

    mzip1.binningType; // --> 0

    Return the binning type property as a <Number>.


  <MzintegrationParams>.binningTypeString

    Return the binningType property of the object as a <String>

    Ex:

    var mzip1 = new MzIntegrationParams();

    mzip1.binningTypeString; // --> NONE

    Return the binning type property as a <String>.


  <MzIntegrationParams>.binSize

    Return the bin size property of the object.

    Ex:

    var mzip1 = new MzIntegrationParams();

    mzip1.binSize; // --> NaN (uninitialized value)

    Return the bin size <Number> property (size of the bins in the mass
    spectrum).


  <MzintegrationParams>.binSizeType

    Return the binSizeType property of the object as a <Number>

    Ex:

    var mzip1 = new MzIntegrationParams();

    mzip1.binSizeType; // --> 0

    Return the bin size type property as a <Number>.


  <MzintegrationParams>.binSizeTypeString

    Return the binSizeType property of the object as a <String>

    Ex:

    var mzip1 = new MzIntegrationParams();

    mzip1.binSizeTypeString; // --> NONE

    Return the bin size type property as a <String>.


  <MzIntegrationParams>.applyMzShift

    Ex:

    var mzip1 = new MzIntegrationParams();

    mzip1.applyMzShift; // --> false
    mzip1.applyMzShift = true;
    mzip1.applyMzShift; // --> true

    Return the <Boolean> value telling if the m/z shift should be
    applied.


  <MzIntegrationParams>.removeZeroValDataPoints

    Ex:

    var mzip1 = new MzIntegrationParams();

    mzip1.applyMzShift; // --> false

    Return the <Boolean> value telling if the <DataPoint> objects having
    m/z keys of a 0-intensity value should be removed from the
    <MassSpectrum> object.


  <MzIntegrationParams>.applySavGolFilter

    Ex:

    var mzip1 = new MzIntegrationParams();

    mzip1.applySavGolFilter // --> false

    Return the <Boolean> value telling if the Savitzky-Golay filter
    should be applied to the <MassSpectrum> object.


  <MzIntegrationParams>.savGolParams

    Ex:

    var mzip1 = new MzIntegrationParams();

    var sgp1 = mzip1.savGolParams;

    sgp1.nL; // --> 15
    sgp1.nR; // --> 15
    sgp1.m; // --> 4
    sgp1.lD; // --> 0
    sgp1.convolveWithNr;	 // --> false

    Return the <SavGolParams> object from this <MzIntegrationParams>
    object.


  MzIntegrationParams.binSize = <Number>

    Set the bin size.

    Ex:

    var mzip1 = new MzIntegrationParams();
    mzip1.binSize; // --> NaN (uninitialized)
    mzip1.binSize = 0.0055;
    mzip1.binSize; // --> 0.0055


  MzIntegrationParams.binSizeType = <Number>

    Set the bin size type as a <Number>

    Ex:

    var mzip1 = new MzIntegrationParams();

    mzip1.binSizeType; // --> 0
    mzip1.binSizeTypeString; // --> NONE
    mzip1.binSizeType=1;
    mzip1.binSizeType; // --> 1
    mzip1.binSizeTypeString; // --> PPM


  MzIntegrationParams.binSizeTypeString = <String>

    Set the bin size type as a <String>

    Ex:

    var mzip1 = new MzIntegrationParams();
    mzip1.binSizeTypeString; // --> NONE
    mzip1.binSizeTypeString = "RES";
    mzip1.binSizeTypeString; // --> RES
    mzip1.binSizeType; // --> 4


  MzIntegrationParams.applyMzShift = <Boolean>

    Tell if the m/z shift between spectra must be applied

    Ex:

    var mzip1 = new MzIntegrationParams();

    mzip1.applyMzShift; // --> false
    mzip1.applyMzShift = true;
    mzip1.applyMzShift; // --> true


  MzIntegrationParams.removeZeroValDataPoints = <Boolean>

    Tell if the DataPoint objects having a value of 0 need to be removed
    from the spectrum.

    Ex:

    var mzip1 = new MzIntegrationParams();

    mzip1.applyMzShift; // --> false
    mzip1.applyMzShift = true;
    mzip1.applyMzShift; // --> true


  MzIntegrationParams.removeZeroValDataPoints = <Boolean>

    Tell if the Savitzky-Golay filter needs to be applied to the
    combination spectrum.

    Ex:

    var mzip1 = new MzIntegrationParams();

    mzip1.applySavGolFilter; // --> false
    mzip1.applySavGolFilter = true;
    mzip1.applySavGolFilter; // --> true;


  MzIntegrationParams.savGolParams = <SavGolParams>

    Initialize the member <SavGolParams> object using the parameter as
    template.

    Ex:

    var sgp1 = new SavGolParams(10, 10, 6, 0, true);
    var mzip1 = new MzIntegrationParams();

    mzip1.savGolParams.nL; // --> 15
    mzip1.savGolParams.nR; // --> 15
    mzip1.savGolParams = sgp1;
    mzip1.savGolParams.nL; // --> 10
    mzip1.savGolParams.nR; // --> 10


  MzIntegrationParams.initialize(other)

    Initialize this MzIntegrationParams object with a <SavGolParams> object

    Ex:

    var sgp1 = new SavGolParams(10, 10, 6, 0, true);
    var mzip1 = new MzIntegrationParams();

    mzip1.savGolParams.nL; // --> 15
    mzip1.savGolParams.nR; // --> 15
    mzip1.savGolParams.m; // --> 4
    mzip1.savGolParams.lD; // --> 0

    mzip1.initialize(sgp1);

    mzip1.savGolParams.nL; // --> 10
    mzip1.savGolParams.nR; // --> 10
    mzip1.savGolParams.m; // --> 6
    mzip1.savGolParams.lD; // --> 0

    other: <SavGolParams> object


  MzIntegrationParams.initialize(other)

    Initialize this MzIntegrationParams object with a
    <MzIntegrationParams> object

    Ex:

    var sgp1 = new SavGolParams(10, 10, 6, 0, true);
    var mzip1 = new MzIntegrationParams(sgp1);
    var mzip2 = new MzIntegrationParams(mzip1);

    mzip2.savGolParams.nL; // --> 10
    mzip2.savGolParams.nR; // --> 10
    mzip2.savGolParams.m; // --> 6
    mzip2.savGolParams.lD; // --> 0

    other: <MzIntegrationParams> object


  MzIntegrationParams.initialize(nL, nR, m, lD, convolveWithNr)

    Initialize this MzIntegrationParams object with the individual <SavGolParams> parameters

    nL: number of data points on the left of the point being filtered

    nR: number of data points on the right of the point being filtered

    m: order of the polynomial to use in the regression analysis
    leading to the Savitzky-Golay coefficients (typicall [2-6])

    lD: order of the derivative to extract from the Savitzky-Golay
    smoothing algorithm (for regular smoothing, use 0);

    convolveWithNr: set to false for best results

    Ex:

    var mzip1 = new MzIntegrationParams();
    mzip1.initialize(10, 10, 6, 0, false);

    mzip1.savGolParams.nL; // --> 10
    mzip1.savGolParams.nR; // --> 10
    mzip1.savGolParams.m; // --> 6
    mzip1.savGolParams.lD; // --> 0


  MzIntegrationParams.asText()

    Return a <String> object containing a textual representation of all the
    member data of this MzIntegrationParams object.


  MzIntegrationParams.asText()

    Return a textual representation of this <MzIntegrationParams> object.

    Ex:

    var mzip1 = new MzIntegrationParams();
    mzip1.binningType = 2;
    mzip1.binningTypeString; // --> ARBITRARY
    mzip1.binSize = 0.0055;
    mzip1.binSizeTypeString = "MZ";
    mzip1.applyMzShift = true;
    mzip1.applySavGolFilter= true;
    mzip1.asText(); // returns this:

    m/z integration parameters:
    Binning type: ARBITRARY
    Bin nominal size: 0.005500
    Bin size type: MZ
    Apply m/z shift: true
    Remove 0-val data points: false
    Savitzky-Golay parameters
    nL = 15 ; nR = 15 ; m = 4 ; lD = 0 ; convolveWithNr = false 


Trace

 The Trace class is fundamentally an <Array> of DataPoint
 objects.

  Trace()

    Constructor of a Trace object

    Ex:
    var t = new Trace;
    t.length; // --> 0


  Trace(title)

    Constructor of a Trace object

    title: <String> containing the title of the Trace object

    Ex:
    var t = new Trace("Trace title");
    t.title; // --> Trace title


  Trace(other)

    Constructor of a Trace object

    other: <Trace> object to be used to initialize this object

    Ex:
    var t2 = new Trace();
    t2.initialize("123.3321 456.654\n147.741 258.852\n");
    t2[0].key; // --> 123.3321
    t2[0].val; // --> 456.654
    t2[1].key; // --> 147.741
    t2[1].val; // --> 258.852
    var t3 = new Trace(t2);
    t3[0].key; // --> 123.3321
    t3[0].val; // --> 456.654
    t3[1].key; // --> 147.741
    t3[1].val; // --> 258.852


  Trace[index]

    Return the <DataPoint> object at index.

    Ex:
    var t1 = new Trace();
    t1.initialize([123.321,456.654,789.987],[147.741, 258.852, 369.963]);
    t1.asText();

    123.3210000000 147.7410000000
    456.6540000000 258.8520000000
    789.9870000000 369.9630000000

    var dp0 = t1[0];
    dp0.key; // --> 123.321
    dp0.val; // --> 147.741

    t1[0].key; // --> 123.321
    t1[0].val; // --> 147.741


  Trace.initialize(xyFormatString)

    Initialize this Trace object with a <String> object representing the
    mass data in the xy text format:

    "<key><sep><val>\n<key><sep><val>\n...".

    xyFormatString: <String> object representing the <DataPoint> data points of
    the <Trace> in the format <key> <value>, with one such key-value pair per
    line. The separator between <key> and <value> might be anything
    non-numerical and not a dot (decimal separator).

    Ex:
    var t2 = new Trace();
    t2.initialize("123.3321 456.654\n147.741 258.852\n");
    t2[0].key; // --> 123.3321
    t2[0].val; // --> 456.654
    t2[1].key; // --> 147.741
    t2[1].val; // --> 258.852


  Trace.initialize(other)

    Initialize this Trace object with a <Trace> object

    other: <Trace> object

    Ex:
    var t1 = new Trace();
    t1.initialize("123.3321 456.654\n147.741 258.852\n");
    var t2 = new Trace();
    t2.initialize(t1);
    t2[0].key; // --> 123.3321
    t2[0].val; // --> 456.654
    t2[1].key; // --> 147.741
    t2[1].val; // --> 258.852


  Trace.initialize(keyArray, valArray)

    Initialize this Trace object with two numerical <Array> entities

    keyArray: the <Array> object containing all the keys of the <Trace>
    valArray: the <Array> object containing all the values of the <Trace>

    Ex:
    var t1 = new Trace;
    t1.initialize([123.321,456.654,789.987],[147.741, 258.852, 369.963]);
    t1.length; // --> 3
    var dp0 = t1[0];
    dp0.key; // --> 123.321
    dp0.val; // --> 147.741


  Trace.initialize(keyArray, valArray, keyStart, keyEnd)

    Initialize this Trace object with two numerical <Array> entities and two
    <Number> entities

    keyArray: the <Array> object containing all the keys of the <Trace>
    valArray: the <Array> object containing all the values of the <Trace>
    keyStart: the <Number> value defining the beginning of the acceptable key range
    keyEnd: the <Number> value defining the end of the acceptable key range

    Ex:
    var t1 = new Trace;
    t1.initialize([123.321,456.654,789.987],[147.741, 258.852, 369.963], 124, 450);
    t1.length; // --> 0

    var t1 = new Trace;
    t1.initialize([123.321,456.654,789.987],[147.741, 258.852, 369.963], 124, 457);
    t1.length; // --> 1
    var dp0 = t1[0];
    dp0.key; // --> 456.654
    dp0.val; // --> 258.852


  Trace.keyArray()

    Return an <Array> of <Number> entities corresponding to all the keys of
    this Trace object

    Ex:
    var t7 = new Trace;
    t7.initialize([123.321,456.654,789.987],[147.741, 258.852, 369.963]);
    t7.keyArray(); // --> 123.321,456.654,789.987


  Trace.valArray()

    Return an <Array> of <Number> entities corresponding to all the values of
    this Trace object

    Ex:
    var t7 = new Trace;
    t7.initialize([123.321,456.654,789.987],[147.741, 258.852, 369.963]);
    t7.valArray(); // --> 147.741,258.852,369.963


  Trace.asText()

    Return the <DataPoint> data points of this Trace object as a <String>
    formatted according to this schema: <key> <value>, with one such pair per
    line

    Ex:
    var t7 = new Trace;
    t7.initialize([123.321,456.654,789.987],[147.741, 258.852, 369.963]);
    t7.asText(); // --> output is:
    123.3210000000 147.7410000000
    456.6540000000 258.8520000000
    789.9870000000 369.9630000000


  Trace.exportToFile(fileName)

    Export the <DataPoint> contents of this Trace object to a file. The format
    is according to this schema: <key> <value>, with one such pair per line

    fileName: <String> containing the path to the file in which to store the
    data

    Ex:
    var t7 = new Trace;
    t7.initialize([123.321,456.654,789.987],[147.741, 258.852, 369.963]);
    t7.exportToFile("/tmp/trial.txt"); // --> file contains:
    123.3210000000 147.7410000000
    456.6540000000 258.8520000000
    789.9870000000 369.9630000000


  Trace.valSum()

    Return the <Number> value corresponding to the sum of all the values of
    all the <DataPoint> object in this Trace object

    Ex:
    var t7 = new Trace;
    t7.initialize([123.321,456.654,789.987],[147.741, 258.852, 369.963]);
    t7.valSum(); // --> 776.556


  Trace.combine(dataPoint)

    Combine into this Trace object the <DataPoint> object

    dataPoint: <DataPoint> object to combine into this MassSpectrum

    Ex:

    var t7 = new Trace;
    t7.initialize([123.321,456.654,789.987],[147.741, 258.852, 369.963]);

    t7.asText(); // --> output is:

    123.3210000000 147.7410000000
    456.6540000000 258.8520000000
    789.9870000000 369.9630000000

    t7.combine(new DataPoint(200.002,1000)); // --> 1, the number of added DataPoint objects

    t7.asText(); // --> output is:

    123.3210000000 147.7410000000
    200.0020000000 1000.0000000000
    456.6540000000 258.8520000000
    789.9870000000 369.9630000000

    t7.combine(new DataPoint(200.002,1000)); // --> 0, no added DataPoint, only increment the value

    t7.asText(); // --> output is:

    123.3210000000 147.7410000000
    200.0020000000 2000.0000000000 // value increment by the same original amount.
    456.6540000000 258.8520000000
    789.9870000000 369.9630000000


  Trace.combine(trace)

    Combine into this Trace object the <Trace> object

    trace: <Trace> object to combine into this Trace

    Ex:
    var t1 = new Trace;
    t1.initialize([123.321,456.654,789.987],[147.741, 258.852,369.963]);
    var t2 = new Trace(t1);
    t2.length; // --> 3
    t2.asText(); // --> output is:

    123.3210000000 147.7410000000
    456.6540000000 258.8520000000
    789.9870000000 369.9630000000

    t2.asText(); // --> output is:

    123.3210000000 147.7410000000
    456.6540000000 258.8520000000
    789.9870000000 369.9630000000

    t2.combine(t1); // --> 3: 3 DataPoint objects were combined
    t2.asText(); // --> output is:

    123.3210000000 295.4820000000
    456.6540000000 517.7040000000
    789.9870000000 739.9260000000


  Trace.combine(key, val)

    Combine into this Trace object a data point in the form of
    two <Number> entities, key and val

    Ex:
    var t1 = new Trace;
    t1.initialize([123.321,456.654,789.987],[147.741, 258.852,369.963]);

    t1.length; // --> 3

    t1.asText(); // --> output is:

    123.3210000000 147.7410000000
    456.6540000000 258.8520000000
    789.9870000000 369.9630000000

    t1.combine(456.654, 1000);

    t1.asText(); // --> output is:

    123.3210000000 147.7410000000
    456.6540000000 1258.8520000000
    789.9870000000 369.9630000000

    t1.combine(800, 2000);

    t1.asText(); // --> output is:

    123.3210000000 147.7410000000
    456.6540000000 1258.8520000000
    789.9870000000 369.9630000000
    800.0000000000 2000.0000000000


  Trace.subtract(dataPoint)

    Subtract from this Trace object the <DataPoint> object

    dataPoint: <DataPoint> object to subtract from this MassSpectrum


  Trace.subtract(trace)

    Subtract from this Trace object the <Trace> object

    trace: <Trace> object to subtract from this Trace


  Trace.subtract(mz, i)

    Subtract from this Trace object a data point in the form of
    two <Number> values, key and value


MassSpectrum

 This class is the main class for handling mass spectra.
 MassSpectrum objects can be "combination spectra", that is, they correspond
 to the summation of a number of spectra. When a combination of mass spectra
 is performed, the combination spectrum is created empty at first and is
 then "configured" to receive the result of the sequential combination of
 all the mass spectra that are to be summated. There are a number of member
 data that are devoted to that combination configuration.

 A spectrum is actually a <Trace> that has a set of particular members:
 - rt: the retention time at which the spectrum was acquired
 - dt: the mobility drift time (for ion mobility spectra)
 - binCount: the number of bins set up in a combination spectrum
 - binSize: the size of the bins in the combination spectrum
 - binSizeType: the type of the bin size (enum AMU, PPM, RES)
 - binSizeTypestring: <String> representation of binSizeType
 - minMz: the minimum m/z value of the combination specrum
 - maxMz: the maximum m/z value of the combination specrum
 - applyMzShift: tells if the m/z shift should be applied
 - mzShift: m/z shift applied (or not) to each combined mass spectrum
 - removeZeroValDataPoints: tells if the data points in the spectrum that
   have a m/z with 0 intensity should be removed

  MassSpectrum()

    Constructor of a MassSpectrum object

    Ex:

    var ms1 = new MassSpectrum();


  MassSpectrum(title)

    Constructor of a MassSpectrum object

    title: <String> containing the title of the MassSpectrum object

    Ex:

    var ms1 = new MassSpectrum("spectrum title");
    ms1.title; // --> spectrum title


  MassSpectrum(other)

    Constructor of a MassSpectrum object

    other: <Trace> object to be used to initialize this object

    Ex:

    var t1 = new Trace;
    t1.initialize([123.321,456.654,789.987],[147.741, 258.852, 369.963]);
    t1.asText();

    123.3210000000 147.7410000000
    456.6540000000 258.8520000000
    789.9870000000 369.9630000000

    var ms1 = new MassSpectrum(t1);
    ms1.asText();

    123.3210000000 147.7410000000
    456.6540000000 258.8520000000
    789.9870000000 369.9630000000


  MassSpectrum(other)

    Constructor of a MassSpectrum object

    other: <MassSpectrum> object to be used to initialize this object

    Ex:

    var ms1 = new MassSpectrum();
    ms1.initialize([123.321,456.654,789.987],[147.741, 258.852, 369.963]);
    ms1.asText();

    123.3210000000 147.7410000000
    456.6540000000 258.8520000000
    789.9870000000 369.9630000000

    ms1.rt = 1.2;
    ms1.dt = 0.00325698;

    var ms2 = new MassSpectrum(ms1);
    ms2.asText();

    123.3210000000 147.7410000000
    456.6540000000 258.8520000000
    789.9870000000 369.9630000000

    ms2.rt; // --> 1.2
    ms2.dt; // --> 0.00325698


  MassSpectrum.title

    Return the title <String> property.

    Ex:

    var ms1 = new MassSpectrum("spectrum title");
    ms1.title; // --> spectrum title


  MassSpectrum.length

    Return the length <Number> property (number of <DataPoint> objects).

    Ex:

    var ms1 = new MassSpectrum();
    ms1.initialize([123.321,456.654,789.987],[147.741, 258.852, 369.963]);
    ms1.asText();

    123.3210000000 147.7410000000
    456.6540000000 258.8520000000
    789.9870000000 369.9630000000

    ms1.length; // --> 3


  MassSpectrum.rt

    Return the rt <Number> property (retention time at which this mass
    spectrum was acquired.

    Ex:

    var ms1 = new MassSpectrum();
    ms1.rt = 1.2;

    ms1.rt; // --> 1.2


  MassSpectrum.dt

    Return the dt <Number> property (ion mobility drift time at which
    this mass spectrum was acquired.

    Ex:

    var ms1 = new MassSpectrum();
    ms1.dt = 0.00325698;

    ms1.dt; // --> 0.00325698


  MassSpectrum.binCount

    Return the bin count <Number> property (number of bins in this mass
    spectrum).


  MassSpectrum.binSize

    Return the bin size <Number> property (size of the bins in this mass
    spectrum).


  MassSpectrum.binSizeType

    Return the bin size type property as a <Number>.

    Ex:

    var ms1 = new MassSpectrum();
    ms1.binSizeType = 2;
    ms1.binSizeType; // --> 2
    ms1.binSizeTypeString = "RES";
    ms1.binSizeType; // --> 4


  MassSpectrum.binSizeTypeString

    Return the bin size type property as a <String>.

    Ex:

    var ms1 = new MassSpectrum();
    ms1.binSizeType = 2;
    ms1.binSizeTypeString; // -> MZ;


  MassSpectrum.minMz

    Return the <Number> minimum m/z value to be used to craft the bins.


  MassSpectrum.maxMz

    Return the <Number> maximum m/z value to be used to craft the bins.


  MassSpectrum.applyMzShift

    Return the <Boolean> value telling if the m/z shift should be
    applied.


  MassSpectrum.mzShift

    Return the <Number> m/z shift value to apply when combining spectra.


  MassSpectrum.removeZeroValDataPoints

    Return the <Boolean> value telling if the <DataPoint> objects having
    m/z keys of a 0-intensity value should be removed from the spectrum.


  MassSpectrum[index]

    Return the <DataPoint> object at index.

    Ex:

    var ms1 = new MassSpectrum();
    ms1.initialize([123.321,456.654,789.987],[147.741, 258.852, 369.963]);
    ms1.asText();

    123.3210000000 147.7410000000
    456.6540000000 258.8520000000
    789.9870000000 369.9630000000

    var dp0 = ms1[0];
    dp0.key; // --> 123.321
    dp0.val; // --> 147.741

    ms1[0].key; // --> 123.321
    ms1[0].val; // --> 147.741


  MassSpectrum.initialize(other)

    Initialize this MassSpectrum object with a <Trace> object

    other: <Trace> object

    Ex:

    var t1 = new Trace;
    t1.initialize([123.321,456.654,789.987],[147.741, 258.852, 369.963]);
    t1.asText();

    123.3210000000 147.7410000000
    456.6540000000 258.8520000000
    789.9870000000 369.9630000000

    var ms1 = new MassSpectrum();
    ms1.initialize(t1);
    ms1.asText();

    123.3210000000 147.7410000000
    456.6540000000 258.8520000000
    789.9870000000 369.9630000000


  MassSpectrum.initialize(other)

    Initialize this MassSpectrum object with a <MassSpectrum> object

    other: <MassSpectrum> object

    Ex:

    var ms1 = new MassSpectrum();
    ms1.initialize([123.321,456.654,789.987],[147.741, 258.852, 369.963]);
    ms1.asText();

    123.3210000000 147.7410000000
    456.6540000000 258.8520000000
    789.9870000000 369.9630000000

    var ms2 = new MassSpectrum();
    ms2.initialize(ms1);
    ms2.asText();

    123.3210000000 147.7410000000
    456.6540000000 258.8520000000
    789.9870000000 369.9630000000



  MassSpectrum.initialize(mzArray, iArray)

    Initialize this MassSpectrum object with two <Array> of numerical
    values

    mzArray: <Array> object containing the m/z values of the spectrum
    iArray: <Array> object containing the intensity values of the spectrum

    Ex:

    var ms1 = new MassSpectrum;

    var mzArray = [123.321,456.654,789.987];
    var iArray = [147.741, 258.852, 369.963];

    ms1.initialize(mzArray, iArray);

    ms1.asText(); // --> output is:

    123.3210000000 147.7410000000
    456.6540000000 258.8520000000
    789.9870000000 369.9630000000


  MassSpectrum.initialize(mzArray, iArray, mzStart, mzEnd)

    Initialize this MassSpectrum object with two <Array> of numerical
    values and two <Number> entities delimiting a range of acceptable m/z
    values.

    mzArray: <Array> object containing the m/z values of the spectrum
    iArray: <Array> object containing the intensity values of the spectrum
    mzStart: m/z value used to filter the data points to be used for the
    initialization (the start of the acceptable m/z range)
    mzEnd: m/z value used to filter the data points to be crafted for the
    initialization (the end of the acceptable m/z range)

    Ex:

    var ms1 = new MassSpectrum;

    var mzArray = [123.321,456.654,789.987];
    var iArray = [147.741, 258.852, 369.963];

    ms1.initialize(mzArray, iArray, 122.231, 789.986); // range: [122.231-789.986]

    ms1.asText(); // --> output is:

    123.3210000000 147.7410000000
    456.6540000000 258.8520000000


  MassSpectrum.mzArray()

    Return a list of <Number> entities corresponding to all the m/z values of
    the spectrum

    Ex:

    var ms1 = new MassSpectrum;

    var mzArray = [123.321,456.654,789.987];
    var iArray = [147.741, 258.852, 369.963];

    ms1.initialize(mzArray, iArray, 122.231, 789.986); // range: [122.231-789.986]

    ms1.asText(); // --> output is:

    123.3210000000 147.7410000000
    456.6540000000 258.8520000000

    ms1.mzArray(); --> output is:
    123.321,456.654


  MassSpectrum.iArray()

    Return a list of <Number> entities corresponding to all the intensity values of
    the spectrum

    Ex:

    var ms1 = new MassSpectrum;

    var mzArray = [123.321,456.654,789.987];
    var iArray = [147.741, 258.852, 369.963];

    ms1.initialize(mzArray, iArray, 122.231, 789.986); // range: [122.231-789.986]

    ms1.asText(); // --> output is:

    123.3210000000 147.7410000000
    456.6540000000 258.8520000000

    ms1.iArray(); --> output is:
    147.741,258.852


  MassSpectrum.asText()

    Return the data points of the spectrum in <String> object. The format of the
    string is of the kind <m/z>,<intensity>, one data point per line.

    Ex:

    var ms1 = new MassSpectrum;

    var mzArray = [123.321,456.654,789.987];
    var iArray = [147.741, 258.852, 369.963];

    ms1.initialize(mzArray, iArray, 122.231, 789.986); // range: [122.231-789.986]

    ms1.asText(); // --> output is:

    123.3210000000 147.7410000000
    456.6540000000 258.8520000000


  MassSpectrum.tic()

    Return the total ion current calculated for this MassSpectrum object

    Ex:

    var ms1 = new MassSpectrum;
    ms1.initialize([123.321, 456.654, 789.987], [147.741, 258.852, 369.963]);
    ms1.asText();
    ms1.tic(); // --> 776.556


  MassSpectrum.combine(dataPoint)

    Combine into this MassSpectrum object the <DataPoint> object

    dataPoint: <DataPoint> object to combine into this MassSpectrum

    Ex:

    var ms1 = new MassSpectrum;
    ms1.initialize([123.321, 456.654, 789.987], [147.741, 258.852,369.963]);
    ms1.asText(); // --> output is:

    123.3210000000 147.7410000000
    456.6540000000 258.8520000000
    789.9870000000 369.9630000000

    ms1.tic(); // -> 776.556

    var dp1 = new DataPoint(123.321, 456.654);
    ms1.combine(dp1);
    ms1.asText(); // --> output is:

    123.3210000000 604.3950000000 // value incremented
    456.6540000000 258.8520000000
    789.9870000000 369.9630000000

    dp1.key = 800;
    dp1.val = 1000;
    ms1.combine(dp1);
    ms1.asText(); // --> output is:

    123.3210000000 604.3950000000
    456.6540000000 258.8520000000
    789.9870000000 369.9630000000
    800.0000000000 1000.0000000000 // creation of new data point


  MassSpectrum.combine(trace)

    Combine into this MassSpectrum object the <Trace> object

    trace: <Trace> object to combine into this MassSpectrum

    Ex:

    var ms1 = new MassSpectrum;
    ms1.initialize([123.321, 456.654, 789.987], [147.741, 258.852, 369.963]);
    ms1.asText(); //  --> output is:

    123.3210000000 147.7410000000
    456.6540000000 258.8520000000
    789.9870000000 369.9630000000

    ms1.tic(); // --> 776.556
    var t1 = new Trace;
    t1.initialize([123.321,600.000,789.987],[147.741, 300.000, 369.963]);
    t1.asText(); // --> output is:

    123.3210000000 147.7410000000
    600.0000000000 300.0000000000
    789.9870000000 369.9630000000

    t1.valSum(); // --> 817.704
    ms1.combine(t1);
    ms1.asText(); // --> output is:

    123.3210000000 295.4820000000
    456.6540000000 258.8520000000
    600.0000000000 300.0000000000
    789.9870000000 739.9260000000

    ms1.tic(); // --> 1594.26



  MassSpectrum.combine(massSpectrum)

    Combine into this MassSpectrum object the <MassSpectrum> object

    massSpectrum: <MassSpectrum> object to combine into this MassSpectrum

    Ex:

    var ms1 = new MassSpectrum;
    ms1.initialize([123.321, 456.654, 789.987], [147.741, 258.852, 369.963]);

    ms1.asText(); // --> output is:

    123.3210000000 147.7410000000
    456.6540000000 258.8520000000
    789.9870000000 369.9630000000

    ms1.tic(); // --> 776.556

    var ms2 = new MassSpectrum(ms1);
    ms2.combine(1500, 1000);
    ms2.asText(); // --> output is:

    123.3210000000 147.7410000000
    456.6540000000 258.8520000000
    789.9870000000 369.9630000000
    1500.0000000000 1000.0000000000

    ms2.combine(ms1);
    ms2.asText(); // --> output is:

    123.3210000000 295.4820000000
    456.6540000000 517.7040000000
    789.9870000000 739.9260000000
    1500.0000000000 1000.0000000000

    ms2.tic(); // --> 2553.112


  MassSpectrum.combine(mz, i)

    Combine into this MassSpectrum object a data point in the form of
    two <Number> values, m/z and intensity

    Ex:

    var ms1 = new MassSpectrum;
    ms1.initialize([123.321, 456.654, 789.987], [147.741, 258.852, 369.963]);
    ms1.asText(); // --> output is:

    123.3210000000 147.7410000000
    456.6540000000 258.8520000000
    789.9870000000 369.9630000000

    ms1.tic(); // --> 776.556
    var mz1 = 123.321;
    var i1 = 300.000
    ms1.combine(mz1, i1);
    ms1.asText(); // --> output is:

    123.3210000000 447.7410000000 // value incremented
    456.6540000000 258.8520000000
    789.9870000000 369.9630000000

    ms1.combine(800, 1000);
    ms1.asText(); // --> output is:

    123.3210000000 447.7410000000
    456.6540000000 258.8520000000
    789.9870000000 369.9630000000
    800.0000000000 1000.0000000000 // new data point created


  MassSpectrum.subtract(dataPoint)

    Subtract from this MassSpectrum object the <DataPoint> object

    dataPoint: <DataPoint> object to subtract from this MassSpectrum


  MassSpectrum.subtract(trace)

    Subtract from this MassSpectrum object the <Trace> object

    trace: <Trace> object to subtract from this MassSpectrum


  MassSpectrum.subtract(massSpectrum)

    Subtract from this MassSpectrum object the <MassSpectrum> object

    massSpectrum: <MassSpectrum> object to subtract from this MassSpectrum

    Ex:

    var ms1 = new MassSpectrum;
    ms1.initialize([123.321, 456.654, 789.987], [147.741, 258.852, 369.963]);
    ms1.asText(); // --> output is:
    123.3210000000 147.7410000000
    456.6540000000 258.8520000000
    789.9870000000 369.9630000000

    var ms2 = new MassSpectrum(ms1);
    ms2.subtract(ms1);
    ms2.asText(); // --> output is:

    123.3210000000 0.0000000000
    456.6540000000 0.0000000000
    789.9870000000 0.0000000000


  MassSpectrum.subtract(mz, i)

    Subtract from this MassSpectrum object a data point in the form of
    two <Number> values, m/z and intensity

    Ex:

    var ms1 = new MassSpectrum;
    ms1.initialize([123.321, 456.654, 789.987], [147.741, 258.852, 369.963]);
    ms1.asText(); // --> output is:

    123.3210000000 147.7410000000
    456.6540000000 258.8520000000
    789.9870000000 369.9630000000

    ms1.subtract(123.321,100);
    ms1.asText(); // --> output is:

    123.3210000000 47.7410000000
    456.6540000000 258.8520000000
    789.9870000000 369.9630000000


AbstractPlotWidget

 This class is not exported to the JavaScript environment, but it
 serves as the base class for all the plot widget subclasses. Its methods
 are thus available to all the objects of the various subclasses, like
 MassSpecPlotWidget, DriftSpecPlotWidget, ColorMapPlotWidget and
 TicChromPlotWidget, collectively referred to as <PlotWidget> below.

 When using objects of the various classes above, the object name will thus
 be, for example, ticChromPlotWidget0 or driftSpecPlotWidget1. These objects
 are made available to the scripting environment in the tree view on the
 left part of the scripting window. See the user manual for
 details.

  <PlotWidget>.showHistory()

    Shows a tooltip with the History of this plot widget.


  <PlotWidget>.historyAsText()

    Return a textual representation of the history of this plot widget.


  <PlotWidget>.showHelpSummary()

    Show a tooltip with a help string summarizing the various keyboard key
    combinations.


  <PlotWidget>.shouldDestroyPlotWidget()

    Start the destruction of this plot widget.


  <PlotWidget>.toggleMultiGraph()

    If the multi-graph plot corresponding to this plot widget is visible, make
    it invisible. And vice versa.


  <PlotWidget>.showMultiGraph()

    Make the multi-graph plot corresponding to this plot widget visible.


  <PlotWidget>.hideMultiGraph()

    Make the multi-graph plot corresponding to this plot widget invisible.


  <PlotWidget>.exportData()

    Open the data export configuration window. Exporting data allows exporting
    only a subset of the whole data set. It can only be performed if the
    original data were read from a SQLite3 database-formatted mass data file.


  <PlotWidget>.asXyText()

    Return  a textual representation of \c this plot widget data.

    Only the data range currently displayed is processed.


  <PlotWidget>.exportPlot()

    Open a file selection dialog window to select a file in which to export
    this plot widget's data.

    Unlike the exportData() function, this function only exports the currently
    displayed graph data to a comma-separated value text file.


  <PlotWidget>.exportPlotToFile(fileName, rangeStart, rangeEnd)

    Export plot data to a text file as a simple plot. Limit the data range to
    export using the numerical parameters.

    fileName: <String> holding the file name
    rangeStart: <Number> holding the beginning of the range to be exported
    rangeEnd <Number> holding the end of the range to be exported


  <PlotWidget>.savePlotToGraphicsFile()

    Open the graphics export configuration dialog window.


  <PlotWidget>.saveToPdfFile(fileName, noCosmeticPen, width, height,
    pdfCreator, title)

    Save this plot widget as a PDF file graphics.

    fileName: <String> holding the file name
    noCosmeticPen: <Boolean> that tells if pen optimizations should be
    performed
    width: <Number> holding the size of the graphics file in pixels
    height: <Number> holding the size of the graphics file in pixels
    pdfCreator: <String> holding the name of the creator of the PDF file
    title: <String> holding the title of the graphics file


  <PlotWidget>.keys()

    Return an <Array> of <Number> values representing the keys of the data
    plotted.


  <PlotWidget>.values()

    Return an <Array> of <Number> values representing the values of the data
    plotted.


  <PlotWidget>.lastTicIntensity()

    Return the last TIC intensity value that was computed.


  <PlotWidget>.trace()

    Return a Trace object initialized with the data in this plot widget.


  <PlotWidget>.replotWithAxisRangeX(lower, upper)

    Replot this plot widget with new key (X-axis) data range.

    lower: <Number> holding the start value of the range
    upper: <Number> holding the end value of the range


  <PlotWidget>.replotWithAxisRangeY(lower, upper)

    Replot this plot widget with new value (Y-axis) data range.

    lower: <Number> holding the start value of the range
    upper: <Number> holding the end value of the range


  <PlotWidget>.getYatX(x)

    get the value at key x.

    x: <Number> holding the X-axis key for which the value is returned.


ColorMapPlotWidget

 This class cannot be instantiated with the new operator. Objects
 of this class are made available to the scripting environment under the
 form of object variable names colorMapPlotWidget[index], with [index]
 being 0 for the first object created and being incremented each time a new
 ColorMapPlotWidget is created.

  ColorMapPlotWidget.jsIntegrateToRt(dtRangeStart, dtRangeEnd, mzRangeStart, mzRangeEnd)

    Starts an integration of mass spectra data to a XIC chromatogram limiting
    the data ranges specified with the numerical arguments.

    dtRange(Start | End) drift time range values
    mzRange(Start | End) m/z range values

    This function creates a new plot widget to display the obtained results.


  ColorMapPlotWidget.jsIntegrateToMz(dtRangeStart, dtRangeEnd, mzRangeStart, mzRangeEnd)

    Starts an integration of mass spectra data to a mass spectrum limiting the
    data ranges specified with the numerical arguments.

    dtRange(Start | End) drift time range values
    mzRange(Start | End) m/z range values

    This function creates a new plot widget to display the obtained results.


  ColorMapPlotWidget.jsIntegrateToDt(dtRangeStart, dtRangeEnd, mzRangeStart, mzRangeEnd)

    Starts an integration of mass spectra data to a drift spectrum limiting the
    data ranges specified with the numerical arguments.

    dtRange(Start | End) drift time range values
    mzRange(Start | End) m/z range values

    This function creates a new plot widget to display the obtained results.


  ColorMapPlotWidget.jsIntegrateToTicIntensity(dtRangeStart, dtRangeEnd, mzRangeStart, mzRangeEnd)

    Starts an integration of mass spectra data to a TIC intensity single value
    limiting the data ranges specified with the numerical arguments.

    dtRange(Start | End) drift time range values
    mzRange(Start | End) m/z range values

    The TIC intensity value is returned


  ColorMapPlotWidget.transposeAxes()

    Transpose the axes of this color map plot widget


  ColorMapPlotWidget.jsSetMzIntegrationParams(mzIntegrationParams)

    Set the m/z integration parameters object passed as parameter to this plot
    widget so that they are taken into account for the next integrations to a
    mass spectrum.


  ColorMapPlotWidget.jsMzIntegrationParams()

    Return the MzIntegrationParams object currently set for this color map
    plot widget.

    These parameters are taken into account for the integrations to a mass
    spectrum.


TicChromPlotWidget

 This class cannot be instantiated with the new operator. Objects
 of this class are made available to the scripting environment under the
 form of object variable names ticChromPlotWidget[index], with [index]
 being 0 for the first object created and being incremented each time a new
 TicChromPlotWidget is created.

  TicChromPlotWidget.jsIntegrateToMz(lower, upper)

    Starts an integration of mass spectra data to a mass spectrum limiting the
    data range specified with the numerical arguments.

    lower, upper: retention time values limiting the integration. If no values
    are provided, there is no limitation to the integration.

    This function creates a new plot widget to display the obtained results.


  TicChromPlotWidget.jsIntegrateToDt(lower, upper)

    Starts an integration of mass spectra data to a drift spectrum limiting the
    data range specified with the numerical arguments.

    lower, upper: retention time values limiting the integration. If no values
    are provided, there is no limitation to the integration.

    This function creates a new plot widget to display the obtained results.


  TicChromPlotWidget.jsIntegrateToTicIntensity(lower, upper)

    Starts an integration of mass spectra data to a TIC intensity single value
    limiting the data range specified with the numerical arguments.

    lower, upper: retention time values limiting the integration. If no values
    are provided, there is no limitation to the integration.

    The TIC intensity value is returned


  TicChromPlotWidget.jsIntegrateToXic(lower, upper)

    Starts an integration of mass spectra data to a XIC chromatogram limiting
    the data range specified with the numerical arguments.

    This process is not equivalent to an integration to RT because we do not
    take into account the History of the current plot widget. Indeed, the
    integration is performed without any filtering from the initial mass
    spectrometry data.

    lower, upper: retention time values limiting the integration. If no values
    are provided, there is no limitation to the integration.

    This function creates a new plot widget to display the obtained results.


  TicChromPlotWidget.statistics()

    Compute the mass spectra statistics on the spectra currently in the range.


  TicChromPlotWidget.newPlot(trace)

    Create a new TicChromPlotWidget using <Trace> trace for the initialization
    of the data.

    This function creates a new plot widget to display the <Trace> data.


  TicChromPlotWidget.jsSetMzIntegrationParams(mzIntegrationParams)

    Set the m/z integration parameters object passed as parameter to this plot
    widget so that they are taken into account for the next integrations to a
    mass spectrum.


  TicChromPlotWidget.jsMzIntegrationParams()

    Return the MzIntegrationParams object currently set for this color map
    plot widget.

    These parameters are taken into account for the integrations to a mass
    spectrum.


MassSpecPlotWidget

 This class cannot be instantiated with the new operator. Objects
 of this class are made available to the scripting environment under the
 form of object variable names massSpecPlotWidget[index], with [index]
 being 0 for the first object created and being incremented each time a new
 MassSpecPlotWidget is created.

  MassSpecPlotWidget.jsIntegrateToDt(lower, upper)

    Starts an integration of mass spectra data to a drift spectrum limiting the
    data range specified with the numerical arguments.

    lower, upper: retention time values limiting the integration. If no values
    are provided, there is no limitation to the integration.

    This function creates a new plot widget to display the obtained results.


  MassSpecPlotWidget.jsIntegrateToRt(lower, upper)

    Starts an integration of mass spectra data to a XIC chromatogram limiting the
    data range specified with the numerical arguments.

    lower, upper: retention time values limiting the integration. If no values
    are provided, there is no limitation to the integration.

    This function creates a new plot widget to display the obtained results.


  MassSpecPlotWidget.jsIntegrateToTicIntensity(lower, upper)

    Starts an integration of mass spectra data to a TIC intensity single value
    limiting the data range specified with the numerical arguments.

    lower, upper: retention time values limiting the integration. If no values
    are provided, there is no limitation to the integration.

    The TIC intensity value is returned


  MassSpecPlotWidget.massSpectrum(lower, upper)

    Creates a new <MassSpectrum> object limiting the data to the lower and
    upper range limits. The data used to craft the new MassSpectrum are this
    plot widget data. That is, the <MassSpectrum> object is not created by
    looking into the internal mass spectral data set.

    lower, upper: m/z values limiting the integration. If no values
    are provided, there is no limitation to the integration and all the points
    in this plot widget are used.

    Return a new MassSpectrum object.


  MassSpecPlotWidget.newPlot(trace)

    Create a new MassSpecPlotWidget using <Trace> trace for the initialization
    of the data.

    This function creates a new plot widget to display the <Trace> data.


DriftSpecPlotWidget

 This class cannot be instantiated with the new operator. Objects
 of this class are made available to the scripting environment under the
 form of object variable names driftSpecPlotWidget[index], with [index]
 being 0 for the first object created and being incremented each time a new
 DriftSpecPlotWidget is created.

  DriftSpecPlotWidget.jsIntegrateToMz(lower, upper)

    Starts an integration of mass spectra data to a mass spectrum limiting the
    data range specified with the numerical arguments.

    lower, upper: retention time values limiting the integration. If no values
    are provided, there is no limitation to the integration.

    This function creates a new plot widget to display the obtained results.


  DriftSpecPlotWidget.jsIntegrateToRt(lower, upper)

    Starts an integration of mass spectra data to a XIC chromatogram limiting the
    data range specified with the numerical arguments.

    lower, upper: retention time values limiting the integration. If no values
    are provided, there is no limitation to the integration.

    This function creates a new plot widget to display the obtained results.


  DriftSpecPlotWidget.jsIntegrateToTicIntensity(lower, upper)

    Starts an integration of mass spectra data to a TIC intensity single value
    limiting the data range specified with the numerical arguments.

    lower, upper: retention time values limiting the integration. If no values
    are provided, there is no limitation to the integration.

    The TIC intensity value is returned


  DriftSpecPlotWidget.newPlot(trace)

    Create a new DriftSpecPlotWidget using <Trace> trace for the initialization
    of the data.

    This function creates a new plot widget to display the <Trace> data.


  TicChromPlotWidget.jsSetMzIntegrationParams(mzIntegrationParams)

    Set the m/z integration parameters object passed as parameter to this plot
    widget so that they are taken into account for the next integrations to a
    mass spectrum.


  TicChromPlotWidget.jsMzIntegrationParams()

    Return the MzIntegrationParams object currently set for this color map
    plot widget.

    These parameters are taken into account for the integrations to a mass
    spectrum.


MainWindow

 This is the main mineXpert program window. It is not instantiable
 through the JavaScript environment. Some funcitonalities are available to
 allow highlevel tasks to be automated. The MainWindow single instance of
 the minexpert software program is made available to the JavaScript
 environment under the object name mainWinwod, with an alias
 mainWnd.

  MainWindow.quit()

    Quit the application.


  MainWindow.clearPlots()

    Clear all plots and give back all memory associated to the mass data.


  MainWindow.jsCreateMassSpectrumFromClipboard()

    Create a new mass spectrum from data in the clipboard. The data in the
    clipboard need to be under the format of <number><separator><number>,
    <separator> being any non-numerical and non-'.' character. The first
    <number> is the m/z and the second <number> is the intensity.

    Upon completing the parsing of the textual data in the clipboard, a pseudo
    TIC chromatogram is created that needs to be integrated to a mass spectrum
    using:

    lastTicChromPlotWidget.integrateToMz();

    Ex:
    mainWindow.createMassSpectrumFromClipboard();
    lastTicChromPlotWidget.integrateToMz();


  MainWindow.jsOpenMassSpectrometryFile(fileName, streamed)

    Load mass spectrometry data from fileName.

    fileName: <String> holding the mass spectrometry data file name
    streamed: <Boolean> telling if the loading should be in streamed mode.

    Ex:
    mainWindow.jsOpenMassSpectrometryFile("/tmp/20161027-cgb-wt-mobility.db", true);

    reads the data in the file in streamed mode.

    mainWindow.jsOpenMassSpectrometryFile("/tmp/20161027-cgb-wt-mobility.db", false);

    reads the data in the file in full mode.


  MainWindow.jsOpenMassSpectrometryFiles(fileNameList, streamed)

    Load mass spectrometry data from all the files in the fileNameList.

    fileNameList: <Array> of <String> objects holding the mass spectrometry data file names
    streamed: <Boolean> telling if the loading should be in streamed mode.


  MainWindow.about()

    Open an About dialog window.

    Ex:
    mainWindow.about();


SqlMassDataSlicerWnd

 This class cannot be instantiated with the new operator. The only
 object of this class that is published to the scripting environment is
 named ``sqlMassDataSlicerWnd''.

 This class can only be used safely if it is first activated by using the
 exportData() function of the <PlotWidget> classes (see <PlotWidget>).
 Indeed, the <PlotWidget>.exportData() activates this sqlMassDataSlicerWnd
 object and initializes it with the current data range displayed in the
 widget.

 The following describes the various methods that can be used to automate
 fully the slicing of very large mass spectrometry data files in a set of
 smaller files. There are three ways to create new files of a reduced size
 with respect to the initial mass data file:

 - export data from the original file in a single file but with a smaller
   set of data. For example, export only part of a TIC chromatogram or
   export only the mass data corresponding to a given drift time range.
 - export data from the original file in multiple smaller files (either the
   whole initial data range or a smaller range). Two possibilities are
   offered:

    - define the number of slices (their size is dynamically computed);
    - define the size of the slices (their number is dynamically computed);

 This window is available for any <PlotWidget> displaying TIC/XIC
 chromatogram data or drift spectrum data. It is therefore essential to
 start a data export process from that specific plot widget of interest by
 calling <PlotWidget>.exportData(). This call will initialize all the
 widget-specific data into this data export configuration window.

 Ex:
 mainWnd.openMassSpectrometryFile("/path/to/file/20161027-cgb-wt-mobility.db",
 false);
 // The TIC chromatogram window displays the TIC chromatogram in
 ticChromPlotWidget0

 // Activate and initialize the SqlMassDataSlicerWnd (its object name is
 sqlMassDataSlicerWnd)
 ticChromPlotWidget0.exportData();


 // Set the number of slices to 2
 sqlMassDataSlicerWnd.setSliceCount(2);

 // Set the start of the range of interest (retention time)
 sqlMassDataSlicerWnd.rangeStart(0.2);

 // Set the end of the range of interest (retention time)
 sqlMassDataSlicerWnd.rangeEnd(12.7);

 // Set the format string to use to craft the file names
 sqlMassDataSlicerWnd.setFormatString("%f-export-slice-%n-of-%c-range_%s-%e.db");

 // Validate the configuration settings (crafts the file names according to
 the configuration of the data export and according to the format string)

 sqlMassDataSlicerWnd.validate(false);

 // Take a peek at the various file names that have been crafted.
 sqlMassDataSlicerWnd.reviewFileNames();

 // If the file names have no error, then start the data export process.
 sqlMassDataSlicerWnd.confirm();

 Note that the calls to validate() and reviewFilenames() and confirm() can
 be shortened to a single call to run() if it is expected that no error will
 occur upon validation of the data export parameters (typically when the
 script has been thoroughly tested). In that case, the script runs perfectly
 unattended.

  sqlMassDataSlicerWnd.setSrcFileName(fileName)

    Set the source SQLite3 db mass data file name. Only use this function if
    you know the range of the data you are willing to export. Usually this
    function is not used, because when starting the data export process using
    the <PlotWidget>.exportData() function, that source file name is set
    automatically. Thus we recommend you use this function only if you know
    what you are doing.

    fileName : <String> that holds the name of the source mass spectrometry
    data file in the SQLite3 database format.


  sqlMassDataSlicerWnd.setDestDirectory(dir)

    Set the directory (create it if it does not exist) where all the slice
    files are to be written to. If this function is not called before calling
    the validate() or run() functions, the destination directory will be the
    directory where the source file is residing.

    dir: <String> holding the name of the directory in which to write all the
    slice files.


  sqlMassDataSlicerWnd.setFormatString(format)

    Set the string that configures the naming of the slice files. The
    following format specification is available:

    %f: original filename without <.extension>
    %s: slice range start value
    %e: slice range end value
    %n: slice number
    %c: total count of slices

    For example, if the original (source) filename were "my-mass-data.db"
    and the format string were "%f-export-slice-%n-of-%c-range_%s-%e.db",
    the first file would be named
    "my-mass-data-export-slice-1-of-7-range_17-28.db"
    the second file
    "my-mass-data-export-slice-2-of-7-range_29-40.db"
    and so on for another 5 files since the total count of slices is 7.


  sqlMassDataSlicerWnd.setRangeStart(start)

    Set the start value of the data range to be exported. For example, if the
    data export process was started in a TIC chromatogram plot widget, and the
    whole acquisition run spanned [0-35] minutes, then the user might want to
    only export a fraction of that span: [17-28]. In that case, the range start
    value would be 17.

    start: <Number> setting the start value of the range to be exported.


  sqlMassDataSlicerWnd.rangeStart()

    Return the start value of the data range to be exported. For example, if the
    data export process was started in a TIC chromatogram plot widget, and the
    whole acquisition run spanned [0-35] minutes, then the user might want to
    only export a fraction of that span: [17-28]. In that case, the range start
    value would be 17.


  sqlMassDataSlicerWnd.setRangeEnd(end)

    Set the end value of the data range to be exported. For example, if the
    data export process was started in a TIC chromatogram plot widget, and the
    whole acquisition run spanned [0-35] minutes, then the user might want to
    only export a fraction of that span: [17-28]. In that case, the range end
    value would be 28.

    end: <Number> setting the end value of the range to be exported.


  sqlMassDataSlicerWnd.rangeEnd()

    Return the end value of the data range to be exported. For example, if the
    data export process was started in a TIC chromatogram plot widget, and the
    whole acquisition run spanned [0-35] minutes, then the user might want to
    only export a fraction of that span: [17-28]. In that case, the range end
    value would be 28.


  sqlMassDataSlicerWnd.setRange(start, end)

    Set the data range to be exported. For example, if the data export process
    was started in a TIC chromatogram plot widget, and the whole acquisition
    run spanned [0-35] minutes, then the user might want to only export a
    fraction of that span: [17-28]. In that case, the range start and end
    values would be 17 and 28 respectively.

    start: <Number> setting the start value of the range to be exported.
    end: <Number> setting the end value of the range to be exported.


  sqlMassDataSlicerWnd.setSliceCount(count)

    Set the number of slices to be created out of the initial data set.

    count: <Number> indicating the number of slices.


  sqlMassDataSlicerWnd.setSliceSize(size)

    Set the size of the slices to be created out of the initial data set.

    size: <Number> indicating the size of the slices.


  sqlMassDataSlicerWnd.setExportToOneFile()

    Tells that the initial mass data set must be exported into a single file.
    Any [rangeStart-rangeEnd] export range that might have been set is taken
    into account. Not limiting the range of the exported data makes the data
    export operation equivalent to copying the file into another file virtually
    identical to the initial one.


  sqlMassDataSlicerWnd.fileNames()

    Print the names of the files that will be written during the data export
    process. For the list of file names to be created and be available, first set
    the various data export options (format string, number or size of slices...)
    and call sqlMassDataSlicerWnd.validate().


  sqlMassDataSlicerWnd.reviewFileNames()

    Print the names of the files that will be written during the data export
    process. For the list of file names to be created and available, first set
    the various data export options (format string, number or size of slices...)
    and call sqlMassDataSlicerWnd.validate(). In this function, the graphical
    user interface is modified to allow the user to review the file names and
    makes available a push button to start the export process.


  sqlMassDataSlicerWnd.validate(noconfirm)

    Verify the configuration settings for the data export operation. Upon this
    validation, the file names of the files that will be written during the data
    export are crafted according to the file format string (see
    setFormatString()). This function needs to be called prior to calling
    reviewFileNames() or fileNames(). After reviewing the file names,
    a call to the function confirm() starts the data export process.

    noconfirm: <Boolean> value telling if the data export process can proceed
    automatically. If true, no call to confirm() needs to be done for the data
    export to start immediately if there is no error during the validation step.


  sqlMassDataSlicerWnd.confirm()

    Confirm that the data export process can start. This function must be
    called after the validation has been performed (see validate()) and the
    user has checked that the file names have been correcly crafted upon
    validation according to the format string.



  sqlMassDataSlicerWnd.run()

    After having set the range, the number (or size) of the slices, let the
    program compute the size (or number, respectively) of the slices and run
    the data export. This function calls validate() with noconfirm set to True
    (see validate()). This way, if no error is encountered during the
    validation, then the data export process is started right way, which is
    expected for a script to run unattended.


