Changeset 1809 in Sophya for trunk/ArchTOIPipe/ProcWSophya/map2toi.cc
- Timestamp:
- Dec 3, 2001, 9:38:03 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ArchTOIPipe/ProcWSophya/map2toi.cc
r1762 r1809 3 3 // Christophe Magneville 4 4 // Reza Ansari 5 // $Id: map2toi.cc,v 1. 9 2001-11-13 16:22:47 aubourgExp $5 // $Id: map2toi.cc,v 1.10 2001-12-03 20:38:02 cmv Exp $ 6 6 7 7 #include "toimanager.h" … … 9 9 #include "ctimer.h" 10 10 #include "map2toi.h" 11 // La valeur "Pi" doit etre celle de smathconst.h a cause du test sur theta 12 #include "smathconst.h" 11 13 12 14 //////////////////////////////////////////////////////////////////////// … … 14 16 : mSph(sph) 15 17 { 18 SetBad(); 16 19 SetEquinox(); 17 20 SetCoorIn(); … … 26 29 void Map2TOI::Print(::ostream & os) 27 30 { 28 os<<"Map2TOI::Print -- Sphere NLat = "<<mSph.SizeIndex()<<endl 29 30 <<" - Equinoxe="<<mActualYear<<endl 31 32 <<" - TypCoorIn: Gal("<<((mTypCoorIn&TypCoordGal)?1:0) 33 <<") Eq("<<((mTypCoorIn&TypCoordEq)?1:0) 34 <<") Deg("<<((mTypCoorIn&TypCoordDD)?1:0) 35 <<") Hour("<<((mTypCoorIn&TypCoordHD)?1:0) 36 <<") Rad("<<((mTypCoorIn&TypCoordRR)?1:0)<<")"<<endl 37 38 <<" - TypCoorMap: Gal("<<((mTypCoorMap&TypCoordGal)?1:0) 39 <<") Eq("<<((mTypCoorMap&TypCoordEq)?1:0) 40 <<") Deg("<<((mTypCoorMap&TypCoordDD)?1:0) 41 <<") Hour("<<((mTypCoorMap&TypCoordHD)?1:0) 42 <<") Rad("<<((mTypCoorMap&TypCoordRR)?1:0)<<")"<<endl; 31 os<<"Map2TOI::Print -- Sphere NLat = "<<mSph.SizeIndex()<<endl 32 <<" - Equinoxe: "<<mActualYear<<" y"<<endl 33 <<" - TypCoorIn: "<<mTypCoorIn<<" = "<<DecodeTypAstro(mTypCoorIn)<<endl 34 <<" - TypCoorMap: "<<mTypCoorMap<<" = "<<DecodeTypAstro(mTypCoorMap)<<endl; 43 35 } 44 36 … … 89 81 try { 90 82 91 uint_4 mSnRead=0, mSnFilled=0;92 83 double mjd = MJDfrYear(mActualYear); 84 cout<<"Map2TOI::run() - modified Julian day "<<mjd<<endl; 85 86 uint_4 mSnRead=0, mSnFilled=0, BadCoorRange=0; 93 87 94 88 for(int k=snb;k<=sne;k++) { … … 100 94 mSnRead++; 101 95 102 // Convert CoordIn to Standard 103 double phi=-1.,theta; 104 CoordConvertToStd(mTypCoorIn,c1,c2); 96 // Conversion de CoordIn to Standard 97 double phi=-1.; 98 CoordConvertToStd(mTypCoorIn,&c1,&c2); 99 100 // Conversion dans le systeme astronomique approprie 105 101 if(mTypCoorIn&TypCoordEq && mTypCoorMap&TypCoordGal) { // CIn=Eq CMap=Gal 106 102 EqtoGal(mjd,c1,c2,&c1,&c2); 107 phi = c1 * M_PI/180.;103 phi = c1 * Pi/180.; 108 104 } else if(mTypCoorIn&TypCoordGal && mTypCoorMap&TypCoordEq) { // CIn=Gal CMap=Eq 109 105 GaltoEq(mjd,c1,c2,&c1,&c2); 110 phi = c1 * M_PI/12.;106 phi = c1 * Pi/12.; 111 107 } else if(mTypCoorMap&TypCoordGal) { // CIn=Gal CMap=Gal 112 phi = c1 * M_PI/180.;108 phi = c1 * Pi/180.; 113 109 } else if(mTypCoorMap&TypCoordEq) { // CIn=Eq CMap=Eq 114 phi = c1 * M_PI/12.;110 phi = c1 * Pi/12.; 115 111 } 116 theta = (90.-c2) * M_PI/180.; 117 if(phi<0. || phi>=2*M_PI) flg=FlgToiOut; 118 if(theta<0. || theta>=M_PI) flg=FlgToiOut; 112 ToCoLat(&c2,TypUniteD); 113 double theta = c2 * Pi/180.; 114 if(phi<0. || phi>=2*Pi || theta<0. || theta>Pi) 115 {BadCoorRange++; flg = mBadFlag; } 119 116 120 117 if(!flg) { … … 128 125 } 129 126 130 cout<<"TOI2Map::run: Samples Read "<<mSnRead<<" Filled "<<mSnFilled<<endl; 127 cout<<"TOI2Map::run: Samples Read "<<mSnRead 128 <<" Filled "<<mSnFilled 129 <<" BadCoorRange="<<BadCoorRange<<endl; 131 130 132 131 //---------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.