Package adams.data.io.input
Class SPCSpectrumReader.SubFileParser
- java.lang.Object
-
- adams.data.io.input.SPCSpectrumReader.AbstractParser
-
- adams.data.io.input.SPCSpectrumReader.SubFileParser
-
- All Implemented Interfaces:
Serializable
- Enclosing class:
- SPCSpectrumReader
public static class SPCSpectrumReader.SubFileParser extends SPCSpectrumReader.AbstractParser
Parser class for SPC files (header).- Version:
- $Revision: 2242 $
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected byte
m_Exponent
the scaling exponent.protected int
m_Index
the subfile index.protected float
m_Noise
the peak picking noise level.protected int
m_NumPoints
the number of points.protected int
m_NumScans
the number of scans.protected boolean
m_OffsetPointersDir
whether to use the offset points directory.protected Spectrum
m_Spectrum
the parsed spectrum.protected float
m_WAxis
the W axis value.protected boolean
m_YasIEEE32bit
whether Y values are stored in IEEE 32bit floats.protected float
m_ZAxis
the Z axis value.protected float
m_ZAxisEnd
the Z axis end value.-
Fields inherited from class adams.data.io.input.SPCSpectrumReader.AbstractParser
m_BytesRead, m_Data, m_Offset, m_Parent
-
-
Constructor Summary
Constructors Constructor Description SubFileParser(SPCSpectrumReader.AbstractParser parent, byte[] data, int offset, boolean offsetPointersDir)
Initializes the parser.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Spectrum
getSpectrum()
Returns the parsed spectrum.protected String
parseData()
Parses the spectral data.protected String
parseHeader()
Parses the header data.protected String
postProcess()
For post-processing the data.-
Methods inherited from class adams.data.io.input.SPCSpectrumReader.AbstractParser
copyBytes, getBytesRead, getParent, parse, parseFooter, sumBytes
-
-
-
-
Field Detail
-
m_OffsetPointersDir
protected boolean m_OffsetPointersDir
whether to use the offset points directory.
-
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_Index
protected int m_Index
the subfile index.
-
m_ZAxis
protected float m_ZAxis
the Z axis value.
-
m_ZAxisEnd
protected float m_ZAxisEnd
the Z axis end value.
-
m_Noise
protected float m_Noise
the peak picking noise level.
-
m_NumPoints
protected int m_NumPoints
the number of points.
-
m_NumScans
protected int m_NumScans
the number of scans.
-
m_WAxis
protected float m_WAxis
the W axis value.
-
m_Spectrum
protected Spectrum m_Spectrum
the parsed spectrum.
-
-
Constructor Detail
-
SubFileParser
public SubFileParser(SPCSpectrumReader.AbstractParser parent, byte[] data, int offset, boolean offsetPointersDir)
Initializes the parser.- Parameters:
parent
- the parent parserdata
- the data to parseoffset
- the offset to useoffsetPointersDir
- whether to use the offset pointers directory
-
-
Method Detail
-
parseHeader
protected String parseHeader()
Parses the header data.- Specified by:
parseHeader
in classSPCSpectrumReader.AbstractParser
- Returns:
- null if successfully parsed, otherwise error message
-
parseData
protected String parseData()
Parses the spectral data.- Specified by:
parseData
in classSPCSpectrumReader.AbstractParser
- Returns:
- null if successfully parsed, otherwise error message
-
postProcess
protected String postProcess()
For post-processing the data.- Overrides:
postProcess
in classSPCSpectrumReader.AbstractParser
- Returns:
- null if successfully parsed, otherwise error message
-
getSpectrum
public Spectrum getSpectrum()
Returns the parsed spectrum.- Returns:
- the spectrum
-
-