Class for parsing a file which holds initial estimates for 1-D components. Used by ImageProfileFitter.
More...
Class for parsing a file which holds initial estimates for 1-D components. Used by ImageProfileFitter.
Intended use:
Public interface
Review Status
- Test programs:
- tProfileFitterEstimatesFileParser
Prerequisite
Synopsis
Used for reading files containing initial estimates of models for 1-D fitting. The expected format is:
-
Lines with a "#" in column 1 are treated as comments and ignored.
-
Each non-comment line is treated as a complete set of three comma-delimited parameters for specifying an estimate for a gaussian component. The values are peak in image units (double), pixel position of center (double), and FWHM in pixels (double)
-
Optionally, a gaussian component estimate line can have a fourth parameter which is a string specifying which of the parameters for that component should be held fixed during the fit. This string can include any combination of the following identifiers: "p" peak, "c" center position, "f" FWHM. So, eg, "cp" means hold the center and peak constant during the fit.
If the specified file passed to the constructor does not exist, an exception is thrown. Parsing is done during object construction and an exception is thrown if the file does not have the expected format.
Example
ProfileFitterEstimatesFilebFileReader reader("myEstimates.txt", myImage);
SpectralList sl = reader.getEstimates();
vector<casacore::String> fixed = reader.getFixed();
Definition at line 80 of file ProfileFitterEstimatesFileParser.h.