- Timestamp:
- 05/07/04 16:12:57 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mtemp/MFindStars.cc
r4003 r4010 62 62 fMaxNumIntegratedEvents = 10; 63 63 fRingInterest = 100.; //[mm] ~ 0.3 deg 64 fMinDCForStars = 3. ; //[uA]64 fMinDCForStars = 3.*fMaxNumIntegratedEvents; //[uA] 65 65 66 66 fPixelsUsed.Set(577); … … 79 79 } 80 80 81 fDisplay.SetGeometry(*fGeomCam); 82 81 83 fCurr = (MCameraDC*)pList->FindObject(AddSerialNumber("MCameraDC")); 82 84 … … 98 100 99 101 if (!fDrive) 100 { 101 *fLog << err << AddSerialNumber("MReportDrive") << " not found ... aborting" << endl; 102 return kFALSE; 103 } 102 { 103 *fLog << warn << AddSerialNumber("MReportDrive") << " not found ... ignored." << endl; 104 } 104 105 else 105 106 { … … 188 189 189 190 MHCamera cam = fDisplay; 190 // First define a area of interest around the expected position of the star 191 191 cam.PrintInfo(); 192 193 // Find the star candidats searching the most brights pairs of pixels 192 194 while(1) 193 195 { 194 196 FindPixelWithMaxDC(maxPixelDC, maxPixel); 197 *fLog << dbg << "Star candidate maxDC(" << setw(3) << maxPixelDC << " uA) x position(" << setw(3) << maxPixel.GetX() << " mm) x position(" << setw(3) << maxPixel.GetY() << " mm)" << endl; 198 195 199 if (maxPixelDC<fMinDCForStars) 196 200 break; … … 198 202 MStarLocalPos *starpos = new MStarLocalPos; 199 203 starpos->SetExpValues(maxPixelDC,maxPixel.GetX(),maxPixel.GetY()); 200 starpos->SetCalcValues(maxPixelDC,maxPixel.GetX(), fRingInterest/2,maxPixel.GetY(),fRingInterest/2);204 starpos->SetCalcValues(maxPixelDC,maxPixel.GetX(),maxPixel.GetY(),fRingInterest/2,fRingInterest/2); 201 205 fStars->GetList()->Add(starpos); 202 206 … … 205 209 } 206 210 fDisplay = cam; 207 211 *fLog << dbg << GetName() << " Found " << fStars->GetList()->GetSize() << " stars candidates in the camera." << endl; 208 212 } 209 213 210 214 //loop to extract position of stars on the camera 215 if (fStars->GetList()->GetSize() == 0) 216 { 217 *fLog << err << GetName() << " No stars candidates in the camera." << endl; 218 return kFALSE; 219 } 220 211 221 TIter Next(fStars->GetList()); 212 222 MStarLocalPos* star; … … 228 238 Int_t MFindStars::PostProcess() 229 239 { 240 if(fStars->GetList()->GetSize() != 0) 230 241 fStars->Print(); 231 return kTRUE; 242 243 return kTRUE; 232 244 } 233 245 … … 249 261 UInt_t maxPixIdx[2]; 250 262 263 maxDC = 0; 264 251 265 for (UInt_t pix=1; pix<numPixels; pix++) 252 266 { 253 maxDC = 0;254 255 267 if(fDisplay.IsUsed(pix)) 256 268 { … … 278 290 maxPixIdx[0] = pix; 279 291 maxPixIdx[1] = swneighbor; 292 maxDC = dc[0]; 280 293 } 281 294 else … … 283 296 maxPixIdx[1] = pix; 284 297 maxPixIdx[0] = swneighbor; 298 maxDC = dc[1]; 285 299 } 286 maxDC = dcsum/2;287 300 } 288 301 }
Note:
See TracChangeset
for help on using the changeset viewer.