Changeset 1441 in Sophya


Ignore:
Timestamp:
Mar 14, 2001, 5:25:02 PM (25 years ago)
Author:
ansari
Message:

documentation PrgUtil (fichiers .cc) pour doxygen - Reza 14/3/2001

Location:
trunk/SophyaProg
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaProg/PrgMap/cl2map.cc

    r1430 r1441  
    1414#include "fitstarray.h"
    1515
     16/*!
     17  \ingroup PrgUtil
     18  \file cl2map.cc
     19  \brief \b cl2map: generates spherical maps from power spectra (C(l))
     20
     21  \verbatim
     22
     23  csh> cl2map -h
     24  SOPHYA Version  1.1 Revision 0 (V_Fev2001) -- Mar  9 2001 15:45:31 cxx
     25
     26  cl2map : Spherical harmonics synthesis - Power spectrum C_l -> HEALPix map
     27  Usage: cl2map [-float/-r4] [-msph pixp] [-beam fwhm]
     28         [-fitsin] [-fitsout] [-autoinirand] InFileName OutFileName
     29   -float (-r4): single precision C_l and map (default = double)
     30   -msph pix: Spherical map pixelization parameter
     31              nside=2^n for HEALPix - default=128
     32                lmax = 2^n  default=128
     33   -beam fwhm : Beam moothing (in l-space) FWHM in arcmin, default=0
     34   -fitsout: Select the FITS format for the output map (default PPF format)
     35   -fitsin : Select the FITS format for the input vector (default PPF format)
     36   -autoinirand : Automtatic random number generator initialization
     37   InFileName : Input file name containing the C_l vector
     38   OutFileName : Output file name (HEALPix map)
     39
     40  \endverbatim
     41*/
    1642
    1743
     
    139165  }
    140166
    141   if ((narg-ko) < 1)  Usage(true);
     167  if ((narg-ko) < 2)  Usage(true);
    142168  infile = arg[ko];
    143169  outfile = arg[ko+1];
  • trunk/SophyaProg/PrgMap/map2cl.cc

    r1430 r1441  
    1515
    1616
     17/*!
     18  \ingroup PrgUtil
     19  \file map2cl.cc
     20  \brief \b map2cl: Computes power spectra (C(l)) on spherical maps.
     21
     22  \verbatim
     23
     24  csh> map2cl -h
     25  SOPHYA Version  1.1 Revision 0 (V_Fev2001) -- Mar  9 2001 15:45:31 cxx
     26
     27  map2cl : Spherical harmonics analysis - HEALPix map -> Power spectrum C_l
     28  Usage: map2cl [-float/-r4] [-lmax lval] [-thetacut dtdeg]
     29         [-fitsin] [-fitsout] InFileName OutFileName
     30   -float (-r4): single precision C_l and map (default = double)
     31   -lmax lval: Maximum value for l index (default=255)
     32   -thetacut dtdeg : Symmetric delta-theta cut (in degree) along equator
     33                    (default=0 -> no cut)
     34   -fitsout: Select the FITS format for the output map (default PPF format)
     35   -fitsin : Select the FITS format for the input vector (default PPF format)
     36   InFileName : Input file name (HEALPix map)
     37   OutFileName : Output file name (the C_l vector)
     38
     39  \endverbatim
     40*/
    1741
    1842/* Nouvelle-Fonction */
     
    132156  }
    133157
    134   if ((narg-ko) < 1)  Usage(true);
     158  if ((narg-ko) < 2)  Usage(true);
    135159  infile = arg[ko];
    136160  outfile = arg[ko+1];
  • trunk/SophyaProg/PrgMap/prjsmap.cc

    r1430 r1441  
    1414#include "fitstarray.h"
    1515
     16/*!
     17  \ingroup PrgUtil
     18  \file prjsmap.cc
     19  \brief \b prjsmap: Molleweide and sinus projection of sky maps
     20
     21  \verbatim
     22
     23  csh> prjsmap -h
     24  SOPHYA Version  1.1 Revision 0 (V_Fev2001) -- Mar  9 2001 15:45:31 cxx
     25
     26  prjsmap : Molleweide and Sinus projection for sky maps
     27  Usage: prjsmap [-float/-r4] [-sinus] [-sx sizeX] [-sy sizeY] [-scale fact]
     28         [-off val][-ump val] [-invy] [-fitsin] [-fitsout] InFileName OutFileName
     29   -float (-r4): single precision sky map and projection (default = double)
     30   -sinus: Selects Sinus projection (default Molleweide projection)
     31   -sx sizeX: Projected map size in X
     32   -sy sizeY: Projected map size in Y
     33       default: sizeX = 2*sizeY ; sizeX*sizeY ~ map.NbPixels()/2
     34   -scale fact: scale factor applied to skymap pixels (def=1.)
     35   -off val: offset value for projected map (def=0.)
     36             prj(ix, jy) = offset + scale*skymap(theta, phi)
     37   -ump val: Unmapped pixel value in projected map (def=0.)
     38   -invy: reverses the projection direction along Y (Theta)
     39   -fitsout: Select the FITS format for the output map (default PPF format)
     40   -fitsin : Select the FITS format for the input vector (default PPF format)
     41   InFileName : Input file name (HEALPix map)
     42   OutFileName : Output file name (the C_l vector)
     43
     44  \endverbatim
     45*/
    1646
    1747
     
    278308  }
    279309
    280   if ((narg-ko) < 1)  Usage(true);
     310  if ((narg-ko) < 2)  Usage(true);
    281311  infile = arg[ko];
    282312  outfile = arg[ko+1];
  • trunk/SophyaProg/PrgUtil/runcxx.cc

    r1341 r1441  
    1818#include "pdlmgr.h"
    1919#include "timing.h"
     20
     21/*!
     22  \ingroup PrgUtil
     23  \file runcxx.cc
     24  \brief \b runcxx: Compile and run simple C++ code using SOPHYA
     25
     26  \verbatim
     27  csh> runcxx -h
     28  SOPHYA Version  1.1 Revision 0 (V_Fev2001) -- Mar  9 2001 15:45:31 cxx
     29  runcxx : compiling and running of a piece of C++ code
     30    Usage: runcxx [-compopt CompileOptions] [-linkopt LinkOptions]
     31                  [-tmpdir TmpDirectory] [-f C++CodeFileName]
     32                  [-inc includefile] [-inc includefile ...]
     33                  [-import modulename] [-import modulename ...]
     34                  [-uarg UserArg1 UserArg2 ...]
     35   if no file name is specified, read from standard input
     36   modulenames: SkyMap, Samba, SkyT, FitsIOServer, LinAlg, IFFTW
     37  \endverbatim
     38*/
    2039
    2140typedef void (* DlFunctionOfVecStr) (vector<string> & args, int & rc);
  • trunk/SophyaProg/PrgUtil/scanfits.cc

    r1306 r1441  
    1111#include "fitsntuple.h"
    1212
     13/*!
     14  \ingroup PrgUtil
     15  \file scanfits.cc
     16  \brief \b scanfits: Check and scan FITS files
     17
     18  Scan FITS files and prints information on each FITS bloc in file.
     19  Uses the FitsIOServer module.
     20
     21  \verbatim
     22  Usage: scanfits FITSFilename
     23  \endverbatim
     24 */
     25
     26string FITSExtType2String(FitsFile::FitsExtensionType exttype)
     27{
     28  if (exttype == FitsFile::FitsExtensionType_IMAGE) return("IMAGE");
     29  else if (exttype == FitsFile::FitsExtensionType_ASCII_TBL) return("ASCII_TBL");
     30  else if (exttype == FitsFile::FitsExtensionType_BINARY_TBL) return("BINARY_TBL");
     31  else if (exttype == FitsFile::FitsExtensionType_EOF) return("EOF");
     32  else if (exttype == FitsFile::FitsExtensionType_ERROR) return("ERROR");
     33  else return("Unknown?");
     34}
     35
     36string FITSDataType2String(FitsFile::FitsDataType datatype)
     37{
     38  if (datatype == FitsFile::FitsDataType_double) return("double");
     39  else if (datatype == FitsFile::FitsDataType_float) return("float");
     40  else if (datatype == FitsFile::FitsDataType_int) return("int");
     41  else if (datatype == FitsFile::FitsDataType_long) return("long");
     42  else if (datatype == FitsFile::FitsDataType_byte) return("byte");
     43  else if (datatype == FitsFile::FitsDataType_char) return("char");
     44  else if (datatype == FitsFile::FitsDataType_ASCII) return("ASCII");
     45  else if (datatype == FitsFile::FitsDataType_NULL) return("NULL");
     46  else return("Unknown?");
     47}
     48
    1349int main(int narg, char *arg[])
    1450{
     
    2157    string flnm = arg[1];
    2258    int nbblk = FitsInFile::NbBlocks(arg[1]);
    23     cout << " :::: File " << flnm << " has " << nbblk << " blocks " << endl;
    24     DVList header;
    25     FitsFile::FitsExtensionType exttype;
    26     FitsFile::FitsDataType datatype;
     59    cout << " :::::::: File " << flnm << " has " << nbblk << " blocks "
     60         << " :::::::: " << endl;
    2761
    28     cout << " FitsFile::FitsExtensionType : FitsExtensionType_IMAGE= " <<
    29       (int)FitsFile::FitsExtensionType_IMAGE <<
    30       "  FitsExtensionType_ASCII_TBL= " << (int)FitsFile::FitsExtensionType_ASCII_TBL <<
    31       "  FitsExtensionType_BINARY_TBL= " << (int)FitsFile::FitsExtensionType_BINARY_TBL << endl;
    32     cout << " FitsFile::FitsDataType: FitsDataType_double= " <<
    33       (int)FitsFile::FitsDataType_double <<
    34       " FitsDataType_float= " << (int)FitsFile::FitsDataType_float <<
    35       " FitsDataType_int= " << (int)FitsFile::FitsDataType_int <<
    36       " FitsDataType_char= " << (int)FitsFile::FitsDataType_char <<
    37       " FitsDataType_ASCII= " << (int)FitsFile::FitsDataType_ASCII << endl << endl;
     62    //    cout << " FitsFile::FitsExtensionType : FitsExtensionType_IMAGE= " <<
     63    //      (int)FitsFile::FitsExtensionType_IMAGE <<
     64    //      "  FitsExtensionType_ASCII_TBL= " << (int)FitsFile::FitsExtensionType_ASCII_TBL <<
     65    //      "  FitsExtensionType_BINARY_TBL= " << (int)FitsFile::FitsExtensionType_BINARY_TBL << endl;
     66    //    cout << " FitsFile::FitsDataType: FitsDataType_double= " <<
     67    //      (int)FitsFile::FitsDataType_double <<
     68    //      " FitsDataType_float= " << (int)FitsFile::FitsDataType_float <<
     69    //      " FitsDataType_int= " << (int)FitsFile::FitsDataType_int <<
     70    //      " FitsDataType_char= " << (int)FitsFile::FitsDataType_char <<
     71    //      " FitsDataType_ASCII= " << (int)FitsFile::FitsDataType_ASCII << endl << endl;
    3872
    39     int naxis;
    40     vector<int> axis;
    4173    for(int i=1; i<=nbblk; i++) {
     74      int naxis;
     75      vector<int> axis;
     76      DVList header;
     77      FitsFile::FitsExtensionType exttype;
     78      FitsFile::FitsDataType datatype;
     79
    4280      FitsInFile::GetBlockType(arg[1], i, exttype, naxis, axis, datatype, header);
    43       cout << " --------- Header Num " << i << " Type " << (int)exttype
    44            << " NAxis= " << naxis << " (" << axis.size() << " )"
    45            << " DataType= " << (int)datatype << endl;
    46       for(int j=0; j<axis.size(); j++) cout  << axis[j] << " x "  ;
    47       cout << endl;
     81      cout << "\n--------- Header Num " << i << " Type " << FITSExtType2String(exttype)
     82           << "  --- NAxis= " << naxis
     83           << " DataType= " << FITSDataType2String(datatype) << endl;
     84      if (axis.size() > 0) {
     85        cout << " >> Axis Sizes: " ;
     86        for(int j=0; j<axis.size(); j++) {
     87          if (j > 0) cout << " x " ;
     88          cout  << axis[j] ;
     89        }
     90        cout << endl;
     91      }
     92      cout << " >>> Header info : " ;
    4893      cout << header << endl;
    49       cout << "----------------------------------------------------" << endl;
     94      cout << "----------------------------------------------------------------------"
     95           << endl;
    5096    }
    5197 
    5298  }
    5399  catch (PThrowable & exc) {
    54     cerr << " Catched Exception " << (string)typeid(exc).name()
    55          << " - Msg= " << exc.Msg() << endl;
     100    cerr << "sanfits: Catched Exception " << (string)typeid(exc).name()
     101         << "\n .... Msg= " << exc.Msg() << endl;
    56102  }
    57103  catch (...) {
  • trunk/SophyaProg/PrgUtil/scanppf.cc

    r1373 r1441  
    1212#include <console.h>
    1313#endif
     14
     15
     16/*!
     17  \defgroup PrgUtil PrgUtil module
     18  This module contains simple programs to perform various utility tasks:
     19  <UL>
     20  <LI> scanppf : Check and scan PPF files (scanppf.cc)
     21  <LI> scanfits : Check and scan FITS files (scanfits.cc)
     22  <LI> runcxx : Compile and run simple C++ code using SOPHYA (runcxx.cc)
     23  <LI> prjsmap : Molleweide and sinus projection of sky maps (prjsmap.cc)
     24  <LI> map2cl : Computes power spectra (C(l)) on spherical maps (map2cl.cc)
     25  <LI> cl2map : generates spherical maps from power spectra (C(l)) (cl2map.cc)
     26  </UL>
     27*/
     28
     29/*!
     30  \ingroup PrgUtil
     31  \file scanppf.cc
     32  \brief \b scanppf: Check and scan PPF files
     33
     34  \verbatim
     35
     36  csh> scanppf -h
     37  SOPHYA Version  1.1 Revision 0 (V_Fev2001) -- Mar  9 2001 15:45:31 cxx
     38  Usage: scanppf filename [s/n/a0/a1/a2/a3]
     39     s[=default} : Sequential reading of objects
     40     n : Object reading at NameTags
     41     a0...a3 : Tag List with PInPersist.AnalyseTags(0...3)
     42
     43  \endverbatim
     44*/
    1445
    1546int main(int narg, char* arg[])
Note: See TracChangeset for help on using the changeset viewer.