Changeset 2976 in Sophya
- Timestamp:
- Jun 20, 2006, 6:05:40 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/ProgPI/skymapmodule.cc
r2951 r2976 46 46 virtual int Execute(string& keyw, vector<string>& args, string& toks); 47 47 48 void Resol2SizeIndex(vector<string>& tokens); 48 49 void TypeMap(vector<string>& tokens); 49 50 void Map2Double(vector<string>& tokens); … … 99 100 mpiac->RegisterCommand(kw, usage, this, hgrp); 100 101 102 kw = "resol2szidx"; 103 usage = "Compute SizeIndex value (=nside for HEALPix) for a"; 104 usage += "\n given resolution, (resol in arcminutes)"; 105 usage += "\n Usage: resol2szidx resol"; 106 mpiac->RegisterCommand(kw, usage, this, hgrp); 107 101 108 kw = "typemap"; 102 109 usage = "Imprime le type de map"; … … 274 281 if(kw == "settypemap") { 275 282 SetTypeMap(tokens); 283 } else if(kw == "resol2szidx") { 284 if(tokens.size()<1) { 285 cout<<"Usage: resol2szidx resol"<<endl; 286 return(0); 287 } 288 Resol2SizeIndex(tokens); 276 289 } else if(kw == "typemap") { 277 290 if(tokens.size()<1) { … … 415 428 416 429 return(0); 430 } 431 432 /* --Methode-- */ 433 void skymapmoduleExecutor::Resol2SizeIndex(vector<string>& tokens) 434 { 435 double resamin = atof(tokens[0].c_str()); 436 double resrad = Angle(resamin,Angle::ArcMin).ToRadian(); 437 int_4 mh = SphereHEALPix<r_4>::ResolToSizeIndex(resrad); 438 int_4 mt = SphereThetaPhi<r_4>::ResolToSizeIndex(resrad); 439 cout << "Resol2SizeIndex: Resol= " << resamin << " arcmin ->" 440 << resrad << " radian NPix ~= " << 4.*M_PI/(resrad*resrad) 441 << " \n ===> nside=m_HEALPix= " << mh << " m_ThetaPhi= " << mt << endl; 442 return; 417 443 } 418 444
Note:
See TracChangeset
for help on using the changeset viewer.