// Creation d'une sphere de masque a partir d'une sphere de valeurs // cmv 13/6/01 // cremskfrsph -m 0.1 -v 1.,0. sph143k05_e.fits sphmskw.fits // cremskfrsph -n -m -1.e-30. -M 1.e-30. -v 1.,0. sph143k05.fits sphmsk.fits #include "machdefs.h" #include #include #include #include #include #include "skymapinit.h" #include "skymap.h" #include "fitsspherehealpix.h" /*! \ingroup PrgMap \file cremskfrsph.cc \brief \b cremskfrsph: Create a masked sphere from a sphere of datas \verbatim csh> cremskfrsph -h cremskfrsph [-n -m min -M max -v valmsk,inimsk] sphval.fits sphmask.fits -m min : min value -M max : max value condition for filling masque is: min<=sphere_value<=max (fill mask with valmsk) (bounds are included) -n : negate the condition (switch to: sphere_value=narg) {usage(); exit(1);} char * sphval = arg[optind]; char * sphmsk = arg[optind+1]; if(negate) dum = ".NOT."; else dum = ""; cout<<"Sphere values : "< sph; FitsInFile sfits(sphval); sfits >> sph; cout<<"Opening Sphere HEALPix for testing values :"< sphm(sph,false); // Filling Mask Sphere with cut on values cout<<"Filling Mask"<vmax)) skp = !negate; if(skp) continue; // Do nothing if(bmin=thetamin && theta<=thetamax) continue; } sphm(i) = vmask; nmask++; } cout<<" .... Number of values set in mask : "<