// Creation d'une sphere de masquee a partir d'une sphere de masques // cmv 15/6/01 #include "sopnamsp.h" #include "machdefs.h" #include #include #include #include #include #include "skymapinit.h" #include "skymap.h" #include "fitsspherehealpix.h" /*! \ingroup PrgMap \file msksphere.cc \brief \b msksphere: mask a sphere of datas with a mask sphere. \verbatim csh> msksphere -h msksphere [-m min -M max -v valmsk] sphval.fits sphmask.fits sphout.fits sphval.fits : inpout sphere of datas where the pixels have to be masked sphmask.fits : inpout masked sphere used to mask pixels sphout.fits : output masked sphere of datas -m min : min mask_sphere_value for MASKING the sphere pixel -M max : max mask_sphere_value for MASKING the sphere pixel condition for MASKING sphere pixel is (min<=mask_sphere_value<=max) -n : negate the previous condition, condition for MASKING sphere pixel becomes: (mask_sphere_value=narg) {usage(); exit(1);} char * sphval = arg[optind]; char * sphmsk = arg[optind+1]; char * sphout = arg[optind+2]; if(!tstmin && !tstmax) {tstmin=true; vmin=0.; negate=true;} if(negate) dum = ".NOT."; else dum=""; cout<<"Sphere values : "< sph; {FitsInFile sfits(sphval); sfits >> sph;} cout<<"Opening Sphere HEALPix for testing values :"< msph; {FitsInFile sfits(sphmsk); sfits >> msph;} cout<<"Opening Sphere HEALPix for mask :"<vmax)) skp = !negate; if(skp) continue; // Do nothing sph(i) = vmask; nmask++; } cout<<" .... Number of values masked : "<