80 likes | 272 Vues
Healpix for Science Tools. Toby Burnett, Bruce Lesnick University of Washington. The Healpix class: an STL containers of Pixels. Constructor: set up nside (number of pixels) mode (nested or ring) and coord system begin() and end() methods: return iterator that evaluate to pixels.
E N D
Healpix for Science Tools Toby Burnett, Bruce Lesnick University of Washington Science Tools Meeting 1/24/05 - T. Burnett
The Healpix class: an STL containers of Pixels • Constructor: set up nside (number of pixels)mode (nested or ring) and coord system • begin() and end() methods: return iterator that evaluate to pixels. • Following code uses STL methods to create an image MapParameters par(argc, argv);// defines image parameters SkyImage piximage(par); // manage a FITS image Healpix hpix(8); // create a Healpix object, nside=8 std::for_each( h.begin(), h.end(), DrawPixel(hix,piximage)); Science Tools Meeting 1/24/05 - T. Burnett
HTM pixel directions Level=3512 pixels Science Tools Meeting 1/24/05 - T. Burnett
HEALPix pixel directions nside=8, 778 pixels Science Tools Meeting 1/24/05 - T. Burnett
The Pixel class: nested in Healpix Behave like • The constructor Healpix::Pixel(const astro::SkyDir& dir, const Healpix &hp)creates a pixel containing the SkyDir direction dir, for the Healpix object hp. • The methodHealpix::Pixel::operator astro::SkyDir ()constreturns the pixel central direction as a SkyDir: a Pixel “behaves” like a SkyDir. • A pixel “knows” its • direction • Area (solid angle) • Neighboring pixels (7 or 8) construct Science Tools Meeting 1/24/05 - T. Burnett
Image based on Healpix: class HealpixData • Simple wrapper of an array of pixel values and a Healpix object. • Inherit from SkyImage, and that is it! Display data from WMAP Science Tools Meeting 1/24/05 - T. Burnett
Status • HTM and Healpix created to do integrals over the sphere. • Also a good way to pixelate exposure functions, and bin the data for sky survey • Class Healpix: • Using C code from WMAP • Code to obtain neighbors converted from Fortran. • Class HealpixData: Science Tools Meeting 1/24/05 - T. Burnett