Fix core WST file
[jabaws.git] / binaries / src / disembl / Tisean_3.0.1 / source_f / upoembed.f
1 c===========================================================================
2 c
3 c   This file is part of TISEAN
4
5 c   Copyright (c) 1998-2007 Rainer Hegger, Holger Kantz, Thomas Schreiber
6
7 c   TISEAN is free software; you can redistribute it and/or modify
8 c   it under the terms of the GNU General Public License as published by
9 c   the Free Software Foundation; either version 2 of the License, or
10 c   (at your option) any later version.
11 c
12 c   TISEAN is distributed in the hope that it will be useful,
13 c   but WITHOUT ANY WARRANTY; without even the implied warranty of
14 c   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 c   GNU General Public License for more details.
16 c
17 c   You should have received a copy of the GNU General Public License
18 c   along with TISEAN; if not, write to the Free Software
19 c   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
20 c
21 c===========================================================================
22 c   delay coordinates for periodic orbits
23 C   Copyright (C) Thomas Schreiber (1998)
24 c===========================================================================
25       parameter(nx=1000)
26       dimension x(nx)
27       character*72 file, fout
28       data m/2/
29       data iverb/1/
30
31       call whatido("embed using delay coordinates",iverb)
32       id=imust("d")
33       m=ican("m",m)
34       ipp=ican("p",0)
35       isout=igetout(fout,iverb)
36       call nthstring(1,file)
37       call infile(file,iunit,iverb)
38       if(isout.eq.1) call addsuff(fout,file,"_delay")
39       call outfile(fout,iunit2,iverb)
40
41  1    read(iunit,*,err=1,end=999) ipor, dum1, dum2
42       do 10 ip=1,ipor
43  10      read(iunit,*,end=999) idum, x(ip)
44       if(ipp.ne.0.and.ipor.ne.ipp) goto 1
45       do 20 ip=1,ipor+1
46  20      write(iunit2,*) (x(mod(ip-(j-1)*id-1+m*ipor,ipor)+1), j=m,1,-1)
47       write(iunit2,'()')
48       write(iunit2,'()')
49       goto 1
50  999  continue
51       end
52
53       subroutine usage()
54 c usage message
55
56       call whatineed(
57      .   "-d# [-m# -p# -o outfile -l# -x# -c# -V# -h] file")
58       call popt("d","delay")
59       call popt("m","embedding dimension (2)")
60       call popt("p","period of orbit (1)")
61       call popt("l","number of values to be read (all)")
62       call popt("x","number of values to be skipped (0)")
63       call popt("c","column to be read (1 or file,#)")
64       call pout("file_delay")
65       call pall()
66       stop
67       end
68
69