Changeset 1239 in Sophya for trunk/SophyaProg/PMixer


Ignore:
Timestamp:
Oct 18, 2000, 10:58:53 PM (25 years ago)
Author:
ansari
Message:

Modifs FITS , Reza 18/10/2000

Location:
trunk/SophyaProg/PMixer
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaProg/PMixer/skymixer.cc

    r1141 r1239  
    286286        << (string)(arg[2]) << endl;
    287287   {
    288      FITS_SphereHEALPix<float> fios2(outgs);
    289      fios2.Write(arg[2]);
     288     FitsOutFile fios(arg[2]);
     289     fios.firstImageOnPrimaryHeader(false); // Use secondary header
     290     fios << outgs ;
    290291   }
    291292   PrtTim("End of WriteFITS ");
     
    446447    ifnm[255] = '\0';
    447448    Matrix mtx;
    448     FITS_TArray<r_8> fios(ifnm, 2);   // $CHECK$ A passer em HDU=2 , Reza 31/7/2000
    449     mtx = fios;
     449    FitsInFile fiis(ifnm);
     450    fiis.firstImageOnPrimaryHeader(false); // Use secondary header HDU=2
     451    fiis >> mtx ;
    450452    double numin = dc.DParam(key, 2, 1.);
    451453    double numax = dc.DParam(key, 3, 9999.);
     
    497499    cout << " Reading Input FITS spectra file " << (string)ifnm << endl;
    498500    Matrix mtx;
    499     FITS_TArray<r_8> fios(ifnm, 2);   // $CHECK$ A passer em HDU=2 , Reza 31/7/2000
    500     mtx = fios;
     501    FitsInFile fiis(ifnm);
     502    fiis.firstImageOnPrimaryHeader(false); // Use secondary header HDU=2
     503    fiis >> mtx ;
    501504    double numin = dc.DParam(key, 2, 1.);
    502505    double numax = dc.DParam(key, 3, 9999.);
  • trunk/SophyaProg/PMixer/tgrsr.cc

    r1141 r1239  
    133133  cout << "\n Writing Matrix NRows= " << mtx.NRows() << "  NCols= "
    134134       << mtx.NCols() << " to FITS file: " << (string)(arg[4]) << endl;
    135   FITS_TArray<r_8> fios(&mtx);
    136   fios.Write(arg[4]);   // $CHECK$ A passer em HDU=2 , Reza 31/7/2000
     135  FitsOutFile fios(arg[4]);
     136  fios.firstImageOnPrimaryHeader(false);  // use secondary header
     137  fios << mtx ;
    137138  PrtTim("End of Matrix->FITS ");
    138139  }
    139140
    140141  if (narg > 5) { // Writing ImageR4 fo FITS file
    141     cout << "wrting ImageR4(" << npt << ", 2) to FITS file: "
     142    cout << "writing ImageR4(" << npt << ", 2) to FITS file: "
    142143         << (string)(arg[5]) << endl;
    143     FITS_TArray<r_4> fios(&img);
    144     fios.Write(arg[5]);
     144    FitsOutFile fios(arg[5]);
     145    fios.firstImageOnPrimaryHeader(true);  // use primary  header
     146    fios << img ;
    145147    PrtTim("End of ImageR4->FITS ");
    146148  }
  • trunk/SophyaProg/PMixer/tgsky.cc

    r1120 r1239  
    109109
    110110  {
    111   FITS_SphereHEALPix<r_4> fios(&sph);
    112   fios.Write(arg[4]);
     111  FitsOutFile fios(arg[4]);
     112  fios.firstImageOnPrimaryHeader(false); // Use secondary header
     113  DVList dvl;
     114  dvl["PDMTYPE"] = "COMPMAP";
     115  dvl.SetComment("PDMTYPE", "Planck Data Model Type");
     116  dvl["SVERSIO"] =  SophyaVersion();
     117  dvl.SetComment("SVERSIO", "Sophya Version");
     118  // fios.DVListIntoPrimaryHeader(dvl);  $CHECK - RZ - GLM 18/10/2000 $
     119  fios << sph;
    113120  cout << "SphereHEALPix<float> written to FITS file " << (string)(arg[4]) << endl;
    114121  PrtTim("End of WriteFITS ");
Note: See TracChangeset for help on using the changeset viewer.