Skip to content

Commit

Permalink
ProcGUI: remove mean on spectrogram
Browse files Browse the repository at this point in the history
  • Loading branch information
chipaudette committed Jun 16, 2014
1 parent 9eb04d2 commit 1e98c8d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Processing_GUI/OpenBCI_GUI/Spectrogram.pde
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ class Spectrogram {
//do the FFT on the data block
float[] localCopy = new float[dataHere.length];
localCopy = Arrays.copyOfRange(dataHere,0, dataHere.length);
float meanVal = mean(localCopy);
for (int I=0; I<localCopy.length;I++) localCopy[I] -= meanVal; //remove mean before doing FFT
localFftData.forward(localCopy);

//convert fft data to uV_per_sqrtHz
Expand Down

0 comments on commit 1e98c8d

Please sign in to comment.