Changeset 1626 in Sophya for trunk/SophyaProg/PrgMap/extrapsph.cc
- Timestamp:
- Aug 7, 2001, 6:20:32 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaProg/PrgMap/extrapsph.cc
r1545 r1626 1 // Pour boucher les trous d'une sphere HEALPIX en clusterisant dans une sphere 2 // plus petite cmv 13/6/01 1 // Pour boucher les trous d'une sphere HEALPIX en la clusterisant 2 // dans une sphere plus petite puis en la re-extrapolant. 3 // cmv 13/6/01 3 4 // extrapsph -r 2 sph143k05.fits sph143k05_e.fits 4 5 // sphout.fits sphoutw.fits sphred.fits sphredw.fits … … 13 14 #include "fitsspherehealpix.h" 14 15 16 /*! 17 \ingroup PrgMap 18 \file extrapsph.cc 19 \brief \b extrapsph: Fill holes in a sphere of datas by reducing 20 it size and re-extrapolating. 21 \verbatim 22 csh> extrapsph -h 23 extrapsph [-r reduc_factor] sphin.fits sphinw.fits 24 sphout.fits [sphout_w.fits sphred.fits sphred_w.fits] 25 -r reduc : reduction factor for clustering (must be 2^n, def=2) 26 sphin.fits : input sphere 27 sphin_w.fits : input sphere filling weight 28 sphout.fits : output sphere 29 sphout_w.fits : output sphere filling weight 30 sphred.fits : output reducted sphere 31 sphred_w.fits : output reducted sphere filling weight 32 \endverbatim 33 */ 34 15 35 void usage(); 16 36 void usage() 17 37 { 18 cout<<"extrapsph [-r reduc ] sphin.fits sphinw.fits"<<endl19 <<" 38 cout<<"extrapsph [-r reduc_factor] sphin.fits sphinw.fits"<<endl 39 <<" sphout.fits [sphout_w.fits" 20 40 <<" sphred.fits sphred_w.fits]"<<endl 21 41 <<" -r reduc : reduction factor for clustering (must be 2^n, def=2)"<<endl … … 31 51 { 32 52 int red=2; 53 string dum; 33 54 int c; 34 55 while((c = getopt(narg,arg,"hr:")) != -1) { … … 122 143 if(sphredw(ir)<=0.) continue; 123 144 sphin(i) = sphred(ir); 145 // On passe en negatif les pixels qui ont ete extrapoles 124 146 sphinw(i) = -sphredw(ir); 125 147 n++; … … 129 151 // Ecriture des spheres 130 152 { 131 stringdum = "rm -f "; dum += fsphout; system(dum.c_str());153 dum = "rm -f "; dum += fsphout; system(dum.c_str()); 132 154 FitsOutFile sfits(fsphout); 133 155 cout<<"Writing Output Sphere Fits file"<<endl; … … 135 157 } 136 158 if(fsphoutw) { 137 stringdum = "rm -f "; dum += fsphoutw; system(dum.c_str());159 dum = "rm -f "; dum += fsphoutw; system(dum.c_str()); 138 160 FitsOutFile sfits(fsphoutw); 139 161 cout<<"Writing Output Sphere Weight Fits file"<<endl; … … 141 163 } 142 164 if(fsphred) { 143 stringdum = "rm -f "; dum += fsphred; system(dum.c_str());165 dum = "rm -f "; dum += fsphred; system(dum.c_str()); 144 166 FitsOutFile sfits(fsphred); 145 167 cout<<"Writing Reducted Sphere Fits file"<<endl; … … 147 169 } 148 170 if(fsphredw) { 149 stringdum = "rm -f "; dum += fsphredw; system(dum.c_str());171 dum = "rm -f "; dum += fsphredw; system(dum.c_str()); 150 172 FitsOutFile sfits(fsphredw); 151 173 cout<<"Writing Reducted Sphere Weight Fits file"<<endl;
Note:
See TracChangeset
for help on using the changeset viewer.