Changeset 1626 in Sophya for trunk/SophyaProg/PrgMap/extrapsph.cc


Ignore:
Timestamp:
Aug 7, 2001, 6:20:32 PM (24 years ago)
Author:
cmv
Message:

Uniformisation des programmes + doc cmv 7/8/01

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
    34// extrapsph -r 2 sph143k05.fits sph143k05_e.fits
    45//                sphout.fits sphoutw.fits sphred.fits sphredw.fits
     
    1314#include "fitsspherehealpix.h"
    1415
     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
     22csh> extrapsph -h
     23extrapsph [-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
    1535void usage();
    1636void usage()
    1737{
    18 cout<<"extrapsph [-r reduc] sphin.fits sphinw.fits"<<endl
    19     <<"                     sphout.fits [sphout_w.fits"
     38cout<<"extrapsph [-r reduc_factor] sphin.fits sphinw.fits"<<endl
     39    <<"          sphout.fits [sphout_w.fits"
    2040    <<" sphred.fits sphred_w.fits]"<<endl
    2141    <<" -r reduc : reduction factor for clustering (must be 2^n, def=2)"<<endl
     
    3151{
    3252int red=2;
     53string dum;
    3354int c;
    3455while((c = getopt(narg,arg,"hr:")) != -1) {
     
    122143  if(sphredw(ir)<=0.) continue;
    123144  sphin(i)  = sphred(ir);
     145  // On passe en negatif les pixels qui ont ete extrapoles
    124146  sphinw(i) = -sphredw(ir);
    125147  n++;
     
    129151// Ecriture des spheres
    130152{
    131 string dum = "rm -f "; dum += fsphout; system(dum.c_str());
     153dum = "rm -f "; dum += fsphout; system(dum.c_str());
    132154FitsOutFile sfits(fsphout);
    133155cout<<"Writing Output Sphere Fits file"<<endl;
     
    135157}
    136158if(fsphoutw) {
    137 string dum = "rm -f "; dum += fsphoutw; system(dum.c_str());
     159dum = "rm -f "; dum += fsphoutw; system(dum.c_str());
    138160FitsOutFile sfits(fsphoutw);
    139161cout<<"Writing Output Sphere Weight Fits file"<<endl;
     
    141163}
    142164if(fsphred) {
    143 string dum = "rm -f "; dum += fsphred; system(dum.c_str());
     165dum = "rm -f "; dum += fsphred; system(dum.c_str());
    144166FitsOutFile sfits(fsphred);
    145167cout<<"Writing Reducted Sphere Fits file"<<endl;
     
    147169}
    148170if(fsphredw) {
    149 string dum = "rm -f "; dum += fsphredw; system(dum.c_str());
     171dum = "rm -f "; dum += fsphredw; system(dum.c_str());
    150172FitsOutFile sfits(fsphredw);
    151173cout<<"Writing Reducted Sphere Weight Fits file"<<endl;
Note: See TracChangeset for help on using the changeset viewer.