Commit a8ce40ae authored by perdereau's avatar perdereau
Browse files

add fits output to rdthermrfi

parent 3ea34d2f
......@@ -135,8 +135,8 @@ int main(int narg, const char* arg[])
}
else if (I==deltaIavg) { // Filling TFM maps
TVector<r_4> vac0 = real(visum.Row(0)); // Voie 1 : Thermometre
TVector<r_4> vac1 = real(visum.Row(2)); // Cx Thermometere X RFI
TVector< complex<r_4> > vacX = visum.Row(1); // Voie 2 : RFI
TVector<r_4> vac1 = real(visum.Row(2)); // Voie 2 : RFI
TVector< complex<r_4> > vacX = visum.Row(1); // Cx Thermometere X RFI
for(sa_size_t jy=0; jy<tfmSY; jy++) { // frequency binning
TFM_therm(TFMtmidx, jy) = vac0( Range(jy*TFMfbin, (jy+1)*TFMfbin-1) ).Sum();
TFM_RFI(TFMtmidx, jy) = vac1( Range(jy*TFMfbin, (jy+1)*TFMfbin-1) ).Sum();
......@@ -168,6 +168,47 @@ int main(int narg, const char* arg[])
po<<PPFNameTag("TFM_therm")<<TFM_therm;
po<<PPFNameTag("TFM_RFI")<<TFM_RFI;
po<<PPFNameTag("TFM_ThXRFI")<<TFM_cross;
po << PPFNameTag("TimeVec") << timevec ;
po << PPFNameTag("RAVec") << ravec ;
P4FreqBand myp4fre;
TVector <double> avg_freqs( myp4fre.getP4NbFreqChannels()/TFMfbin);
double frbase = myp4fre.freqstart_ + myp4fre.getP4FreqResolution()/2. ;
for (int kf=0 ; kf< myp4fre.getP4NbFreqChannels()/TFMfbin ; kf++,frbase += myp4fre.getP4FreqResolution()*TFMfbin )
avg_freqs(kf) = frbase ;
po << PPFNameTag("FreqVec") << avg_freqs;
FitsInOutFile * fos = NULL ;
if (fitsoutfile.length()>=1){
vector <string> ext_names;
cout << " fitsoutfile :" <<fitsoutfile<<":"<< endl;
fos = new FitsInOutFile(fitsoutfile, FitsInOutFile::Fits_Create);
ext_names.push_back("TFM_therm");
(*fos) << TFM_therm;
ext_names.push_back("TFM_RFI");
(*fos) << TFM_RFI;
ext_names.push_back("TFM_ThXRFI_R");
(*fos) << real(TFM_cross);
ext_names.push_back("TFM_ThXRFI_I");
(*fos) << imag(TFM_cross);
ext_names.push_back("Frequences");
(*fos)<< avg_freqs ;
ext_names.push_back("RAs");
(*fos)<< ravec;
ext_names.push_back("Times");
(*fos)<< timevec;
cout << " number of objs in fits "<< ext_names.size() << endl;
cout << ext_names << endl;
delete(fos);
}
}
// resu.Update();
cout << resu; // Update est fait lors du print
......
......@@ -445,7 +445,7 @@ int main(int narg, const char* arg[])
cout<<"visiavg/Info: count="<<cnt*wreader.getWindowSize()<<" Visibility Matrices read "<<endl;
// --- Sauvegarde cartes temps-frequence en fits
//FitsABTWriter * fbtw = NULL;
FitsInOutFile * fos = NULL ;
if (fitsoutfile.length()>=1){
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment