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

Petite correction pour rendre le calcul des bornes (integer) en frequences de...

Petite correction pour rendre le calcul des bornes (integer) en frequences de P4FreqBand plus precis/correcte (conversion float->int) , Reza 26/08/2018
parent 0bab08e0
......@@ -31,8 +31,8 @@ public:
P4FreqBand(double f0=1420., double df=1.)
: f0_(f0), df_(df)
{
jfmin_=(sa_size_t)((f0_-freqstart_-0.5*df_)/deltanufft_);
jfmax_=(sa_size_t)((f0_-freqstart_+0.5*df_)/deltanufft_);
jfmin_=(sa_size_t)((f0_-freqstart_-0.5*df_)/deltanufft_+0.5);
jfmax_=(sa_size_t)((f0_-freqstart_+0.5*df_)/deltanufft_+0.5);
if ((jfmin_<0)||(jfmin_>4095)||(jfmax_<0)||(jfmax_>4095)) {
cout<<"P4FreqBand(f0="<<f0<<" ,df="<<df<<") ERROR -> Out of range (0...4095) jfmin="<<jfmin_<<" jfmax="<<jfmax_<<endl;
throw ParmError("P4FreqBand(f0,df) Out of range (0...4095) jfmin,jfmax");
......
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