public Vector<Double>[] calcIntensity() throws Exception {

    int fileIndex = 0;
    @SuppressWarnings("unchecked")
    Vector<Double>[] indexedReturn = new Vector[this.rawData.size()];

    for (RawData raw : this.rawData) {
      Vector<Double> sampleReturn = new Vector<Double>();
      if (raw.getSegmentStartBorders().size() != 0
          && dataNormingRate
              != 0) { // raw.getSegmentStartBorders().size()!=0 is true if segmentation is used.
        for (int i = 0;
            i < raw.getSegmentStartBorders().size();
            i++) { // Calculates and saves intensity values for all Segments
          Timestamp start = raw.getSegmentStartBorders().get(i);

          if (i == 0) {
            double intensity = this.calcIntensity(raw.getTimestamps()[0], start, fileIndex);
            sampleReturn.add((intensity));
          }
          if (i < raw.getSegmentStartBorders().size() - 1) {
            Timestamp nextStart = raw.getSegmentStartBorders().get(i + 1);
            double intensity =
                this.calcIntensity(start, nextStart, fileIndex); // //DATA NORMING PART
            for (int y = 0;
                y < (nextStart.getTime() - start.getTime()) / dataNormingRate;
                y++) { // divided by dataNormingRate to reduce DataOutput
              sampleReturn.add((intensity));
            }
          }
        }

      } else {
        System.out.println(
            "Calculation for this module not possible without segmentation and at least data norming of 1!");
      }

      indexedReturn[fileIndex] = sampleReturn;
      fileIndex++;
    }
    logger.info("Stepcounter " + stepCounter);
    return indexedReturn;
  }