Class LFRReader
- java.lang.Object
-
- pulse.io.readers.LFRReader
-
- All Implemented Interfaces:
AbstractHandler,AbstractReader<List<ExperimentalData>>,CurveReader,Reflexive
public class LFRReader extends Object implements CurveReader
ACurveReadercapable of reading ASCII master-files generated by the Linseis software.An
.lfrfile contains a table with filenames of individual experimental heating curves, their respective IDs (as they appear in the Linseis software), test temperatures, and other variables. The individual ASCII files encoded in ASCII represent tab-delimited time-temperature data.PULsEcurrently accepts the formats of only those files output by Linseis LFA systems that are in ASCII formats, so results from other systems may be edited to be readable byPULsE. Linseis automatically outputs .lf files for each shot, containing information about the shot. However, these are binary files with an unknown format. Therefore, after performing a shot, clicking “Export/Save As” in the Linseis AproSoft program will export the data for the heating curve recorded as a.txtfile (in a readable format). This should be done for any shot or curve you wish to analyse inPULsE.After all shots have been recorded, click “Severals” in the Linseis analysis window and select all exported heating curve
.txtfiles for the experiment. Clicking “Ok” and “Save” on the following windows will create a.lfrfile with file locations and data for all the heating curves. Save this in the same folder as the.txtfiles.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CurveReadergetInstance()Retrieves the single instance of this class.StringgetSupportedExtension()Retrieves the supported extension of files, which thisAbstractHandleris able to process.List<ExperimentalData>read(File file)Reads through thefile, identifies the names of other files with individual heating curves, theirs external IDs and test temperatures (in degrees Celsius, later converted to Kelvin).ExperimentalDatareadSingleCurve(File file, Metadata metadata)Creates a singleExperimentalDataobject with the time-temperature information retrieved fromfileand using the previously generatedMetadataobject, containing the external ID and the test temperature of this heating curve.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface pulse.io.readers.AbstractHandler
isExtensionSupported
-
-
-
-
Method Detail
-
getSupportedExtension
public String getSupportedExtension()
Description copied from interface:AbstractHandlerRetrieves the supported extension of files, which thisAbstractHandleris able to process.- Specified by:
getSupportedExtensionin interfaceAbstractHandler- Returns:
- The supported extension (
.lfr).
-
read
public List<ExperimentalData> read(File file) throws IOException
Reads through thefile, identifies the names of other files with individual heating curves, theirs external IDs and test temperatures (in degrees Celsius, later converted to Kelvin).Creates a
ListofExperimentalDataobjects with the size equal to the number of individual entries in the master-file. Searches for the individual files listed in the namelist and stored in the same directory where the master-file has been found previously. Upon finding the individual files, invokesreadSingleCurveon each of them sequentially and stores theExperimentalDatain a list. Finally, invokes thesortmethod on that list to sort it.- Specified by:
readin interfaceAbstractReader<List<ExperimentalData>>- Specified by:
readin interfaceCurveReader- Parameters:
file- the master-file with.lfrsuffix- Returns:
- a
Listof @code ExperimentalData}, containing all information stored in both the master file and linked individual files. - Throws:
IOException- if something goes wrong with reading the file- See Also:
CurveReader.sort(java.util.List<pulse.input.ExperimentalData>),readSingleCurve(java.io.File,pulse.input.Metadata)
-
readSingleCurve
public ExperimentalData readSingleCurve(File file, Metadata metadata) throws IOException
Creates a singleExperimentalDataobject with the time-temperature information retrieved fromfileand using the previously generatedMetadataobject, containing the external ID and the test temperature of this heating curve.The time in Linseis files is usually stored in [ms], hence the time values are multiplied by
1E-3to adhere to thePULsEformat. The signal rise is recorded in [mV], hence it represents a relative scale, which however is functionally linked to the temperature rise.PULsEdoes not establish this functional relation. Instead, it uses the signal values in the dimensionless problem formulation.- Parameters:
file- the file with a data just enough for a singleExperimentalDataobjectmetadata- the previously loadedMetadatawhich includes the external ID and the test temperature- Returns:
- an
ExperimentalDataobject - Throws:
IOException
-
getInstance
public static CurveReader getInstance()
Retrieves the single instance of this class. As this class uses a singleton pattern, there is only one such instance.- Returns:
- the single instance of this class.
-
-