Changeset 7788 for trunk/MagicSoft/Cosy/main/MStarguider.cc
- Timestamp:
- 07/12/06 03:00:16 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/main/MStarguider.cc
r7785 r7788 1 #undef EXPERT 1 2 #undef EXPERT 2 3 … … 335 336 336 337 fCZdAz = new MGCoordinates(this, kETypeZdAz, kFALSE); 337 fCZdAz->Move(240+12+28, fMenu->GetDefaultHeight()+581+ 12);338 fCZdAz->Move(240+12+28, fMenu->GetDefaultHeight()+581+20-4); 338 339 AddFrame(fCZdAz); 339 340 fList->Add(fCZdAz); 340 341 341 342 fPZdAz = new MGCoordinates(this, kETypeZdAz, kFALSE); 342 fPZdAz->Move(240+12+28, fMenu->GetDefaultHeight()+627+2* 12);343 fPZdAz->Move(240+12+28, fMenu->GetDefaultHeight()+627+2*20-4); 343 344 AddFrame(fPZdAz); 344 345 fList->Add(fPZdAz); 345 346 346 347 fDZdAz = new MGCoordinates(this, kETypeZdAz, kFALSE); 347 fDZdAz->Move(240+12+28, fMenu->GetDefaultHeight()+673+3* 12);348 fDZdAz->Move(240+12+28, fMenu->GetDefaultHeight()+673+3*20-4); 348 349 AddFrame(fDZdAz); 349 350 fList->Add(fDZdAz); 350 351 351 352 fSZdAz = new MGCoordinates(this, kETypeZdAz, kFALSE); 352 fSZdAz->Move(240+12+28, fMenu->GetDefaultHeight()+719+4* 12);353 fSZdAz->Move(240+12+28, fMenu->GetDefaultHeight()+719+4*20-4); 353 354 AddFrame(fSZdAz); 354 355 fList->Add(fSZdAz); 355 356 356 357 fTPoint = new TGTextButton(this, "TPoint"); 357 fTPoint->Move(4, fMenu->GetDefaultHeight()+722+3*1 2+25);358 fTPoint->Move(4, fMenu->GetDefaultHeight()+722+3*15+15); 358 359 fTPoint->AllowStayDown(kTRUE); 359 360 AddFrame(fTPoint); … … 361 362 362 363 fStargTPoint = new TGTextButton(this, "StargTPoint"); 363 fStargTPoint->Move(240+12+2 0, fMenu->GetDefaultHeight()+785);364 fStargTPoint->Move(240+12+28, fMenu->GetDefaultHeight()+785); 364 365 fStargTPoint->AllowStayDown(kTRUE); 365 366 AddFrame(fStargTPoint); … … 368 369 fFps = new TGLabel(this, "---fps"); 369 370 fFps->SetTextJustify(kTextRight); 370 fFps->Move(650-4 40, fMenu->GetDefaultHeight()+619+13+60+20);371 fFps->Move(650-495, fMenu->GetDefaultHeight()+619+13+60+20+2); 371 372 AddFrame(fFps); 372 373 fList->Add(fFps); 373 374 374 fPosZoom = new TGLabel(this, " ----.--d/----.--d (----, ----)");375 fPosZoom->SetTextJustify(kText Right);375 fPosZoom = new TGLabel(this, "(----, ----) ----.--d/----.--d"); 376 fPosZoom->SetTextJustify(kTextLeft); 376 377 fPosZoom->Move(4, fMenu->GetDefaultHeight()+765); 377 378 AddFrame(fPosZoom); … … 386 387 TGLabel *l = new TGLabel(this, "arcsec/pix"); 387 388 l->SetTextJustify(kTextLeft); 388 l->Move(60 5-400, fMenu->GetDefaultHeight()+619+13+60);389 l->Move(606-412, fMenu->GetDefaultHeight()+619+13+60); 389 390 AddFrame(l); 390 391 fList->Add(l); … … 392 393 l = new TGLabel(this, "deg"); 393 394 l->SetTextJustify(kTextLeft); 394 l->Move(60 5-410, fMenu->GetDefaultHeight()+619-10+60);395 l->Move(606-412, fMenu->GetDefaultHeight()+619-10+60); 395 396 AddFrame(l); 396 397 fList->Add(l); … … 398 399 l = new TGLabel(this, "Telescope pointing at"); 399 400 l->SetTextJustify(kTextLeft); 400 l->Move(240+12+20 , fMenu->GetDefaultHeight()+584-5);401 l->Move(240+12+20+7, fMenu->GetDefaultHeight()+584-5); 401 402 AddFrame(l); 402 403 fList->Add(l); … … 404 405 l = new TGLabel(this, "Starguider position"); 405 406 l->SetTextJustify(kTextLeft); 406 l->Move(240+12+20 , fMenu->GetDefaultHeight()+630+12-5);407 l->Move(240+12+20+7, fMenu->GetDefaultHeight()+630+20-5); 407 408 AddFrame(l); 408 409 fList->Add(l); … … 410 411 l = new TGLabel(this, "Misspointing"); 411 412 l->SetTextJustify(kTextLeft); 412 l->Move(240+12+20 , fMenu->GetDefaultHeight()+676+2*12-5);413 l->Move(240+12+20+7, fMenu->GetDefaultHeight()+676+2*20-5); 413 414 AddFrame(l); 414 415 fList->Add(l); … … 417 418 l = new TGLabel(this, "Misspointing/FindStar (Experts Only!)"); 418 419 l->SetTextJustify(kTextLeft); 419 l->Move(240+12+20, fMenu->GetDefaultHeight()+722+3* 12-5);420 l->Move(240+12+20, fMenu->GetDefaultHeight()+722+3*20-5); 420 421 AddFrame(l); 421 422 fList->Add(l); … … 436 437 fList->Add(fPixSize); 437 438 438 fAngle = new TGTextEntry(this, " 0", IDM_kAngle); 439 const Double_t angle = -0.4; 440 fSao->SetRotationAngle(angle); 441 442 txt = ""; 443 txt += angle; 444 445 fAngle = new TGTextEntry(this, txt, IDM_kAngle); 439 446 fAngle->SetAlignment(kTextCenterX); 440 447 fAngle->Move(547-410, fMenu->GetDefaultHeight()+617-10+60); … … 1385 1392 { 1386 1393 // open tpoint file 1387 const TString name = MCosy::GetFileName("tpoint /starg_%s.txt");1394 const TString name = MCosy::GetFileName("tpoint", "starg", "txt"); 1388 1395 cout << "TPoint-Starg File ********* " << name << " ********** " << endl; 1389 1396 … … 1451 1458 // Try to find Led in this area 1452 1459 Leds leds; 1453 f.FindStar Circle(leds, (Int_t)SearchCenter.X(), (Int_t)SearchCenter.Y());1460 f.FindStar(leds, (Int_t)SearchCenter.X(), (Int_t)SearchCenter.Y(), true); 1454 1461 1455 1462 // Check whether star found … … 1470 1477 if (!fOutRq) 1471 1478 { 1472 const TString name = MCosy::GetFileName("tpoint /starg_roquelamp_%s.txt");1479 const TString name = MCosy::GetFileName("tpoint", "roquelamp", "txt"); 1473 1480 cout << "Starg_RoqueLamp File ********* " << name << " ********** " << endl; 1474 1481 fOutRq = new ofstream(name); … … 1476 1483 } 1477 1484 1478 1479 1485 return relroquepos; 1480 1486 } 1481 1482 1487 1483 1488 ZdAz MStarguider::FindStar(FilterLed &f, FilterLed &f2, Ring ¢er, MTime &t, Double_t cut, Double_t box, Double_t scalefactor = 1.0) … … 1489 1494 // Try to find Led in this area 1490 1495 Leds leds; 1491 f.FindStar Circle(leds, (Int_t)center.GetX(), (Int_t)center.GetY());1496 f.FindStar(leds, (Int_t)center.GetX(), (Int_t)center.GetY(), true); 1492 1497 1493 1498 if (leds.GetEntries()<0) … … 1505 1510 return ZdAz(.0,.0); 1506 1511 } 1507 1508 1512 cout << "Found star @ " << flush; 1509 1513 star->Print(); … … 1561 1565 // open tpoint file 1562 1566 // 1563 const TString name = MCosy::GetFileName("tpoint /tpoint_%s.txt");1567 const TString name = MCosy::GetFileName("tpoint", "tpoint", "txt"); 1564 1568 cout << "TPoint-Starg File ********* " << name << " ********** " << endl; 1565 1569 … … 1715 1719 // Find Star at Center---for Tpoint Procedure 1716 1720 if (fDisplay->IsEntryChecked(IDM_kFindStar)) 1717 /*ZdAz zdaz =*/FindStar(f, f2, center, t, 3.5, 70);1721 FindStar(f, f2, center, t, 3.5, 70); 1718 1722 1719 1723 byte zimg[kZOOM*kZOOM]; … … 1779 1783 { 1780 1784 1781 XY roquelamp(0,0);1782 1783 1785 Double_t imageclean = 1.5; 1784 1786 Double_t boxradius = 60; … … 1786 1788 XY searchcenter(768/2-1,576/2+25); 1787 1789 1788 roquelamp = FindRoqueLamp(f, f2, sgcenter, t, imageclean, boxradius, searchcenter);1790 XY roquelamp = FindRoqueLamp(f, f2, sgcenter, t, imageclean, boxradius, searchcenter); 1789 1791 1790 1792 if (fOutRq) … … 1804 1806 1805 1807 // Find Spot on Camera Center in Starguider camera 1806 1807 1808 if (fOperations->IsEntryChecked(IDM_kRoqueLampAna)) 1808 1809 { … … 1832 1833 f2.DrawCircle(sgcenter, 115.0, 0x0fa); 1833 1834 } 1834 1835 1835 // we calculate the offset given by the three ETH Leds visible to 1836 1836 // the guide camera … … 1884 1884 1885 1885 // Position around which the circles are drawn. 1886 const Ring skycenter(768/2 +off.X(), 576/2+off.Y());1886 const Ring skycenter(768/2-off.X(), 576/2+off.Y()); 1887 1887 1888 1888 // There are two corrections to the misspointing … … 1896 1896 Leds spots; 1897 1897 f.SetBox(230); 1898 // f.SetCut(1.5); 1899 double bright; 1898 f.SetCut(2.5); 1899 1900 double bright; 1900 1901 f.ExecuteAndMark(spots, 530, 292, bright); 1901 MString txt; 1902 1903 MString txt; 1902 1904 txt.Print("Sky Brightness: %.1f", bright); 1903 1905 fSkyBright->SetText(txt); … … 1961 1963 { 1962 1964 f2.DrawCircle(center, 0x0a); 1963 f2.DrawCircle(center, 5.0,1965 f2.DrawCircle(center, 7.0, 1964 1966 fDisplay->IsEntryChecked(IDM_kFindStar)?3:0xb0); 1965 1967 f2.DrawCircle(center, 115.0, 0x0a); … … 2003 2005 if (aa.Az()<0) 2004 2006 aa.Az(aa.Az()+360); 2005 txt.Print(" %.1fd/%.1fd (%d, %d)", -aa.Alt(), aa.Az()-180, fDx, fDy);2007 txt.Print("(%d, %d) %.1fd/%.1fd", fDx, fDy, -aa.Alt(), aa.Az()-180); 2006 2008 } 2007 2009 else
Note:
See TracChangeset
for help on using the changeset viewer.