Skip to content

Commit fa3129f

Browse files
committed
SCALE_HEATMAP value is decreased from 1.3 to 1.1, to get same brightness as before
1 parent 3838cf5 commit fa3129f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/graph_spectrum_plot.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,8 @@ GraphSpectrumPlot._drawFrequencyVsXGraph = function (canvasCtx) {
382382

383383
GraphSpectrumPlot._drawHeatMap = function () {
384384
const THROTTLE_VALUES_SIZE = 100;
385-
const SCALE_HEATMAP = 1.3; // Value decided after some tests to be similar to the scale of frequency graph
385+
//The magnitude is greate then seperete Re or Im value up to 1.4=sqrt(2). Therefore the SCALE_HEATMAP is decreased from 1.3 to 1.1
386+
const SCALE_HEATMAP = 1.1; // Value decided after some tests to be similar to the scale of frequency graph.
386387
// This value will be maximum color
387388

388389
const heatMapCanvas = document.createElement("canvas");
@@ -395,7 +396,7 @@ GraphSpectrumPlot._drawHeatMap = function () {
395396
const fftColorScale = 100 / (this._zoomY * SCALE_HEATMAP);
396397

397398
// Loop for throttle
398-
for (let j = 0; j < 100; j++) {
399+
for (let j = 0; j < THROTTLE_VALUES_SIZE; j++) {
399400
// Loop for frequency
400401
for (let i = 0; i < this._fftData.fftLength; i++) {
401402
const valuePlot = Math.round(

0 commit comments

Comments
 (0)