Class MetaFilePopulator
- java.lang.Object
-
- pulse.io.readers.MetaFilePopulator
-
- All Implemented Interfaces:
AbstractHandler,AbstractPopulator<Metadata>,Reflexive
public class MetaFilePopulator extends Object implements AbstractPopulator<Metadata>
AnAbstractPopulatorcapable of handling metafiles.Metafiles are ASCII files storing various experimental parameters for different instances of
ExperimentalData. TheMetadata (.met)file should be formatted to include a header of arbitrary length, which defines global parameters, and a table where a series of metaproperties is defined for each laser shot.Metadata for each shot should be recorded during the experiment in a tab delimited ASCII format, with a
The full list of keywords for the.metfile suffix. Constant data should be recorded in tab-separated pairs at the top of the file, such asSample_Name,Thickness(of the sample, in mm),Diameter(of the sample, in mm),Spot_Diameter(diameter of laser spot, in mm),TemporalShape(e.g.TrapezoidalPulse,RectangularPulse) andDetector_Iris. Two line breaks below, a tab-delimited table with headers for variables should contain variable data for each shot. These variables should include ID (which should relate to the final number of the file name for each shot), Test_Temperature (in deg. C), Pulse_Width (the time width of the laser pulse, in ms),Laser_Energy(the energy transmitted by the laser, in J), and Detector_Gain (gain of the detector). If any of the “constants” listed above are variable, then they should be included in the variable table, and vice versa..metfiles are listed in theNumericPropertyKeywordenum.An example content of a valid
.metfile is provided below.Thickness 2.034 Diameter 9.88 Spot_Diameter 10.0 Test_Temperature Pulse_Width Spot_Diameter Laser_Energy Detector_Gain TemporalShape Detector_Iris 200 200 5 2 31.81 50 TrapezoidalPulse 1 201 196 5 2 31.81 100 TrapezoidalPulse 1 202 198 5 2 31.81 100 TrapezoidalPulse 1 203 199 5 2 31.81 50 TrapezoidalPulse 1 204 199 5 2 31.81 50 TrapezoidalPulse 1 205 199 5 2 31.81 50 TrapezoidalPulse 1 206 200 5 2 31.81 50 TrapezoidalPulse 1 207 200 5 2 31.81 50 TrapezoidalPulse 1 208 400 5 2 31.81 50 TrapezoidalPulse 1 209 400 5 2 31.81 20 TrapezoidalPulse 1 210 400 5 2 31.81 10 TrapezoidalPulse 1- See Also:
NumericPropertyKeyword,PulseTemporalShape
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MetaFilePopulatorgetInstance()Gets the single instance of this class.StringgetSupportedExtension()Retrieves the supported extension of files, which thisAbstractHandleris able to process.voidpopulate(File file, Metadata met)Tries to populatetfrom data contained inf.-
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
-
getInstance
public static MetaFilePopulator getInstance()
Gets the single instance of this class.- Returns:
- a static instance of
MetaFilePopulator.
-
populate
public void populate(File file, Metadata met) throws IOException
Description copied from interface:AbstractPopulatorTries to populatetfrom data contained inf.- Specified by:
populatein interfaceAbstractPopulator<Metadata>- Parameters:
file- a file presumably containing data that can be converted to the internal format oft.met- aTobject which can potentially be populated byf.- Throws:
IOException- if an exception occurs during processingf.
-
getSupportedExtension
public String getSupportedExtension()
Description copied from interface:AbstractHandlerRetrieves the supported extension of files, which thisAbstractHandleris able to process.- Specified by:
getSupportedExtensionin interfaceAbstractHandler- Returns:
.met, an internal PULsE meta-file format.
-
-