public class WavelengthArrayParserAsciiPairs extends Object implements Wavelength1DArrayParser
This code was developed by NASA, Goddard Space Flight Center, Code 588 for the Scientist's Expert Assistant (SEA) project for Next Generation Space Telescope (NGST).
Constructor and Description |
---|
WavelengthArrayParserAsciiPairs(Wavelength1DArray array,
InputStream istream) |
WavelengthArrayParserAsciiPairs(Wavelength1DArray array,
InputStream istream,
String[] optionalArgs)
optionalArgs, if present should be:
[0] wavelength units
[1] flux units
|
WavelengthArrayParserAsciiPairs(Wavelength1DArray array,
Reader rdr,
String[] optionalArgs)
optionalArgs, if present should be:
[0] wavelength units
[1] flux units
|
Modifier and Type | Method and Description |
---|---|
void |
parse()
Parser of return stream from a StringReader, with data expected
to be a pair of columns.
|
public WavelengthArrayParserAsciiPairs(Wavelength1DArray array, InputStream istream) throws WavelengthArrayParseException
WavelengthArrayParseException
public WavelengthArrayParserAsciiPairs(Wavelength1DArray array, InputStream istream, String[] optionalArgs) throws WavelengthArrayParseException
WavelengthArrayParseException
public WavelengthArrayParserAsciiPairs(Wavelength1DArray array, Reader rdr, String[] optionalArgs) throws WavelengthArrayParseException
WavelengthArrayParseException
public void parse() throws WavelengthArrayParseException
This is designed to be compatible with the HST STSDAS ttools tdump and tprint formats All comment lines beginning with '#' are ignored. The wavelength units must be in Angstroms, no units are assumed for the data values they will be stored as doubles.
parse
in interface Wavelength1DArrayParser
reader
- the Reader who's contents are to be parsedwlUnits
- a string containing the wavelength units contained in the string.
If this is set to null, Wavelength.ANGSTROM will be assumedWavelengthArrayParseException
- if there is any error in the parsing. No cleanup
of the the dataset up to the point of the parse error is performedCopyright © 2023 Central Laboratory of the Research Councils. All Rights Reserved.