Changeset 900 in Sophya for trunk/SophyaProg/PMixer/extractRS.cc
- Timestamp:
- Apr 13, 2000, 10:06:55 AM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaProg/PMixer/extractRS.cc
r884 r900 19 19 #include "datacards.h" 20 20 #include "fitsioserver.h" 21 21 #include "fitsspherehealpix.h" 22 22 #include "radspecvector.h" 23 23 #include "blackbody.h" … … 28 28 #include "specrespvector.h" 29 29 #include "gaussfilt.h" 30 30 #include "fitstarray.h" 31 31 // ----------------------------------------------------------------- 32 32 // ------------- Function declaration ------------------------------ … … 102 102 try { 103 103 104 FitsIoServer fios; // Our FITS IO Server104 // FitsIoServer fios; // Our FITS IO Server 105 105 char * flnm, buff[90]; 106 106 string key; … … 123 123 TMatrix<float> ings; 124 124 // Opening the file containing the map 125 126 if (printlev > 2)cout << " Processing map's frequency component No " << sk+1 << endl;125 cout << "-------------------" << endl; 126 cout << " Processing map's frequency component No " << sk+1 << endl; 127 127 sprintf(buff, "%d", sk+1); 128 128 key = (string)"RADSPECMAP" + buff; 129 129 130 130 flnm = BuildFITSFileName(dc.SParam(key,0)); 131 if (printlev > 2) cout << " Reading Input FITS map " << (string)flnm << endl; 132 133 fios.load(ings, flnm) ; 131 cout << " Reading Input FITS map " << (string)flnm << endl; 132 FITS_TArray<float> read_input(flnm); 133 ings = (TArray<float>)read_input; 134 134 135 if (printlev > 2) 135 136 { … … 232 233 int randomPix = random*OutputMap.NbPixels(); 233 234 int outpix = random*nbOfPix; 234 OutputMap(i) = outCoeff(outpix) *1.e18;235 OutputMap(i) = outCoeff(outpix); 235 236 } 236 237 … … 256 257 int outPix = random*OutputMap.NbPixels(); 257 258 SourceMap(outPix) = sourceCoeff(i); 258 OutputMap(outPix) = OutputMap(i)+ SourceMap(outPix) *1.E18;259 OutputMap(outPix) = OutputMap(i)+ SourceMap(outPix); 259 260 } 260 261 } … … 287 288 // } 288 289 { 289 FitsIoServer fios;290 fios.save(OutputMap,arg[2]);291 double moy,sig;292 MeanSig(OutputMap.DataBlock(),moy,sig);293 cout << " MeanSig for Output Map - Mean= " << moy << " Sigma= " << sig << endl;294 cout << "Output Map (SphereHEALPix<float>) written to FITS file "295 << (string)(arg[2]) << endl;290 FITS_SphereHEALPix<float> fios2(OutputMap); 291 fios2.Write(arg[2]); 292 double moy,sig; 293 MeanSig(OutputMap.DataBlock(),moy,sig); 294 cout << " MeanSig for Output Map - Mean= " << moy << " Sigma= " << sig << endl; 295 cout << "Output Map (SphereHEALPix<float>) written to FITS file " 296 << (string)(arg[2]) << endl; 296 297 } 297 298 if(printlev>2) PrtTim("End of WriteFITS "); … … 422 423 423 424 if (dc.HasKey(key) ) { // Reading FITS filter file 424 FitsIoServer fios;425 425 char ifnm[256]; 426 426 strncpy(ifnm, dc.SParam(key, 1).c_str(), 255); 427 427 ifnm[255] = '\0'; 428 Matrix mtx(2,10); 429 fios.load(mtx, ifnm); 428 TMatrix<float> mtx(2,10); 429 FITS_TArray<float> read_input(ifnm); 430 mtx = (TMatrix<float>)read_input; 431 430 432 double numin = dc.DParam(key, 2, 1.); 431 433 double numax = dc.DParam(key, 3, 9999.);
Note:
See TracChangeset
for help on using the changeset viewer.