═══ 1. Introduction ═══ In the last 10 years the physics of chaotic and nonlinear behavior became more and more popular. Many authors and scientists have worked with nonlinear data sets. They have developed many routines to estimate all functions one needs to analyse an unknown system. At this a scientist has no program or an integrated environment which can do all calculations and visualize the results. During the work with nonlinear systems one recognizes that there are a lot of different possibilities to calculate a specific function. The most important question is, which routine is the best for the actual system? The Time Series Analyzer (TSA) is designed to work with nonlinear time series. All routines are tested several times and if a routine seems to be stable it is implemented in the main program. One of the most important problem with nonlinear data sets is the calculation of proper reconstruction parameters like the delay time and the embedding dimension. With the Time Series Analyzer it's possible to calculate these reconstruction parameters automatic. Additionally the Time Series Analyzer is able to plot all functions implemented in various ways like 1D -, 2D-plot, and in real 3D plots (red-green projection). Implemented functions: The following list gives you an overview about all possible calculations: o Autocorrelation o SQ Autocorrelation o PoinacrВ Maps o Correlation Dimension o Prediction Error o Mutual Information o Singular Value Decomposition o Fourier spectrum o Power spectrum o Wavelet spectrum o Lyapunov Bifurcation o Lyapunov Exponents o Kolmogorov Entropy o Solving differential equations by a dynamic Runge-Kutta procedure At this time not all calculations are implemented, but I'm working hard to do this. If you detect a bug in a routine, please contact me either by mail or by e-mail to the following address: Time Series Analyzer is developed by: Wolfgang Reichenbach Gervinusstraсe 55 64287 Darmstadt Phone : W-Germany 06151/424547 E-mail: Wolfgang.Reichenbach@physik.th-darmstadt.de You can get the newest version at o ftp://ftp.physik.th-darmstadt.de o http://www.physik.th-darmstadt.de ═══ 2. Licence Agreement ═══ Grant of Rights Wolfgang Reichenbach grants you the right to use the Software in the quantity indicated on the enclosed Certificate of License. If this Software is an upgrade or trade-up from a previous version of a produkt by Wolfgang Reichenbach, Wolfgang Reichenbach grants you the right to use either the current or prior version of the Software in the quantity indicated on the Certificate and any prior version license is replaced by this Agreement. For a single-user computer or workstation not attached to a network server, the Software is considered "in use" when any portion of the Software is either loaded in memory or virtual memory (Loaded), or stored on a hard disk or other storage (Stored). For single-user computers or workstations attached to a network (Network Stations), the quantity of the Software in use is considered to be the maximum number of Network Stations on which the Software is either Loaded or Stored at any one time. For multi-user computer,a use is counted for every session of the Software running on the computer. Restrictions You may not rent or lease the Software without the written permission of Wolfgang Reichenbach. You may not decompile, disassemble, reverse engineer, copy, create a derivative work, or otherwise use the Software except as stated in this Agreement. Irrespective of the number of sets of media included with the Software, you are granted the rights to use the Software only in the quantity indicated on the Certificate of License. Certain qualifications may apply to the purchase of this Software. These qualifications, if any, are printed on the Software package and when present from part of this Agreement; you must qualify in order to use the Software. Special Provisions You are authorized to create and use an extra copy of the Software on a home or laptop computer, as long as the extra copy is never Loaded at the same time the Software is Loaded on the primary computer on which you use the Software. Special licensing provisions may apply for a qualified educational or charitable institution. Limited Warranty / Limitations of Liability This Software is licensed as is. If any materials or media in this package are defective, return them within 90 days of the original date of purchase, and Wolfgang Reichenbach will replace them at no charge. These Warranties are in lieu of any other warranties, express or implied, including the implied warranties of merchantability and fitness for a particular purpose. In no event will Wolfgang Reichenbach be liable to you for damages, including any loss of profits, lost savings, or other incidental or consequential damages arising out of your use of or inability to use the Software, even if Wolfgang Reichenbach or an authorized Represantative has been advised of the possibility of such damages. Custumer Support Wolfgang Reichenbach will attempt to answer your specific costumer support requests; however, this service is offered to you on a best efforts basis only, and Wolfgang Reichenbach not be able to resolve every support request. Wolfgang Reichenbach supports the Software only so long as it is used under conditions or on operating systems for which the Software was designed. General If any provision of this Agreement shall be unlawful, void, or for any reason unenforceable, then that provision shall be severed from this Agreement and shall not affect the validity and enforceability of any remaining provisions. ═══ 3. Installation ═══ First way: The easiest way is to copy all files in a directory and use the Time Series Analyzer Second way: You can use the installation program INSTALL.CMD to install the files. In addition this program creates a Dekstop folder with all files in it. This feature is optional. Now the Time Series Analyzer uses dynamic link libraries (DLL's). either you can copy it in the same directory as the executable or copy it in a special directory 'DLL', if you do this, you must include this directory in your LIBPATH statement in the CONFIG.SYS file on your boot drive. ═══ 4. File Formats ═══ The Time Series Analyzer reads three different file formats now: o Internal NLD format This is a binary format with an ASCII Header. It is developed to shrink the size of the files. o ASCII format Data ASCII files should contain one data point per line. Lines beginning with # will be treated as comments and ignored. For plots, each data point represents an (x,y, ...) pair. You can load up to 32MB data sets. o WAV Sound files You can record a sound files with your computer and load it. The files must be sampled mono with 11025 kHz. All other sampling rates are not supported. Sorry! Internal File Format NLD The Header Definition is plain ASCII, followed by binary data of the time series and it is easy to implement. ┌────┬──────────────────┬──────────────────────────────────────┐ │ 1 │ SFB_NLD_DA │ Identification String │ ├────┼──────────────────┼──────────────────────────────────────┤ │ 2 │ V1.0 │ Version Number (actual) │ ├────┼──────────────────┼──────────────────────────────────────┤ │ 3 │ ROW │ Compression (not now) │ ├────┼──────────────────┼──────────────────────────────────────┤ │ 4 │ 2048 │ Length of Time Series │ ├────┼──────────────────┼──────────────────────────────────────┤ │ 5 │ Integer n │ Not used now │ ├────┼──────────────────┼──────────────────────────────────────┤ │ 6 │ Dimension d │ Dimension │ ├────┼──────────────────┼──────────────────────────────────────┤ │ 7 │ #% Title Text │ Title String │ ├────┼──────────────────┼──────────────────────────────────────┤ │ 8 │ DOUBLE/8BYTE │ Numberformat (C-Convension) │ ├────┼──────────────────┼──────────────────────────────────────┤ │ 9 │ Samples / sec │ Samples per second │ ├────┼──────────────────┼──────────────────────────────────────┤ │ 10 │ SFB_NLD_BEGIN │ End of Header, Begin of binary data │ └────┴──────────────────┴──────────────────────────────────────┘ The binary data is a hardcopy of the used memory. If you are able to write C-programs: Write the pointer to double (double *)p on disk after the header. ═══ New ═══ New deletes the time series and all calculated functions in memory. You cannot use this command to create a new times series. ═══ Open Time Series ═══ Use Open Time Series to display a window that enables you to choose a Time Series, following these steps. 1. Select the down arrow to the right of the Drive list to display all the drives on your system. 2. Select a drive from the Drive list. 3. Select a directory from the Directory list. 4. Select a file name from the File list or type in a file name. 5. Select the OK pushbutton to load a time series. The Time Series Analyzer reads three different file formats automatic: o Internal NLD format This is a binary format with an ASCII Header. It is developed to shrink the size of the files. o ASCII format Data ASCII files should contain one data point per line. Lines beginning with # will be treated as comments and ignored. For plots, each data point represents an (x,y, ...) pair. You can load up to 32MB data sets. o WAV Sound files You can record a sound files with your computer and load it. The files must be sampled mono with 11025 kHz. All other sampling rates are not supported. Sorry! ═══ Save Time Series ═══ Use Save Time Series to display a window that enables you to choose the functions to save. In addition you can specify the file format (nld or ASCII). If you click on OK you will asked for a filename. ═══ Page Setup ═══ Displays a window to change the size of the plot if you print the actual screen. To change the size of the plot, you can modify the values of width and height. A small preview is displayed. You can print in landscape mode, but you must change the printer settings directly at the printer object on yout desktop. If you are printing in landscape mode, the preview is not displaying this, simply swap width and height. ═══ Print Screen ═══ A Printer dialog is displayed to change the printer. Select a printer and press OK. After this the Time Series Analyzer prints the actual plot on screen. Make all settings on screen and print it. ═══ Charateristic ═══ Displays a windows with some information about the actual loaded time series. o Filename The Name of the time series including drive and path o Length The Length in Points o Dimension The dimension of the actual time series. For embedding you can use only one coordinate of the time series. o Sample time The time steps between to points in seconds. ═══ Exit ═══ Use Exit to end the program. All functions and settings will be lost after this. ═══ About ═══ Time Series Analyzer A graphical environment for chaotic and nonlinear data sets Version 0.96.1129 for OS/2 3.0 Warp copyright by Wolfgang Reichenbach 1994 e-mail: pixies@nlp.physik.th-darmstadt.de ═══ Copy as Bitmap ═══ Copies the actual screen as bitmap into the clipboard. This function is a little bit buggy. Only a black rectangle will appear. ═══ Copy as Metafile ═══ Copies the actual screen as metafile into the clipboard. ═══ Clear the Screen ═══ Clears the actual screen. ═══ Embedding Parameters ═══ Use Embedding parameters to change the delay time and the embedding dimension calculated by the Prediction Error. These new values are used by other routines like Lyapunov Exponents. If the embedding dimension is greater or equal than 3, you can display the embedded attractor. ═══ Calculate a Flow ═══ You can integrate a three dimensional differential equations with a dynamical Runge-Kutta method, following these steps. 1. Edit the three equation in the entryfields without any symbolic constants except x,y,z. 2. Select the Length (Size) of the new time series. 3. Select the time steps for calculation. 4. Select the accuracy witch is used to specify the maximum error. If you want to change the default startup values click MORE. Click OK to integrate the flow. ═══ Startup Values ═══ Use Startup Values to choose the initial values for the dynamic Runge-Kutta method to integrate a flow. ═══ 1D Plot ═══ Plots one coordinate of the time series as a function of the number of points. You can choose the coordinate to plot in this cascade menu. The first three coordinates are listed in the menu, for all others you must spefify it in the displayed window. ═══ 2D Plot ═══ Plots one coordinate against another coordinate of the time series as a function of the number of points. You can choose the coordinates to plot in this cascade menu. The first three posible combinations of coordinates are listed in the menu, for all others you must spefify them in the displayed window. ═══ Real View of Time Series 3D ═══ Plots three dimensional time series as a parametric curve with Red-Green option. You can look at this with a normal Red-Green glass. There are no labels or numeric values in the plot, cause this plot is only for orientation in three dimensional space. ═══ Normal View of Time Series 3D ═══ Plots three dimensional time series as a parametric curve. Three sides of a cube will displayed for orientation. There are no labels or numeric values in the plot, cause this plot is only for orientation in three dimensional space. In addition you can activate a popup menu by clicking the right mousebutton. In this popup menu you can display the three axis (x,y,z) and a shadow projection to the three walls of the cube. ═══ Real View of embedded Time Series 3D ═══ Plots three dimensional embedded time series as a parametric curve with Red-Green option. You can look at this with a normal Red-Green glass. There are no labels or numeric values in the plot, cause this plot is only for orientation in three dimensional space. ═══ Normal View of embedded Time Series 3D ═══ Plots three dimensional embedded time series as a parametric curve. Three sides of a cube will displayed for orientation. There are no labels or numeric values in the plot, cause this plot is only for orientation in three dimensional space. In addition you can activate a popup menu by clicking the right mousebutton. In this popup menu you can display the three axis (x,y,z) and a shadow projection to the three walls of the cube. ═══ Plot Settings ═══ Change the settins of all plots such as linestyles, grids, colors etc. A dialog appears with a notebook in it. On the right side you find all topics to change. These are: Color Change the colors of the lines and/or markers Marker Change the style of the used markers Grids Enables the grid in each plot Lines Change the line thickness RGB Change the Red-Green colors for the 3D Plot in RGB-Mode After you changed the settings, press OK. ═══ 3D Surface ═══ Displays a dialog window to change the viewport of the 3D Plot in RGB-mode or 3D Modelling-mode. Press one the buttons around the circle to change one of the angles in spherical coordinates. Press OK if all changes are all right, if not, press Cancel. This option only can be activated if a 3D plot is already displayed. ═══ Trackball ═══ Use the trackball to rotate the 3D plot in RGB-mode or in 3D Modelling-mode. A white circle around the plot is displayed with two half elipses in it. The point of intersection is the position on a sphere. If you press the left mousebutton and move the mouse, the trackball follows the mouse and calculates the new viewport. If the mousebutton is released, the plot will updated immediately. This option only can be activated if a 3D plot is already displayed. ═══ Preferences ═══ This function displays a dialog window to setup the file management. Yuo can specifiy a path to load the time series and to save the time series and its functions. You can also specify the used filter in the file open dialog. ═══ Perspective ═══ This function displays a dialog box to change the perspective of the 3D plot in RGB Mode. Red-Green-Offset You can change the distance between the red and the green plot. This option is synonymous with the distance of your eyes. Viewport You can also change the main perspective. If the value of the viewport is on its maximum, the plot is a parallel projektion of the cube. This option is synonymous with the distance between you and the cube. ═══ 5. Persistence of Vision Raytracer ═══ Persistence of Vision Raytracer Version 2.0 Basic Information The Persistence of Vision Raytracer creates three-dimensional, photo-realistic images using a rendering technique called ray tracing. It reads in a text file containing information describing the objects and lighting in a scene and generates an image of that scene from the view point of a camera also described in the text file. Ray tracing is not a fast process by any means, but it produces very high quality images with realistic reflections, shading, perspective, and other effects. The POV-Ray package includes detailed instructions on using the raytracer and creating scenes. Many stunning scenes are included with POV-Ray so you can start creating images immediately when you get the package. These scenes can be modified by the user also so they don't have to start from scratch. In addition to the pre-defined scenes are a large library of predefined shapes and materials that can be used in your own scenes by just typing the name of the shape or material. POV-Ray is easy to use, and also includes many advanced features like bezier patches, blobs, height-fields, bump mapping, and material mapping. POV-Ray can be used on IBM-PC and compatibles, Apple Macintoshes, Commodore Amiga's, UNIX, and other computers. POV-Ray is based on DKBTrace 2.12 by David K. Buck and Aaron A. Collins. The POV-Team is a collection of volunteer programmers, designers, animators and artists meeting via electronic mail on Compuserve's GRAPHDEV forum, sections 8 (POV Sources), and 9 (POV Images). (GRAPHDEV is also the home of the very popular Fractint and its authors the Stone Soup Group.) ═══ 6. Rexx Program ═══ The Time Series Analyzer supports the REXX macro language of OS/2 2.x. You can write your own macros using all legal Rexx commands and some additional commands added by the Time Series Analyzer. Some sample programs are shipped with the main program. For more information about writing REXX programs see also in the online information files shipped with OS/2 and Macro Reference. Use REXX Program to display a window to select a Rexx program. This program starts immediately after pressing the OK-button. ═══ 7. Mathmatical Theory ═══ In this section all routines will be explained. All implemented routines are either specially developed and/or copied from "Numerical recipes in C". For more information see at the "recipes". All routines are developed for automatic calculation, but some routines require initial conditions. These routines will redeveloped for automatic use. ═══ 7.1. Autocorrelation ═══ The autocorrelation function measures the correlation between subsequent signals. It remains constant or oscillates for regular motion and decays rapidly (mostly with an exponential tail) if the signal (time series) become uncorrelated in the chaotic regime. It should be noted that the power spectrum P(w) is proportional to the Fourier transformation of the autocorrelation function. In this implementation the autocorrelation uses the Fast Fourier Transformation. Initial conditions There are no initial conditions to calculate the autocorrelation. If a time series is loaded with more than one dimension (e.g. 3D like Roessler), this routine calculates for all dimensions the autocorrelation seperatly. Results The result is a one dimensional function for each loaded dimension. The first minimum or the first zero value can used as a proper dealy time for the reconstruction of the attractor. Relase Notes At this time the autocorrelation is finished. Later you can get an exact value from the plot screen simply by moving the mouse pointer. ═══ 7.2. Quadratic Autocorrelation Function ═══ At this time there is no detailed information avaible to describe this routine, because it's very new and nobody know's something to do with it. In future, perhaps, we will find something interesting. Let's hope ! ═══ 7.3. Correlation Dimension ═══ Dissipative dynamical systems which exhibit chaotic behavior often have an attractor in phase space which is strange. Strange attractors are typically characterized by a fractal dimension D which is smaller than the number of degrees of freedom F, D 0 A small perturbation of the initial conditions can grow to chaotic motion. 2. l(i) = 0 The system is regular with any sign of deterministic chaos. The orbit is periodic. 3. l(i) < 0 The system is growing to a fixpoint Release Notes This algorithmn approximates the matrix of the linearized flow (local Jacobian) and it based on a work by J. Holzfuss and W. Lauterborn. This routine is stable and automatic. This is Version 1.1 ═══ 7.10. Kolmogorov Entropy ═══ The Kolmogorov entropy of an attractor can be considered as a measure for the rate of information loos along the attractor or as a measure for the degree of predictability of points along the attractor given an (arbitrary) inital point. The calculation is based on a work by [Schouten, Takens,van den Bleek] Initial conditions There are no initial conditions to calculate the Kolmogorov entropy. Results In general, a positive, finite entropy is considered as the conclusive proof that the time series and its underlying dynamic phenomenon are chaotic. A zero entropy represents a constant ro regular, cylic phenomenon that can be represented in the state space by a fixed point, a perodic attractor, or a multiperiodic attractor. An infinite entropy refers to a stochastic, nondeterministic phenomenon. Release Notes This is one of the first implementation in this enviroment. At this time there are two known problems: 1. The entropy function can't be exactly zero. This is a problem of the numerical calculation. 2. The actual calculation uses the standard derivation as initial distance. Problems can occur if this value is too big for the actual time series. I hope I can solve this problems during my work. ═══ 7.11. Lyapunov Bifurcation ═══ The Lyapunov Bifurcation is designed to show the accuracy of the previous calculated Lyapunov exponents, cause the results are instable in case of short time series as a result of different initial conditions or startup values. This method takes 50 different windows over the time series and calculates the Lyapunov exponents of each window. Each horizontal line of the displayed picture is the evolution of the Lyapunov exponent in time. The exponents are coded in colors displayed at the top of the picture. Initial conditions There are no initial conditions to calculate the Lyapunov Bifurcation. Results If there are only vertical lines of the same color then the Lyapunov exponents are stable in time with different initial conditions, if not there is no chance to calculate the exponents more exact. Release Notes This is a new method to test the results of the Lyapunov exponents calculation. Test and enjoy it. This is Version 1.0 ═══ 8. Macro Reference ═══ The Time Series Analyzer supports the REXX macro language of OS/2 2.x. You can write your own macros using all legal Rexx commands and some additional commands added by the Time Series Analyzer. Some sample programs are shipped with the main program. For more information about writing REXX programs see also in the online information files shipped with OS/2. The following list decribes all new commands supported by the Time Series Analyzer. REXX Commands grouped alphabetically REXX Commands grouped by category ═══ REXX Commands grouped alphabetically ═══ Commands grouped alphabetically A - F G - L M - Z ═══ REXX Commands A - F ═══ AddSpecialPoints CalcAutocorrelation CalcCorrelationDim CalcFillFactor CalcKolmogorov CalcLyapunov CalcLyapunovBifurcation CalcMutalInformation CalcPredictionError CalcSingularValues CalcWavelet CopyOutput ═══ REXX Commands G - L ═══ GetAcfMin GetCorrelationDim GetDelay GetEmbeddingDim GetEntropyValues GetLyapunovExponents GetTsDim GetTsLength GetViewport LoadTs ═══ REXX Commands M - Z ═══ Plot1D Plot3D PlotAcf PlotFunction PrintScreen Query SaveMetaFile SaveOutput SaveTs SetDelay SetLabelText SetTitleText SetTsLength SetTsOffset SetViewport ShowSpecialPoints SetEmbeddingDim UpdateScreen VisualMode ═══ Commands grouped by category ═══ Commands grouped by category Nonlinear functions Direct manipulation Functions Plot and Graphic Functions File Management Functions ═══ Nonlinear Functions ═══ AddSpecialPoints CalcAutocorrelation CalcCorrelationDim CalcFillFactor CalcKolmogorov CalcLyapunov CalcLyapunovBifurcation CalcMutalInformation CalcPredictionError CalcSingularValues CalcWavelet ═══ Direct Manipulation Functions ═══ GetAcfMin GetCorrelationDim GetDelay GetEmbeddingDim GetEntropyValues GetLyapunovExponents GetTsDim GetTsLength Query SetDelay SetTsLength SetTsOffset ═══ File Management Functions ═══ CopyOutput LoadTs SaveOutput SaveTs SetEmbeddingDim ═══ Graphic Functions ═══ GetViewport Plot1D Plot3D PlotAcf PlotFunction PrintScreen SaveMetaFile SetLabelText SetTitleText SetViewport ShowSpecialPoints UpdateScreen VisualMode ═══ 8.1. AddSpecialPoints ═══ Calculates special points from the actual loaded time series. Syntax AddSpecialPoints( szType, Index ) szType specifies the kind of special value. It can be one of the following values: CENTRE_OF_GRAVITY is the centre of gravity Index is an Indexnumber in the list of special points. This value can be ranged from 1 to 5. Return Value The function returns: 0 - if the calculation sucessfull ended. 1 - if an error occured. Example Say 'Plotting the time series in real 3D view' if rc = 0 then Say 'sucessfully ended' else Say 'An Error occured' rc = AddSpecialPoints('CENTRE_OF_GRAVITY',1) rc = ShowSpecialPoints( 'ON' ) rc = Plot3D( '3D' ) See also Plot3D ShowSpecialPoints ═══ 8.2. CalcAutocorrelation ═══ Calculates the autocorrelation of the actual time series. This function can be called every time a time series is loaded. Syntax CalcAutocorrelation() Return Value The function returns: 0 - if the calculation sucessfull ended. 1 - if an error occured. Example Say 'Calculating the autocorrelation' rc = CalcAutocorrelation() if rc = 0 then Say 'sucessfully ended' else Say 'An Error occured' See also CalcCorrelationDim CalcFillFactor CalcKolmogorov CalcLyapunov CalcMutalInformation CalcPredictionError CalcSingularValues CalcWavelet GetAcfMin ═══ 8.3. CalcCorrelationDim ═══ Calculates the Correlation integral and the Correlationdimension of the actual time series. For this function a proper delay time and embedding dimension is required. Syntax CalcCorrelationDim() Return Value The function returns: 0 - if the calculation sucessfull ended. 1 - if an error occured. Example Say 'Calculating the Correlation dimension' rc = CalcPredictionError() if rc = 0 then rc = CalcCorrelationDim() if rc = 0 then Say 'OK' else Say 'Error' See also CalcAutocorrelation CalcFillFactor CalcKolmogorov CalcLyapunov CalcMutalInformation CalcPredictionError CalcSingularValues CalcWavelet ═══ 8.4. CalcFillFactor ═══ Calculates the Fill Factor of the actual time series. This function can be called every time a time series is loaded. Syntax CalcFillFactor( nCol, ndim_E_max, nPercent ) nCol specifies the colomn (coordinate) of the time series, the fill factor routine uses for calculation. ndim_E_max describes the max. embedding dimension nPercent are used for calculation If you call this function without parameter, the Time Series Analyzer will show the fill factor dialogbox. Return Value The function returns: 0 - if the calculation sucessfull ended. 1 - if an error occured. Example Say 'Calculating the Fill Factor automatic' rc = CalcFillFactor(1,20,10) if rc = 0 then Say 'Sucessfully ended' else Say 'Error!' Say 'Calculating the Fill Factor mamually' rc = CalcFillFactor() if rc = 0 then Say 'Sucessfully ended' else Say 'Error!' See also CalcAutocorrelation CalcCorrelationDim CalcKolmogorov CalcLyapunov CalcMutalInformation CalcPredictionError CalcSingularValues CalcWavelet ═══ 8.5. CalcKolmogorov ═══ Calculates the Kolmogorov Entropy of the actual time series. For this function a proper delay time and embedding dimension is required. Syntax CalcKolmogov() No parameters used. Return Value The function returns: 0 - if the calculation sucessfull ended. 1 - if an error occured. Example Say 'Calculating the Kolmogorov Entropy' rc = CalcPredictionError() if rc = 0 then rc = CalcKolmogorov() if rc = 0 then Say 'Sucessfully ended' else Say 'Error!' See also CalcAutocorrelation CalcCorrelationDim CalcFillFactor CalcLyapunov CalcMutalInformation CalcPredictionError CalcSingularValues CalcWavelet GetEntropyValues ═══ 8.6. CalcLyapunov ═══ Calculates the Lyapunov exponents of the actual loaded time series. For this function a proper delay time and embedding dimension is required. Syntax CalcLyapunov() Return Value The function returns: 0 - if the calculation sucessfull ended. 1 - if an error occured. Example Say 'Calculating the Lyapunov Exponents' rc = CalcPredictionError() if rc = 0 then rc = CalcLyapunov() if rc = 0 then Say 'Calculation sucessfull' else Say 'Error occured' See also CalcAutocorrelation CalcCorrelationDim CalcFillFactor CalcKolmogorov CalcMutalInformation CalcPredictionError CalcSingularValues CalcWavelet ═══ 8.7. CalcLyapunovBifurcation ═══ Calculates the Lyapunov Bifurcation of the actual loaded time series. For this function a proper delay time and embedding dimension is required. Syntax CalcLyapunovBifurcation() Return Value The function returns: 0 - if the calculation sucessfull ended. 1 - if an error occured. Example Say 'Calculating the Lyapunov Bifurcation' rc = CalcPredictionError() if rc = 0 then rc = CalcLyapunovBifurcation() if rc = 0 then Say 'Calculation sucessfull' else Say 'Error occured' See also CalcLyapunov ═══ 8.8. CalcMutalInformation ═══ Calculates the Mutual Information of the actual time series.This function can be called every time a time series is loaded. Syntax CalcMutualInformation( nlowdelay, nhighdelay, npts, nrand ) nlowdelay is the smallest delay time for calculation nhighdelay is the highest delay time for calculation npts specifies the number of used points for calculation nrand is the number of used random points If you call this function without any parameter the Dialog Box of the Mutual Information appears. Return Value The function returns: 0 - if the calculation sucessfull ended. 1 - if an error occured. Example Say 'Automatic calculation of the mutual information' rc = CalcMutualInformation(1,20,204, 204) if rc = 0 then Say 'Calculation sucessfull' else Say 'Error occured' Say 'Manual calculation of the mutual information' rc = CalcMutualInformation() if rc = 0 then Say 'Calculation sucessfull' else Say 'Error occured' See also CalcAutocorrelation CalcCorrelationDim CalcFillFactor CalcKolmogorov CalcLyapunov CalcPredictionError CalcSingularValues CalcWavelet ═══ 8.9. CalcPredictionError ═══ Calculates the Prediction Error of the actual loaded time series. This function can be called every time a time series is loaded. Syntax CalcPredictionError() Return Value The function returns: 0 - if the calculation sucessfull ended. 1 - if an error occured. Example Say 'Calculating the Prediction Error' rc = CalcPredictionError() if rc = 0 then Say 'Calculation sucessfull' else Say 'Error occured' See also CalcAutocorrelation CalcCorrelationDim CalcFillFactor CalcKolmogorov CalcLyapunov CalcMutalInformation CalcSingularValues CalcWavelet GetAcfMin GetDelay GetEmbeddingDim ═══ 8.10. CalcSingularValues ═══ Calculates the Singular Values Decomposition of the actual time series.This function can be called every time a time series is loaded. Syntax CalcSingularValues( ndelay, ndim_E, npts ) ndelay specifies the used delay time ndim_E is the highest embedding dimension npts specifies the number used points for the calculation If you call this function without any parameter the Dialog Box of the Singular Value Decomposition appears. Return Value The function returns: 0 - if the calculation sucessfull ended. 1 - if an error occured. Example Say 'Automatic calculation of the Singular values' rc = CalcSingularValues(1,20,204) if rc = 0 then Say 'Calculation sucessfull' else Say 'Error occured' Say 'Manual calculation of the Singular values' rc = CalcSingularValues() if rc = 0 then Say 'Calculation sucessfull' else Say 'Error occured' See also CalcAutocorrelation CalcCorrelationDim CalcFillFactor CalcKolmogorov CalcLyapunov CalcMutalInformation CalcPredictionError CalcWavelet ═══ 8.11. CalcWavelet ═══ Calculates the Wavelet spectrum of the actual time series. This function can be called every time a time series is loaded. Syntax CalcWavelet() Return Value The function returns: 0 - if the calculation sucessfull ended. 1 - if an error occured. Example Say 'Calculating the wavelet spectrum' rc = CalcWavelet() if rc = 0 then Say 'Calculation sucessfull' else Say 'Error occured' See also CalcAutocorrelation CalcCorrelationDim CalcFillFactor CalcKolmogorov CalcLyapunov CalcMutalInformation CalcPredictionError CalcSingularValues ═══ 8.12. CopyOutput ═══ This function copies the contents of the REXX output dialogbox into the clipboard. This function is the same as pressing the Copy button in the REXX Dialogbox. Syntax CopyOutput() Return Value The functions returns 0 - if the contents are copied. 1 - if an error occured. Example Say 'Calculating the Prediction Error' rc = CalcPredictionError() if rc = 0 then Say 'Calculation sucessfull' else Say 'Error' rc = CalcCorrelationDim() TextDim = GetCorrelationDim() AttractorDim = Word(TextDim,1) Error = Word(TextDim,2) Say 'The attractor Dimension is ' AttractorDim Say 'The error is ' Error rc = CopyOut() See also SaveOutput VisualMode ═══ 8.13. GetAcfMin ═══ This function returns different values from the autocorrelation. These returned values can be used for alternativ delay times. Syntax GetAcfMin( MinFlag, IndexFlag ) MinFlag is used as a switch to specify the return value. 1 returns the first minimum 2 returns a value nearest to exp(-1) 3 returns the first root value if not exactly exits IndexFlag is an input value which specifies the returned value 0 The returned value is the exact value of the minimum 1 The returned value is the index of the minimum Return Value The function returns 0 - if an error occured. x - The value x of the minimum. Example Say 'Calculating the Autocorrelation' rc = CalcAutocorrelation() if rc = 0 then Say 'Sucessfull' else Say 'Error' RelMin = GetAcfMin( 1, 0) ExpMin = GetAcfMin( 2, 0) NulMin = GetAcfMin( 3, 0) Say 'The first Minimum is ' RelMin Say 'The value of the 1/exp(1) Minimum is ' ExpMin Say 'The first root value ' NulMin See also CalcAutocorrelation CalcPredictionError GetDelay ═══ 8.14. GetCorrelationDim ═══ This function returns the correlation dimension as referenced by Grassberger and Procaccia. This function returns also the standard derivation from fitting the dimension. Both values are returned in one string seperated by a single space. Syntax GetCorrelationDim() Return Value The functions returns 0 - if an error occured. d - the actual used correlation dimension D(2) and the error. Example Say 'Calculating the Prediction Error' rc = CalcPredictionError() if rc = 0 then Say 'Calculation sucessfull' else Say 'Error' rc = CalcCorrelationDim() TextDim = GetCorrelationDim() AttractorDim = Word(TextDim,1) Error = Word(TextDim,2) Say 'The attractor Dimension is ' AttractorDim Say 'The error is ' Error See also CalcCorrelationDim CalcPredictionError ═══ 8.15. GetDelay ═══ This function is used to get the actual used delay time. You can get either the used delay or the recommended delay calculated by the Prediction Error. Syntax GetDelay( Flag ) Flag specifies the returned delay time 0 specifies the used delay 1 specifies the recommended delay time Return Value The function returns 0 - if an error occured. n - The actual used delay time n. Example Say 'Calculating the Prediction Error' rc = CalcPredictionError() if rc = 0 then Say 'OK' else Say 'Error' delay = GetDelay( 0 ) Say 'The used delay is ' delay See also CalcAutocorrelation CalcPredictionError GetAcfMin GetEmbeddingDim ═══ 8.16. GetEmbeddingDim ═══ This function returns the used or the recommended embedding dimension calculated by the Prediction Error. Syntax GetEmbeddingDim( Flag ) Flag specifies the returned embedding dimension 0 specifies the used dimension 1 specifies the recommended dimension Return Value The functions returns 0 - if an error occured. d - the actual used embedding dimension d. Example Say 'Calculating the Prediction Error' rc = CalcPredictionError() if rc = 0 then Say 'Calculation sucessfull' else Say 'Error' dim_E = GetEmbeddingDim( 0 ) Say 'The used embedding dimension is ' dim_E See also CalcAutocorrelation CalcPredictionError GetAcfMin GetDelay ═══ 8.17. GetEntropyValues ═══ This function returns three values from the calculated Kolmogorov Entropy. These values are the exact entropy itself, the standard derivation from the entropy and the standard derivation of the entropy calculated from the calculation. Syntax GetEntropyValues( ValueID ) ValueID specifies the value to return. Possible Number are valid 0 specifies the exact entropy 1 is the standard derivation from entropy 2 is the standard derivation from calculation Return Value The function returns the specified value Example Say 'Loading a time series' rc = LoadTs('C:\math\lorenz.ts.nld') rc = CalcPredictionError() rc = CalcKolmogorov() ke = GetEntropyValues(0) stke = GetEntropyValues(1) st = GetEntropyValues(2) Say 'The entropy is K = ' ke Say 'The standard derivation sigma(K) = ' stke Say 'The standard derivation from calculation sigma = ' st See also CalcKolmogorov ═══ 8.18. GetLyapunovExponents ═══ This function returns for each embedding dimension the corresponding Lyapunov exponent. Syntax GetLyapunovExponents() Return Value The function returns all Lyapunov exponents in a string seperated by a blank. Example Say 'Loading a time series' rc = LoadTs('C:\math\lorenz.ts.nld') rc = CalcPredictionError() rc = CalcLyapunov() lambda = GetLyapunovExponents() Say 'The Lyapunov exponents are' Say lambda See also CalcLyapunov ═══ 8.19. GetTsDim ═══ This function returns the dimension of the actual loaded time series. Syntax GetTsDim() Return Value The function returns 0 - if an error occured. n - the actual dimension n of the loaded time series. Example Say 'Displays the dimension of the time series' dim = GetTsDim() Say 'Dimension = ' dim See also GetTsLength ═══ 8.20. GetTsLength ═══ This function returns the length of the actual loaded time series. Syntax GetTsLength() Return Value The function returns 0 - if an error occured. n - The length n of the time series. Example Say 'Display the length of the time series' length = GetTsLength() Say 'Length = ' dim See also GetTsDim ═══ 8.21. GetViewport ═══ This function is used to get the actual used angle in 3D view to plot the attractor. You can get either the xy angle with rotation axis z or the rotation angle to the front. Syntax GetViewport( Flag ) Flag specifies the returned angle 0 specifies the xy angle phi 1 specifies the angle theta Return Value The function returns 0 - if an error occured. n - The actual used angle alpha. Example phi = GetViewport( 0 ) theta = GetViewport( 1 ) Say 'The used angles are ' phi ' and ' theta See also SetViewport Plot3D ═══ 8.22. LoadTs ═══ Load a new time series from the harddisk or floppy drive. All functions are killed from memory. Syntax LoadTs( szName ) szName is the complete filename including drive and path. If this called without parameter this function displays a filedialog. Return Value The function returns: 0 - if the calculation sucessfull ended. 1 - if an error occured. Example Say 'Loading a time series' rc = LoadTs('C:\math\lorenz.ts.nld' Say 'Calculating the autocorrelation' rc = CalcAutocorrelation() if rc = 0 then Say 'sucessfully ended' else Say 'An Error occured' See also SaveTs ═══ 8.23. Plot1D ═══ This function displays a 1-dimensional plots of the loaded time series. Syntax Plot1D( CoordinateID) CoordinateID specifies the displayed coordinate. Possible numbers are 1 - 3. For all other vou must use the user difined Plot Routine. Return Value The function returns 0 if the plot is displayed 1 if an error occured Example Say 'Loading a time series' rc = LoadTs('C:\math\lorenz.ts.nld') Say 'Plot the first coordinate of the time series' rc = Plot1D( 1 ) See also LoadTs ═══ 8.24. Plot3D ═══ This function displays a 3-dimensional plot of the loaded time series. Syntax Plot1D( SwitchFlag ) SwitchFlag specifies the 3D-mode to display. Possible values are '3D' with Red-Green-Offset or 'MODELL' without Red-Green-Offset. Return Value The function returns 0 if the plot is displayed 1 if an error occured Example Say 'Loading a time series' rc = LoadTs('C:\math\lorenz.ts.nld') Say 'Plot the time series in real 3D' rc = Plot3D( '3D' ) See also LoadTs Plo1D ═══ 8.25. PlotAcf ═══ This function displays the autocorrelation function of the loaded time series. Syntax PlotAcf( CoordinateID) CoordinateID specifies the displayed coordinate. Possible numbers are 1 - 3. Return Value The function returns 0 if the plot is displayed 1 if an error occured Example Say 'Loading a time series' rc = LoadTs('C:\math\lorenz.ts.nld') rc = CalcAutocorrelation() Say 'Plot the autocorrelation of the first coordinate' rc = PlotAcf( 1 ) See also LoadTs CalcAutocorrelation ═══ 8.26. PlotFunction ═══ This function displays a calculated function of the loaded time series like the Prediction Error. Syntax PlotFunction( FunctionID ) FunctionID specifies the displayed function. Possible numbers are ID Function 2 Autocorrelation 4 Kolmogorov Entropy 8 Fill Factor 16 Prediction Error 32 Mutual Information 64 Singular Value Decomposition 128 Fouriertransformation 256 Wavelet Spectrum 512 Lyapunov Exponents 1024 Quadratic Autocorrelation 2048 Correlationsintegral 4096 Correlation Dimension 8192 Lyapunov Bifurcation Return Value The function returns 0 if the plot is displayed 1 if an error occured Example Say 'Loading a time series' rc = LoadTs('C:\math\lorenz.ts.nld') rc = CalcPredictionError() Say 'Plot the Prediction Error' rc = PlotFunction( 16 ) See also Plot1D Plot3D ═══ 8.27. PrintScreen ═══ This function prints the actual window on the standard printer. Syntax PrintScreen() Return Value The function returns 0 if the plot is displayed 1 if an error occured Example Say 'Loading a time series' rc = LoadTs('C:\math\lorenz.ts.nld') Say 'Plot the first coordinate of the time series' rc = Plot1D( 1 ) rc = PrintScreen() Plot1D ═══ 8.28. Query ═══ This function displays a message box with a specified prompt, an edit box for the user to enter string data to be sent back to the macro, and OK and Cancel buttons. You can use Query to request information from the user. Syntax Query( MessageText, PromptText ) MessageText is a string passed as a prompt to the user. The Time Series Analyzer accepts a maximum of 80 characters. However, the number of characters that actually display depends on the font used for dialog boxes. PromptText is optional parameter that is displayed in the edit field as a default. Return Value The string typed by the user. Null string ("") if the user does not type anything. If the user chooses Cancel instead of OK, the macro returns also the Null string. Example Say 'Loading a time series' Name = Query('Name of time series to load :') rc = LoadTs(Name) Say 'Plot the first coordinate of the time series' rc = Plot1D( 1 ) rc = PrintScreen() ═══ 8.29. SaveMetaFile ═══ This function saves the actual screen as a metafile on disk. Syntax SaveMetaFile( Name ) Name specifies the filename of the metafile Return Value The function returns 0 if the screen is saved 1 if an error occured Example Say 'Loading a time series' rc = LoadTs('C:\math\lorenz.ts.nld') Say 'Plot the first coordinate of the time series' rc = Plot1D( 1 ) rc = SaveMetaFile('Picture.met') Plot1D ═══ 8.30. SaveOutput ═══ This function saves the contents of the REXX output dialogbox to disk in the actual directory. This function is the same as pressing the Save button in the REXX Dialogbox. The filename is 'TSA.LOG' Syntax SaveOutput() Return Value The functions returns 0 - if the contents are saved. 1 - if an error occured. Example Say 'Calculating the Prediction Error' rc = CalcPredictionError() if rc = 0 then Say 'Calculation sucessfull' else Say 'Error' rc = CalcCorrelationDim() TextDim = GetCorrelationDim() AttractorDim = Word(TextDim,1) Error = Word(TextDim,2) Say 'The attractor Dimension is ' AttractorDim Say 'The error is ' Error rc = SaveOut() See also CopyOutput VisualMode ═══ 8.31. SetLabelText ═══ This function is used to change the xy labeltext of the actual plot. To see the changes you must call UpdateScreen(). Syntax SetLabelText( Flag, LabelText ) Flag specifies the labeltext to change 0 specifies the x labeltext 1 specifies the y labeltext LabelText is the new Text for the specified axis. Return Value The function returns 0 - if the labeltext is changed 1 - if an error occured. Example rc = Plot1D( 0 ) rc = SetLabelText(0,'The x axis') rc = SetLabelText(1,'The y axis') rc = UpdateScreen() See also SetTitleText ═══ 8.32. SetTitleText ═══ This function is used to change the titletext of the actual plot. To see the changes you must call UpdateScreen(). Syntax SetTitleText( TitleText ) TitleText is the new Titletext for the actual plot. Return Value The function returns 0 - if the titletext is changed 1 - if an error occured. Example rc = Plot1D( 0 ) rc = SetLabelText(0,'The x axis') rc = SetLabelText(1,'The y axis') rc = SetTitleText('The Title') rc = UpdateScreen() See also SetLabelText ═══ 8.33. SetTsLength ═══ This function sets the length of the actual loaded time series. Syntax SetTsLength( Size ) Size - is an integer value that specifies the new length of the time series Return Value The function returns 1 - if an error occured. 0 - if the length is changed. Example Say 'Changing the Size of the time series' length = GetTsLength() Say 'Length = ' dim Do i = 1 to 10 rc = SetTsLength( i * 1024 ) rc = CalcPredictionError() dim_E = GetEmbeddingDim(0) delay = GetDelay(0) Say 'dim = ' dim_E Say 'delay ' delay end See also GetTsDim ═══ 8.34. SetTsOffset ═══ This function set the start index of the actual loaded time series. In general this function is used in combination with SetTsLength to change the calculation window. Syntax SetTsOffset( Offset ) Offset - is the start index into the actual time series Return Value The function returns 1 - if an error occured. 0 - if the index is changed Example Say 'Changing the Size of the time series' length = GetTsLength() Say 'Length = ' dim Do i = 1 to 10 rc = SetTsLength( 1024 ) rc = SetTsOffset( i * 128 ) rc = CalcPredictionError() dim_E = GetEmbeddingDim(0) delay = GetDelay(0) Say 'Number = ' i Say 'dim = ' dim_E Say 'delay ' delay end See also SetTsLength ═══ 8.35. SetViewport ═══ This function is used to change the angles in 3D View. To see the changes you must call the function UpdateScreen(). The unit of the values is degree, Syntax SetViewport( phi, theta ) phi is the new angle at the xy plane. theta is the new angle at the screen plane. Return Value The function returns 0 - if the angles are changed 1 - if an error occured. Example rc = Plot1D( '3D' ) rc = SetViewport(20,20) rc = UpdateScreen() See also GetViewport ═══ 8.36. SaveTs ═══ Save the time series and all calculated functions. Syntax SaveTs( FunctionID, Format, szName ) FunctionID - Specifies the functions to save. Each function has a ID-number, if you want to save more then one function, simply add the numbers of the functions. ID Function 1 Time Series itself 2 Autocorrelation 4 Kolmogorov Entropy 8 Fill Factor 16 Prediction Error 32 Mutual Information 64 Singular Value Decomposition 128 Fouriertransformation 256 Wavelet Spectrum 512 Lyapunov Exponents 1024 Quadratic Autocorrelation 2048 Correlationsintegral und Dimension Format specifies the fileformat, 0 is the NLD-format, 1 is ASCII szName is the complete filename including drive and path. If this called without parameter this function displays a filedialog. Return Value The function returns: 0 - if the functions saved sucessfull ended. 1 - if an error occured. Example Say 'Loading a time series' rc = LoadTs('C:\math\lorenz.ts.nld') Say 'Calculating the autocorrelation' rc = CalcAutocorrelation() if rc = 0 then Say 'sucessfully ended' else Say 'An Error occured' rc = SaveTs(3,1,'C:\lorenz') See also LoadTs ═══ 8.37. SetDelay ═══ Change the actual used delay for the calculations Syntax SetDelay( tau ) tau sets the delay to tau Return Value The function returns 0 - if the operation was sucessfull 1 - if an error occured Example Say 'Calculating the Prediction Error' rc = CalcPredictionError() if rc = 0 then Say 'Calculation sucessfull' else Say 'Error' tau = GetDelay() Say 'The used delay is ' tau Say 'The delay will set to 10' rc = SetDelay(10) See also GetEmbeddingDim SetEmbeddingDim ═══ 8.38. SetEmbeddingDim ═══ Change the actual used embedding dimension for the calculations Syntax SetEmbeddingDim( dim ) dim sets the embedding dimension to dim Return Value The function returns 0 - if the operation was sucessfull 1 - if an error occured Example Say 'Calculating the Prediction Error' rc = CalcPredictionError() if rc = 0 then Say 'Calculation sucessfull' else Say 'Error' dim = GetEmbeddingDim() Say 'The used embedding dimension is ' dim Say 'The embedding dimension will set to 10' rc = SetEmbeddingDim(10) See also GetEmbeddingDim SetDelay ═══ 8.39. ShowSpecialPoints ═══ Enables or disables the view of all calculated special points from the actual loaded time series. Syntax ShowSpecialPoints( SwitchFlag ) SwitchFlag can be either set to 'ON' to enable the view or 'OFF' to disable the view. Return Value The function returns: 0 - if the calculation sucessfull ended. 1 - if an error occured. Example Say 'Plotting the time series in real 3D view' if rc = 0 then Say 'sucessfully ended' else Say 'An Error occured' rc = AddSpecialPoints('CENTRE_OF_GRAVITY',1) rc = ShowSpecialPoints( 'ON' ) rc = Plot3D( '3D' ) See also Plot3D AddSpecialPoints ═══ 8.40. UpdateScreen ═══ Use this function to update the window. After this function all changes like Title or labels are active. Syntax UpdateScreen( Flag ) Flag is an optional parameter to specify if the statusbar is updated. If Flag is 0 the statusbar will not be updated, any other value the statusbar will be updated. Return Value This function returns 0 if the window is updated 1 if an error occured Example rc = Plot1D(0) rc = SetTitleText('Title') rc = UpdateScreen() ═══ 8.41. VisualMode ═══ Use this function to display a REXX Output Window. All SAY-commands are displayed in this window. Syntax VisualMode ON/OFF ON activates the output window for SAY-commands OFF deactivates this window Return Value This function has no return value. Example VisualMode ON Say 'All text is dislayed' ═══ 9. Thanks ═══ Rolf Langjahr He has studied medicine at the university Giessen for several years and is now finished with his master degree. The methods of nonlinear dynamics give him the choice to analyse complex medical systems like heart beat and brain streams. So he is interesting in my work with the Time Series Analyzer. o He is the first tester of the Time Series Analyzer program. o He wrotes the import filter for WAV Sound files so that I can implement it directly o Last but not least he gave me some usefull data sets of heart beats and Cochlear microphonics which he recorded during his study at Giessen. ═══ 10. Reported Bugs ═══ Reported bugs in Version 0.97.12 o You can create more than one instance of the program and execute a REXX macro ═══ ═══ Time Series Analyzer Version 0.96.1129 for OS/2 3.0 Warp copyright by Wolfgang Reichenbach 1993-1995 e-mail: pixies@nlp.physik.th-darmstadt.de ═══ ═══ Jaap C. Schouten, Floris Takens, Cor M. van den Bleek; Maximum-likehood estimation of the entropy of an attractor Physical Review E, Volume 49, Number 1