// Pour boucher les trous d'une sphere HEALPIX en clusterisant dans une sphere // plus petite cmv 13/6/01 // extrapsph -r 2 sph143k05.fits sph143k05_e.fits // sphout.fits sphoutw.fits sphred.fits sphredw.fits #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 Input Sphere :"< sphinw; {FitsInFile sfits(fsphinw); sfits >> sphinw;} cout<<"Opening Input Weight Sphere :"< 0.) {sphred(ir) /= sphredw(ir); n++;} cout<<" Reducted Sphere: Number of pixels filled "<0.) continue; double theta,phi; sphin.PixThetaPhi(i,theta,phi); int_4 ir = sphred.PixIndexSph(theta,phi); if(sphredw(ir)<=0.) continue; sphin(i) = sphred(ir); sphinw(i) = -sphredw(ir); n++; } cout<<" Output Sphere: Number of pixels filled "<