Source
101
101
102
102
uInt ConstantSpectrum::nParameters() const {
103
103
DebugAssert(ok(), AipsError);
104
104
return 0;
105
105
}
106
106
107
107
void ConstantSpectrum::setParameters(const Vector<Double>& newSpectralParms) {
108
108
DebugAssert(newSpectralParms.nelements() == nParameters(), AipsError);
109
109
DebugAssert(ok(), AipsError);
110
110
// Suppress compiler warning about unused variable
111
-
if (&newSpectralParms == 0) {};
111
+
// perhaps should just get rid of the DebugAssert statements
112
+
if (newSpectralParms.empty()) {};
112
113
}
113
114
114
115
Vector<Double> ConstantSpectrum::parameters() const {
115
116
DebugAssert(ok(), AipsError);
116
117
return Vector<Double>(0);
117
118
}
118
119
119
120
void ConstantSpectrum::setErrors(const Vector<Double>& newSpectralErrs) {
120
121
DebugAssert(ok(), AipsError);
121
122
// Suppress compiler warning about unused variable
122
-
if (&newSpectralErrs == 0) {};
123
+
if (newSpectralErrs.empty()) {};
123
124
}
124
125
125
126
Vector<Double> ConstantSpectrum::errors() const {
126
127
DebugAssert(ok(), AipsError);
127
128
Vector<Double> tmp(1,0.0);
128
129
return tmp;
129
130
}
130
131
131
132
Bool ConstantSpectrum::fromRecord(String& errorMessage,
132
133
const RecordInterface& record) {