// Pour boucher les trous d'une sphere HEALPIX en clusterisant dans une sphere // plus petite cmv 13/6/01 #include "machdefs.h" #include #include #include #include #include #include "skymapinit.h" #include "skymap.h" #include "fitsspherehealpix.h" void usage(); void usage() { cout<<"extrapsph [-r reduc] sphin.fits sphinw.fits"<=narg) {usage(); exit(1);} char * fsphin = arg[optind]; char * fsphinw = arg[optind+1]; char * fsphout = arg[optind+2]; char * fsphoutw = NULL; char * fsphred = NULL; char * fsphredw = NULL; if(optind+3 sphin; {FitsInFile sfits(fsphin); sfits >> sphin;} int nlat = sphin.SizeIndex(); int nlatr = nlat/red; cout<<"Opening Sphere Input :"< sphinw; {FitsInFile sfits(fsphinw); sfits >> sphinw;} cout<<"Opening Weight Sphere Input :"< sphout(sphin,false); SphereHEALPix sphoutw(sphinw,false); // Creation des spheres reduites cout<<"Creating Reducted Spheres : nlatr = "< sphred(nlatr); sphred.SetPixels(0.); SphereHEALPix sphredw(nlatr); sphredw.SetPixels(0.); cout<<"Creating Reducted Sphere :"< 0.) {sphred(ir) /= sphredw(ir); n++;} cout<<" Number of filled pixels "<0.) continue; double theta,phi; sphout.PixThetaPhi(i,theta,phi); int_4 ir = sphred.PixIndexSph(theta,phi); if(sphredw(ir)<=0.) continue; sphout(i) = sphred(ir); sphoutw(i) = -sphredw(ir); n++; } cout<<" Number of filled pixels "<