1
C @(#)atest.for 19.1 (ES0-DMD) 02/25/03 13:18:59
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 ATEST(NX,NY,IN,HG,HL,OUT,M,OG,UL,OL,
31
C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
33
C compares actual gradient and Laplaces with noise statistics and decides
34
C if a pixel is significant on the actual order
35
C OG,UL,OL : upper limit for gradients and lower and upper limits for
36
C Laplace-terms respectively; pixel values exceeding these
37
C limits make the pixel significant. (in)
38
C NSG,NSL : number of pixels wich became significant at the actual
39
C order by gradient or Laplace respectively. (out)
41
C----------------------------------------------------------------------------
45
INTEGER NX,NY,ORD,NSG,NSL,I
46
REAL IN(1),HG(1),HL(1),OUT(1),OG,UL,OL,HHL,ORDR,M(1)
54
IF (M(I).NE.0) GOTO 10 ! pixel already significant on lower order
55
IF (TYP.NE.'S') GOTO 5
57
C *** test for filter type SMOOTH
58
IF (HG(I).GE.OG) GOTO 2 ! gradient significant
60
IF ((HHL.GE.OL).OR.(HHL.LE.UL)) GOTO 3 ! Laplace significant
64
3 IF (S.EQ.'G') NSG=NSG+1
65
IF (S.EQ.'L') NSL=NSL+1
70
5 IF (TYP.NE.'G') GOTO 7
72
C *** test for filter type GRADIENT
74
IF(HHL.LT.OG) GOTO 10 ! gradient not significant
79
C *** test for filter type LAPLACE
81
IF ((HHL.LT.OL).AND.(HHL.GT.UL)) GOTO 10 ! Laplace not significant
84
9 M(I)=ORDR! mark significant pixel