@@ -143,13 +143,6 @@ GraphSpectrumPlot.redraw = function () {
143143 GraphSpectrumPlot . draw ( ) ;
144144} ;
145145
146- GraphSpectrumPlot . clearImportedSpectrums = function ( curvesData ) {
147- this . _importedSpectrumsData . length = 0 ;
148- this . _invalidateCache ( ) ;
149- this . _invalidateDataCache ( ) ;
150- GraphSpectrumPlot . draw ( ) ;
151- } ;
152-
153146GraphSpectrumPlot . setOverdraw = function ( overdrawType ) {
154147 this . _overdrawType = overdrawType ;
155148 this . _invalidateCache ( ) ;
@@ -344,7 +337,7 @@ GraphSpectrumPlot._drawPowerSpectralDensityGraph = function (canvasCtx) {
344337 canvasCtx . translate ( LEFT , TOP ) ;
345338 this . _drawGradientBackground ( canvasCtx , WIDTH , HEIGHT ) ;
346339
347- const pointsCount = this . _fftData . psdLength ;
340+ const pointsCount = this . _fftData . fftLength ;
348341 const scaleX = 2 * WIDTH / PLOTTED_BLACKBOX_RATE * this . _zoomX ;
349342 canvasCtx . beginPath ( ) ;
350343 canvasCtx . lineWidth = 1 ;
@@ -367,7 +360,7 @@ GraphSpectrumPlot._drawPowerSpectralDensityGraph = function (canvasCtx) {
367360 canvasCtx . moveTo ( 0 , 0 ) ;
368361 for ( let pointNum = 0 ; pointNum < pointsCount ; pointNum ++ ) {
369362 const freq = PLOTTED_BLACKBOX_RATE / 2 * pointNum / pointsCount ;
370- const y = HEIGHT - ( this . _fftData . psdOutput [ pointNum ] - minY ) * scaleY ;
363+ const y = HEIGHT - ( this . _fftData . fftOutput [ pointNum ] - minY ) * scaleY ;
371364 canvasCtx . lineTo ( freq * scaleX , y ) ;
372365 }
373366 canvasCtx . stroke ( ) ;
@@ -440,10 +433,10 @@ GraphSpectrumPlot._drawLegend = function (canvasCtx, WIDTH, HEIGHT, importedCurv
440433 }
441434}
442435GraphSpectrumPlot . getPSDbyFreq = function ( frequency ) {
443- let freqIndex = Math . round ( 2 * frequency / this . _fftData . blackBoxRate * ( this . _fftData . psdOutput . length - 1 ) ) ;
444- freqIndex = Math . min ( freqIndex , this . _fftData . psdOutput . length - 1 ) ;
436+ let freqIndex = Math . round ( 2 * frequency / this . _fftData . blackBoxRate * ( this . _fftData . fftOutput . length - 1 ) ) ;
437+ freqIndex = Math . min ( freqIndex , this . _fftData . fftOutput . length - 1 ) ;
445438 freqIndex = Math . max ( freqIndex , 0 ) ;
446- return this . _fftData . psdOutput . length ? this . _fftData . psdOutput [ freqIndex ] : 0 ;
439+ return this . _fftData . fftOutput . length ? this . _fftData . fftOutput [ freqIndex ] : 0 ;
447440} ;
448441
449442GraphSpectrumPlot . _drawFrequencyVsXGraph = function ( canvasCtx , drawPSD = false ) {
0 commit comments