Changeset 2973 in Sophya for trunk/SophyaLib/SkyMap/HEALPixUtils.cc
- Timestamp:
- Jun 20, 2006, 6:01:49 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/SkyMap/HEALPixUtils.cc
r2615 r2973 687 687 688 688 689 /*! 690 \brief return the size index value corresponding to resolution \b res 691 Computes the size index m providing a resolution better or equal the 692 specified value \b res (in radian) 693 694 - m : size-index 695 - number of pixels for 4Pi : 12*m*m 696 697 \sa SOPHYA::Angle 698 */ 699 int_4 HEALPix::ResolToSizeIndex(double res) 700 { 701 int_4 m = 1; 702 double cres = sqrt(M_PI/3.); // 4PI/12 703 while (cres > 1.001*res) { 704 m *= 2; 705 cres = sqrt(4.*M_PI/(12*m*m)); 706 } 707 return m; 708 }
Note:
See TracChangeset
for help on using the changeset viewer.