- Timestamp:
- 08/31/06 17:09:19 (18 years ago)
- Location:
- tags/Release2.1.0b
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
tags/Release2.1.0b/python/asapfitter.py
r1221 r1228 100 100 101 101 self.fitter.setexpression(self.fitfunc,n) 102 self.fitted = False 102 103 return 103 104 … … 136 137 out = "Scan[%d] Beam[%d] IF[%d] Pol[%d] Cycle[%d]" % (self.data.getscan(i),self.data.getbeam(i),self.data.getif(i),self.data.getpol(i), self.data.getcycle(i)) 137 138 asaplog.push(out,False) 138 print self.mask139 139 self.fitter.setdata(self.x, self.y, self.mask) 140 140 if self.fitfunc == 'gauss': -
tags/Release2.1.0b/src/STFitter.cpp
r1221 r1228 64 64 funcs_.resize(0,True); 65 65 parameters_.resize(); 66 fixedpar_.resize(); 66 67 error_.resize(); 67 68 thefit_.resize(); … … 208 209 parameters_.resize(tmppar.nelements()); 209 210 if (tmppar.nelements() != fixedpar_.nelements()) { 210 211 fixedpar_ = False;212 211 fixedpar_.resize(tmppar.nelements()); 212 fixedpar_ = False; 213 } 213 214 } 214 215 if (dynamic_cast<Gaussian1D<Float>* >(funcs_[0]) != 0) { … … 227 228 } 228 229 } 230 // reset 231 if (params.size() == 0) { 232 parameters_.resize(); 233 fixedpar_.resize(); 234 } 229 235 return true; 230 236 } … … 236 242 if (fixedpar_.nelements() > 0 && fixed.size() != fixedpar_.nelements()) 237 243 throw (AipsError("Number of mask elements inconsistent with function.")); 244 if (fixedpar_.nelements() == 0) { 245 fixedpar_.resize(parameters_.nelements()); 246 fixedpar_ = False; 247 } 238 248 if (dynamic_cast<Gaussian1D<Float>* >(funcs_[0]) != 0) { 239 249 uInt count = 0; … … 264 274 Vector<Bool> out(parameters_.nelements()); 265 275 if (fixedpar_.nelements() == 0) { 266 out = False;276 return std::vector<bool>(); 267 277 //throw (AipsError("No parameter mask set.")); 268 278 } else {
Note:
See TracChangeset
for help on using the changeset viewer.