|
Isis Developer Reference
|
Go to the documentation of this file. 1 #ifndef GainChannelNormalize_h
2 #define GainChannelNormalize_h
43 Module(
"GainChannelNormalize") {
52 void init(
const HiCalConf &conf) {
57 double bin =
ToDouble(prof(
"Summing"));
59 double _normalizer = 128.0 / tdi / (bin*bin);
69 else if ( z.dim() == nsamps) {
73 std::ostringstream mess;
74 mess <<
"Expected 1 or " << nsamps <<
" values from CSV file "
75 <<
getcsvFile() <<
" but got " << z.dim() <<
" instead!";
80 for (
int i = 0 ; i <
_data.dim() ; i++ ) {
_data[i] *= _normalizer; }
HiHistory _history
Hierarchial component history.
Definition: Module.h:152
void clear()
Definition: HiCalTypes.h:65
QString Name() const
Returns the name of this property.
Definition: DbProfile.h:104
Computes a gain correction for each sample GainChannelNormalize.
Definition: GainChannelNormalize.h:37
QString ToString(const T &value)
Helper function to convert values to strings.
Definition: HiCalUtil.h:246
Module manages HiRISE calibration vectors from various sources.
Definition: Module.h:39
GainChannelNormalize(const HiCalConf &conf)
Definition: GainChannelNormalize.h:42
virtual ~GainChannelNormalize()
Destructor.
Definition: GainChannelNormalize.h:48
HiVector _data
Data vector.
Definition: Module.h:151
GainChannelNormalize()
Definition: GainChannelNormalize.h:41
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
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
int ToInteger(const T &value)
Helper function to convert values to Integers.
Definition: HiCalUtil.h:222
A DbProfile is a container for access parameters to a database.
Definition: DbProfile.h:51
TNT::Array1D< double > HiVector
1-D Buffer
Definition: HiCalTypes.h:27
void add(const QString &event)
Definition: HiCalTypes.h:55
double ToDouble(const T &value)
Helper function to convert values to doubles.
Definition: HiCalUtil.h:234
QString getcsvFile() const
Returns expanded name of last CSV file loaded by loadCsv.
Definition: Module.h:71
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
@ User
A type of error that could only have occurred due to a mistake on the user's part (e....
Definition: IException.h:126