Changeset 7794 for trunk/MagicSoft/Cosy/main/MStarguider.cc
- Timestamp:
- 07/16/06 01:38:53 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/main/MStarguider.cc
r7792 r7794 130 130 131 131 fGStarg->Update(fPos, fD); 132 fGNumStars->Update(fNumStarsDetected, fNumStarsCorrelated); 132 if (fDisplay->IsEntryChecked(IDM_kStarguider)) 133 fGNumStars->Update(fNumStarsDetected, fNumStarsCorrelated); 133 134 134 135 return kTRUE; … … 445 446 446 447 // Set input box for rotation angle 447 const Double_t angle = -0. 4;448 const Double_t angle = -0.2; 448 449 fSao->SetRotationAngle(angle); 449 450 … … 458 459 459 460 // Set input box for pixel size 460 const Double_t pixsize = 48. 8; // used to be 23.4461 const Double_t pixsize = 48.9; // used to be 23.4 461 462 462 463 fSao->SetPixSize(pixsize); 463 fSao->SetRotationAngle(0);464 464 465 465 txt = ""; … … 519 519 fCRaDec->UnmapWindow(); 520 520 fCZdAz->UnmapWindow(); 521 fCZdAzText->UnmapWindow(); 521 522 fPZdAz->UnmapWindow(); 522 523 fPZdAzText->UnmapWindow(); … … 723 724 fDisplay->CheckEntry(IDM_kCatalog); 724 725 fCRaDec->MapWindow(); 725 fCRaDecText-MapWindow();726 726 fCZdAz->MapWindow(); 727 727 fCZdAzText->MapWindow(); … … 771 771 //catalog 772 772 fCRaDec->UnmapWindow(); 773 fCRaDecText-UnmapWindow();774 773 fCZdAz->UnmapWindow(); 775 774 fCZdAzText->UnmapWindow(); … … 1408 1407 { 1409 1408 num = leds.GetEntries(); 1409 //cout << "Num: " << num << endl; 1410 1410 if (num < 3) //was 1 1411 1411 { … … 1416 1416 } 1417 1417 1418 //cout << "Cat: " << stars.GetRealEntries() << endl; 1418 1419 if (stars.GetRealEntries() < 3) 1419 1420 { … … 1437 1438 1438 1439 // FIXME: Is predefined value 3 a good idea? 1440 Int_t cnt=0; 1439 1441 1440 1442 MStar *star; 1441 1443 MStarListIter NextStar(&stars); 1442 while ((star=NextStar()) )1444 while ((star=NextStar()) && cnt<num+5) 1443 1445 { 1444 1446 TIter NextSp(&leds); … … 1457 1459 x.AddAt(dpos.X(), idx); 1458 1460 y.AddAt(dpos.Y(), idx); 1459 mag.AddAt(spot->GetMag()/star->GetMag(), idx); 1461 mag.AddAt(log(spot->GetMag())/star->GetMag(), idx); 1462 1460 1463 #ifdef EXPERT 1461 1464 if (fout) … … 1463 1466 fout << spot->GetX() << " " 1464 1467 << spot->GetY() << " " 1465 << spot->GetMag() << " "1468 << -2.5*log(spot->GetMag()) << " " 1466 1469 << star->GetX() << " " 1467 1470 << star->GetY() << " " … … 1471 1474 #endif 1472 1475 } 1476 cnt++; 1473 1477 } 1474 1478 … … 1477 1481 if (numcor<1) 1478 1482 return 0; 1483 1484 //cout << "Cor: " << numcor << endl; 1479 1485 1480 1486 fDZdAz->SetCoordinates(d); … … 1829 1835 if (fCosy) 1830 1836 pos = fCosy->GetPointingPos(); 1831 center = fCaos->Run(img, printl, printr, pos, t, 50, 3.0);1837 center = fCaos->Run(img, printl, printr, pos, t, 19, 3.0); 1832 1838 cout << "Caos Filter Camera center position: " << center.GetX() << " " << center.GetY() << endl; 1833 1839 … … 1835 1841 1836 1842 // Find Star at Center---for Tpoint Procedure 1837 if (fDisplay->IsEntryChecked(IDM_kFindStar)) 1843 if (fDisplay->IsEntryChecked(IDM_kFindStar) && 1844 center.GetX()>0 && center.GetY()>0) 1838 1845 { 1839 1846 // SCALE FACTOR ASSUMED TO BE 70 … … 1888 1895 << sgcenter.GetY()-293.6<< "pix" << endl; 1889 1896 #endif 1890 if (fDisplay->IsEntryChecked(IDM_kStargFindStar)) 1897 if (fDisplay->IsEntryChecked(IDM_kStargFindStar) && 1898 sgcenter.GetX()>0 && sgcenter.GetY()>0) 1891 1899 { 1892 1900 star = FindStar(f, f2, sgcenter, t, 4.5, 30, 267/161.9); // [deg] … … 1972 1980 MTime time(*tm); 1973 1981 1974 XY xy = fCRaDec->GetCoordinates(); 1975 fRaDec->Set(xy.X()*360/24, xy.Y()); 1982 XY xy = fCRaDec->GetCoordinates(); //[h, deg] 1983 fRaDec->Set(xy.X()*360/24, xy.Y()); //[deg,deg] 1976 1984 1977 1985 UpdatePosZoom(); 1978 1986 1979 1987 // Always call SetMjd first! 1980 1988 fSao->SetPointing(time.GetMjd(), *fRaDec); 1981 1989 fCZdAz->SetCoordinates(fSao->GetZdAz()); 1982 1990 … … 2048 2056 const Int_t rc = CalcTrackingError(spots, stars, fD, t, bright, numstars); 2049 2057 2050 const Bool_t monitoring = brightnessisvalid && centerisvalid ;2058 const Bool_t monitoring = brightnessisvalid && centerisvalid && fNumStarsCorrelated>2; 2051 2059 2052 2060 fStatus = monitoring ? MDriveCom::kMonitoring : MDriveCom::kError; … … 2082 2090 f2.DrawHexagon(skycenter, 2.06/ap, 0x0a); 2083 2091 f2.DrawHexagon(skycenter, 3.50/ap, 0x0a); 2084 2085 /*2086 f2.DrawCircle(skycenter, 2.06*.5*74.0, 0x0a);2087 f2.DrawCircle(skycenter, 2.32*.5*74.0, 0x0a);2088 f2.DrawCircle(skycenter, 3.50*.5*74.0, 0x0a);2089 f2.DrawCircle(skycenter, 3.84*.5*74.0, 0x0a);2090 */2091 2092 } 2092 2093 … … 2094 2095 2095 2096 // Draw Circles around center of Camera 2096 if (fDisplay->IsEntryChecked(IDM_kCaosFilter)) 2097 if (fDisplay->IsEntryChecked(IDM_kCaosFilter) && 2098 center.GetX()>0 && center.GetY()>0) 2097 2099 { 2098 2100 f2.DrawCircle(center, 0x0a); … … 2104 2106 } 2105 2107 2106 if (fDisplay->IsEntryChecked(IDM_kStargCaosFilter)) 2108 if (fDisplay->IsEntryChecked(IDM_kStargCaosFilter) && 2109 sgcenter.GetX()>0 && sgcenter.GetY()>0) 2107 2110 { 2108 2111 f2.DrawCircle(sgcenter, 0x0a); … … 2110 2113 fDisplay->IsEntryChecked(IDM_kFindStar)?3:0xb0); 2111 2114 } 2112 2113 // if (fDisplay->IsEntryChecked(IDM_kCatalog))2114 // {2115 // fSao->PaintImg(cimg, 768, 576);2116 // const float r = 60*60/fSao->GetPixSize();2117 // f2.DrawCircle(0.5*r, 0x0a);2118 // f2.DrawCircle(1.0*r, 0x0a);2119 // f2.DrawCircle(1.5*r, 0x0a);2120 // }2121 2115 2122 2116 if (fDisplay->IsEntryChecked(IDM_kCaosFilter) ||
Note:
See TracChangeset
for help on using the changeset viewer.