Changeset 3572 in Sophya for trunk/SophyaExt


Ignore:
Timestamp:
Feb 7, 2009, 10:50:34 PM (17 years ago)
Author:
cmv
Message:

char* -> const char* pour regler les problemes de deprecated string const... + comparaison unsigned signed + suppression EVOL_PLANCK rz+cmv 07/02/2009

Location:
trunk/SophyaExt
Files:
4 deleted
28 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaExt/FitsIOServer/Makefile

    r3407 r3572  
    44 
    55clean:
    6          rm -f $(SOPHYAOBJP)datacirclefits.o $(SOPHYAOBJP)fabtcolread.o $(SOPHYAOBJP)fabtwriter.o $(SOPHYAOBJP)fboloread.o $(SOPHYAOBJP)fbtntintf.o $(SOPHYAOBJP)fiosinit.o $(SOPHYAOBJP)fitsautoreader.o $(SOPHYAOBJP)fitsbntbllineRW.o $(SOPHYAOBJP)fitsfile.o $(SOPHYAOBJP)fitsgenedata.o $(SOPHYAOBJP)fitshdtable.o $(SOPHYAOBJP)fitshisterr.o $(SOPHYAOBJP)fitshistos.o $(SOPHYAOBJP)fitsinoutfile.o $(SOPHYAOBJP)fitslocalmap.o $(SOPHYAOBJP)fitsmanager.o $(SOPHYAOBJP)fitsntuple.o $(SOPHYAOBJP)fitsspherehealpix.o $(SOPHYAOBJP)fitsspherethetaphi.o $(SOPHYAOBJP)fitstarray.o $(SOPHYAOBJP)fitsxntuple.o $(SOPHYAOBJP)swfitsdtable.o
     6         rm -f $(SOPHYAOBJP)datacirclefits.o $(SOPHYAOBJP)fabtcolread.o $(SOPHYAOBJP)fabtwriter.o $(SOPHYAOBJP)fboloread.o $(SOPHYAOBJP)fbtntintf.o $(SOPHYAOBJP)fiosinit.o $(SOPHYAOBJP)fitsbntbllineRW.o $(SOPHYAOBJP)fitsfile.o $(SOPHYAOBJP)fitsgenedata.o $(SOPHYAOBJP)fitshdtable.o $(SOPHYAOBJP)fitshisterr.o $(SOPHYAOBJP)fitshistos.o $(SOPHYAOBJP)fitsinoutfile.o $(SOPHYAOBJP)fitslocalmap.o $(SOPHYAOBJP)fitsmanager.o $(SOPHYAOBJP)fitsntuple.o $(SOPHYAOBJP)fitsspherehealpix.o $(SOPHYAOBJP)fitsspherethetaphi.o $(SOPHYAOBJP)fitstarray.o $(SOPHYAOBJP)swfitsdtable.o
    77        rm -f $(SOPHYALIBP)libFitsIOServer.a
    88 
    9 $(SOPHYALIBP)libFitsIOServer.a : $(SOPHYAOBJP)datacirclefits.o $(SOPHYAOBJP)fabtcolread.o $(SOPHYAOBJP)fabtwriter.o $(SOPHYAOBJP)fboloread.o $(SOPHYAOBJP)fbtntintf.o $(SOPHYAOBJP)fiosinit.o $(SOPHYAOBJP)fitsautoreader.o $(SOPHYAOBJP)fitsbntbllineRW.o $(SOPHYAOBJP)fitsfile.o $(SOPHYAOBJP)fitsgenedata.o $(SOPHYAOBJP)fitshdtable.o $(SOPHYAOBJP)fitshisterr.o $(SOPHYAOBJP)fitshistos.o $(SOPHYAOBJP)fitsinoutfile.o $(SOPHYAOBJP)fitslocalmap.o $(SOPHYAOBJP)fitsmanager.o $(SOPHYAOBJP)fitsntuple.o $(SOPHYAOBJP)fitsspherehealpix.o $(SOPHYAOBJP)fitsspherethetaphi.o $(SOPHYAOBJP)fitstarray.o $(SOPHYAOBJP)fitsxntuple.o $(SOPHYAOBJP)swfitsdtable.o
     9$(SOPHYALIBP)libFitsIOServer.a : $(SOPHYAOBJP)datacirclefits.o $(SOPHYAOBJP)fabtcolread.o $(SOPHYAOBJP)fabtwriter.o $(SOPHYAOBJP)fboloread.o $(SOPHYAOBJP)fbtntintf.o $(SOPHYAOBJP)fiosinit.o $(SOPHYAOBJP)fitsbntbllineRW.o $(SOPHYAOBJP)fitsfile.o $(SOPHYAOBJP)fitsgenedata.o $(SOPHYAOBJP)fitshdtable.o $(SOPHYAOBJP)fitshisterr.o $(SOPHYAOBJP)fitshistos.o $(SOPHYAOBJP)fitsinoutfile.o $(SOPHYAOBJP)fitslocalmap.o $(SOPHYAOBJP)fitsmanager.o $(SOPHYAOBJP)fitsntuple.o $(SOPHYAOBJP)fitsspherehealpix.o $(SOPHYAOBJP)fitsspherethetaphi.o $(SOPHYAOBJP)fitstarray.o $(SOPHYAOBJP)swfitsdtable.o
    1010        $(AR) $(ARFLAGS) $@ $?
    1111        touch $(SOPHYAINCP)/SophyaConfInfo/libextsophya.objlist
     
    184184        $(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fiosinit.cc
    185185 
    186 $(SOPHYAOBJP)fitsautoreader.o: fitsautoreader.cc \
    187   $(SOPHYAINCP)sopnamsp.h \
    188   $(SOPHYAINCP)pexceptions.h \
    189   $(SOPHYAINCP)machdefs.h fitsautoreader.h \
    190   $(SOPHYAINCP)machdefs.h \
    191   $(SOPHYAINCP)anydataobj.h fitsfile.h \
    192   $(SOPHYAINCP)ndatablock.h \
    193   $(SOPHYAINCP)anydataobj.h \
    194   $(SOPHYAINCP)dvlist.h \
    195   $(SOPHYAINCP)objfio.h \
    196   $(SOPHYAINCP)ppersist.h \
    197   $(SOPHYAINCP)pexceptions.h \
    198   $(SOPHYAINCP)gnumd5.h \
    199   $(SOPHYAINCP)ppfbinstream.h \
    200   $(SOPHYAINCP)rawstream.h \
    201   $(SOPHYAINCP)ppfnametag.h \
    202   $(SOPHYAINCP)mutyv.h \
    203   $(SOPHYAINCP)timestamp.h fitsinoutfile.h \
    204   $(SOPHYAINCP)FitsIO/fitsio.h \
    205   $(SOPHYAINCP)FitsIO/longnam.h fitshandler.h \
    206   fitstarray.h $(SOPHYAINCP)tarray.h \
    207   $(SOPHYAINCP)basarr.h \
    208   $(SOPHYAINCP)dvlist.h \
    209   $(SOPHYAINCP)ndatablock.h \
    210   $(SOPHYAINCP)utilarr.h fitsspherehealpix.h \
    211   $(SOPHYAINCP)spherehealpix.h \
    212   $(SOPHYAINCP)sphericalmap.h \
    213   $(SOPHYAINCP)smathconst.h \
    214   $(SOPHYAINCP)pixelmap.h \
    215   $(SOPHYAINCP)spherepos.h \
    216   $(SOPHYAINCP)unitvector.h \
    217   $(SOPHYAINCP)vector3d.h \
    218   $(SOPHYAINCP)longlat.h \
    219   $(SOPHYAINCP)utilgeom.h \
    220   $(SOPHYAINCP)datatype.h \
    221   $(SOPHYAINCP)tvector.h \
    222   $(SOPHYAINCP)tmatrix.h \
    223   $(SOPHYAINCP)tarray.h \
    224   $(SOPHYAINCP)tmatrix_tsnl.h \
    225   $(SOPHYAINCP)tvector_tsnl.h \
    226   $(SOPHYAINCP)HEALPixUtils.h fitsntuple.h \
    227   $(SOPHYAINCP)ntuple.h \
    228   $(SOPHYAINCP)ntupintf.h \
    229   $(SOPHYAINCP)ppersist.h fitsxntuple.h \
    230   $(SOPHYAINCP)xntuple.h fitslocalmap.h \
    231   $(SOPHYAINCP)localmap.h fbtntintf.h \
    232   $(SOPHYAINCP)ntupintf.h
    233         $(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitsautoreader.cc
    234  
    235186$(SOPHYAOBJP)fitsbntbllineRW.o: fitsbntbllineRW.cc \
    236187  $(SOPHYAINCP)sopnamsp.h \
     
    633584        $(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitstarray.cc
    634585 
    635 $(SOPHYAOBJP)fitsxntuple.o: fitsxntuple.cc \
    636   $(SOPHYAINCP)sopnamsp.h \
    637   $(SOPHYAINCP)pexceptions.h \
    638   $(SOPHYAINCP)machdefs.h fitsxntuple.h \
    639   $(SOPHYAINCP)machdefs.h \
    640   $(SOPHYAINCP)xntuple.h \
    641   $(SOPHYAINCP)ntupintf.h \
    642   $(SOPHYAINCP)ppersist.h \
    643   $(SOPHYAINCP)pexceptions.h \
    644   $(SOPHYAINCP)gnumd5.h \
    645   $(SOPHYAINCP)ppfbinstream.h \
    646   $(SOPHYAINCP)rawstream.h \
    647   $(SOPHYAINCP)ppfnametag.h \
    648   $(SOPHYAINCP)dvlist.h \
    649   $(SOPHYAINCP)objfio.h \
    650   $(SOPHYAINCP)anydataobj.h \
    651   $(SOPHYAINCP)mutyv.h \
    652   $(SOPHYAINCP)timestamp.h \
    653   $(SOPHYAINCP)anydataobj.h \
    654   $(SOPHYAINCP)ppersist.h fitsfile.h \
    655   $(SOPHYAINCP)ndatablock.h \
    656   $(SOPHYAINCP)dvlist.h fitsinoutfile.h \
    657   $(SOPHYAINCP)FitsIO/fitsio.h \
    658   $(SOPHYAINCP)FitsIO/longnam.h fitshandler.h
    659         $(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitsxntuple.cc
    660  
    661586$(SOPHYAOBJP)swfitsdtable.o: swfitsdtable.cc swfitsdtable.h \
    662587  $(SOPHYAINCP)basedtable.h \
  • trunk/SophyaExt/FitsIOServer/fabtcolread.cc

    r3188 r3572  
    189189  \return value into double
    190190*/
    191 double FitsOpenFile::ReadKey(fitsfile *fitsptr,char *keyname)
     191double FitsOpenFile::ReadKey(fitsfile *fitsptr,const char *keyname)
    192192{
    193193 if(keyname==NULL || fitsptr==NULL) return 0.;
     
    204204  \return value into long
    205205*/
    206 long FitsOpenFile::ReadKeyL(fitsfile *fitsptr,char *keyname)
     206long FitsOpenFile::ReadKeyL(fitsfile *fitsptr,const char *keyname)
    207207{
    208208 if(keyname==NULL || fitsptr==NULL) return 0;
     
    219219  \return value into long long
    220220*/
    221 LONGLONG FitsOpenFile::ReadKeyLL(fitsfile *fitsptr,char *keyname)
     221LONGLONG FitsOpenFile::ReadKeyLL(fitsfile *fitsptr,const char *keyname)
    222222{
    223223 if(keyname==NULL || fitsptr==NULL) return 0;
     
    234234  \return value into string
    235235*/
    236 string FitsOpenFile::ReadKeyS(fitsfile *fitsptr,char *keyname)
     236string FitsOpenFile::ReadKeyS(fitsfile *fitsptr,const char *keyname)
    237237{
    238238 if(keyname==NULL || fitsptr==NULL) return (string)"";
     
    529529  \return value into double
    530530*/
    531 double FitsABTColRd::ReadKey(char *keyname)
     531double FitsABTColRd::ReadKey(const char *keyname)
    532532{
    533533 return FitsOpenFile::ReadKey(GetFitsPtr(),keyname);
     
    539539  \return value into long
    540540*/
    541 long FitsABTColRd::ReadKeyL(char *keyname)
     541long FitsABTColRd::ReadKeyL(const char *keyname)
    542542{
    543543 return FitsOpenFile::ReadKeyL(GetFitsPtr(),keyname);
     
    549549  \return value into long long
    550550*/
    551 LONGLONG FitsABTColRd::ReadKeyLL(char *keyname)
     551LONGLONG FitsABTColRd::ReadKeyLL(const char *keyname)
    552552{
    553553 return FitsOpenFile::ReadKeyLL(GetFitsPtr(),keyname);
     
    559559  \return value into string
    560560*/
    561 string FitsABTColRd::ReadKeyS(char *keyname)
     561string FitsABTColRd::ReadKeyS(const char *keyname)
    562562{
    563563 return FitsOpenFile::ReadKeyS(GetFitsPtr(),keyname);
     
    10801080  \return value into double
    10811081*/
    1082 double FitsImg2DRd::ReadKey(char *keyname)
     1082double FitsImg2DRd::ReadKey(const char *keyname)
    10831083{
    10841084 return FitsOpenFile::ReadKey(GetFitsPtr(),keyname);
     
    10901090  \return value into long
    10911091*/
    1092 long FitsImg2DRd::ReadKeyL(char *keyname)
     1092long FitsImg2DRd::ReadKeyL(const char *keyname)
    10931093{
    10941094 return FitsOpenFile::ReadKeyL(GetFitsPtr(),keyname);
     
    11001100  \return value into long long
    11011101*/
    1102 LONGLONG FitsImg2DRd::ReadKeyLL(char *keyname)
     1102LONGLONG FitsImg2DRd::ReadKeyLL(const char *keyname)
    11031103{
    11041104 return FitsOpenFile::ReadKeyLL(GetFitsPtr(),keyname);
     
    11101110  \return value into string
    11111111*/
    1112 string FitsImg2DRd::ReadKeyS(char *keyname)
     1112string FitsImg2DRd::ReadKeyS(const char *keyname)
    11131113{
    11141114 return FitsOpenFile::ReadKeyS(GetFitsPtr(),keyname);
     
    14281428  \return value into double
    14291429*/
    1430 double FitsImg3DRd::ReadKey(char *keyname)
     1430double FitsImg3DRd::ReadKey(const char *keyname)
    14311431{
    14321432 return FitsOpenFile::ReadKey(GetFitsPtr(),keyname);
     
    14381438  \return value into long
    14391439*/
    1440 long FitsImg3DRd::ReadKeyL(char *keyname)
     1440long FitsImg3DRd::ReadKeyL(const char *keyname)
    14411441{
    14421442 return FitsOpenFile::ReadKeyL(GetFitsPtr(),keyname);
     
    14481448  \return value into long long
    14491449*/
    1450 LONGLONG FitsImg3DRd::ReadKeyLL(char *keyname)
     1450LONGLONG FitsImg3DRd::ReadKeyLL(const char *keyname)
    14511451{
    14521452 return FitsOpenFile::ReadKeyLL(GetFitsPtr(),keyname);
     
    14581458  \return value into string
    14591459*/
    1460 string FitsImg3DRd::ReadKeyS(char *keyname)
     1460string FitsImg3DRd::ReadKeyS(const char *keyname)
    14611461{
    14621462 return FitsOpenFile::ReadKeyS(GetFitsPtr(),keyname);
  • trunk/SophyaExt/FitsIOServer/fabtcolread.h

    r3493 r3572  
    4848  void Print(void);
    4949
    50   static double   ReadKey(fitsfile *fitsptr,char *keyname);
    51   static long     ReadKeyL(fitsfile *fitsptr,char *keyname);
    52   static LONGLONG ReadKeyLL(fitsfile *fitsptr,char *keyname);
    53   static string   ReadKeyS(fitsfile *fitsptr,char *keyname);
     50  static double   ReadKey(fitsfile *fitsptr,const char *keyname);
     51  static long     ReadKeyL(fitsfile *fitsptr,const char *keyname);
     52  static LONGLONG ReadKeyLL(fitsfile *fitsptr,const char *keyname);
     53  static string   ReadKeyS(fitsfile *fitsptr,const char *keyname);
    5454  static void   printerror(int sta);
    5555
     
    7878  void ChangeBuffer(long blen=100,long bsens=1);
    7979
    80   double    ReadKey(char *keyname);
    81   long      ReadKeyL(char *keyname);
    82   LONGLONG  ReadKeyLL(char *keyname);
    83   string    ReadKeyS(char *keyname);
     80  double    ReadKey(const char *keyname);
     81  long      ReadKeyL(const char *keyname);
     82  LONGLONG  ReadKeyLL(const char *keyname);
     83  string    ReadKeyS(const char *keyname);
    8484
    8585  double Read(LONGLONG n,bool usebuffer=true);
     
    195195  virtual ~FitsImg2DRd();
    196196
    197   double   ReadKey(char *keyname);
    198   long     ReadKeyL(char *keyname);
    199   LONGLONG ReadKeyLL(char *keyname);
    200   string   ReadKeyS(char *keyname);
     197  double   ReadKey(const char *keyname);
     198  long     ReadKeyL(const char *keyname);
     199  LONGLONG ReadKeyLL(const char *keyname);
     200  string   ReadKeyS(const char *keyname);
    201201
    202202  LONGLONG Read(TMatrix<uint_2>& data);
     
    260260  virtual ~FitsImg3DRd();
    261261
    262   double   ReadKey(char *keyname);
    263   long     ReadKeyL(char *keyname);
    264   LONGLONG ReadKeyLL(char *keyname);
    265   string   ReadKeyS(char *keyname);
     262  double   ReadKey(const char *keyname);
     263  long     ReadKeyL(const char *keyname);
     264  LONGLONG ReadKeyLL(const char *keyname);
     265  string   ReadKeyS(const char *keyname);
    266266
    267267  LONGLONG Read(TArray<uint_2>& data);
  • trunk/SophyaExt/FitsIOServer/fabtwriter.cc

    r3128 r3572  
    105105
    106106/*! Write a double value into Fits Header */
    107 void FitsWriter::WriteKey(const char *keyname,double val,char* comment)
     107void FitsWriter::WriteKey(const char *keyname,double val,const char* comment)
    108108{
    109109 if(keyname==NULL || strlen(keyname)<=0) return;
     
    116116
    117117/*! Write a long value into Fits Header */
    118 void FitsWriter::WriteKey(const char *keyname,long val,char* comment)
     118void FitsWriter::WriteKey(const char *keyname,long val,const char* comment)
    119119{
    120120 if(keyname==NULL || strlen(keyname)<=0) return;
     
    127127
    128128/*! Write a long long value into Fits Header */
    129 void FitsWriter::WriteKey(const char *keyname,LONGLONG val,char* comment)
     129void FitsWriter::WriteKey(const char *keyname,LONGLONG val,const char* comment)
    130130{
    131131 if(keyname==NULL || strlen(keyname)<=0) return;
     
    138138
    139139/*! Write a string value into Fits Header */
    140 void FitsWriter::WriteKey(const char *keyname,string val,char* comment)
     140void FitsWriter::WriteKey(const char *keyname,string val,const char* comment)
    141141{
    142142 if(keyname==NULL || strlen(keyname)<=0) return;
  • trunk/SophyaExt/FitsIOServer/fabtwriter.h

    r3493 r3572  
    3636
    3737  //! Write a double value in Fits header.
    38   void WriteKey(const char *keyname,double val,char* comment=NULL);
     38  void WriteKey(const char *keyname,double val,const char* comment=NULL);
    3939  //! Write a long value in Fits header.
    40   void WriteKey(const char *keyname,long val,char* comment=NULL);
     40  void WriteKey(const char *keyname,long val,const char* comment=NULL);
    4141  //! Write a long long value in Fits header.
    42   void WriteKey(const char *keyname,LONGLONG val,char* comment=NULL);
     42  void WriteKey(const char *keyname,LONGLONG val,const char* comment=NULL);
    4343  //! Write a string value in Fits header.
    44   void WriteKey(const char *keyname,string val,char* comment=NULL);
     44  void WriteKey(const char *keyname,string val,const char* comment=NULL);
    4545  //! Write a character string value in Fits header.
    46   inline void WriteKey(const char *keyname,char* val,char* comment=NULL)
     46  inline void WriteKey(const char *keyname,const char* val,const char* comment=NULL)
    4747                      {string dum=val; WriteKey(keyname,dum,comment);}
    4848  //! Set debug level
     
    9393  inline void SetExtName(string extname=string("")) {ExtName = extname;}
    9494  //! Set the FITS table extension name
    95   inline void SetExtName(char* extname="") {ExtName = extname;}
     95  inline void SetExtName(const char* extname="") {ExtName = extname;}
    9696
    9797  //! Add a new column to the FITS table and return its number (see addcol).
  • trunk/SophyaExt/FitsIOServer/fitsblkrw.h

    r3493 r3572  
    159159      string msg = "FitsBlockRW<std::string>::WriteColumnData() Error: " ;
    160160      msg += buff;
    161       sprintf(buff," kk=%ld",kk);  msg += buff;
     161      sprintf(buff," kk=%ld",(long)kk);  msg += buff;
    162162      throw FitsIOException(msg);
    163163    }
     
    187187      string msg = "FitsBlockRW<std::string>::ReadColumnData() Error: " ;
    188188      msg += buff;
    189       sprintf(buff," kk=%ld",kk);  msg += buff;
     189      sprintf(buff," kk=%ld",(long)kk);  msg += buff;
    190190      throw FitsIOException(msg);
    191191    }
  • trunk/SophyaExt/FitsIOServer/fitsbntbllineRW.cc

    r2615 r3572  
    6464      else if (ss == FitsFile::FitsDataType_char) SfitsCol.push_back(k);
    6565      else {
    66         cout << " FITS_XNTuple: colonne fits " << k << " type= " << (int) ss << endl;
     66        cout << "FITS_BntblLineReader: colonne fits " << k << " type= " << (int) ss << endl;
    6767        throw  IOExc("type de champ inconnu");
    6868      }
     
    113113
    114114
    115 FITS_BntblLineWriter::FITS_BntblLineWriter(char inputfile[],int dc, int fc,int ic, int lc, int bc, int cc,  vector<string> names,DVList* ptr_dvl,  FitsFile::WriteMode wrm)
     115FITS_BntblLineWriter::FITS_BntblLineWriter(const char inputfile[],int dc, int fc,int ic, int lc, int bc, int cc,  vector<string> names,DVList* ptr_dvl,  FitsFile::WriteMode wrm)
    116116{
    117117  int k;
    118118  int nbcols = dc+fc+ic+cc+lc+bc;
    119   if (nbcols !=  names.size())
     119  if (nbcols !=  (int)names.size())
    120120    {
    121121      cout << " WARNING: BnTblLineWriter:: length of vector of column names not equal to total number of columns" << endl;
  • trunk/SophyaExt/FitsIOServer/fitsbntbllineRW.h

    r2201 r3572  
    66#include "dvlist.h"
    77#include "fitsfile.h"
    8 //#include "xntuple.h"
    98
    109namespace SOPHYA {
     
    6665
    6766public:
    68  FITS_BntblLineWriter(char inputfile[],int dc, int fc, int ic, int lc, int bc,int cc, vector<string> names, DVList* dvl=NULL, FitsFile::WriteMode wrm = FitsFile::clear);
     67 FITS_BntblLineWriter(const char inputfile[],int dc, int fc, int ic, int lc, int bc,int cc, vector<string> names, DVList* dvl=NULL, FitsFile::WriteMode wrm = FitsFile::clear);
    6968~FITS_BntblLineWriter();
    7069 void WriteNextLine( BnTblLine& WorkLine);
  • trunk/SophyaExt/FitsIOServer/fitsfile.cc

    r2907 r3572  
    228228*/
    229229
    230 /*! \fn void  SOPHYA::FitsIOHandler::Read(char flnm[],int hdunum)
     230/*! \fn void  SOPHYA::FitsIOHandler::Read(const char flnm[],int hdunum)
    231231
    232232this method is called from inherited objects :
     
    238238calls the method 'ReadFromFits' from the inherited  object
    239239*/
    240 void   FitsIOHandler::Read(char flnm[],int hdunum)
     240void   FitsIOHandler::Read(const char flnm[],int hdunum)
    241241{
    242242  FitsInFile ifts(flnm);
     
    274274
    275275*/
    276 void FitsIOHandler::Write(char flnm[])
     276void FitsIOHandler::Write(const char flnm[])
    277277
    278278{
     
    327327}
    328328
    329 void FitsFile::printerror(int& status, char* texte)
     329void FitsFile::printerror(int& status, const char* texte)
    330330  //*****************************************************/
    331331  //* Print out cfitsio error messages and exit program */
     
    338338  throw IOExc("FitsFile:: error FITSIO status");
    339339}
    340 void FitsFile::printerrorAndContinue(int& status, char* texte)
     340void FitsFile::printerrorAndContinue(int& status, const char* texte)
    341341  //*****************************************************/
    342342  //* Print out cfitsio error messages and exit program */
     
    15341534  char dtype;
    15351535  char card[FLEN_CARD]; 
    1536   char *comkey = "COMMENT";
     1536  const char *comkey = "COMMENT";
    15371537  char comment[FLEN_COMMENT];
    15381538
     
    21982198      char comment[FLEN_COMMENT];
    21992199      char strval[FLEN_VALUE]= "";
    2200       char *comkey = "COMMENT";
     2200      const char *comkey = "COMMENT";
    22012201      //      fits_read_keyword(fptr_, keyname, strval, NULL, &status);
    22022202      //  if (status != 0 || strncmp(keyname,comkey,LEN_KEYWORD-1) == 0 )
     
    25272527      default :
    25282528        {
    2529           char *comkey = "COMMENT";
     2529          const char *comkey = "COMMENT";
    25302530          if(strncmp(keyname,comkey,LEN_KEYWORD-1) == 0)
    25312531            {
  • trunk/SophyaExt/FitsIOServer/fitsfile.h

    r3493 r3572  
    6464
    6565   virtual ~FitsIOHandler() {}
    66    void   Read(char flnm[],int hdunum= 0);
    67    void   Write(char flnm[]) ;
     66   void   Read(const char flnm[],int hdunum= 0);
     67   void   Write(const char flnm[]) ;
    6868
    6969   //Implementation par defaut de l'interface FitsHandlerInterface
     
    181181void         ResetStatus(int& status) ;
    182182static  void printerror(int&) ;
    183 static  void printerror(int&,char* texte) ;
    184 static  void printerrorAndContinue(int& status, char* texte);
     183static  void printerror(int&,const char* texte) ;
     184static  void printerrorAndContinue(int& status,const char* texte);
    185185inline void  InitNull()
    186186  {
  • trunk/SophyaExt/FitsIOServer/fitsinoutfile.cc

    r3452 r3572  
    157157}
    158158/* -- Fonction utilitaire pour verifier le code d'erreur fitsio -- */
    159 static inline bool FitsCheckStatus(int st, char * emsg = NULL) {
     159static inline bool FitsCheckStatus(int st, const char * emsg = NULL) {
    160160  if (st) {
    161161    fits_report_error(stderr, st);
     
    272272int FitsInOutFile::CurrentHDU()  const
    273273{
    274   int status = 0;
     274  //unused: int status = 0;
    275275  int curhdu = 0;
    276276  fits_get_hdu_num(FitsPtr() , &curhdu);
     
    496496  int colnum, typecode;
    497497  LONGLONG repeat, colw;   // $CHECK$ LONGLONG ???
    498   int ncols = 0;
     498  //unused: int ncols = 0;
    499499  char colname[128];  // longueur max d'un nom de colonne
    500500
    501501  while (status != COL_NOT_FOUND) {
    502     fits_get_colname(FitsPtr(), CASEINSEN, "*", colname, &colnum, &status);
     502    char dum[2]  = {'*','\0'};
     503    fits_get_colname(FitsPtr(), CASEINSEN, dum, colname, &colnum, &status);
    503504    if (status == COL_NOT_FOUND)  break;
    504505    if ( (status != COL_NOT_UNIQUE) && (status != 0) ) {
     
    665666
    666667  CheckFitsPtr(FitsPtr());
    667   int status = 0;
     668  //unused: int status = 0;
    668669  DVList::ValList::const_iterator it;
    669670  for(it = dvl.Begin(); it != dvl.End(); it++) 
  • trunk/SophyaExt/FitsIOServer/fitsioserver.h

    r3493 r3572  
    1919#include "fitsspherehealpix.h"
    2020#include "fitsntuple.h"
    21 // #include "fitsxntuple.h"
    2221#include "fitslocalmap.h"
    2322
  • trunk/SophyaExt/FitsIOServer/fitsmanager.cc

    r3167 r3572  
    8080  int hfg = 0;
    8181  int bhfg = 0;
    82   int clev = 0;
     82  //unused: int clev = 0;
    8383  int blev = 0;
    8484  for(it = hlistp->begin(); it != hlistp->end(); it++) {
     
    196196      LONGLONG naxes[5] = {0,0,0,0,0};
    197197      int naxis=5;
    198       int imgtyp = is.GetImageHDUInfo(naxis, naxes);
     198      //unused: int imgtyp = is.GetImageHDUInfo(naxis, naxes);
    199199      os << ">> IMAGE_HDU:  naxis= " << naxis << " : ";
    200200      for(int i=0; i<naxis; i++) {
     
    212212      else os << ">> ASCII_TBL :  NRows= " << is.GetNbRows();
    213213      os << " x NCols= " << ncols << endl;
    214       for(int kk=0; kk<colnames.size(); kk++) {
     214      for(size_t kk=0; kk<colnames.size(); kk++) {
    215215        os << "Col[" << kk+1 << "]  Name= " << colnames[kk]
    216216             << " Type= " << FitsTypes::DataTypeToTypeString(coltypes[kk])
  • trunk/SophyaExt/FitsIOServer/fitsntuple.h

    r3493 r3572  
    5353
    5454/*!
    55 fill the XNTuple only with lines from firstLine-th to (firstLine+numberOfLines-1)-th of the FITS-file inputfile.
     55fill the NTuple only with lines from firstLine-th to (firstLine+numberOfLines-1)-th of the FITS-file inputfile.
    5656\param <firstLine>  first line  to be read (the first line of the file is numbered 0)
    5757\param <numberOfLines>  number of lines to be read
  • trunk/SophyaExt/FitsIOServer/fitsspherehealpix.cc

    r3167 r3572  
    2727 
    2828template <class T>
    29 FITS_SphereHEALPix<T>::FITS_SphereHEALPix(char inputfile[],int hdunum)
     29FITS_SphereHEALPix<T>::FITS_SphereHEALPix(const char inputfile[],int hdunum)
    3030{
    3131    dobj_= new SphereHEALPix<T>;
     
    266266
    267267template <class T>
    268 void FITS_SphereHEALPix<T>::Mollweide_picture_projection(char filename[])
     268void FITS_SphereHEALPix<T>::Mollweide_picture_projection(const char filename[])
    269269{
    270270  int ni = 300;
     
    297297}
    298298template <class T>
    299 void FITS_SphereHEALPix<T>::sinus_picture_projection(char filename[])
     299void FITS_SphereHEALPix<T>::sinus_picture_projection(const char filename[])
    300300{
    301301  int ni = 300;
  • trunk/SophyaExt/FitsIOServer/fitsspherehealpix.h

    r3493 r3572  
    2424
    2525FITS_SphereHEALPix();
    26 FITS_SphereHEALPix(char inputfile[],int hdunum=0);
     26FITS_SphereHEALPix(const char inputfile[],int hdunum=0);
    2727FITS_SphereHEALPix(const SphereHEALPix<T>& obj);
    2828FITS_SphereHEALPix(SphereHEALPix<T>* obj);
     
    3535virtual FitsHandlerInterface* Clone();
    3636
    37 void Mollweide_picture_projection(char flnm[]);
    38 void sinus_picture_projection(char flnm[]);
     37void Mollweide_picture_projection(const char flnm[]);
     38void sinus_picture_projection(const char flnm[]);
    3939//void ReWriteFromFitsToFits(FitsInFile& headerin, FitsOutFile& os);
    4040
  • trunk/SophyaExt/FitsIOServer/fitsspherethetaphi.cc

    r3167 r3572  
    2626
    2727template <class T>
    28 FITS_SphereThetaPhi<T>::FITS_SphereThetaPhi(char inputfile[],int hdunum)
     28FITS_SphereThetaPhi<T>::FITS_SphereThetaPhi(const char inputfile[],int hdunum)
    2929{
    3030    dobj_= new SphereThetaPhi<T>;
     
    255255
    256256template <class T>
    257 void FITS_SphereThetaPhi<T>::Mollweide_picture_projection(char filename[])
     257void FITS_SphereThetaPhi<T>::Mollweide_picture_projection(const char filename[])
    258258{
    259259  int ni = 300;
     
    286286}
    287287template <class T>
    288 void FITS_SphereThetaPhi<T>::sinus_picture_projection(char filename[])
     288void FITS_SphereThetaPhi<T>::sinus_picture_projection(const char filename[])
    289289{
    290290  int ni = 300;
  • trunk/SophyaExt/FitsIOServer/fitsspherethetaphi.h

    r3493 r3572  
    2222
    2323FITS_SphereThetaPhi();
    24 FITS_SphereThetaPhi(char inputfile[],int hdunum=0);
     24FITS_SphereThetaPhi(const char inputfile[],int hdunum=0);
    2525FITS_SphereThetaPhi(const SphereThetaPhi<T>& obj);
    2626FITS_SphereThetaPhi(SphereThetaPhi<T>* obj);
     
    3333virtual FitsHandlerInterface* Clone();
    3434
    35 void Mollweide_picture_projection(char flnm[]);
    36 void sinus_picture_projection(char flnm[]);
     35void Mollweide_picture_projection(const char flnm[]);
     36void sinus_picture_projection(const char flnm[]);
    3737
    3838
  • trunk/SophyaExt/FitsIOServer/fitstarray.cc

    r2874 r3572  
    2424
    2525template <class T>
    26 FITS_TArray<T>::FITS_TArray(char inputfile[],int hdunum)
     26FITS_TArray<T>::FITS_TArray(const char inputfile[],int hdunum)
    2727{
    2828  dobj_=NULL;
  • trunk/SophyaExt/FitsIOServer/fitstarray.h

    r1231 r3572  
    2525
    2626FITS_TArray();
    27 FITS_TArray(char inputfile[],int hdunum=0);
     27FITS_TArray(const char inputfile[],int hdunum=0);
    2828FITS_TArray(const TArray<T> & obj);
    2929FITS_TArray(TArray<T> *obj);
  • trunk/SophyaExt/FitsIOServer/objlist.list

    r3123 r3572  
    55fbtntintf.o
    66fiosinit.o
    7 fitsautoreader.o
    87fitsbntbllineRW.o
    98fitsfile.o
     
    1918fitsspherethetaphi.o
    2019fitstarray.o
    21 fitsxntuple.o
    2220swfitsdtable.o
  • trunk/SophyaExt/FitsIOServer/smakefile

    r3407 r3572  
    44 
    55clean:
    6          rm -f $(SOPHYAOBJP)datacirclefits.o $(SOPHYAOBJP)fabtcolread.o $(SOPHYAOBJP)fabtwriter.o $(SOPHYAOBJP)fboloread.o $(SOPHYAOBJP)fbtntintf.o $(SOPHYAOBJP)fiosinit.o $(SOPHYAOBJP)fitsautoreader.o $(SOPHYAOBJP)fitsbntbllineRW.o $(SOPHYAOBJP)fitsfile.o $(SOPHYAOBJP)fitsgenedata.o $(SOPHYAOBJP)fitshdtable.o $(SOPHYAOBJP)fitshisterr.o $(SOPHYAOBJP)fitshistos.o $(SOPHYAOBJP)fitsinoutfile.o $(SOPHYAOBJP)fitslocalmap.o $(SOPHYAOBJP)fitsmanager.o $(SOPHYAOBJP)fitsntuple.o $(SOPHYAOBJP)fitsspherehealpix.o $(SOPHYAOBJP)fitsspherethetaphi.o $(SOPHYAOBJP)fitstarray.o $(SOPHYAOBJP)fitsxntuple.o $(SOPHYAOBJP)swfitsdtable.o
     6         rm -f $(SOPHYAOBJP)datacirclefits.o $(SOPHYAOBJP)fabtcolread.o $(SOPHYAOBJP)fabtwriter.o $(SOPHYAOBJP)fboloread.o $(SOPHYAOBJP)fbtntintf.o $(SOPHYAOBJP)fiosinit.o $(SOPHYAOBJP)fitsbntbllineRW.o $(SOPHYAOBJP)fitsfile.o $(SOPHYAOBJP)fitsgenedata.o $(SOPHYAOBJP)fitshdtable.o $(SOPHYAOBJP)fitshisterr.o $(SOPHYAOBJP)fitshistos.o $(SOPHYAOBJP)fitsinoutfile.o $(SOPHYAOBJP)fitslocalmap.o $(SOPHYAOBJP)fitsmanager.o $(SOPHYAOBJP)fitsntuple.o $(SOPHYAOBJP)fitsspherehealpix.o $(SOPHYAOBJP)fitsspherethetaphi.o $(SOPHYAOBJP)fitstarray.o $(SOPHYAOBJP)swfitsdtable.o
    77        rm -f $(SOPHYALIBP)libFitsIOServer.a
    88 
    9 $(SOPHYALIBP)libFitsIOServer.a : $(SOPHYAOBJP)datacirclefits.o $(SOPHYAOBJP)fabtcolread.o $(SOPHYAOBJP)fabtwriter.o $(SOPHYAOBJP)fboloread.o $(SOPHYAOBJP)fbtntintf.o $(SOPHYAOBJP)fiosinit.o $(SOPHYAOBJP)fitsautoreader.o $(SOPHYAOBJP)fitsbntbllineRW.o $(SOPHYAOBJP)fitsfile.o $(SOPHYAOBJP)fitsgenedata.o $(SOPHYAOBJP)fitshdtable.o $(SOPHYAOBJP)fitshisterr.o $(SOPHYAOBJP)fitshistos.o $(SOPHYAOBJP)fitsinoutfile.o $(SOPHYAOBJP)fitslocalmap.o $(SOPHYAOBJP)fitsmanager.o $(SOPHYAOBJP)fitsntuple.o $(SOPHYAOBJP)fitsspherehealpix.o $(SOPHYAOBJP)fitsspherethetaphi.o $(SOPHYAOBJP)fitstarray.o $(SOPHYAOBJP)fitsxntuple.o $(SOPHYAOBJP)swfitsdtable.o
     9$(SOPHYALIBP)libFitsIOServer.a : $(SOPHYAOBJP)datacirclefits.o $(SOPHYAOBJP)fabtcolread.o $(SOPHYAOBJP)fabtwriter.o $(SOPHYAOBJP)fboloread.o $(SOPHYAOBJP)fbtntintf.o $(SOPHYAOBJP)fiosinit.o $(SOPHYAOBJP)fitsbntbllineRW.o $(SOPHYAOBJP)fitsfile.o $(SOPHYAOBJP)fitsgenedata.o $(SOPHYAOBJP)fitshdtable.o $(SOPHYAOBJP)fitshisterr.o $(SOPHYAOBJP)fitshistos.o $(SOPHYAOBJP)fitsinoutfile.o $(SOPHYAOBJP)fitslocalmap.o $(SOPHYAOBJP)fitsmanager.o $(SOPHYAOBJP)fitsntuple.o $(SOPHYAOBJP)fitsspherehealpix.o $(SOPHYAOBJP)fitsspherethetaphi.o $(SOPHYAOBJP)fitstarray.o $(SOPHYAOBJP)swfitsdtable.o
    1010        $(AR) $(ARFLAGS) $@ $?
    1111        touch $(SOPHYAINCP)/SophyaConfInfo/libextsophya.objlist
     
    184184        $(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fiosinit.cc
    185185 
    186 $(SOPHYAOBJP)fitsautoreader.o: fitsautoreader.cc \
    187   $(SOPHYAINCP)sopnamsp.h \
    188   $(SOPHYAINCP)pexceptions.h \
    189   $(SOPHYAINCP)machdefs.h fitsautoreader.h \
    190   $(SOPHYAINCP)machdefs.h \
    191   $(SOPHYAINCP)anydataobj.h fitsfile.h \
    192   $(SOPHYAINCP)ndatablock.h \
    193   $(SOPHYAINCP)anydataobj.h \
    194   $(SOPHYAINCP)dvlist.h \
    195   $(SOPHYAINCP)objfio.h \
    196   $(SOPHYAINCP)ppersist.h \
    197   $(SOPHYAINCP)pexceptions.h \
    198   $(SOPHYAINCP)gnumd5.h \
    199   $(SOPHYAINCP)ppfbinstream.h \
    200   $(SOPHYAINCP)rawstream.h \
    201   $(SOPHYAINCP)ppfnametag.h \
    202   $(SOPHYAINCP)mutyv.h \
    203   $(SOPHYAINCP)timestamp.h fitsinoutfile.h \
    204   $(SOPHYAINCP)FitsIO/fitsio.h \
    205   $(SOPHYAINCP)FitsIO/longnam.h fitshandler.h \
    206   fitstarray.h $(SOPHYAINCP)tarray.h \
    207   $(SOPHYAINCP)basarr.h \
    208   $(SOPHYAINCP)dvlist.h \
    209   $(SOPHYAINCP)ndatablock.h \
    210   $(SOPHYAINCP)utilarr.h fitsspherehealpix.h \
    211   $(SOPHYAINCP)spherehealpix.h \
    212   $(SOPHYAINCP)sphericalmap.h \
    213   $(SOPHYAINCP)smathconst.h \
    214   $(SOPHYAINCP)pixelmap.h \
    215   $(SOPHYAINCP)spherepos.h \
    216   $(SOPHYAINCP)unitvector.h \
    217   $(SOPHYAINCP)vector3d.h \
    218   $(SOPHYAINCP)longlat.h \
    219   $(SOPHYAINCP)utilgeom.h \
    220   $(SOPHYAINCP)datatype.h \
    221   $(SOPHYAINCP)tvector.h \
    222   $(SOPHYAINCP)tmatrix.h \
    223   $(SOPHYAINCP)tarray.h \
    224   $(SOPHYAINCP)tmatrix_tsnl.h \
    225   $(SOPHYAINCP)tvector_tsnl.h \
    226   $(SOPHYAINCP)HEALPixUtils.h fitsntuple.h \
    227   $(SOPHYAINCP)ntuple.h \
    228   $(SOPHYAINCP)ntupintf.h \
    229   $(SOPHYAINCP)ppersist.h fitsxntuple.h \
    230   $(SOPHYAINCP)xntuple.h fitslocalmap.h \
    231   $(SOPHYAINCP)localmap.h fbtntintf.h \
    232   $(SOPHYAINCP)ntupintf.h
    233         $(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitsautoreader.cc
    234  
    235186$(SOPHYAOBJP)fitsbntbllineRW.o: fitsbntbllineRW.cc \
    236187  $(SOPHYAINCP)sopnamsp.h \
     
    633584        $(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitstarray.cc
    634585 
    635 $(SOPHYAOBJP)fitsxntuple.o: fitsxntuple.cc \
    636   $(SOPHYAINCP)sopnamsp.h \
    637   $(SOPHYAINCP)pexceptions.h \
    638   $(SOPHYAINCP)machdefs.h fitsxntuple.h \
    639   $(SOPHYAINCP)machdefs.h \
    640   $(SOPHYAINCP)xntuple.h \
    641   $(SOPHYAINCP)ntupintf.h \
    642   $(SOPHYAINCP)ppersist.h \
    643   $(SOPHYAINCP)pexceptions.h \
    644   $(SOPHYAINCP)gnumd5.h \
    645   $(SOPHYAINCP)ppfbinstream.h \
    646   $(SOPHYAINCP)rawstream.h \
    647   $(SOPHYAINCP)ppfnametag.h \
    648   $(SOPHYAINCP)dvlist.h \
    649   $(SOPHYAINCP)objfio.h \
    650   $(SOPHYAINCP)anydataobj.h \
    651   $(SOPHYAINCP)mutyv.h \
    652   $(SOPHYAINCP)timestamp.h \
    653   $(SOPHYAINCP)anydataobj.h \
    654   $(SOPHYAINCP)ppersist.h fitsfile.h \
    655   $(SOPHYAINCP)ndatablock.h \
    656   $(SOPHYAINCP)dvlist.h fitsinoutfile.h \
    657   $(SOPHYAINCP)FitsIO/fitsio.h \
    658   $(SOPHYAINCP)FitsIO/longnam.h fitshandler.h
    659         $(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitsxntuple.cc
    660  
    661586$(SOPHYAOBJP)swfitsdtable.o: swfitsdtable.cc swfitsdtable.h \
    662587  $(SOPHYAINCP)basedtable.h \
  • trunk/SophyaExt/IFFTW/fftw3server.cc

    r3412 r3572  
    209209  sa_size_t n = in.NElts();
    210210  sa_size_t ncs = n/2+1;
    211   sa_size_t nc = (n%2 != 0) ? n/2+1 : n/2;
     211  //unused: sa_size_t nc = (n%2 != 0) ? n/2+1 : n/2;
    212212  if (out.NElts() != ncs)
    213213    throw SzMismatchError("FFTWServer::ReShapetoCompl() - Wrong output array size !");
     
    398398  sa_size_t n = in.NElts();
    399399  sa_size_t ncs = n/2+1;
    400   sa_size_t nc = (n%2 != 0) ? n/2+1 : n/2;
     400  //unused: sa_size_t nc = (n%2 != 0) ? n/2+1 : n/2;
    401401  if (out.NElts() != ncs)
    402402    throw SzMismatchError("FFTWServer::ReShapetoCompl() - Wrong output array size !");
  • trunk/SophyaExt/LinAlg/intflapack.cc

    r3534 r3572  
    178178extern "C" {
    179179// Le calculateur de workingspace
    180   int_4 ilaenv(int_4 *ispec,char *name,char *opts,int_4 *n1,int_4 *n2,int_4 *n3,int_4 *n4,
     180  int_4 ilaenv(int_4 *ispec,const char *name,const char *opts,int_4 *n1,int_4 *n2,int_4 *n3,int_4 *n4,
    181181                int_4 nc1,int_4 nc2);
    182182
     
    300300////////////////////////////////////////////////////////////////////////////////////
    301301template <class T>
    302 int_4 LapackServer<T>::ilaenv_en_C(int_4 ispec,char *name,char *opts,int_4 n1,int_4 n2,int_4 n3,int_4 n4)
     302int_4 LapackServer<T>::ilaenv_en_C(int_4 ispec,const char *name,const char *opts,int_4 n1,int_4 n2,int_4 n3,int_4 n4)
    303303{
    304304 int_4 nc1 = strlen(name), nc2 = strlen(opts), rc=0;
     
    519519  int_4 info;
    520520
    521   int_4 minmn = (m < n) ? m : n;
     521  //unused: int_4 minmn = (m < n) ? m : n;
    522522  int_4 maxmn = (m > n) ? m : n;
    523523  int_4 maxmnrhs = (nrhs > maxmn) ? nrhs : maxmn;
     
    788788  int_4 m = a.Size(rowa);
    789789  int_4 n = a.Size(cola);
    790   int_4 maxmn = (m > n) ? m : n;
     790  //unused: int_4 maxmn = (m > n) ? m : n;
    791791  int_4 minmn = (m < n) ? m : n;
    792792
  • trunk/SophyaExt/LinAlg/intflapack.h

    r2906 r3572  
    4040  int SVDDriver(TArray<T>& a, TArray<T> & s,
    4141                TArray<T>* up=NULL, TArray<T> * vtp=NULL);
    42   int_4 ilaenv_en_C(int_4 ispec,char *name,char *opts,int_4 n1,int_4 n2,int_4 n3,int_4 n4);
     42  int_4 ilaenv_en_C(int_4 ispec,const char *name,const char *opts,int_4 n1,int_4 n2,int_4 n3,int_4 n4);
    4343  int_4 type2i4(void *val,int nbytes);
    4444
  • trunk/SophyaExt/XAstroPack/mollweide.cc

    r2730 r3572  
    4848 \endverbatim
    4949*/
    50 double MollWeide_XY(double longitude,double latitude,double* xmoll,double*ymoll)
     50double MollWeide_XY(double longitude,double latitude,double& xmoll,double& ymoll)
    5151{
    5252 int i,niter=2;
     
    9090
    9191 t0 *= asgn;
    92  *xmoll = 2.*M_SQRT2*(longitude-M_PI)/M_PI*cos(t0);
    93  *ymoll = M_SQRT2*sin(t0);
     92 xmoll = 2.*M_SQRT2*(longitude-M_PI)/M_PI*cos(t0);
     93 ymoll = M_SQRT2*sin(t0);
    9494
    9595 return t0;
     
    118118 \endverbatim
    119119*/
    120 double MollWeide_LL(double xmoll,double ymoll,double* longitude,double* latitude)
     120double MollWeide_LL(double xmoll,double ymoll,double& longitude,double& latitude)
    121121{
    122122 double t,a,eps=1.e-20;
    123123
    124  *longitude = *latitude = -999.;
     124 longitude = latitude = -999.;
    125125 if(xmoll<-2*M_SQRT2 || xmoll>2*M_SQRT2) return(-901.);
    126126 if(ymoll<-M_SQRT2 || ymoll>M_SQRT2) return(-902.);
     
    130130
    131131 a = (2.*t+sin(2.*t))/M_PI; if(a<-1.) a=-1.; else if(a>1.) a=1.;
    132  *latitude = asin(a);
     132 latitude = asin(a);
    133133
    134134 a= cos(t);
    135135 if(fabs(a)<eps) return(-903.);
    136  *longitude = M_PI*(xmoll/(2.*M_SQRT2*a)+1.);
     136 longitude = M_PI*(xmoll/(2.*M_SQRT2*a)+1.);
    137137
    138138 return(t);
  • trunk/SophyaExt/XAstroPack/mollweide.h

    r1811 r3572  
    11#ifndef MOLLWEIDE_H_SEEN
    22#define MOLLWEIDE_H_SEEN
    3 double MollWeide_XY(double longitude,double latitude,double* xmoll,double* ymoll);
    4 double MollWeide_LL(double xmoll,double ymoll,double* longitude,double* latitude);
     3double MollWeide_XY(double longitude,double latitude,double& xmoll,double& ymoll);
     4double MollWeide_LL(double xmoll,double ymoll,double& longitude,double& latitude);
    55#endif
  • trunk/SophyaExt/XAstroPack/tstmollweide.cc

    r2743 r3572  
    2020   a = 2.*tvrai+sin(2.*tvrai);
    2121   lat = asin(a/M_PI);
    22    tcalc = MollWeide_XY(0.,lat,&x,&y);
     22   tcalc = MollWeide_XY(0.,lat,x,y);
    2323   if(fabs(tcalc-tvrai)>tll) {tll = fabs(tcalc-tvrai); txy=tvrai;}
    2424   if(file) fprintf(file,"%e %e %e %e\n",tvrai,tcalc,a,tcalc-tvrai);
     
    2828
    2929 for(lon=0.;lon<360.;lon+=2.5) for(lat=-90.;lat<=90.1;lat+=2.5) {
    30    txy = MollWeide_XY(lon*M_PI/180.,lat*M_PI/180.,&x,&y);
    31    tll = MollWeide_LL(x,y,&longitude,&latitude);
     30   txy = MollWeide_XY(lon*M_PI/180.,lat*M_PI/180.,x,y);
     31   tll = MollWeide_LL(x,y,longitude,latitude);
    3232   longitude *= 180./M_PI;
    3333   latitude  *= 180./M_PI;
Note: See TracChangeset for help on using the changeset viewer.