102 const DbProfile &prof,
const int &elements = 0) {
103 LoadCSV csv(csvBase, conf, prof);
105 if (elements != 0) csv.validateSize(elements,
true);
107 return (csv.getVector());
120 const QString keyname =
"ModuleHistory")
131 void Dump(
const QString &fname)
const {
133 QString dumpcFile = dumpc.expanded();
134 std::ofstream ofile(dumpcFile.toLatin1().data(), std::ios::out);
136 QString mess =
"Unable to open/create module dump file " +
170 std::ostringstream ostr;
173 return (QString(ostr.str().c_str()));
178 return (QString(ostr.str().c_str()));
184 o <<
"# History = " <<
_history << std::endl;
185 o <<
"# Count = " <<
_data.dim() << std::endl;
186 for (
int i = 0 ; i <
_data.dim() ; i++) {
#define _FILEINFO_
Macro for the filename and line number.
Definition IException.h:24
A DbProfile is a container for access parameters to a database.
Definition DbProfile.h:51
File name manipulation and expansion.
Definition FileName.h:100
Definition HiCalTypes.h:30
PvlKeyword makekey(const QString &name="History") const
Definition HiCalTypes.h:67
Isis exception class.
Definition IException.h:91
@ User
A type of error that could only have occurred due to a mistake on the user's part (e....
Definition IException.h:126
Provides generalized access to HiRISE calibration CSV files.
Definition LoadCSV.h:52
Module manages HiRISE calibration vectors from various sources.
Definition Module.h:39
HiVector _data
Data vector.
Definition Module.h:151
Module(const QString &name, const Module &c)
Definition Module.h:56
double operator()(int index) const
Return individual element of the data vector.
Definition Module.h:113
int _fmtPrecision
Default field with of double.
Definition Module.h:154
QString getcsvFile() const
Returns expanded name of last CSV file loaded by loadCsv.
Definition Module.h:71
HiHistory _history
Hierarchial component history.
Definition Module.h:152
virtual void Process(const HiVector &v)
Default processing behavior makes a reference copy of data array.
Definition Module.h:81
Module(const QString &name)
Definition Module.h:50
int size() const
Returns the size (number of elements) of data array.
Definition Module.h:73
QString _csvFile
Fully expanded name of CSV file if present.
Definition Module.h:150
virtual ~Module()
Destructor.
Definition Module.h:66
QString _name
Name of component.
Definition Module.h:149
Module(const Module &c)
Definition Module.h:59
virtual void printOn(std::ostream &o) const
Default printing of data in module.
Definition Module.h:183
const HiVector & ref() const
Return data via a const reference.
Definition Module.h:111
Module(const QString &name, const HiHistory &history)
Definition Module.h:53
QString name() const
Returns name of component.
Definition Module.h:69
@ DefaultWidth
Definition Module.h:147
@ DefaultPrecision
Definition Module.h:147
int _fmtWidth
Default field with of double.
Definition Module.h:153
virtual void record(PvlGroup &pvl, const QString keyname="ModuleHistory") const
Record history in Pvl group object.
Definition Module.h:119
void Dump(const QString &fname) const
Dumps the component to a specified file.
Definition Module.h:131
virtual void Process(const Module &c)
Invokes the process method on the Module vector.
Definition Module.h:76
const HiHistory & History() const
Return recorded history of events.
Definition Module.h:116
Module()
Definition Module.h:48
HiVector loadCsv(const QString &csvBase, const HiCalConf &conf, const DbProfile &prof, const int &elements=0)
Provide generic loading of CSV file for all modules.
Definition Module.h:101
friend std::ostream & operator<<(std::ostream &o, const Module &c)
Definition Module.h:41
QString formatDbl(const double &value) const
Properly format values that could be special pixels.
Definition Module.h:169
Contains multiple PvlContainers.
Definition PvlGroup.h:41
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16
bool IsSpecial(const double d)
Returns if the input pixel is special.
Definition SpecialPixel.h:197
TNT::Array1D< double > HiVector
1-D Buffer
Definition HiCalTypes.h:27
QString PixelToString(double d, double precision=8)
Takes a double pixel value and returns the name of the pixel type as a string.
Definition SpecialPixel.h:371