rename tget_spec to be in line with function name
authordrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Tue, 12 Jun 2012 05:09:39 +0000 (05:09 +0000)
committerdrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Tue, 12 Jun 2012 05:09:39 +0000 (05:09 +0000)
git-svn-id: https://svn.code.sf.net/p/freetel/code@544 01035d8c-6547-0410-b346-abe4f91aad63

codec2-dev/octave/tfft_log.m [deleted file]
codec2-dev/octave/tget_spec.m [new file with mode: 0644]
codec2-dev/src/fdmdv.c

diff --git a/codec2-dev/octave/tfft_log.m b/codec2-dev/octave/tfft_log.m
deleted file mode 100644 (file)
index 8936496..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-% tfft_log.m
-%
-% Used in conjunction swith src/fdmdv_demod to test the
-% fdmdv_get_rx_spectrum() function.
-%
-% codec2-dev/src$ ./fdmdv_demod fdmdv_mod.raw tmp.c2 dump.txt
-% octave:3> tfft_log("../src/dump.txt")
-%
-% Copyright David Rowe 2012
-% This program is distributed under the terms of the GNU General Public License 
-% Version 2
-%
-
-function tfft_log(dumpfilename)
-
-  load(dumpfilename);
-
-  [rows cols] = size(rx_spec_log_c);
-  Fs = 8000; low_freq = 0; high_freq = 2500;
-  res = (Fs/2)/cols;
-  st_bin = low_freq/res + 1;
-  en_bin = high_freq/res;
-  xaxis = (st_bin:en_bin)*res;
-
-  f_start = 2; f_end = 100;
-  beta = 0.1;
-
-  av = zeros(f_end, en_bin-st_bin+1);
-  for r=f_start:f_end
-      x = (1-beta)*av(r-1,:) + beta*rx_spec_log_c(r,st_bin:en_bin);
-      av(r,:) = x;
-  end
-
-  % spectrogram (waterfall)
-
-  figure(1)
-  clf;
-  imagesc(av,[-40 0]);
-
-  % animated spectrum display
-
-  figure(2)
-  clf;
-  for r=f_start:f_end
-      plot(xaxis, av(r,:))
-      axis([ low_freq high_freq -40 0])
-      sleep(0.1)
-  end
-endfunction
diff --git a/codec2-dev/octave/tget_spec.m b/codec2-dev/octave/tget_spec.m
new file mode 100644 (file)
index 0000000..e46c1ea
--- /dev/null
@@ -0,0 +1,49 @@
+% tget-spec.m
+%
+% Used in conjunction with src/fdmdv_demod to test the
+% fdmdv_get_rx_spectrum() function.
+%
+% codec2-dev/src$ ./fdmdv_demod fdmdv_mod.raw tmp.c2 dump.txt
+% octave:3> tget_spec("../src/dump.txt")
+%
+% Copyright David Rowe 2012
+% This program is distributed under the terms of the GNU General Public License 
+% Version 2
+%
+
+function tfft_log(dumpfilename)
+
+  load(dumpfilename);
+
+  [rows cols] = size(rx_spec_log_c);
+  Fs = 8000; low_freq = 0; high_freq = 2500;
+  res = (Fs/2)/cols;
+  st_bin = low_freq/res + 1;
+  en_bin = high_freq/res;
+  xaxis = (st_bin:en_bin)*res;
+
+  f_start = 2; f_end = 100;
+  beta = 0.1;
+
+  av = zeros(f_end, en_bin-st_bin+1);
+  for r=f_start:f_end
+      x = (1-beta)*av(r-1,:) + beta*rx_spec_log_c(r,st_bin:en_bin);
+      av(r,:) = x;
+  end
+
+  % spectrogram (waterfall)
+
+  figure(1)
+  clf;
+  imagesc(av,[-40 0]);
+
+  % animated spectrum display
+
+  figure(2)
+  clf;
+  for r=f_start:f_end
+      plot(xaxis, av(r,:))
+      axis([ low_freq high_freq -40 0])
+      sleep(0.1)
+  end
+endfunction
index 2e88d1d4a4cbb79292b871378e418a91d85b03ab..3526e7802a196792ab3ac7295191188a50e2e32c 100644 (file)
@@ -1377,7 +1377,7 @@ void CODEC2_WIN32SUPPORT fdmdv_48_to_8(float out8k[], float in48k[], int n)
   FDMDV_NSPEC.  Note that a 2*FDMDV_NSPEC size FFT is reqd to get
   FDMDV_NSPEC output points. FDMDV_NSPEC must be a power of 2.
 
-  See octave/tfft_log.m for a demo real time spectral display using
+  See octave/tget_spec.m for a demo real time spectral display using
   Octave. This demo averages the output over time to get a smoother
   display: