Class for parsing a file which holds initial estimates for 2-D components. Used by imfit. More...
#include <FitterEstimatesFileParser.h>
Public Member Functions | |
FitterEstimatesFileParser (const String &filename, const ImageInterface< Float > &image) | |
Constructor filename Name of file containing estimates image Image for which the estimates apply. | |
~FitterEstimatesFileParser () | |
ComponentList | getEstimates () const |
Get the estimates specified in the file as a ComponentList object. | |
Vector< String > | getFixed () const |
Get the fixed parameter masks specified in the file. | |
String | getContents () const |
Get the contents of the file. | |
Private Member Functions | |
FitterEstimatesFileParser () | |
default constructor cannot be called. | |
void | _parseFile (const RegularFile &myFile) |
parse the file | |
void | _createComponentList (const ImageInterface< Float > &image) |
Private Attributes | |
ComponentList | _componentList |
Vector< String > | _fixedValues |
std::unique_ptr< LogIO > | _log |
Vector< Double > | _peakValues |
Vector< Double > | _xposValues |
Vector< Double > | _yposValues |
Vector< Quantity > | _majValues |
Vector<Quantity> fluxValues, majValues, minValues, paValues;. | |
Vector< Quantity > | _minValues |
Vector< Quantity > | _paValues |
String | _contents |
Class for parsing a file which holds initial estimates for 2-D components. Used by imfit.
Public interface
Used for reading files containing initial estimates of models for 2-D fitting. The expected format is:
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.
FitterEstimatesFilebFileReader reader("myEstimates.txt", myImage);
ComponentList cl = reader.getEstimates();
Vector<String> fixed = reader.getFixed();
Definition at line 83 of file FitterEstimatesFileParser.h.
casa::FitterEstimatesFileParser::FitterEstimatesFileParser | ( | const String & | filename, | |
const ImageInterface< Float > & | image | |||
) | [explicit] |
Constructor filename
Name of file containing estimates image
Image for which the estimates apply.
casa::FitterEstimatesFileParser::~FitterEstimatesFileParser | ( | ) |
casa::FitterEstimatesFileParser::FitterEstimatesFileParser | ( | ) | [private] |
default constructor cannot be called.
void casa::FitterEstimatesFileParser::_createComponentList | ( | const ImageInterface< Float > & | image | ) | [private] |
void casa::FitterEstimatesFileParser::_parseFile | ( | const RegularFile & | myFile | ) | [private] |
parse the file
String casa::FitterEstimatesFileParser::getContents | ( | ) | const |
Get the contents of the file.
ComponentList casa::FitterEstimatesFileParser::getEstimates | ( | ) | const |
Get the estimates specified in the file as a ComponentList object.
Vector<String> casa::FitterEstimatesFileParser::getFixed | ( | ) | const |
Get the fixed parameter masks specified in the file.
Definition at line 106 of file FitterEstimatesFileParser.h.
String casa::FitterEstimatesFileParser::_contents [private] |
Definition at line 112 of file FitterEstimatesFileParser.h.
Vector<String> casa::FitterEstimatesFileParser::_fixedValues [private] |
Definition at line 107 of file FitterEstimatesFileParser.h.
std::unique_ptr<LogIO> casa::FitterEstimatesFileParser::_log [private] |
Definition at line 108 of file FitterEstimatesFileParser.h.
Vector<Quantity> casa::FitterEstimatesFileParser::_majValues [private] |
Vector<Quantity> fluxValues, majValues, minValues, paValues;.
Definition at line 111 of file FitterEstimatesFileParser.h.
Vector<Quantity> casa::FitterEstimatesFileParser::_minValues [private] |
Definition at line 111 of file FitterEstimatesFileParser.h.
Vector<Quantity> casa::FitterEstimatesFileParser::_paValues [private] |
Definition at line 111 of file FitterEstimatesFileParser.h.
Vector<Double> casa::FitterEstimatesFileParser::_peakValues [private] |
Definition at line 109 of file FitterEstimatesFileParser.h.
Vector<Double> casa::FitterEstimatesFileParser::_xposValues [private] |
Definition at line 109 of file FitterEstimatesFileParser.h.
Vector<Double> casa::FitterEstimatesFileParser::_yposValues [private] |
Definition at line 109 of file FitterEstimatesFileParser.h.