[Kst] RE: Kst Digest, Vol 12, Issue 33

Andrew Walker arwalker at sumusltd.com
Wed Apr 28 22:26:49 CEST 2004


No particular reason. But as no memory checks are done
on the allocated arrays it seemed sensible to limit the
size. Or perhaps not. I still believe that at some point
we have to confirm all memory allocations and fail
gracefully where necessary.

Andrew

=============================================

Date: Wed, 28 Apr 2004 15:19:33 -0400
From: Barth Netterfield <netterfield at astro.utoronto.ca>
Subject: Re: [Kst] kdeextragear-2/kst/kst
To: kst at kde.org
Message-ID: <200404281519.33107.netterfield at astro.utoronto.ca>
Content-Type: text/plain;  charset="utf-8"

Are you limiting the psd to 65536 frequency bins?  If so, why?

cbn

On April 28, 2004 03:09 pm, Andrew Walker wrote:
> CVS commit by arwalker:
>
> The KstPSDCurve constructor is not expecting the length of FFT vector, but
> instead its log2(length).
>
>
>   M +5 -1      datawizard.ui.h   1.17
>
>
> --- kdeextragear-2/kst/kst/datawizard.ui.h  #1.16:1.17
> @@ -350,5 +351,8 @@ void DataWizard::finished()
>            name += "'";
>          }
> -        iLength = int(pow(2.0, int(ceil(log(double(xv->length())) /
> log(2))))); +        iLength = int(ceil(log(double(xv->length())) /
> log(2.0))); +        if( iLength > 16 ) {
> +          iLength = 16;
> +        }
>          KstBaseCurvePtr c = new KstPSDCurve(name, xv, 1.0, iLength, "",
> "", KstColorSequence::next()); if (_drawBoth->isChecked()) {
>
>




More information about the Kst mailing list