1 #ifndef GainChannelNormalize_h 2 #define GainChannelNormalize_h 57 Module(
"GainChannelNormalize") {
66 void init(
const HiCalConf &conf) {
71 double bin =
ToDouble(prof(
"Summing"));
73 double _normalizer = 128.0 / tdi / (bin*bin);
83 else if ( z.dim() == nsamps) {
87 std::ostringstream mess;
88 mess <<
"Expected 1 or " << nsamps <<
" values from CSV file " 89 <<
getcsvFile() <<
" but got " << z.dim() <<
" instead!";
94 for (
int i = 0 ; i <
_data.dim() ; i++ ) {
_data[i] *= _normalizer; }
HiVector _data
Data vector.
HiHistory _history
Hierarchial component history.
HiVector loadCsv(const QString &csvBase, const HiCalConf &conf, const DbProfile &prof, const int &elements=0)
Provide generic loading of CSV file for all modules.
virtual ~GainChannelNormalize()
Destructor.
A DbProfile is a container for access parameters to a database.
int ToInteger(const T &value)
Helper function to convert values to Integers.
#define _FILEINFO_
Macro for the filename and line number.
Module manages HiRISE calibration vectors from various sources.
A type of error that could only have occurred due to a mistake on the user's part (e...
double ToDouble(const T &value)
Helper function to convert values to doubles.
Computes a gain correction for each sample GainChannelNormalize.
Namespace for ISIS/Bullet specific routines.
QString getcsvFile() const
Returns expanded name of last CSV file loaded by loadCsv.
QString Name() const
Returns the name of this property.
QString ToString(const T &value)
Helper function to convert values to strings.
TNT::Array1D< double > HiVector
1-D Buffer