Skip to content

Commit

Permalink
clean import from 0.97 stable
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter L. Soendergaard committed May 10, 2010
0 parents commit ba35a71
Show file tree
Hide file tree
Showing 333 changed files with 30,321 additions and 0 deletions.
4 changes: 4 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Peter Soendergaard <ps@elektro.dtu.dk>
Bruno Torresani <Bruno.Torresani@univ-provence.fr>
Peter Balazs <Peter.Balazs@oeaw.ac.at>
Hans G. Feichtinger <hans.feichtinger@univie.ac.at>
7 changes: 7 additions & 0 deletions COPYING
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
This software is licensed under the GPL 3.0 with the possibily to obtain a
commercial license, if you cannot abide by the terms of the GPL.

For the exact terms of the GPL, see the file glp-3.0.txt

If you wish to obtain a commercial license, please contact the authors at
ltfat-help@ltfat.sourceforge.net
105 changes: 105 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
Version 0.97

* Toolbox is now built upon a standalone C library.

*

Version 0.96 12/1 2009 svn no 728
* Matlab MEX compilation now works under Windows. See the
instructions in the INSTALL file.

* Speed optimizations in the C-code used by DGT, DWILT and MDCT
and their inverses.

* New functions DGTREAL and IDGTREAL works with the positive
frequencies of the DGT of real valued signals.

* New functions FFTREAL computes only the positive frequencies of
the FFT of a real valued input signal.

* More systematic naming of functions:
CANDUAL -> GABDUAL
CANTIGHT -> GABTIGHT
MIXDUAL -> GAMIXDUAL
PROJDUAL -> GABPROJDUAL
GFBOUNDS -> GABFRAMEBOUNDS and GABRIESZBOUNDS
TF_ADAPTLASSO -> GABELITISTLASSO
TF_GROUPLASSO -> GABGROUPLASSO

* Reassignment is a method for sharpening the spectrogram. Support
for reassignment is included in the new function REASSIGN and an
easy to use plot RESGRAM.

* Easy to use plot for plotting instantantaneous frequency:
INSTFREQPLOT

* Three different methos for computing instantaneous time and
frequency: INSTTFDGT, INSTTFPHASE and INSTTFABS.

* General speedup of many of the SPREAD* routines based on speedup
in COL2DIAG and more efficient algorithms for sparse matrices.

* COL2DIAG provides the basic coordinate change needed for
efficient implementation of spreading function methods. COL2DIAG
has a C-implementation.

* New function WIL2RECT converts Wilson coefficients from the
standard compact layout to a more loose layout, where the
coefficients are appropriatly placed on the TF-plane. The
rectangular format is welll suited for visualizing Wilson
coefficients.

* The functionality of GFBOUNDS was split into two methods
computing either frame bounds or Riesz basis bounds

* Dynamic range in SGRAM and RESGRAM is now specified by the
'dynrange' parameter instead of previously 'range'.

* greasylong and doppler signals added.

* Periodic Heaviside function added, PHEAVISIDE.

* Simple exponential wave added as EXPMODE.

Version 0.95 6/3 2008 svn no. 595

* DCT based resampling function.

Version 0.94 24/10 2007 svn no. 556

* Numerically stable computation of Hermite functions. Thanks to
Thomasz Hrycak.

* gabmulappr (approximation of an operator by a Gabor multiplier)
now works with fast algorithm.

* group lasso shrinkage and adaptive lasso shrinkage added with an
example (examp_audioshrink)

* Removed all support of lattices in the spreading operator
routines, as this is not practically usefull.

* Special support in candual for windows shorter than the number
of channels.

* The configure style system has been removed. Use ltfatmex instead.

* phaseplot now uses the phaselocked dgt by default.


Version 0.93 10/8 2007 svn no. 504

* Easy compilation of Mex/Octave interfaces by 'ltfatmex' command

* Bug fixed for Wilson bases.

* Better support of choosing an alternative dimension for the
various transforms.

* fmax option added to sgram

* fftresample does Fourier interpolation

* phaseplot changed to always do full STFT

* moved to GPL v 3.0 license
19 changes: 19 additions & 0 deletions Contents.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
% LTFAT - Base routines
%
% Peter L. Soendergaard, 2009 - 2010.
%
% Basic routines
% LTFATSTART - Start the toolbox
% LTFATHELP - Help
% LTFATMEX - Compile Mex/Oct interfaces
% LTFATBASEPATH - Return the base path
% LTFATGETDEFAULTS - Get the default values for a function
% LTFATSETDEFAULTS - Get the default values for a function
% ISOCTAVE - True if interpreter is Octave
%
% Graphical user intefaces
% MULACLAB - Short Time-Fourier transform modification in Matlab
%
% For help, bug reports, suggestions etc. please send email to
% ltfat-help@lists.sourceforge.net

26 changes: 26 additions & 0 deletions INSTALL
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

--------- Running the toolbox --------------------

In Matlab or Octave type "ltfatstart" as the first command from the
installation directory. This will set up the correct paths.

If you issue the command "clear all" you will have to run ltfatstart
again.

In Octave you can put this command in your ~/.octaverc file. In Matlab
you can put this command in your startup.m file. You statup file of
choice should contain some lines like this:

addpath /path/to/ltfat
ltfatstart;

The ltfatstart command will add all the necessary subdirectories (so
please don't add these manually), and it will print a statement
telling you which backend you are currently using.

-------- Compiling the toolbox ------- ------------

- If you wish to use the toolbox with Matlab, see the file INSTALL-Matlab

- If you wish to use the toolbox with Octave, see the file INSTALL-Octave

86 changes: 86 additions & 0 deletions INSTALL-Matlab
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@

-------- Compatibility ----------------------------------

The toolbox should work and compile on all versions of Matlab later than 2007a.

-------- Compiling the MEX interfaces ------------------

LTFAT comes with C Mex interfaces written for all computationally
intensitive function in the toolbox.

To compile the Mex-interfaces, type "ltfatmex" on the Matlab command
prompt. This will compile all the available mex-functions.

The Mex-files links to certain libraries, most importantly to the
LTFAT C-library. In order to compile the Mex-interfaces, you must
first have compiled the C library. If you have downloaded a binary
release for Microsoft Windows, then this library has already been
compiled for you, and you should not need to do anything else.

Currently, lcc is the only supported compiler on Windows, if you use
some variant of Microsoft Visual Studio, the compilation will most
likely fail.

--------- Compiling libltfat on Microsoft windows, 32 bit --------------

By far the easiest option is to download the "ltfat-win32" binary
package from Sourceforge. This package includes a compiled version of
libltfat and FFTW, enough to compile the Matlab interfaces without
install anything else.

If you wish to compile libltfat youself, do the following:

- Download and install Mingw and MSYS from http://www.mingw.org. This
will give you a minimal GNU environment just large enough to compile the library.

- Open an MSYS shell. All the following commands should be typed into the MSYS shell.

- Make sure that 'gcc' is in the path. Type 'which gcc'. You should
get a message that gcc has been found and where it is. If it is not
found, you will need to manually add it to the path. Execute a
command similarly to the following:

export PATH=$PATH:/c/MinGW/bin/

- Change to the ltfat/src/ directory (use the 'cd' command).

- Edit the 'Makefile' using your favorite editor. On of the first
lines of this file is a path to the 'lcclib.exe' program shipped
with Matlab. Make sure this path is correct.

- Type 'make winnomem' to compile the library.

The mex interfaces must be linked to some external libraries, some of
which are shipped with Matlab. However, if you have not downloaded the
binary release, you need to download the binary release of FFTW from
http://www.fftw.org/install/windows.html, and place the two .dll files
in ltfat/mex.

To finally compile the mex-interfaces, you have to type the 'ltfatmex'
command TWICE in the Matlab command window. This is because the system
path needs to be updated, which happens in between the two calls.

--------- Compiling libltfat on Linux ------------------------------------

There is no binary release of libltfat for Linux, so you have to
compile it yourself. Fortunately, this is rather easy:

- Open a terminal, and change to the ltfat/src directory (using 'cd')

- Type 'make unixnomem'

The mex interfaces must be linked to some external libraries, which
are all standard packages in most Linux distributions. This is the
FFTW, LAPACK and BLAS libraries:

- On Redhat / Fedora, install the packages 'fftw-devel',
'lapack-devel' and 'blas-devel' and their dependcies.

- On Debian / Ubuntu, install the packages 'libfftw3-dev',
'libblas-dev' and 'liblapack-dev'.






49 changes: 49 additions & 0 deletions INSTALL-Octave
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@

-------- Compatibility ----------------------------------

The toolbox should work and compile on all versions of Octave later
than version 3.0, but it is generally recommended to upgrade to the
latest stable release of Octave. For demos etc. to work, you will need
to install the Octave-forge packages.

-------- Compiling the Octave interfaces ------------------

LTFAT comes with C++ Octave interfaces written for all computationally
intensitive function in the toolbox.

To compile the Octave interfaces, type "ltfatmex" on the Octave command
prompt. This will compile all the available oct-functions.

For this to work, you will need to install the Octave development
packages (the 'mkoctfile' script must be available).

The oct-files links to certain libraries, most importantly to the
LTFAT C-library. In order to compile the oct-interfaces, you must
first have compiled the C library.

------- Octave on Linux ------ -----------------------------


To compile, install the Octave development package and all its
dependencies. This will also install all necessary libraries and
header files needed for compilation.

* On Fedora / Redhat this package is called "octave-devel"

* On Debian / Ubuntu this package is called "octave-headers"

Install the octave-forge packages to add extra toolboxes available for
Octave.

--------- Compiling libltfat on Linux ------------------------------------

There is no binary release of libltfat for Linux, so you have to
compile it yourself. Fortunately, this is rather easy:

- Open a terminal, and change to the ltfat/src directory (using 'cd')

- Type 'make unixnomem'

------- Octave on Windows -------------------------------------

Octave on Windows is not yet supported.
23 changes: 23 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
To use the toolbox, 'cd' to this directory and execute 'ltfatstart'.

In Octave you can put this command in your ~/.octaverc file.

Directory struture.

The toolbox is organized in subdirectories as follows:

fourier - Basic Fourier analysis and DCT/DST transforms.
gabor - Basic time/frequency analysis and synthesis functions.
sparsereg - Tools for sparse regression of Gabor and Wilson systems.
sigproc - A collection of simple, signal processing tools.
demos - Demos
signals - Test signals for use with the examples.
comp - Computational subroutines.
These should not be called directly.
src - C implementation of the most computationally intensive
routines.
mex - Mex files to speed up the toolbox (if compiled)
oct - Octave C++-files to speed up the toolbox (if compiled)

The file INSTALL contains instructions for compiling the C-library and
the Octave and Matlab interfaces.
68 changes: 68 additions & 0 deletions comp/assert_L.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
function [b,N,L]=assert_L(Ls,Lwindow,L,a,M,callfun)
%ASSERT_L Validate lattice and window size.
% Usage: [b,N,L]=assert_L(Ls,Lwindow,a,M,callfun);
%
% Input parameters:
% Ls : Length of signal (see below).
% Lwindow : Length of window.
% L : Specified length of transform (may be [])
% a : Length of time shift.
% M : Number of modulations.
% callfun : Name of calling function.
% Output parameters:
% b : Length of frequency shift.
% N : Number of translations.
% L : Transform length.
%
% Calculate a minimal transform length, or verify a user specified
% input length.
%
% The routine assumes that a and M has already been checked. use
% assert_squarelat for this.
%
% If the window length is not yet determined, it is safe to pass Lwindow=0

if ~isempty(L)
if (prod(size(L))~=1 || ~isnumeric(L))
error([callfun,': L must be a scalar']);
end;

if rem(L,1)~=0
error([callfun,': L must be an integer']);
end;
end;

% Length of window must be dividable by M.
if rem(Lwindow,M)~=0
error('%s: Length of window must be dividable by M = %i.',...
callfun,M);
end;

if isempty(L)
% Smallest length transform.
Lsmallest=lcm(a,M);

% Choose a transform length larger than both the length of the
% signal and the window.
% The ",1" is to always get a transform of at least Lsmallest
L=ceil(max([Ls,Lwindow,1])/Lsmallest)*Lsmallest;
else

if rem(L,M)~=0
error('%s: The length of the transform must be divisable by M = %i',...
callfun,M);
end;

if rem(L,a)~=0
error('%s: The length of the transform must be divisable by a = %i',...
callfun,a);
end;

if L<Lwindow
error('%s: Window is too long.',callfun);
end;

end;

b=L/M;
N=L/a;
Loading

0 comments on commit ba35a71

Please sign in to comment.