// Pour boucher les trous d'une sphere HEALPIX utilisant une autre sphere // cmv 13/6/01 // extrap2sph -w sph143k05_e.fits sph143k05.fits sphred.fits sphout_2.fits // extrap2sph -m -1.e-30 -M +1.e-30 sph143k05.fits sphred.fits sphout_22.fits #include "machdefs.h" #include #include #include #include #include #include "skymapinit.h" #include "skymap.h" #include "fitsspherehealpix.h" void usage(); void usage() { cout<<"extrap2sph [-w sphinw.fits -m valmin -M valmax]"<=narg) {usage(); exit(1);} char * fsphin = arg[optind]; char * fsphred = arg[optind+1]; char * fsphout = arg[optind+2]; cout<<"Input Sphere : "< sphin; {FitsInFile sfits(fsphin); sfits >> sphin;} int nlat = sphin.SizeIndex(); cout<<"Opening Input Sphere :"< sphinw; if(fsphinw) { FitsInFile sfits(fsphinw); sfits >> sphinw; cout<<"Opening Input Weight Sphere :"< sphred; {FitsInFile sfits(fsphred); sfits >> sphred;} cout<<"Opening Input Reducted Sphere :"<0.) continue; } else { // Not Filled pixels ]valmin,valmax[ // Filled pixels ]-Infinity,valmin] or [valmax,+Infinity[ if(tstmin && sphin(i)<=valmin) continue; if(tstmax && sphin(i)>=valmax) continue; } double theta,phi; sphin.PixThetaPhi(i,theta,phi); int_4 ir = sphred.PixIndexSph(theta,phi); sphin(i) = sphred(ir); n++; if(sphred(ir)!=0.) n0++; } cout<<" Number of pixels filled " <