~ubuntu-branches/debian/jessie/eso-midas/jessie

« back to all changes in this revision

Viewing changes to applic/fit/libsrc/lsfun1.for

  • Committer: Package Import Robot
  • Author(s): Ole Streicher
  • Date: 2014-04-22 14:44:58 UTC
  • Revision ID: package-import@ubuntu.com-20140422144458-okiwi1assxkkiz39
Tags: upstream-13.09pl1.2+dfsg
ImportĀ upstreamĀ versionĀ 13.09pl1.2+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
C @(#)lsfun1.for        19.1 (ES0-DMD) 02/25/03 13:17:40
 
2
C===========================================================================
 
3
C Copyright (C) 1995 European Southern Observatory (ESO)
 
4
C
 
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.
 
9
C
 
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.
 
14
C
 
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, 
 
18
C MA 02139, USA.
 
19
C
 
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 
 
26
C                       GERMANY
 
27
C===========================================================================
 
28
C
 
29
      SUBROUTINE LSFUN1(NRRES,NRPRM,PRM,FCTVEC)                                 
 
30
C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++        
 
31
C                                                                               
 
32
C.MODULE                                                                        
 
33
C       FIT                                                                     
 
34
C                                                                               
 
35
C.NAME                                                                          
 
36
C       LSFUN1                                                                  
 
37
C                                                                               
 
38
C.PURPOSE                                                                       
 
39
C   Function to compute the approximating function at each point.               
 
40
C   Pass the control to different routines according to IMAGE or TABLE          
 
41
C                                                                               
 
42
C.KEYWORDS                                                                      
 
43
C       Approximating Function.                                                 
 
44
C                                                                               
 
45
C.DESCRIPTION                                                                   
 
46
C       Test the type of FIT and go to respective routines                      
 
47
C                                                                               
 
48
C.LANGUAGE                                                                      
 
49
C       FORTRAN                                                                 
 
50
C                                                                               
 
51
C.CALLING SEQUENCE                                                              
 
52
C      CALL LSFUN1(NRRES,NRPRM,PRM,FCTVEC)                                      
 
53
C                                                                               
 
54
C.INPUT PARAMETERS                                                              
 
55
C       NRRES               INTEGER  Number of residuals                        
 
56
C       NRPRM             INTEGER  Number of parameters                         
 
57
C       PRM (NRPRM)       DOUBLE   Parameters                                   
 
58
C                                                                               
 
59
C.MODIFIED PARAMETERS                                                           
 
60
C       none                                                                    
 
61
C                                                                               
 
62
C.OUTPUT PARAMETERS                                                             
 
63
C       FCTVEC (NRRES)      DOUBLE   Approximating values                       
 
64
C                                                                               
 
65
C.FILES                                                                         
 
66
C       FIT_NAG.INC/NOLIST                                                      
 
67
C                                                                               
 
68
C.MODULES CALLED                                                                
 
69
C       LSFUN1_T                                                                
 
70
C       LSFUN1_I                                                                
 
71
C                                                                               
 
72
C.AUTHOR                                                                        
 
73
C       Ph. DEFERT,      Feb 1986                                               
 
74
C                                                                               
 
75
C.MODIFICATIONS                                                                 
 
76
C                                                                               
 
77
C                                                                               
 
78
C-----------------------------------------------------------------------        
 
79
C                                                                               
 
80
C      IMPLICIT NONE                                                            
 
81
C     .. Scalar Arguments ..                                                    
 
82
      INTEGER NRPRM,NRRES,MADRID(1)                                             
 
83
C     ..                                                                        
 
84
C     .. Array Arguments ..                                                     
 
85
      DOUBLE PRECISION FCTVEC(NRRES),PRM(NRPRM)                                 
 
86
C     ..                                                                        
 
87
C     .. External Files ..                                                      
 
88
       INCLUDE 'MID_INCLUDE:FITNAGI.INC/NOLIST'                                 
 
89
      COMMON /VMR/MADRID                                                     
 
90
       INCLUDE 'MID_INCLUDE:FITNAGC.INC/NOLIST'                                 
 
91
C     ..                                                                        
 
92
C     .. Executable Statements ..                                               
 
93
      IF (FILTYP(1:1).EQ.'T') THEN                                              
 
94
          CALL LSFU1T(NRRES,NRPRM,PRM,FCTVEC)                                 
 
95
                                                                                
 
96
      ELSE                                                                      
 
97
          CALL LSFU1I(NRRES,NRPRM,PRM,FCTVEC,MADRID(PTRI),                    
 
98
     +                  MADRID(PTRM),NRPIX(1),NRPIX(2),NRPIX(3))                
 
99
      END IF                                                                    
 
100
                                                                                
 
101
      RETURN                                                                    
 
102
                                                                                
 
103
      END