#include "lagsht_spheregeom.h" #include "lagsht_exceptions.h" #include "lagsht_healpixhelper.h" namespace LagSHT { //----------------- Base Class of Geometry ---------------------- void BaseGeometry::SetCommonMapFeatures() { //sharp initialization sharpjob_.set_triangular_alm_info(L_-1,M_-1); Npix_ = get_npix(sharpjob_.get_geom_info()); Nalm_ = get_nalms(sharpjob_.get_alm_info()); SetPixelPositions(); cout << "SetThetaPhiMap: Geom, Nring, Nphi, Npix, Nalm: " << geomType_ << ", " << Nrings_ << ", " << Nphi_ << ", " << Npix_ << ", " << Nalm_ << endl; }//SetThetaPhiMap void BaseGeometry::SetPixelPositions() { const sharp_geom_info *ginfo; ginfo = sharpjob_.get_geom_info(); for (int i=0; inpairs; ++i) { double theta1 = ginfo->pair[i].r1.theta; thetaPix_.push_back(theta1); // and so on for nph, phi0 int nph1 = ginfo->pair[i].r1.nph; double phi0 = ginfo->pair[i].r1.phi0; for(int j=0; jpair[i].r2.nph>0) {// the second ring in this pair exists double theta2 = ginfo->pair[i].r2.theta; thetaPix_.push_back(theta2); int nph2 = ginfo->pair[i].r2.nph; double phi0 = ginfo->pair[i].r2.phi0; for(int j=0; j=M_PI) LagSHTError("BaseLagSphTransform::PixIndexSph: Healpix theta out of range"); return HEALPIX::ang2pix_ring_z_phi(Nrings_,cos(theta),phi); }//PixIndexSph void HealpixGeometry::PixThetaPhi(int k, r_8& theta, r_8& phi) const { r_8 z; HEALPIX::pix2ang_ring_z_phi (Nrings_,k,&z,&phi); theta = acos(z); }//PixThetaPhi void HealpixGeometry::SetMap(int nsides, int DUMMY) { //second argument not used geomType_ = "Healpix"; if(geomDone_){ cout << "-------------------------------------------------" <