Ignore:
Timestamp:
Feb 2, 2007, 6:46:47 PM (19 years ago)
Author:
ansari
Message:

Passage a la version ll (LONGLONG) des routines fits , cmv+Reza 02/02/2007

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaExt/FitsIOServer/fitsinoutfile.cc

    r3069 r3167  
    337337  if (CurrentHDU() != 1) return false;
    338338  int naxis = 2;
    339   long naxes[2];
     339  LONGLONG naxes[2];
    340340  GetImageHDUInfo(naxis, naxes);
    341341  if ((naxis == 0) &&  (NbHDUs() > 1)) {
     
    347347
    348348/*-- Methode --*/
    349 void FitsInOutFile::CreateImageHDU(int bitpix, int naxis, long* naxes)
    350 {
    351   int status = 0;
    352   fits_create_img(fptr_, bitpix, naxis, naxes, &status);
     349void FitsInOutFile::CreateImageHDU(int bitpix, int naxis, LONGLONG* naxes)
     350{
     351  int status = 0;
     352  fits_create_imgll(fptr_, bitpix, naxis, naxes, &status);
    353353  FitsCheckStatus(status,"FitsInOutFile::CreateImageHDU() Error: ");
    354354  return;
     
    361361   Rc : return the image type (bitpix)
    362362 */
    363 int FitsInOutFile::GetImageHDUInfo(int& naxis, long* naxes) const
     363int FitsInOutFile::GetImageHDUInfo(int& naxis, LONGLONG* naxes) const
    364364{
    365365  int status = 0;
    366366  int maxdim = naxis;
    367367  int bitpix = 0;
    368   fits_get_img_param(fptr_, maxdim, &bitpix, &naxis, naxes, &status);
     368  fits_get_img_paramll(fptr_, maxdim, &bitpix, &naxis, naxes, &status);
    369369  FitsCheckStatus(status, "FitsInOutFile::GetImageHDUInfo() Error: ");
    370370  return bitpix;
     
    372372
    373373/*-- Methode --*/
    374 long FitsInOutFile::GetNbRows()  const
    375 {
    376   int status = 0;
    377   long nbrow = 0;
    378   fits_get_num_rows(FitsPtr() , &nbrow, &status);
     374LONGLONG FitsInOutFile::GetNbRows()  const
     375{
     376  int status = 0;
     377  LONGLONG nbrow = 0;
     378  fits_get_num_rowsll(FitsPtr() , &nbrow, &status);
    379379  FitsCheckStatus(status, "FitsInOutFile::GetNbRows() Error: " );
    380380  return nbrow;
     
    466466long FitsInOutFile::GetColInfo(vector<string> & colnames,
    467467                                 vector<int> & coltypes,
    468                                  vector<long> & repcnt,
    469                                  vector<long> & width)
     468                                 vector<LONGLONG> & repcnt,
     469                                 vector<LONGLONG> & width)
    470470{
    471471
     
    478478
    479479  int colnum, typecode;
    480   long repeat, colw;
     480  LONGLONG repeat, colw;   // $CHECK$ LONGLONG ???
    481481  int ncols = 0;
    482482  char colname[128];  // longueur max d'un nom de colonne
     
    493493    }
    494494    int sta2 = 0;
    495     fits_get_coltype(FitsPtr(), colnum, &typecode, &repeat, &colw, &sta2);
     495    fits_get_coltypell(FitsPtr(), colnum, &typecode, &repeat, &colw, &sta2); // $CHECK$ LONGLONG ???fits_get_coltypell
    496496    FitsCheckStatus(sta2, "FitsInOutFile::GetColInfo() Error(2): ");
    497497
     
    608608  CheckFitsPtr(FitsPtr());
    609609  char keyname[FLEN_KEYWORD], comm[FLEN_COMMENT], sval[FLEN_VALUE];
    610   long lval;
     610  LONGLONG lval;
    611611  double dval;
    612612  string s;
     
    621621  case MuTyV::MTVInteger :
    622622    lval = mtv.GetIntPart();
    623     fits_write_key(FitsPtr(), TLONG, keyname, &lval, comm, &status);
     623    fits_write_key(FitsPtr(), TLONGLONG, keyname, &lval, comm, &status);
    624624    break;
    625625  case MuTyV::MTVFloat :
Note: See TracChangeset for help on using the changeset viewer.