diff --git a/chemclipse/plugins/org.eclipse.chemclipse.chromatogram.xxd.baseline.detector/META-INF/MANIFEST.MF b/chemclipse/plugins/org.eclipse.chemclipse.chromatogram.xxd.baseline.detector/META-INF/MANIFEST.MF index af92deb9a0..d803b4c7f2 100644 --- a/chemclipse/plugins/org.eclipse.chemclipse.chromatogram.xxd.baseline.detector/META-INF/MANIFEST.MF +++ b/chemclipse/plugins/org.eclipse.chemclipse.chromatogram.xxd.baseline.detector/META-INF/MANIFEST.MF @@ -12,7 +12,8 @@ Require-Bundle: org.eclipse.core.runtime, org.eclipse.chemclipse.model;bundle-version="0.8.0", org.eclipse.chemclipse.csd.model;bundle-version="0.8.0", org.eclipse.chemclipse.wsd.model;bundle-version="0.8.0", - com.fasterxml.jackson.core.jackson-annotations;bundle-version="2.9.9" + com.fasterxml.jackson.core.jackson-annotations;bundle-version="2.9.9", + org.eclipse.chemclipse.support;bundle-version="0.9.0" Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-17 Export-Package: org.eclipse.chemclipse.chromatogram.xxd.baseline.detector.core, diff --git a/chemclipse/plugins/org.eclipse.chemclipse.chromatogram.xxd.baseline.detector/src/org/eclipse/chemclipse/chromatogram/xxd/baseline/detector/core/BaselineDetector.java b/chemclipse/plugins/org.eclipse.chemclipse.chromatogram.xxd.baseline.detector/src/org/eclipse/chemclipse/chromatogram/xxd/baseline/detector/core/BaselineDetector.java index 6c061e8cc2..e699612af3 100644 --- a/chemclipse/plugins/org.eclipse.chemclipse.chromatogram.xxd.baseline.detector/src/org/eclipse/chemclipse/chromatogram/xxd/baseline/detector/core/BaselineDetector.java +++ b/chemclipse/plugins/org.eclipse.chemclipse.chromatogram.xxd.baseline.detector/src/org/eclipse/chemclipse/chromatogram/xxd/baseline/detector/core/BaselineDetector.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2023 Lablicate GmbH. + * Copyright (c) 2008, 2024 Lablicate GmbH. * * All rights reserved. * This program and the accompanying materials are made available under the @@ -121,6 +121,7 @@ public static IBaselineDetectorSupport getBaselineDetectorSupport() { try { IBaselineDetectorSettings instance = (IBaselineDetectorSettings)element.createExecutableExtension(DETECTOR_SETTINGS); supplier.setSettingsClass(instance.getClass()); + supplier.getLiteratureReferences().addAll(instance.getLiteratureReferences()); } catch(CoreException e) { logger.warn(e); // settings class is optional, set null instead diff --git a/chemclipse/plugins/org.eclipse.chemclipse.chromatogram.xxd.baseline.detector/src/org/eclipse/chemclipse/chromatogram/xxd/baseline/detector/core/BaselineDetectorProcessTypeSupplier.java b/chemclipse/plugins/org.eclipse.chemclipse.chromatogram.xxd.baseline.detector/src/org/eclipse/chemclipse/chromatogram/xxd/baseline/detector/core/BaselineDetectorProcessTypeSupplier.java index 57ca1da708..23a926e804 100644 --- a/chemclipse/plugins/org.eclipse.chemclipse.chromatogram.xxd.baseline.detector/src/org/eclipse/chemclipse/chromatogram/xxd/baseline/detector/core/BaselineDetectorProcessTypeSupplier.java +++ b/chemclipse/plugins/org.eclipse.chemclipse.chromatogram.xxd.baseline.detector/src/org/eclipse/chemclipse/chromatogram/xxd/baseline/detector/core/BaselineDetectorProcessTypeSupplier.java @@ -60,6 +60,7 @@ private static final class BaselineDetectorProcessorSupplier extends Chromatogra public BaselineDetectorProcessorSupplier(IBaselineDetectorSupplier supplier, IProcessTypeSupplier parent) { super(supplier.getId(), supplier.getDetectorName(), supplier.getDescription(), (Class)supplier.getSettingsClass(), parent, DataType.MSD, DataType.CSD, DataType.WSD, DataType.VSD); + getLiteratureReferences().addAll(supplier.getLiteratureReferences()); } @Override diff --git a/chemclipse/plugins/org.eclipse.chemclipse.chromatogram.xxd.baseline.detector/src/org/eclipse/chemclipse/chromatogram/xxd/baseline/detector/core/BaselineDetectorSupplier.java b/chemclipse/plugins/org.eclipse.chemclipse.chromatogram.xxd.baseline.detector/src/org/eclipse/chemclipse/chromatogram/xxd/baseline/detector/core/BaselineDetectorSupplier.java index 82f0f79fbc..adad3a9711 100644 --- a/chemclipse/plugins/org.eclipse.chemclipse.chromatogram.xxd.baseline.detector/src/org/eclipse/chemclipse/chromatogram/xxd/baseline/detector/core/BaselineDetectorSupplier.java +++ b/chemclipse/plugins/org.eclipse.chemclipse.chromatogram.xxd.baseline.detector/src/org/eclipse/chemclipse/chromatogram/xxd/baseline/detector/core/BaselineDetectorSupplier.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2018 Lablicate GmbH. + * Copyright (c) 2008, 2024 Lablicate GmbH. * * All rights reserved. * This program and the accompanying materials are made available under the @@ -11,7 +11,11 @@ *******************************************************************************/ package org.eclipse.chemclipse.chromatogram.xxd.baseline.detector.core; +import java.util.ArrayList; +import java.util.List; + import org.eclipse.chemclipse.chromatogram.xxd.baseline.detector.settings.IBaselineDetectorSettings; +import org.eclipse.chemclipse.support.literature.LiteratureReference; public class BaselineDetectorSupplier implements IBaselineDetectorSupplier { @@ -19,6 +23,7 @@ public class BaselineDetectorSupplier implements IBaselineDetectorSupplier { private String description = ""; private String detectorName = ""; private Class settingsClass; + private List literatureReference = new ArrayList<>(); @Override public String getId() { @@ -86,6 +91,12 @@ protected void setSettingsClass(Class setti this.settingsClass = settingsClass; } + @Override + public List getLiteratureReferences() { + + return literatureReference; + } + @Override public boolean equals(Object other) { diff --git a/chemclipse/plugins/org.eclipse.chemclipse.chromatogram.xxd.baseline.detector/src/org/eclipse/chemclipse/chromatogram/xxd/baseline/detector/core/IBaselineDetectorSupplier.java b/chemclipse/plugins/org.eclipse.chemclipse.chromatogram.xxd.baseline.detector/src/org/eclipse/chemclipse/chromatogram/xxd/baseline/detector/core/IBaselineDetectorSupplier.java index fc48004a24..8628a4caae 100644 --- a/chemclipse/plugins/org.eclipse.chemclipse.chromatogram.xxd.baseline.detector/src/org/eclipse/chemclipse/chromatogram/xxd/baseline/detector/core/IBaselineDetectorSupplier.java +++ b/chemclipse/plugins/org.eclipse.chemclipse.chromatogram.xxd.baseline.detector/src/org/eclipse/chemclipse/chromatogram/xxd/baseline/detector/core/IBaselineDetectorSupplier.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2018 Lablicate GmbH. + * Copyright (c) 2008, 2024 Lablicate GmbH. * * All rights reserved. * This program and the accompanying materials are made available under the @@ -11,7 +11,10 @@ *******************************************************************************/ package org.eclipse.chemclipse.chromatogram.xxd.baseline.detector.core; +import java.util.List; + import org.eclipse.chemclipse.chromatogram.xxd.baseline.detector.settings.IBaselineDetectorSettings; +import org.eclipse.chemclipse.support.literature.LiteratureReference; public interface IBaselineDetectorSupplier { @@ -43,4 +46,6 @@ public interface IBaselineDetectorSupplier { * @return */ Class getSettingsClass(); + + List getLiteratureReferences(); } diff --git a/chemclipse/plugins/org.eclipse.chemclipse.chromatogram.xxd.edit.supplier.snip/META-INF/MANIFEST.MF b/chemclipse/plugins/org.eclipse.chemclipse.chromatogram.xxd.edit.supplier.snip/META-INF/MANIFEST.MF index 8257611bd9..992c1b569d 100644 --- a/chemclipse/plugins/org.eclipse.chemclipse.chromatogram.xxd.edit.supplier.snip/META-INF/MANIFEST.MF +++ b/chemclipse/plugins/org.eclipse.chemclipse.chromatogram.xxd.edit.supplier.snip/META-INF/MANIFEST.MF @@ -15,7 +15,8 @@ Require-Bundle: org.eclipse.core.runtime, org.eclipse.chemclipse.support;bundle-version="0.8.0", org.eclipse.chemclipse.numeric;bundle-version="0.8.0", org.eclipse.chemclipse.chromatogram.filter;bundle-version="0.8.0", - com.fasterxml.jackson.core.jackson-annotations;bundle-version="2.7.1" + com.fasterxml.jackson.core.jackson-annotations;bundle-version="2.7.1", + org.eclipse.chemclipse.logging;bundle-version="0.9.0" Bundle-RequiredExecutionEnvironment: JavaSE-17 Bundle-ActivationPolicy: lazy Export-Package: org.eclipse.chemclipse.chromatogram.xxd.edit.supplier.snip.calculator, diff --git a/chemclipse/plugins/org.eclipse.chemclipse.chromatogram.xxd.edit.supplier.snip/src/org/eclipse/chemclipse/chromatogram/xxd/edit/supplier/snip/settings/0168583X88900638.ris b/chemclipse/plugins/org.eclipse.chemclipse.chromatogram.xxd.edit.supplier.snip/src/org/eclipse/chemclipse/chromatogram/xxd/edit/supplier/snip/settings/0168583X88900638.ris new file mode 100644 index 0000000000..7b76b5133e --- /dev/null +++ b/chemclipse/plugins/org.eclipse.chemclipse.chromatogram.xxd.edit.supplier.snip/src/org/eclipse/chemclipse/chromatogram/xxd/edit/supplier/snip/settings/0168583X88900638.ris @@ -0,0 +1,19 @@ +TY - JOUR +T1 - SNIP, a statistics-sensitive background treatment for the quantitative analysis of PIXE spectra in geoscience applications +AU - Ryan, C.G. +AU - Clayton, E. +AU - Griffin, W.L. +AU - Sie, S.H. +AU - Cousens, D.R. +JO - Nuclear Instruments and Methods in Physics Research Section B: Beam Interactions with Materials and Atoms +VL - 34 +IS - 3 +SP - 396 +EP - 402 +PY - 1988 +DA - 1988/09/01/ +SN - 0168-583X +DO - https://doi.org/10.1016/0168-583X(88)90063-8 +UR - https://www.sciencedirect.com/science/article/pii/0168583X88900638 +AB - Statistical fluctuations in X-ray spectra must be treated properly for reliable quantitative PIXE analysis. A background approximation that provides reliable treatment of fluctuations, the Statistics-sensitive Non-linear Iterative Peak-clipping (SNIP) algorithm, is described. Monte Carlo simulation demonstrates the stability of this background approximation, and hence the deduced trace element concentrations, over a wide range of counting statistics. +ER - diff --git a/chemclipse/plugins/org.eclipse.chemclipse.chromatogram.xxd.edit.supplier.snip/src/org/eclipse/chemclipse/chromatogram/xxd/edit/supplier/snip/settings/BaselineDetectorSettings.java b/chemclipse/plugins/org.eclipse.chemclipse.chromatogram.xxd.edit.supplier.snip/src/org/eclipse/chemclipse/chromatogram/xxd/edit/supplier/snip/settings/BaselineDetectorSettings.java index a925767ee2..422c171fbf 100644 --- a/chemclipse/plugins/org.eclipse.chemclipse.chromatogram.xxd.edit.supplier.snip/src/org/eclipse/chemclipse/chromatogram/xxd/edit/supplier/snip/settings/BaselineDetectorSettings.java +++ b/chemclipse/plugins/org.eclipse.chemclipse.chromatogram.xxd.edit.supplier.snip/src/org/eclipse/chemclipse/chromatogram/xxd/edit/supplier/snip/settings/BaselineDetectorSettings.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2013, 2021 Lablicate GmbH. + * Copyright (c) 2013, 2024 Lablicate GmbH. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -12,8 +12,13 @@ *******************************************************************************/ package org.eclipse.chemclipse.chromatogram.xxd.edit.supplier.snip.settings; +import java.util.ArrayList; +import java.util.List; + import org.eclipse.chemclipse.chromatogram.xxd.baseline.detector.settings.AbstractBaselineDetectorSettings; import org.eclipse.chemclipse.chromatogram.xxd.edit.supplier.snip.preferences.PreferenceSupplier; +import org.eclipse.chemclipse.logging.core.Logger; +import org.eclipse.chemclipse.support.literature.LiteratureReference; import org.eclipse.chemclipse.support.settings.IntSettingsProperty; import org.eclipse.chemclipse.support.settings.IntSettingsProperty.Validation; import org.eclipse.chemclipse.support.settings.serialization.WindowSizeDeserializer; @@ -24,6 +29,8 @@ public class BaselineDetectorSettings extends AbstractBaselineDetectorSettings { + private static final Logger logger = Logger.getLogger(BaselineDetectorSettings.class); + // @JsonProperty(value = "Number of Iterations", defaultValue = "100") @JsonPropertyDescription(value = "The number of iterations to apply the SNIP filter.") @IntSettingsProperty(minValue = PreferenceSupplier.MIN_ITERATIONS, maxValue = PreferenceSupplier.MAX_ITERATIONS) @@ -53,4 +60,24 @@ public void setIterations(int iterations) { this.iterations = iterations; } + + @Override + public List getLiteratureReferences() { + + List literatureReferences = new ArrayList<>(); + literatureReferences.add(createLiteratureReference("0168583X88900638.ris", "10.1016/0168-583X(88)90063-8")); + return literatureReferences; + } + + private static LiteratureReference createLiteratureReference(String file, String doi) { + + String content; + try { + content = new String(BaselineDetectorSettings.class.getResourceAsStream(file).readAllBytes()); + } catch(Exception e) { + content = doi; + logger.warn(e); + } + return new LiteratureReference(content); + } }