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

« back to all changes in this revision

Viewing changes to contrib/invent/libsrc/cfaint.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 @(#)cfaint.for        19.1 (ES0-DMD) 02/25/03 13:25:31
 
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
C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
30
C.IDENIFICATION
 
31
C
 
32
C  subroutine CFAINT         version 1.2       870729
 
33
C  A. Kruszewski             ESO Garching
 
34
C
 
35
C.PURPOSE
 
36
C
 
37
C  classifies unsaturated objects into stars, galaxies and image defects
 
38
C
 
39
C.INPUT/OUTPUT
 
40
C
 
41
C  input arguments
 
42
C
 
43
C  PMTR        real*4 array      array holding classifiers
 
44
C  BRGT        logical array     array indicating saturated objects
 
45
C  M           integer*4         number of objects
 
46
C  STPR        real*4 array      one-dimensional point spread function
 
47
C                                of stallar objects
 
48
C  TRSH        real*4            detection treshold above the sky 
 
49
C                                background
 
50
C
 
51
C  output arguments
 
52
C
 
53
C  ICLS        integer*4 array   array holding the classification
 
54
C                                coded: 0-defect or not classified,
 
55
C                                1-star, 2-galaxy. for each object 
 
56
C                                the first element gives a seed value,
 
57
C                                the second gives a current value.
 
58
C  FAIL        logical           fail flag
 
59
C-----------------------------------------------------------------------
 
60
      SUBROUTINE CFAINT(PMTR,BRGT,ICLS,M,STPR,TRSH,FAIL)
 
61
C
 
62
      IMPLICIT NONE
 
63
      INCLUDE 'MID_REL_INCL:INVENT.INC/NOLIST'
 
64
C
 
65
      REAL    PMTR(30,MAXCNT)
 
66
      LOGICAL BRGT(MAXCNT)
 
67
      INTEGER ICLS(2,MAXCNT)
 
68
      INTEGER M
 
69
      REAL    STPR(MAXCNT)
 
70
      REAL    TRSH
 
71
      LOGICAL FAIL
 
72
C
 
73
      INTEGER ITER
 
74
      INTEGER KZ6901
 
75
      REAL    PCLA(0:13,MAXCNT)
 
76
C
 
77
      LOGICAL DONE
 
78
C
 
79
C sets seed samples of stars and galaxies
 
80
C
 
81
      CALL STSEED(PMTR,BRGT,ICLS,M,TRSH,FAIL)
 
82
      IF (FAIL) THEN
 
83
          RETURN
 
84
 
 
85
      END IF
 
86
C
 
87
C corrects radius parameters for distortions due to
 
88
C finite sizes of objects
 
89
C
 
90
      CALL RADCOR(PMTR,PCLA,M,STPR,TRSH)
 
91
C
 
92
C transforms parameters in order to make them more independend
 
93
C and to assure similar ranges of variability
 
94
C
 
95
      CALL TRSFRM(PMTR,PCLA,M)
 
96
C
 
97
C performs classification
 
98
C
 
99
      DONE   = .FALSE.
 
100
      ITER   = 0
 
101
      DO 10 KZ6901 = 1,100000000
 
102
          IF ( .NOT. (.NOT.DONE.AND.ITER.LE.20)) GO TO 20
 
103
          CALL CLASFY(PCLA,BRGT,ICLS,M,ITER,DONE)
 
104
   10 CONTINUE
 
105
   20 CONTINUE
 
106
C
 
107
C seed classification is coded in ICLS(1,*)
 
108
C final classification is coded in ICLS(2,*)
 
109
C 0-defect or unclassified, 1-star, 2-galaxy
 
110
C
 
111
      RETURN
 
112
 
 
113
      END
 
114