Class SPCSpectrumReader.FileParser

    • Field Detail

      • m_ID

        protected String m_ID
        the ID to use.
      • m_Spectra

        protected List<Spectrum> m_Spectra
        the parsed spectrum.
      • m_Blocks16bit

        protected boolean m_Blocks16bit
        whether blocks are in 16bit integer (0:0x01h).
      • m_MultiFile

        protected boolean m_MultiFile
        whether multi-file (0:0x04h).
      • m_Ordered

        protected boolean m_Ordered
        whether ordered (0:0x10h).
      • m_AxisLabels

        protected boolean m_AxisLabels
        whether axis labeled stored (0:0x20h).
      • m_UniqueXs

        protected boolean m_UniqueXs
        whether each subfile has unique X array (0:0x40h).
      • m_NonEvenX

        protected boolean m_NonEvenX
        whether X data is non-evenly spaced (0:0x80h).
      • m_Version

        protected String m_Version
        the version (1).
      • m_ExperimentType

        protected String m_ExperimentType
        the instrument experiment technique (2).
      • m_Exponent

        protected byte m_Exponent
        the scaling exponent.
      • m_YasIEEE32bit

        protected boolean m_YasIEEE32bit
        whether Y values are stored in IEEE 32bit floats.
      • m_NumPoints

        protected int m_NumPoints
        the number of points.
      • m_FirstX

        protected double m_FirstX
        the value of the first X.
      • m_LastX

        protected double m_LastX
        the value of the last X.
      • m_NumFiles

        protected int m_NumFiles
        the number of sub-files.
      • m_XAxis

        protected String m_XAxis
        the label of the X axis.
      • m_YAxis

        protected String m_YAxis
        the label of the Y axis.
      • m_ZAxis

        protected String m_ZAxis
        the label of the Z axis.
      • m_CollectionDate

        protected Date m_CollectionDate
        the collection date.
      • m_Resolution

        protected String m_Resolution
        the resolution.
      • m_Source

        protected String m_Source
        the source.
      • m_PeakPointNum

        protected int m_PeakPointNum
        the peak point number.
      • m_Comment

        protected String m_Comment
        the comment.
      • m_OffsetLogstc

        protected int m_OffsetLogstc
        the offset for LOGSTC.
      • m_MultZInc

        protected float m_MultZInc
        the multiple Z value increment.
      • m_NumWPlanes

        protected int m_NumWPlanes
        the number of W places in 4D data.
      • m_MultWInc

        protected float m_MultWInc
        the multiple W value increment.
      • m_WAxis

        protected String m_WAxis
        the label of the W axis.
      • m_Log

        protected SampleData m_Log
        the log values.
    • Constructor Detail

      • FileParser

        public FileParser​(String id,
                          byte[] data)
        Initializes the parser.
        Parameters:
        id - the ID to use
        data - the data to parse
    • Method Detail

      • determineExperimentType

        protected String determineExperimentType​(byte data)
        Determines the experiment type.
        Parameters:
        data - the byte to inspect
        Returns:
        the type
      • determineLabelType

        protected String determineLabelType​(byte data,
                                            char axis)
        Determines the label type.
        Parameters:
        data - the byte to inspect
        axis - the axis to determine the label for (x,y,z)
        Returns:
        the type
      • getSpectra

        public List<Spectrum> getSpectra()
        Returns the parsed spectra.
        Returns:
        the spectra
      • getNumPoints

        public int getNumPoints()
        Returns the number of points to read.
        Returns:
        the number of points
      • getFirstX

        public double getFirstX()
        Returns the X of the first value.
        Returns:
        the first X
      • getLastX

        public double getLastX()
        Returns the X of the last value.
        Returns:
        the last X
      • getNumFiles

        public int getNumFiles()
        Returns the number of sub-files.
        Returns:
        the number of files