Skip to content

Commit

Permalink
Merge pull request #2058 from Mailaender/scan-#-at-peak-max
Browse files Browse the repository at this point in the history
Fix Scan # at peak Maximum and S/N in Peak/Scan List.
  • Loading branch information
eselmeister authored Jan 28, 2025
2 parents 351c147 + 3055202 commit 3993d00
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public class PeakScanListLabelProvider extends AbstractChemClipseLabelProvider {
CLASSIFIER, //
PEAK_MODEL //
};
//

public static final int[] BOUNDS = { //
30, //
60, //
Expand Down Expand Up @@ -240,28 +240,28 @@ private String getPeakText(IPeak peak, int columnIndex) {
case 12:
if(peak instanceof IChromatogramPeakMSD chromatogramPeak) {
switch(columnIndex) {
case 9:
case 11:
text = Integer.toString(chromatogramPeak.getScanMax());
break;
case 10:
case 12:
text = decimalFormat.format(chromatogramPeak.getSignalToNoiseRatio());
break;
}
} else if(peak instanceof IChromatogramPeakCSD chromatogramPeak) {
switch(columnIndex) {
case 9:
case 11:
text = Integer.toString(chromatogramPeak.getScanMax());
break;
case 10:
case 12:
text = decimalFormat.format(chromatogramPeak.getSignalToNoiseRatio());
break;
}
} else if(peak instanceof IChromatogramPeakWSD chromatogramPeak) {
switch(columnIndex) {
case 9:
case 11:
text = Integer.toString(chromatogramPeak.getScanMax());
break;
case 10:
case 12:
float sn = chromatogramPeak.getSignalToNoiseRatio();
text = Float.isNaN(sn) ? NO_VALUE : decimalFormat.format(sn);
break;
Expand Down

0 comments on commit 3993d00

Please sign in to comment.