Class TrinamixSpectrumReader

  • All Implemented Interfaces:
    adams.core.AdditionalInformationHandler, adams.core.CleanUpHandler, adams.core.Destroyable, adams.core.GlobalInfoSupporter, adams.core.io.FileFormatHandler, adams.core.logging.LoggingLevelHandler, adams.core.logging.LoggingSupporter, adams.core.option.OptionHandler, adams.core.ShallowCopySupporter<adams.data.io.input.AbstractDataContainerReader>, adams.core.SizeOfHandler, adams.core.Stoppable, Serializable, Comparable

    public class TrinamixSpectrumReader
    extends AbstractSpectrumReader
    Reader for the trinamiX (https://trinamixsensing.com/) CSV format.
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Constructor Detail

      • TrinamixSpectrumReader

        public TrinamixSpectrumReader()
    • Method Detail

      • globalInfo

        public String globalInfo()
        Returns a string describing the object.
        Specified by:
        globalInfo in interface adams.core.GlobalInfoSupporter
        Specified by:
        globalInfo in class adams.core.option.AbstractOptionHandler
        Returns:
        a description suitable for displaying in the gui
      • getFormatDescription

        public String getFormatDescription()
        Returns a string describing the format (used in the file chooser).
        Specified by:
        getFormatDescription in interface adams.core.io.FileFormatHandler
        Specified by:
        getFormatDescription in class adams.data.io.input.AbstractDataContainerReader<Spectrum>
        Returns:
        a description suitable for displaying in the file chooser
      • getFormatExtensions

        public String[] getFormatExtensions()
        Returns the extension(s) of the format.
        Specified by:
        getFormatExtensions in interface adams.core.io.FileFormatHandler
        Specified by:
        getFormatExtensions in class adams.data.io.input.AbstractDataContainerReader<Spectrum>
        Returns:
        the extension (without the dot!)
      • add

        protected void add​(String instrument,
                           String sampleID,
                           String repeat,
                           String timestamp,
                           float[] waveno,
                           float[] absorb)
        Adds the spectrum.
        Parameters:
        instrument - the instrument
        sampleID - the sample ID
        repeat - the repeat
        timestamp - the timestamp
        waveno - the wave numbers
        absorb - the absorbance amplitudes
      • readData

        protected void readData()
        Performs the actual reading.
        Specified by:
        readData in class adams.data.io.input.AbstractDataContainerReader<Spectrum>