From: <be...@us...> - 2012-08-05 15:13:40
|
Revision: 10829 http://octave.svn.sourceforge.net/octave/?rev=10829&view=rev Author: benjf5 Date: 2012-08-05 15:13:33 +0000 (Sun, 05 Aug 2012) Log Message: ----------- Updated license information for all functions, more work on lscomplexwavelet. Modified Paths: -------------- trunk/octave-forge/extra/lssa/DESCRIPTION trunk/octave-forge/extra/lssa/inst/cubicwgt.m trunk/octave-forge/extra/lssa/inst/lombcoeff.m trunk/octave-forge/extra/lssa/inst/lscomplex.m trunk/octave-forge/extra/lssa/inst/lscomplexwavelet.m trunk/octave-forge/extra/lssa/inst/lscorrcoeff.m trunk/octave-forge/extra/lssa/inst/lsreal.m trunk/octave-forge/extra/lssa/inst/lsrealwavelet.m trunk/octave-forge/extra/lssa/inst/lswaveletcoeff.m trunk/octave-forge/extra/lssa/src/fastlscomplex.cc trunk/octave-forge/extra/lssa/src/fastlsreal.cc Modified: trunk/octave-forge/extra/lssa/DESCRIPTION =================================================================== --- trunk/octave-forge/extra/lssa/DESCRIPTION 2012-08-05 05:52:09 UTC (rev 10828) +++ trunk/octave-forge/extra/lssa/DESCRIPTION 2012-08-05 15:13:33 UTC (rev 10829) @@ -1,15 +1,15 @@ Name: lssa Version: 0.1.0 Date: 2012-07-28 -Author: Ben Lewis -Maintainer: Ben Lewis +Author: Ben Lewis <be...@gm...> +Maintainer: Ben Lewis <be...@gm...> Title: Least squares spectral analysis Description: A package implementing tools to compute spectral decompositions of irregularly-spaced time series. Currently includes functions based off the Lomb-Scargle periodogram and Adolf Mathias' implementation for R and C (see -URLs). +URLs). Url: http://www.jstatsoft.org/v11/i02 Problems: fast implementations, wavelet functions are currently not functional. Depends: octave (>= 3.4.3) Autoload: no -License: GPLv2+ +License: GPLv3+ Modified: trunk/octave-forge/extra/lssa/inst/cubicwgt.m =================================================================== --- trunk/octave-forge/extra/lssa/inst/cubicwgt.m 2012-08-05 05:52:09 UTC (rev 10828) +++ trunk/octave-forge/extra/lssa/inst/cubicwgt.m 2012-08-05 15:13:33 UTC (rev 10829) @@ -2,7 +2,7 @@ ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software -## Foundation; either version 2 of the License, or (at your option) any later +## Foundation; either version 3 of the License, or (at your option) any later ## version. ## ## This program is distributed in the hope that it will be useful, but WITHOUT Modified: trunk/octave-forge/extra/lssa/inst/lombcoeff.m =================================================================== --- trunk/octave-forge/extra/lssa/inst/lombcoeff.m 2012-08-05 05:52:09 UTC (rev 10828) +++ trunk/octave-forge/extra/lssa/inst/lombcoeff.m 2012-08-05 15:13:33 UTC (rev 10829) @@ -2,7 +2,7 @@ ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software -## Foundation; either version 2 of the License, or (at your option) any later +## Foundation; either version 3 of the License, or (at your option) any later ## version. ## ## This program is distributed in the hope that it will be useful, but WITHOUT Modified: trunk/octave-forge/extra/lssa/inst/lscomplex.m =================================================================== --- trunk/octave-forge/extra/lssa/inst/lscomplex.m 2012-08-05 05:52:09 UTC (rev 10828) +++ trunk/octave-forge/extra/lssa/inst/lscomplex.m 2012-08-05 15:13:33 UTC (rev 10829) @@ -2,7 +2,7 @@ ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software -## Foundation; either version 2 of the License, or (at your option) any later +## Foundation; either version 3 of the License, or (at your option) any later ## version. ## ## This program is distributed in the hope that it will be useful, but WITHOUT Modified: trunk/octave-forge/extra/lssa/inst/lscomplexwavelet.m =================================================================== --- trunk/octave-forge/extra/lssa/inst/lscomplexwavelet.m 2012-08-05 05:52:09 UTC (rev 10828) +++ trunk/octave-forge/extra/lssa/inst/lscomplexwavelet.m 2012-08-05 15:13:33 UTC (rev 10829) @@ -2,7 +2,7 @@ ## ## This software is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software -## Foundation; either version 2 of the License, or (at your option) any later +## Foundation; either version 3 of the License, or (at your option) any later ## version. ## ## This program is distributed in the hope that it will be useful, but WITHOUT @@ -15,7 +15,7 @@ -function transform = lscomplexwavelet( t , x, omegamax, ncoeff, noctave, minimum_window_count, sigma) +function transform = lscomplexwavelet( t , x, omegamax, ncoeff, noctave, minimum_window_count, sigma = 0.05) ## This is a transform based entirely on the simplified complex-valued transform ## in the Mathias paper, page 10. My problem with the code as it stands is, it @@ -37,21 +37,14 @@ window_min = t_min; ## Although that will vary depending on the window. This is just an ## implementation for the first window. - o = current_frequency = maxfreq * 2 ^ ( - octave_iter*coeff_iter / ncoeff ); + omega = current_frequency = maxfreq * 2 ^ ( - octave_iter*coeff_iter / ncoeff ); current_radius = 1 / ( current_octave * sigma ); transform{iter} = zeros(1,current_window_number); win_t = window_min + ( window_step / 2); for iter_window = 1:current_window_number - ## the beautiful part of this code is that if parts end up falling outside the - ## vector, it won't matter (although it's wasted computations.) - ## I may add a trap to avoid too many wasted cycles. - windowed_t = ((abs (T-win_t) < current_radius) .* T); - ## this will of course involve an additional large memory allocation, at least in the short term, - ## but it's faster to do the operation once on the time series, then multiply it by the data series. - zeta = sum( cubicwgt ((windowed_t - win_t) ./ current_radius) .* exp( - i * - o .* windowed_t ) .* X ) / sum( cubicwgt ((windowed_t - win_t ) ./ - current_radius) .* exp ( -i * o .* windowed_t )); + ## Computes the transform as stated in the paper for each given frequency. + zeta = sum ( cubicwgt ( sigma .* omega .* ( T - win_t ) ) .* exp ( -i .* omega .* ( T - win_t ) ) .* X ) / sum ( cubicwgt ( sigma .* omega .* ( T - win_t ) ) .* exp ( -i .* omega .* ( T - win_t ) ) ); transform{iter}(iter_window) = zeta; window_min += window_step ; ## I remain hesitant about this value, since it is entirely possible necessary precision will be lost. Should I try to reduce that? Modified: trunk/octave-forge/extra/lssa/inst/lscorrcoeff.m =================================================================== --- trunk/octave-forge/extra/lssa/inst/lscorrcoeff.m 2012-08-05 05:52:09 UTC (rev 10828) +++ trunk/octave-forge/extra/lssa/inst/lscorrcoeff.m 2012-08-05 15:13:33 UTC (rev 10829) @@ -2,7 +2,7 @@ ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software -## Foundation; either version 2 of the License, or (at your option) any later +## Foundation; either version 3 of the License, or (at your option) any later ## version. ## ## This program is distributed in the hope that it will be useful, but WITHOUT @@ -24,7 +24,7 @@ ## default is cubicwgt if left blank, and its radius is 1, ## as defined as the default for @var{winradius}. ## -## @seealso lswaveletcoeff lscomplexwavelet lsrealwavelet +## @seealso{lswaveletcoeff, lscomplexwavelet, lsrealwavelet} ## ## @end deftypefn Modified: trunk/octave-forge/extra/lssa/inst/lsreal.m =================================================================== --- trunk/octave-forge/extra/lssa/inst/lsreal.m 2012-08-05 05:52:09 UTC (rev 10828) +++ trunk/octave-forge/extra/lssa/inst/lsreal.m 2012-08-05 15:13:33 UTC (rev 10829) @@ -2,7 +2,7 @@ ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software -## Foundation; either version 2 of the License, or (at your option) any later +## Foundation; either version 3 of the License, or (at your option) any later ## version. ## ## This program is distributed in the hope that it will be useful, but WITHOUT @@ -14,7 +14,7 @@ ## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- -## @deftypefn {Function File} {transform =} nureal ( time, mag, maxfreq, numcoeff, numoctaves) +## @deftypefn {Function File} {transform =} lsreal ( time, mag, maxfreq, numcoeff, numoctaves) ## ## Return the real least-squares transform of the time series ## defined, based on the maximal frequency @var{maxfreq}, the @@ -23,6 +23,7 @@ ## pair (c_o, s_o) defining the coefficients which best fit the ## function y = c_o * cos(ot) + s_o * sin(ot) to the (@var{time}, @var{mag}) data. ## +## @seealso{lscomplex} ## @end deftypefn %!shared t, x, o, maxfreq Modified: trunk/octave-forge/extra/lssa/inst/lsrealwavelet.m =================================================================== --- trunk/octave-forge/extra/lssa/inst/lsrealwavelet.m 2012-08-05 05:52:09 UTC (rev 10828) +++ trunk/octave-forge/extra/lssa/inst/lsrealwavelet.m 2012-08-05 15:13:33 UTC (rev 10829) @@ -2,7 +2,7 @@ ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software -## Foundation; either version 2 of the License, or (at your option) any later +## Foundation; either version 3 of the License, or (at your option) any later ## version. ## ## This program is distributed in the hope that it will be useful, but WITHOUT @@ -24,7 +24,7 @@ ## ## Currently non-functional. ## -## @seealso lscomplexwavelet lswaveletcoeff lscorrcoeff +## @seealso{lscomplexwavelet, lswaveletcoeff, lscorrcoeff} ## ## @end deftypefn Modified: trunk/octave-forge/extra/lssa/inst/lswaveletcoeff.m =================================================================== --- trunk/octave-forge/extra/lssa/inst/lswaveletcoeff.m 2012-08-05 05:52:09 UTC (rev 10828) +++ trunk/octave-forge/extra/lssa/inst/lswaveletcoeff.m 2012-08-05 15:13:33 UTC (rev 10829) @@ -2,7 +2,7 @@ ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software -## Foundation; either version 2 of the License, or (at your option) any later +## Foundation; either version 3 of the License, or (at your option) any later ## version. ## ## This program is distributed in the hope that it will be useful, but WITHOUT @@ -25,7 +25,7 @@ ## while @var{winradius} is the windowing radius, and defaults ## to 1 (the radius of cubicwgt.) ## -## @seealso lscorrcoeff lscomplexwavelet lsrealwavelet +## @seealso{lscorrcoeff, lscomplexwavelet, lsrealwavelet} ## ## @end deftypefn Modified: trunk/octave-forge/extra/lssa/src/fastlscomplex.cc =================================================================== --- trunk/octave-forge/extra/lssa/src/fastlscomplex.cc 2012-08-05 05:52:09 UTC (rev 10828) +++ trunk/octave-forge/extra/lssa/src/fastlscomplex.cc 2012-08-05 15:13:33 UTC (rev 10829) @@ -2,7 +2,7 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, @@ -38,8 +38,7 @@ "Return the complex least squares transform of the (@var{time},@var{magnitude}) series\n\ supplied, using the fast algorithm.\n" "\n" -"@seealso{lscomplex}\n" -"@seealso{fastlsreal}\n" +"@seealso{lscomplex, fastlsreal}\n" "\n" "@end deftypefn") { if ( args.length() != 5 ) { Modified: trunk/octave-forge/extra/lssa/src/fastlsreal.cc =================================================================== --- trunk/octave-forge/extra/lssa/src/fastlsreal.cc 2012-08-05 05:52:09 UTC (rev 10828) +++ trunk/octave-forge/extra/lssa/src/fastlsreal.cc 2012-08-05 15:13:33 UTC (rev 10829) @@ -2,7 +2,7 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, @@ -35,8 +35,7 @@ Return the real least-sqaures spectral fit to the (@var{time},@var{magnitude})\n\ data supplied, using the fast algorithm.\n\ \n\ -@seealso{fastlscomplex}\n\ -@seealso{lsreal}\n\ +@seealso{lsreal, fastlscomplex}\n\ @end deftypefn") { if ( args.length() != 5 ) { print_usage(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |