1
C @(#)ftdfpr.for 19.1 (ES0-DMD) 02/25/03 13:17:33
2
C===========================================================================
3
C Copyright (C) 1995 European Southern Observatory (ESO)
5
C This program is free software; you can redistribute it and/or
6
C modify it under the terms of the GNU General Public License as
7
C published by the Free Software Foundation; either version 2 of
8
C the License, or (at your option) any later version.
10
C This program is distributed in the hope that it will be useful,
11
C but WITHOUT ANY WARRANTY; without even the implied warranty of
12
C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
C GNU General Public License for more details.
15
C You should have received a copy of the GNU General Public
16
C License along with this program; if not, write to the Free
17
C Software Foundation, Inc., 675 Massachusetss Ave, Cambridge,
20
C Corresponding concerning ESO-MIDAS should be addressed as follows:
21
C Internet e-mail: midas@eso.org
22
C Postal address: European Southern Observatory
23
C Data Management Division
24
C Karl-Schwarzschild-Strasse 2
25
C D 85748 Garching bei Muenchen
27
C===========================================================================
29
SUBROUTINE FTDFPR(PARAM,LEN,VAL,LENV,ISTAT)
30
C++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
31
C.COPYRIGHT: Copyright (c) 1987 European Southern Observatory,
34
C.VERSION: 1.0 ESO-FORTRAN Conversion, AA 17:25 - 13 JAN 1988
36
C.LANGUAGE: F77+ESOext
42
C FITLIB.FOR VERSION 1.0 27 MAR 1984
46
C INTERFACE ROUTINES FOR THE FITTING STRUCTURES
47
C DEFINES NEW PARAMETER GUESS
51
C USE MIDAS I/O INTERFACES TO FRAMES AND TABLES
58
C----------------------------------------------------------------
63
C PARAM CHAR PARAMETER NAME
64
C LEN INTG PARAMETER LENGTH
65
C VAL CHAR PARAMETER GUESS
66
C LENV INTG VALUE LENGTH
69
C ISTAT INTG STATUS RETURN
71
INTEGER LEN,LENV,ISTAT,I,J,II,II1,L,IFUN,IOFF
72
CHARACTER*(*) PARAM,VAL
73
CHARACTER NAME*12,FSPEC*80,CVAL*30
74
INCLUDE 'MID_INCLUDE:FITI.INC/NOLIST'
75
INCLUDE 'MID_INCLUDE:FITC.INC/NOLIST'
77
C SEARCH FOR PARAMETER (I IS THE PARAMETER NUMBER)
81
IF (NAME(1:FZPLEN(I)).EQ.PARAM(1:LEN)) GO TO 20
86
C FIND FUNCTION (J IS THE FUNCTION NUMBER)
89
IF (FZFIXED(I).GT.0) THEN
97
IF (I.LE.IOFF+FZACTPAR(J)) THEN
103
IOFF = IOFF + FZACTPAR(J)
108
C SEARCH FOR INITIAL VALUE IN FSPEC
111
NAME = PARAM(1:LEN)//'='
112
II = INDEX(FSPEC,NAME(1:LEN+1))
114
II = INDEX(FSPEC,')') + 2
117
II1 = INDEX(FSPEC(II:),' ')
118
FSPEC(II:) = FZSPEC(J) (II1:)
121
C INSERT VAL IN POSITION II
123
IF (FZFIXED(I).EQ.0) THEN
124
CVAL = VAL(1:LENV)//'@'
132
FZSPEC(J) = FSPEC(1:II-1)//CVAL(1:L)//FSPEC(II:)