Class NetzschCSVReader
- java.lang.Object
- 
- pulse.io.readers.NetzschCSVReader
 
- 
- All Implemented Interfaces:
- AbstractHandler,- AbstractReader<List<ExperimentalData>>,- CurveReader,- Reflexive
 
 public class NetzschCSVReader extends Object implements CurveReader Reads the .CSV files exported from Proteus LFA Analysis software. To load Proteus measurements in PULsE, the detector signal needs to be imported first, followed by the pulse data.Note that by default the decimal separator is assumed to be a point ("."). 
- 
- 
Field SummaryFields Modifier and Type Field Description protected static doubleTO_SECONDS
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static intdetermineShotID(BufferedReader reader, File file)protected static StringfindLineByLabel(BufferedReader reader, String label, boolean ignoreLocale)protected static StringfindLineByLabel(BufferedReader reader, String label, String stopLabel, boolean ignoreLocale)static StringgetDelims()Get the standard delimiter chars.static CurveReadergetInstance()As this class uses the singleton pattern, only one instance is created using an empty no-argument constructor.StringgetSupportedExtension()Retrieves the supported extension of files, which thisAbstractHandleris able to process.protected static voidpopulate(AbstractData data, BufferedReader reader)List<ExperimentalData>read(File file)Readsfile, assuming that it contains data generated by Proteus with the detector signal.protected voidsetDefaultLocale()- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface pulse.io.readers.AbstractHandlerisExtensionSupported
 
- 
 
- 
- 
- 
Field Detail- 
TO_SECONDSprotected static final double TO_SECONDS - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
setDefaultLocaleprotected void setDefaultLocale() 
 - 
getSupportedExtensionpublic String getSupportedExtension() Description copied from interface:AbstractHandlerRetrieves the supported extension of files, which thisAbstractHandleris able to process.- Specified by:
- getSupportedExtensionin interface- AbstractHandler
- Returns:
- The supported extension (.csv).
 
 - 
readpublic List<ExperimentalData> read(File file) throws IOException Readsfile, assuming that it contains data generated by Proteus with the detector signal.This will throw an IllegalArgumentExceptionif the first entry in this file does not contain the "Shot_data" string. If this is found, then an ID is extracted from the file, which will then be used to associate a pulse with the newly createExperimentalData(this requires another reader. When the ID is identified, the file is searched for the keywords "Thickness_RT" and "Sample_temperature" to determine the sample thickness and baseline temperature of the shot. Then the method proceeds to search for theDETECTORkeyword, marking the beginning of the experimental time-signal sequence. If, for example, the file only contains the pulse data, the method will return an empty list and print an error message in the log, saying that the file was skipped. Otherwise, the time-signal sequence will be read, taking care to convert the time (in milliseconds by default) to second (used by default in PULsE).- Specified by:
- readin interface- AbstractReader<List<ExperimentalData>>
- Specified by:
- readin interface- CurveReader
- Parameters:
- file- a- Filewhich has either all information encoded in its contents or provides- URIlinks to other files, each containing the necessary information.
- Returns:
- a list containing either zero elements, if the procedure failed, or one element, corresponding to the stored shot data.
- Throws:
- IOException- if something goes wrong with reading the file
 
 - 
populateprotected static void populate(AbstractData data, BufferedReader reader) throws IOException, ParseException - Throws:
- IOException
- ParseException
 
 - 
determineShotIDprotected static int determineShotID(BufferedReader reader, File file) throws IOException - Throws:
- IOException
 
 - 
findLineByLabelprotected static String findLineByLabel(BufferedReader reader, String label, boolean ignoreLocale) throws IOException - Throws:
- IOException
 
 - 
findLineByLabelprotected static String findLineByLabel(BufferedReader reader, String label, String stopLabel, boolean ignoreLocale) throws IOException - Throws:
- IOException
 
 - 
getInstancepublic static CurveReader getInstance() As this class uses the singleton pattern, only one instance is created using an empty no-argument constructor.- Returns:
- the single instance of this class.
 
 - 
getDelimspublic static String getDelims() Get the standard delimiter chars.- Returns:
- delims
 
 
- 
 
-