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 bytem_Exponentthe scaling exponent.protected intm_Indexthe subfile index.protected floatm_Noisethe peak picking noise level.protected intm_NumPointsthe number of points.protected intm_NumScansthe number of scans.protected booleanm_OffsetPointersDirwhether to use the offset points directory.protected Spectrumm_Spectrumthe parsed spectrum.protected floatm_WAxisthe W axis value.protected booleanm_YasIEEE32bitwhether Y values are stored in IEEE 32bit floats.protected floatm_ZAxisthe Z axis value.protected floatm_ZAxisEndthe 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 SpectrumgetSpectrum()Returns the parsed spectrum.protected StringparseData()Parses the spectral data.protected StringparseHeader()Parses the header data.protected StringpostProcess()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:
parseHeaderin classSPCSpectrumReader.AbstractParser- Returns:
- null if successfully parsed, otherwise error message
-
parseData
protected String parseData()
Parses the spectral data.- Specified by:
parseDatain classSPCSpectrumReader.AbstractParser- Returns:
- null if successfully parsed, otherwise error message
-
postProcess
protected String postProcess()
For post-processing the data.- Overrides:
postProcessin classSPCSpectrumReader.AbstractParser- Returns:
- null if successfully parsed, otherwise error message
-
getSpectrum
public Spectrum getSpectrum()
Returns the parsed spectrum.- Returns:
- the spectrum
-
-