Package net.sf.mzmine.data.impl

Examples of net.sf.mzmine.data.impl.SimpleDataPoint


  private double getMaxIntensity(DataPoint dataPoints[], Range mzRange,
      PlotMode plotMode) {

    double maxIntensity = 0;

    DataPoint searchMZ = new SimpleDataPoint(mzRange.getMin(), 0);
    int startMZIndex = Arrays.binarySearch(dataPoints, searchMZ,
        new DataPointSorter(SortingProperty.MZ,
            SortingDirection.Ascending));
    if (startMZIndex < 0)
      startMZIndex = (startMZIndex * -1) - 1;
View Full Code Here


    DataPoint dataPoints[] = new DataPoint[numOfDataPoints];

    for (int i = 0; i < numOfDataPoints; i++) {
      float mz = floatBuffer.get();
      float intensity = floatBuffer.get();
      dataPoints[i] = new SimpleDataPoint(mz, intensity);
    }

    return dataPoints;

  }
View Full Code Here

      sumOfInts = sumOfInts / h;

      if (sumOfInts < 0) {
        sumOfInts = 0;
      }
      newDataPoints[spectrumInd - marginSize] = new SimpleDataPoint(
          oldDataPoints[spectrumInd].getMZ(), sumOfInts);

    }

    SimpleScan newScan = new SimpleScan(scan);
View Full Code Here

    // set the new m/z value in the middle of the bin
    double newX = mzRange.getMin() + binSize / 2.0;
    // creates new DataPoints
    for (int i = 0; i < newY.length; i++) {
      newPoints[i] = new SimpleDataPoint(newX, newY[i]);
      newX += binSize;
    }

    // Create updated scan
    SimpleScan newScan = new SimpleScan(scan);
View Full Code Here

      elSum = 0;
      for (int j = 0; j < intensityWindow.size(); j++) {
        elSum += ((Double) (intensityWindow.get(j))).doubleValue();
      }

      newDataPoints[i] = new SimpleDataPoint(currentMass, elSum
          / (double) intensityWindow.size());

    }

    // Create filtered scan
View Full Code Here

          finalMZRange.extendRange(dp.getMZ());
          finalIntensityRange.extendRange(dp.getIntensity());
        }

        scanNumbers[i] = bestPeakDataPoints.get(i).getScanNumber();
        finalDataPoint[i] = new SimpleDataPoint(dp.getMZ(),
            dp.getIntensity());
        mz += bestPeakDataPoints.get(i).getMZ();

        // Check height
        if (bestPeakDataPoints.get(i).getIntensity() > height) {
View Full Code Here

      // Copy original data points.
      int i = 0;
      for (final DataPoint dp : origDataPoints) {

        newDataPoints[i++] = new SimpleDataPoint(dp);
      }

      // Create new copied scan.
      final SimpleScan newScan = new SimpleScan(origScan);
      newScan.setDataPoints(newDataPoints);
View Full Code Here

      // Subtract baseline.
      final double mz = dp.getMZ();
      final int bin = mzRange.binNumber(numBins, mz);
      final double baselineIntenstity = baselines[bin][scanIndex];
      newDataPoints[i++] = baselineIntenstity <= 0.0
          ? new SimpleDataPoint(dp)
          : new SimpleDataPoint(mz, Math.max(0.0, dp.getIntensity()
              - baselineIntenstity));
    }

    // Return the new data points.
    return newDataPoints;
View Full Code Here

      // Subtract baseline.
      final double mz = dp.getMZ();
      final int bin = mzRange.binNumber(numBins, mz);
      final double baselineIntenstity = baselines[bin][scanIndex];
      newDataPoints[i++] = baselineIntenstity <= 0.0
          ? new SimpleDataPoint(dp)
          : new SimpleDataPoint(mz, Math.max(0.0, dp.getIntensity()
              * (1.0 - baselineIntenstity)));
    }

    // Return the new data points.
    return newDataPoints;
View Full Code Here

                  // Create a new data point.
                  final double mz = dataPoint.getMZ();
                  final double rt = dataFile.getScan(
                      scanNumber).getRetentionTime();
                  final DataPoint newDataPoint = new SimpleDataPoint(
                      mz, intensity);
                  newDataPoints[i] = newDataPoint;

                  // Track maximum intensity data point.
                  if (intensity > maxIntensity) {
View Full Code Here

TOP

Related Classes of net.sf.mzmine.data.impl.SimpleDataPoint

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.