Changeset 7764 for trunk/MagicSoft/Cosy/main
- Timestamp:
- 06/28/06 13:49:23 (18 years ago)
- Location:
- trunk/MagicSoft/Cosy/main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/main/MStargHistograms.cc
r7614 r7764 127 127 } 128 128 129 void MStargHistograms::Fill(Leds &spots, MStarList &stars, ZdAz &d, ZdAz sao, Ring ¢er, ZdAz & centerzdaz, ZdAz &star, Double_t bright, const ZdAz &pos, const MTime &t)129 void MStargHistograms::Fill(Leds &spots, MStarList &stars, ZdAz &d, ZdAz sao, Ring ¢er, ZdAz &star, Double_t bright, const ZdAz &pos, const MTime &t) 130 130 { 131 131 // FIXME! … … 146 146 fCenterX = center.GetX(); 147 147 fCenterY = center.GetY(); 148 fCenterZd = centerzdaz.Zd();149 fCenterAz = centerzdaz.Az();148 //fCenterZd = centerzdaz.Zd(); 149 //fCenterAz = centerzdaz.Az(); 150 150 fStarZd = star.Zd(); 151 151 fStarAz = star.Az(); -
trunk/MagicSoft/Cosy/main/MStargHistograms.h
r4865 r7764 31 31 Double_t fSpots; 32 32 Double_t fBright; 33 Double_t fCenterZd;34 Double_t fCenterAz;33 // Double_t fCenterZd; 34 // Double_t fCenterAz; 35 35 Double_t fStarZd; 36 36 Double_t fStarAz; … … 49 49 50 50 void Fill(Leds &spots, MStarList &stars, ZdAz &d, ZdAz sao, 51 Ring ¢er, ZdAz ¢erzdaz,ZdAz &star, Double_t bright,51 Ring ¢er, /*ZdAz ¢erzdaz,*/ ZdAz &star, Double_t bright, 52 52 const ZdAz &pos, const MTime &t); 53 53 -
trunk/MagicSoft/Cosy/main/MStarguider.cc
r7708 r7764 665 665 else 666 666 { 667 668 667 fStatus = MDriveCom::kStandby; 669 668 … … 684 683 fOperations->DisableEntry(IDM_kStargAnalysis); 685 684 } 686 gSystem->Unlink("tracking_error.txt");685 //gSystem->Unlink("tracking_error.txt"); 687 686 } 688 687 … … 1371 1370 AltAz pos0 = fSao->CalcAltAzFromPix(768/2, 576/2)*kRad2Deg; 1372 1371 AltAz pos1 = fSao->CalcAltAzFromPix(768/2+mx, 576/2+my)*kRad2Deg; 1373 1372 /* 1374 1373 ofstream fout1("pointingpos.txt"); 1375 1374 fout1 << setprecision(10) << fSao->GetMjd()-52000 << " "; … … 1385 1384 fout2 << fCosy->GetPointingPos() << " "; 1386 1385 fout2 << -pos1.Alt() << " " << pos1.Az() << endl; 1387 1386 */ 1388 1387 return ZdAz(-pos1.Alt(), pos1.Az()); 1389 1388 } … … 1853 1852 1854 1853 Ring sgcenter(53.2, 293.6); // Center of camera in SG picture [px] 1855 ZdAz sgcenterzdaz(0, 0); // Center of camera in SG picture [deg]1856 // (0,0)_deg is at (53.2, 293.6)_px1854 //ZdAz sgcenterzdaz(0, 0); // Center of camera in SG picture [deg] 1855 // // (0,0)_deg is at (53.2, 293.6)_px 1857 1856 ZdAz star(0, 0); // Star on curtain in [deg] 1858 1857 … … 1862 1861 if (fCosy) 1863 1862 pos = fCosy->GetPointingPos(); 1864 sgcenter = 1865 fStargCaos->Run(img, kFALSE, kFALSE, pos, t, 30, 3.0); // [px] 1863 1864 sgcenter = fStargCaos->Run(img, kFALSE, kFALSE, pos, t, 30, 3.0); // [px] 1865 1866 1866 const Float_t pixsize = atof(fPixSize->GetText()); // [arcsec/px] 1867 1867 … … 1871 1871 // wrong exspecially near the zenith were az-lines are highly 1872 1872 // curved around the zenith! 1873 sgcenterzdaz.Zd((sgcenter.GetY()-293.6) * pixsize /3600 );1874 sgcenterzdaz.Az((sgcenter.GetX()-53.2) * pixsize /3600 );1873 //sgcenterzdaz.Zd((sgcenter.GetY()-293.6) * pixsize /3600 ); 1874 //sgcenterzdaz.Az((sgcenter.GetX()-53.2) * pixsize /3600 ); 1875 1875 #ifdef EXPERT 1876 1876 cout << "- LEDs imply offset of Zd=" … … 1918 1918 } 1919 1919 1920 // Find Spot on Camera Center in Starguider camera1920 // Find Spot on Camera Center in Starguider camera 1921 1921 1922 1922 if (fOperations->IsEntryChecked(IDM_kRoqueLampAna)) … … 1947 1947 f2.DrawCircle(sgcenter, 115.0, 0x0fa); 1948 1948 } 1949 1950 1951 1949 1952 1950 // we calculate the offset given by the three ETH Leds visible to … … 1958 1956 1959 1957 // Position corresponding to the camera center (53.2, 293.6) 1960 Ring skycenter(392, 318); 1958 //Ring skycenter(392, 318); 1959 Ring skycenter(768/2, 576/2); 1961 1960 // MStarList spots; 1962 1961 … … 1980 1979 // very careful: If center of camera cannot be determined 1981 1980 // sgcenter jumps to (0,0) 1982 double sgcenteroffsetX = 0.0; 1983 double sgcenteroffsetY = 0.0; 1984 if ((double)sgcenter.GetX() > 0.0 && (double)sgcenter.GetY() > 0.0) 1985 { 1986 //Please never change this offsets!!! 1987 sgcenteroffsetX = sgcenter.GetX()-53.2; 1988 sgcenteroffsetY = sgcenter.GetY()-293.6; 1989 } 1981 1982 //Please never change this offsets!!! 1983 // 53.2 and 293.6 are the "preliminary" camera center 1984 // -9 and 28.5 are the offsets of the pointing position in the sky 1985 const XY offset(53.2-9, 293.6+28.5); 1986 1987 const Bool_t centerisvalid = sgcenter.GetX()>0 && sgcenter.GetY()>0; 1988 if (centerisvalid) 1989 skycenter.SetXY(sgcenter.X() - offset.X(), 1990 sgcenter.Y() - offset.Y()); 1990 1991 1991 1992 // we obtain stars in the effective star FOV and draw them. … … 1993 1994 // We determine the ideal starfield using camera sagging info 1994 1995 // from the LEDs 1995 1996 //cout << sgcenteroffsetX << " " << sgcenteroffsetY << endl; 1997 1998 fSao->CalcStars(stars, 530, 292, 1999 -8+2-3+sgcenteroffsetX, //x: star<spot =>subs 2000 31.5-3+sgcenteroffsetY); //y: star<spot =>subs? 2001 1996 fSao->CalcStars(stars, 530, 292, skycenter.GetX(), skycenter.GetY()); 2002 1997 fSao->DrawStars(stars, cimg); 2003 1998 … … 2008 2003 // Next we evaluate the offset given by the LEDs. This we obtain 2009 2004 // in Zd/Az and add it to the tracking error. 2010 2011 2005 if (fDisplay->IsEntryChecked(IDM_kStarguider)) 2012 2006 { … … 2020 2014 fSkyBright->SetText(txt); 2021 2015 2016 const Bool_t brightnessisvalid = bright<1.75*fLastBright && 2017 bright>30 && bright<110; 2018 2019 fLastBright = bright; 2020 2022 2021 ULong_t color; 2023 2022 gClient->GetColorByName("Green", color); … … 2033 2032 const Int_t rc = CalcTrackingError(spots, stars, fD, t, bright, numstars); 2034 2033 2035 if ((bright <= 1.75* fLastBright) && (bright < 110)) 2036 fStatus = MDriveCom::kMonitoring; 2037 else 2038 fStatus = MDriveCom::kError; 2034 const Bool_t monitoring = brightnessisvalid && centerisvalid; 2035 2036 fStatus = monitoring ? MDriveCom::kMonitoring : MDriveCom::kError; 2039 2037 2040 2038 if (fCosy) … … 2043 2041 if (fOperations->IsEntryChecked(IDM_kStargAnalysis)) 2044 2042 fStargHistograms->Fill(spots, stars, fD, 2045 fSao->GetZdAz(), sgcenter, sgcenterzdaz,2043 fSao->GetZdAz(), sgcenter, /*sgcenterzdaz,*/ 2046 2044 star, bright, fPos, t); 2047 2048 fLastBright = bright;2049 2045 2050 2046 if (fCosy) … … 2055 2051 time.GetMjd(), 0, 0); // Report 2056 2052 } 2053 2057 2054 } //kStarguider 2058 2055 2059 f2.DrawCircle(skycenter, 2.0, 0x0a); 2060 2061 f2.DrawCircle(skycenter, 7.4, 0x0a); //0.1deg 2062 2063 f2.DrawCircle(skycenter, 2.06*.5*74.0, 0x0a); 2064 f2.DrawCircle(skycenter, 2.32*.5*74.0, 0x0a); 2065 f2.DrawCircle(skycenter, 3.50*.5*74.0, 0x0a); 2066 f2.DrawCircle(skycenter, 3.84*.5*74.0, 0x0a); 2056 if (centerisvalid) 2057 { 2058 f2.DrawCircle(skycenter, 2.0, 0x0a); 2059 2060 f2.DrawCircle(skycenter, 7.4, 0x0a); //0.1deg 2061 2062 f2.DrawCircle(skycenter, 2.06*.5*74.0, 0x0a); 2063 f2.DrawCircle(skycenter, 2.32*.5*74.0, 0x0a); 2064 f2.DrawCircle(skycenter, 3.50*.5*74.0, 0x0a); 2065 f2.DrawCircle(skycenter, 3.84*.5*74.0, 0x0a); 2066 } 2067 2067 2068 } //CalcStars 2068 2069
Note:
See TracChangeset
for help on using the changeset viewer.