Commit baa2cc43 authored by Reza  ANSARI's avatar Reza ANSARI
Browse files

Correction petit bug recuperation bande de frequence de...

Correction petit bug recuperation bande de frequence de P4FreqSelectorFilterMgr et amelioration prints, Reza 15/08/2018
parent 4ebb56ba
......@@ -39,13 +39,14 @@ size_t P4FreqSelectorFilterMgr::addBand(P4FreqBand& fb)
{
v_bands_.push_back( pair<sa_size_t , sa_size_t>(fb.getFirstFreqChannel() , fb.getLastFreqChannel() ) );
weight_bands_.push_back(complex<float>((float)(1./(double)(fb.getLastFreqChannel()-fb.getFirstFreqChannel())), 1.));
v_freqbands_.push_back(fb);
return v_bands_.size();
}
P4FreqBand P4FreqSelectorFilterMgr::getBand(size_t i)
{
if (i >= v_bands_.size()) throw RangeCheckError("P4FreqSelectorFilterMgr::getBand() Out of Range band number");
return P4FreqBand(v_bands_[i].first, v_bands_[i].second);
return v_freqbands_[i];
}
vector< complex<float> > P4FreqSelectorFilterMgr::getAverage( TVector< complex<float> > & vis)
......
......@@ -53,6 +53,7 @@ protected:
// Definition of simple bands, without masked frequencies
std::vector< std::pair<sa_size_t , sa_size_t> > v_bands_;
std::vector< complex<float> > weight_bands_;
std::vector< P4FreqBand > v_freqbands_;
};
......
......@@ -131,7 +131,7 @@ void P4PhaseCor::readFitParamFile(string const & filename)
{
string subs;
iss >> subs;
cout << "Substring: |" << subs << "| cnt "<< cnt << " " << subs.size()<<endl;
//DBG cout << "Substring: |" << subs << "| cnt "<< cnt << " " << subs.size()<<endl;
cnt++;
if (cnt> 2 && subs.size()>0 ) {
double tst;
......@@ -141,7 +141,11 @@ void P4PhaseCor::readFitParamFile(string const & filename)
} while (iss);
cout << "P4PhaseCor::readFitParamFile() Info : parm type "<<sftyp<<" param number= "<< p.size()<<endl;
for (sa_size_t np=0 ; np<p.size() ; np++) cout<<" parm "<<np<<" = "<<p[np]<<endl;
for (sa_size_t np=0 ; np<p.size() ; np++) {
cout<<"P"<<np<<"= "<<p[np];
if ((np>0)&&(np%5==0)) cout<<endl;
else cout<<" ";
}
TVector<double> phases((sa_size_t)P4FreqBand::getP4NbFreqChannels());
......
......@@ -104,16 +104,6 @@ int main(int narg, const char* arg[])
vector<sa_size_t> KVCXHH = visiencod.getAllHCrossCor();
vector<sa_size_t> KVCXVV = visiencod.getAllVCrossCor();
vector<sa_size_t> KVCXHV = visiencod.getAllHVCrossCor();
/*
cout << " List of AutoCorrelation rows:"<<endl;
for(size_t k=0; k<KVAC.size(); k++) {
cout << "KVAC["<<k<<"]="<<KVAC[k]<<" ->"<<visiencod.Convert2VisiName(KVAC[k])<<endl;
}
cout << " List of HH X-cor rows:"<<endl;
for(size_t k=0; k<KVCXHH.size(); k++) {
cout << "KVCXHH["<<k<<"]="<<KVCXHH[k]<<" ->"<<visiencod.Convert2VisiName(KVCXHH[k])<<endl;
}
*/
VisiP4WindowReader wreader(params);
......@@ -198,8 +188,10 @@ int main(int narg, const char* arg[])
arr.Info()["FREQBAND"]=freqbands.getBand(k).getBandwidth();
char buff[32];
sprintf(buff,"vamm_%d",(int)k);
cout << " Writing array for FreqBand="<<freqbands.getBand(k)<< " with name="<<buff<<endl;
po << PPFNameTag(buff) << arr;
}
cout << " Writing TimeVec & RAVec arrays ..."<<endl;
po << PPFNameTag("TimeVec") << timevec ;
po << PPFNameTag("RAVec") << ravec ;
......
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