~ubuntu-branches/ubuntu/wily/eso-midas/wily-proposed

« back to all changes in this revision

Viewing changes to contrib/invent/libsrc/clpmtr.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 @(#)clpmtr.for        19.1 (ES0-DMD) 02/25/03 13:25:32
 
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.IDENT:   subroutine CLPMTR         version 1.2        870729
 
31
C          A. Kruszewski             ESO Garching
 
32
C.PURPOSE: classifies objects into stars, galaxies and image defects
 
33
C.INPUT/OUTPUT
 
34
C  input arguments
 
35
C  PMTR        real*4 array      array holding classifiers
 
36
C  M           integer*4         number of objects
 
37
C  STPR        real*4 array      one-dimensional point spread function
 
38
C                                of stellar objects
 
39
C  TRSH        real*4            detection treshold above the sky 
 
40
C  output arguments
 
41
C  ICLS        integer*4 array   array holding the classification
 
42
C  PMTR        real*4 array      modified array holding classifiers
 
43
C  FAIL        logical           fail flag
 
44
C-----------------------------------------------------------------------
 
45
      SUBROUTINE CLPMTR(PMTR,ICLS,M,STPR,TRSH,FAIL)
 
46
C
 
47
      IMPLICIT NONE
 
48
      INCLUDE 'MID_REL_INCL:INVENT.INC/NOLIST'
 
49
C
 
50
      INTEGER ICTL(7)
 
51
      INTEGER ICLS(2,MAXCNT)
 
52
      INTEGER IAC
 
53
      INTEGER ISTAT
 
54
      INTEGER I, IB, IF
 
55
      INTEGER KUN, KNUL
 
56
      INTEGER M
 
57
      INTEGER MADRID(1)
 
58
C
 
59
      REAL    BLMT
 
60
      REAL    PMTR(30,MAXCNT)
 
61
      REAL    STPR(MAXSUB)
 
62
      REAL    TRSH
 
63
C
 
64
      LOGICAL BRGT(MAXCNT)
 
65
      LOGICAL FAIL
 
66
C
 
67
      COMMON /VMR/MADRID
 
68
C
 
69
      CALL STKRDR('INV_REAL', 8, 1, IAC, BLMT, KUN, KNUL, ISTAT)
 
70
C
 
71
C ****    Set corresponding elements of BRGT to true for bright objects.
 
72
C
 
73
      IB     = 0
 
74
      IF     = 0
 
75
      DO 10 I = 1,M
 
76
          IF (PMTR(5,I).LT.BLMT) THEN
 
77
              BRGT(I) = .TRUE.
 
78
              IB     = IB + 1
 
79
          ELSE
 
80
              BRGT(I) = .FALSE.
 
81
              IF     = IF + 1
 
82
          END IF
 
83
 
 
84
   10 CONTINUE
 
85
      ICTL(1) = IF
 
86
      ICTL(2) = IB
 
87
      DO 20 I = 3,7
 
88
          ICTL(I) = 0
 
89
   20 CONTINUE
 
90
C
 
91
C classifies bright objects
 
92
C
 
93
      CALL CLBRGT(PMTR, BRGT, ICLS, M)
 
94
C
 
95
C classifies faint objects
 
96
C
 
97
      CALL CFAINT(PMTR, BRGT, ICLS, M, STPR, TRSH, FAIL)
 
98
C
 
99
C          Elements of ICLS(1,*) are coded: 0-unclassified, 1-star,
 
100
C         2-galaxy
 
101
C ****    and they describe the classification of seed objects.
 
102
C         Elements of ICLS(2,*) are coded: 0-defect, 1-star, 2-galaxy
 
103
C         and they describe current classification of objects.
 
104
C
 
105
      RETURN
 
106
      END