Changeset 8907 for trunk/MagicSoft/Mars/mastro
- Timestamp:
- 06/02/08 09:52:26 (17 years ago)
- Location:
- trunk/MagicSoft/Mars/mastro
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mastro/MAstro.cc
r8765 r8907 44 44 45 45 ClassImp(MAstro); 46 47 Double_t MAstro::RadToHor() 48 { 49 return 24/TMath::TwoPi(); 50 } 51 52 Double_t MAstro::HorToRad() 53 { 54 return TMath::TwoPi()/24; 55 } 46 56 47 57 Double_t MAstro::Trunc(Double_t val) -
trunk/MagicSoft/Mars/mastro/MAstro.h
r8765 r8907 31 31 static Double_t HorToDeg() { return 1./15; } 32 32 33 static Double_t RadToHor() 34 static Double_t HorToRad() 33 static Double_t RadToHor(); // { return 24/TMath::TwoPi(); } 34 static Double_t HorToRad(); // { return TMath::TwoPi()/24; } 35 35 36 36 // Angle/Time conversion functions -
trunk/MagicSoft/Mars/mastro/MAstroCatalog.cc
r8725 r8907 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MAstroCatalog.cc,v 1. 29 2007-09-02 13:53:55tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MAstroCatalog.cc,v 1.30 2008-06-02 08:46:39 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 20 20 ! Author(s): Thomas Bretz, 03/2004 <mailto:tbretz@astro.uni-wuerzburg.de> 21 21 ! 22 ! Copyright: MAGIC Software Development, 2002-200 522 ! Copyright: MAGIC Software Development, 2002-2008 23 23 ! 24 24 ! … … 143 143 #include <TPaveText.h> // TPaveText 144 144 145 #include <TGraph.h> 145 #include <TH1.h> // TH1F 146 #include <TGraph.h> // TGraph 146 147 147 148 #include "MLog.h" … … 218 219 } 219 220 } 221 222 // -------------------------------------------------------------------------- 223 // 224 // Set Radius of FOV using the pixsize [arcsec/pix], width 225 // and height [pixel] of image 226 // 227 void MAstroCatalog::SetRadiusFOV(Double_t pixsize, Double_t w, Double_t h) 228 { 229 // pixsize [arcsec/pixel] 230 // w [pixel] 231 // h [pixel] 232 const Double_t scale = TMath::Hypot(w, h)/2; 233 SetRadiusFOV(scale*pixsize/3600); 234 } 220 235 221 236 // -------------------------------------------------------------------------- -
trunk/MagicSoft/Mars/mastro/MAstroCatalog.h
r8066 r8907 108 108 void SetObservatory(const MObservatory &obs); 109 109 void SetLimMag(Double_t mag) { fLimMag=mag; Update(); } // *MENU* *ARGS={mag=>fLimMag} 110 111 void SetRadiusFOV(Double_t pixsize, Double_t w, Double_t h); 110 112 void SetRadiusFOV(Double_t deg) 111 113 { … … 121 123 Update(); 122 124 } // *MENU* *ARGS={deg=>fRadiusFOV} 123 void SetRadiusFOV(Double_t pixsize, Double_t w, Double_t h)124 {125 // pixsize [arcsec/pixel]126 // w [pixel]127 // h [pixel]128 const Double_t scale = TMath::Hypot(w, h)/2;129 SetRadiusFOV(scale*pixsize/3600);130 } // Set Radius of FOV using the pixsize [arcsec/pix], width and height [pixel] of image131 125 132 126 void SetRaDec(Double_t ra, Double_t dec) { fRaDec.SetRaDec(ra, dec, 1); Update(); } -
trunk/MagicSoft/Mars/mastro/MVector3.cc
r4977 r8907 18 18 ! Author(s): Thomas Bretz, 03/2004 <mailto:tbretz@astro.uni-wuerzburg.de> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2002-200 420 ! Copyright: MAGIC Software Development, 2002-2008 21 21 ! 22 22 ! … … 33 33 #include <iostream> 34 34 35 #include <TMath.h> 36 35 37 #include "MLog.h" 36 38 #include "MLogManip.h" … … 39 41 40 42 using namespace std; 43 44 void MVector3::SetThetaPhiMag(Double_t theta, Double_t phi, Double_t mag) 45 { 46 SetMagThetaPhi(TMath::Power(10, -mag/2.5), theta, phi); 47 } 48 49 Double_t MVector3::Magnitude() const 50 { 51 return -2.5*TMath::Log10(Mag()); 52 } 53 54 void MVector3::SetRaDec(Double_t ra, Double_t dec, Double_t mag) 55 { 56 fType = kIsRaDec; 57 SetThetaPhiMag(TMath::Pi()/2-dec, ra, mag); 58 } 59 60 void MVector3::SetAltAz(Double_t alt, Double_t az, Double_t mag) 61 { 62 fType = kIsAltAz; 63 SetThetaPhiMag(TMath::Pi()/2-alt, az, mag); 64 } 41 65 42 66 void MVector3::WriteBinary(ostream &out) const -
trunk/MagicSoft/Mars/mastro/MVector3.h
r8725 r8907 22 22 TString fName; 23 23 24 void SetThetaPhiMag(Double_t theta, Double_t phi, Double_t mag) 25 { 26 SetMagThetaPhi(TMath::Power(10, -mag/2.5), theta, phi); 27 } 24 void SetThetaPhiMag(Double_t theta, Double_t phi, Double_t mag); // SetMagThetaPhi(TMath::Power(10, -mag/2.5), theta, phi); 28 25 29 26 public: … … 35 32 } 36 33 MVector3(const TVector3 &v3) : TVector3(v3) { fType=kIsArbitrary; } 37 Double_t Magnitude() const { return -2.5*TMath::Log10(Mag()); }34 Double_t Magnitude() const;// { return -2.5*TMath::Log10(Mag()); } 38 35 39 36 Bool_t IsValid() const { return fType!=kIsInvalid; } 40 37 41 void SetRaDec(Double_t ra, Double_t dec, Double_t mag=0) 42 { 43 fType = kIsRaDec; 44 SetThetaPhiMag(TMath::Pi()/2-dec, ra, mag); 45 } 46 void SetName(const TString &str) { fName = str.Strip(TString::kBoth); } 38 void SetRaDec(Double_t ra, Double_t dec, Double_t mag=0); // SetThetaPhiMag(TMath::Pi()/2-dec, ra, mag); 39 void SetAltAz(Double_t alt, Double_t az, Double_t mag=0); // SetThetaPhiMag(TMath::Pi()/2-alt, az, mag); 47 40 void SetZdAz(Double_t zd, Double_t az, Double_t mag=0) 48 41 { … … 50 43 SetThetaPhiMag(zd, az, mag); 51 44 } 52 void SetAltAz(Double_t alt, Double_t az, Double_t mag=0)53 {54 fType = kIsAltAz;55 SetThetaPhiMag(TMath::Pi()/2-alt, az, mag);56 }57 45 46 void SetName(const TString &str) { fName = str.Strip(TString::kBoth); } 58 47 const char *GetName() const { return fName; } 59 48
Note:
See TracChangeset
for help on using the changeset viewer.