Skip to content

Commit

Permalink
Merge pull request #2066 from Mailaender/abstract-integrated-area
Browse files Browse the repository at this point in the history
Move peak integrated area to abstract chromatogram
  • Loading branch information
eselmeister authored Jan 29, 2025
2 parents 4a47e14 + 2e8e79b commit 756db23
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 48 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2012, 2024 Lablicate GmbH.
* Copyright (c) 2012, 2025 Lablicate GmbH.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
Expand Down Expand Up @@ -68,16 +68,6 @@ public void fireUpdate(IChromatogramSelection<?, ?> chromatogramSelection) {
}
}

@Override
public double getPeakIntegratedArea() {

double integratedArea = 0.0d;
for(IChromatogramPeakCSD peak : getPeaks()) {
integratedArea += peak.getIntegratedArea();
}
return integratedArea;
}

@Override
public <ResultType extends IMeasurementResult<?>> ResultType getMeasurementResult(Class<ResultType> type) {

Expand Down Expand Up @@ -106,4 +96,4 @@ private String getNoiseCalculatorId() {
return PreferenceSupplier.getSelectedNoiseCalculatorId();
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,16 @@ public void setIntegratorDescription(String integratorDescription) {
}
}

@Override
public double getPeakIntegratedArea() {

double integratedArea = 0.0d;
for(IPeak peak : getPeaks()) {
integratedArea += peak.getIntegratedArea();
}
return integratedArea;
}

@Override
public double getChromatogramIntegratedArea() {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008, 2024 Lablicate GmbH.
* Copyright (c) 2008, 2025 Lablicate GmbH.
*
* All rights reserved.
* This program and the accompanying materials are made available under the
Expand Down Expand Up @@ -252,16 +252,6 @@ public double getStopIon() {
return highestIon;
}

@Override
public double getPeakIntegratedArea() {

double integratedArea = 0.0d;
for(IChromatogramPeakMSD peak : getPeaks()) {
integratedArea += peak.getIntegratedArea();
}
return integratedArea;
}

@Override
public IIonTransitionSettings getIonTransitionSettings() {

Expand Down Expand Up @@ -298,4 +288,4 @@ private String getNoiseCalculatorId() {
return PreferenceSupplier.getSelectedNoiseCalculatorId();
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2023, 2024 Lablicate GmbH.
* Copyright (c) 2023, 2025 Lablicate GmbH.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
Expand All @@ -25,16 +25,6 @@ public void updateNoiseFactor() {
// TODO - Noise Calculation
}

@Override
public double getPeakIntegratedArea() {

double integratedArea = 0.0d;
for(IChromatogramPeakVSD peak : getPeaks()) {
integratedArea += peak.getIntegratedArea();
}
return integratedArea;
}

@Override
public void fireUpdate(IChromatogramSelection<?, ?> chromatogramSelection) {

Expand All @@ -45,4 +35,4 @@ public void fireUpdate(IChromatogramSelection<?, ?> chromatogramSelection) {
chromatogramSelectionISD.update(true);
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2013, 2024 Lablicate GmbH.
* Copyright (c) 2013, 2025 Lablicate GmbH.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
Expand Down Expand Up @@ -89,16 +89,6 @@ public void fireUpdate(IChromatogramSelection<?, ?> chromatogramSelection) {
}
}

@Override
public double getPeakIntegratedArea() {

double integratedArea = 0.0d;
for(IChromatogramPeakWSD peak : getPeaks()) {
integratedArea += peak.getIntegratedArea();
}
return integratedArea;
}

@Override
public IBaselineModel getBaselineModel(double wavelength) {

Expand Down Expand Up @@ -152,4 +142,4 @@ private String getNoiseCalculatorId() {
return PreferenceSupplier.getSelectedNoiseCalculatorId();
}
}
}
}

0 comments on commit 756db23

Please sign in to comment.