Gitlab is now running v13.9.0 - More info -> here <-

Commit 16a807a8 authored by perdereau's avatar perdereau

Add fits output

parent ee3263e2
......@@ -38,11 +38,16 @@
#include "ppfwrapstlv.h"
#include "fitsioserver.h"
#include "fiosinit.h"
// include lecteur de fichiers visibilites
#include "visip4reader.h"
#include "visp4winreader.h"
//#include "visip4reader.h"
#include "p4autils.h"
#include "p4gnugain.h"
#include "visp4winreader.h"
//--------------------------- Fonctions de ce fichier -------------------
int Usage(bool fglong=false)
......@@ -105,6 +110,10 @@ int main(int narg, const char* arg[])
}
if (outfile.length()<1) outfile = "filtered_"+feedname+".ppf";
string fitsoutfile = params.fitsoutfile_;
if (fitsoutfile.length()>=1) {
fitsoutfile = "!"+fitsoutfile ; // adds '!' ?
}
P4FreqBand fb1(freqmin,0.);
sa_size_t JFmin = fb1.getFirstFreqChannel();
......@@ -219,6 +228,8 @@ int main(int narg, const char* arg[])
cnt++;
if (cnt%params.prtmodulo_ == 0) cout << " filt_blind/Info: processed "<<cnt<<" out of "<< wreader.getTotalNbWindows()<<endl;
}
cout<<" filt_blind : saving results to PPF file "<<outfile<<endl;
cout<<" filt_blind : "<<vtimes.size()<<" samples"<<endl;
POutPersist po(outfile);
......@@ -233,8 +244,23 @@ int main(int narg, const char* arg[])
po << PPFNameTag("TVFilt_Times") << tvtimes;
po << PPFNameTag("TVFilt_Values") << tvmed_chan;
FitsInOutFile * fos = NULL ;
if (fitsoutfile.length()>=1){
cout << " fitsoutfile :" <<fitsoutfile<<":"<< endl;
fos = new FitsInOutFile(fitsoutfile, FitsInOutFile::Fits_Create);
//(*fos)<<vtimes;
//(*fos)<<med_chan;
(*fos)<<tvtimes;
(*fos)<<tvmed_chan;
delete(fos);
}
// resu.Update();
cout << resu; // Update est fait lors du print
}
catch (PException& exc) {
cerr << " filt_blind catched PException " << exc.Msg() << endl;
......
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