Changeset 2983 in Sophya
- Timestamp:
- Jun 21, 2006, 5:51:29 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/ProgPI/skymapmodule.cc
r2976 r2983 47 47 48 48 void Resol2SizeIndex(vector<string>& tokens); 49 void SizeIndex2Resol(vector<string>& tokens); 49 50 void TypeMap(vector<string>& tokens); 50 51 void Map2Double(vector<string>& tokens); … … 105 106 usage += "\n Usage: resol2szidx resol"; 106 107 mpiac->RegisterCommand(kw, usage, this, hgrp); 108 kw = "szidx2resol"; 109 usage = "Compute resolution for a given SizeIndex (=nside for HEALPix)"; 110 usage += "\n Usage: szidx2resol szidx_m"; 111 mpiac->RegisterCommand(kw, usage, this, hgrp); 107 112 108 113 kw = "typemap"; … … 287 292 } 288 293 Resol2SizeIndex(tokens); 294 } else if(kw == "szidx2resol") { 295 if(tokens.size()<1) { 296 cout<<"Usage: szidx2resol szidx_m"<<endl; 297 return(0); 298 } 299 SizeIndex2Resol(tokens); 289 300 } else if(kw == "typemap") { 290 301 if(tokens.size()<1) { … … 440 451 << resrad << " radian NPix ~= " << 4.*M_PI/(resrad*resrad) 441 452 << " \n ===> nside=m_HEALPix= " << mh << " m_ThetaPhi= " << mt << endl; 453 return; 454 } 455 456 void skymapmoduleExecutor::SizeIndex2Resol(vector<string>& tokens) 457 { 458 int_4 m = atoi(tokens[0].c_str()); 459 double resh = SphereHEALPix<r_4>::SizeIndexToResol(m); 460 double rest = SphereThetaPhi<r_4>::SizeIndexToResol(m); 461 cout << "SizeIndex2Resol: SizeIndex (m)= " << m 462 << "\n HEALPix: " << Angle(resh).ToArcMin() << " arcmin " 463 << " NPix= " << 12*m*m 464 << "\n ThetaPhi: " << Angle(rest).ToArcMin() << " arcmin " 465 << " NPix ~= " << 4.*M_PI/(rest*rest) << endl; 442 466 return; 443 467 }
Note:
See TracChangeset
for help on using the changeset viewer.