1
C @(#)radcor.for 19.1 (ES0-DMD) 02/25/03 13:25:37
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
C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
31
C subroutine RADCOR version 1.2 870729
32
C A. Kruszewski ESO Garching
34
C Correct different radial size parameters and isophotal magnitude
35
C for influence of brightness dependent finite size of the used image.
36
C A stellar object is assumed.
37
C This subroutine should remove any brightness dependence of
38
C corrected radial size parameters and isophotal magnitudes
39
C for stellar objects.
40
C It is irrelevant for galaxies.
41
C It work for unsaturated objects only.
44
C PMTR real*4 array array holding classifiers
45
C M integer*4 number of objects
46
C STPR real*4 array one-dimensional point spread function
48
C TRSH real*4 detection treshold
50
C PCLA real*4 array array holding corrected classifiers
51
C-----------------------------------------------------------------------
52
SUBROUTINE RADCOR(PMTR,PCLA,M,STPR,TRSH)
55
INCLUDE 'MID_REL_INCL:INVENT.INC/NOLIST'
58
REAL PCLA(0:13,MAXCNT)
65
INTEGER NPXL(0:MAXSUB)
74
REAL CRAD(0:100),AIN0(0:MAXSUB)
75
REAL AIN1(0:MAXSUB),AIN2(0:MAXSUB),AINK(0:MAXSUB)
77
DATA NPXL/1,8,12,16,32,28,40,40,48,68,56,72,68,88,88,84,112,112,
78
+ 112,116,112,144,140,144,144,168,164,160,184,172,200,192,188,
79
+ 208,224,224,228,224,248,236,264,248,264,276,264,288,276,304,
82
C Transforms the differential logarithmic
83
C *** point spread function STPR into profile
84
C in intensity units SPIU.
88
SPIU(I) = SPIU(I-1)* (10.0** (-STPR(I)))
91
C *** Calculates integrated quantities.
98
TEMP = SPIU(I)*NPXL(I)
99
AIN0(I) = AIN0(I-1) + TEMP
100
AIN1(I) = AIN1(I-1) + TEMP*I
101
AIN2(I) = AIN2(I-1) + TEMP*I*I
102
AINK(I) = AINK(I-1) + TEMP/ (I*I)
105
AIN1(I) = AIN1(I)/AIN0(I)
106
AIN2(I) = AIN2(I)/AIN0(I)
107
AINK(I) = AINK(I)/AIN0(I)
110
AIN1(I) = AIN1(25)/AIN1(I)
111
AIN2(I) = AIN2(25)/AIN2(I)
112
AIN2(I) = AIN2(I)**0.5
113
AINK(I) = AINK(25)/AINK(I)
114
AINK(I) = AINK(I)**(-0.5)
117
C *** Correct following parameters: "RADIUS1", "RADIUS2","KRON RADIUS".
121
C *** Store value of the limiting radius in variable TEMP.
126
C *** Apply the corrections.
128
PCLA(4,I) = PMTR(6,I)*
129
2 (AIN1(IR)* (1.0-FRCT)+AIN1(IR+1)*FRCT)
130
PCLA(5,I) = PMTR(7,I)*
131
2 (AIN2(IR)* (1.0-FRCT)+AIN2(IR+1)*FRCT)
132
PCLA(12,I) = PMTR(18,I)*
133
2 (AINK(IR)* (1.0-FRCT)+AINK(IR+1)*FRCT)
136
C Corrects parameters: "ISOPHOTAL MAGNITUDE", "LIMITING RADIUS".
137
C it takes into account that the stellar profile is cut by
138
C limiting treshold in a different way depending on stellar
139
C *** brightness. Average of 9 central pixels is taken as a
140
C measure of stellar brightness. Stellar profile is cut
141
C horizontally by 100 eqidistant levels. Corrections are
142
C calculated for each level and stored in arrays CMAG and
143
C CRAD. Linear interpolation is used.
150
ALIM = (100.0-FI)*0.01
152
IF ( .NOT. (SPIU(J).GT.ALIM) ) GO TO 70
153
CMAG(I) = CMAG(I) + SPIU(J)*NPXL(J)
161
DIF1 = SPIU(J-1) - ALIM
162
DIF2 = SPIU(J-1) - SPIU(J)
163
IF (DIF1.GT.0.0001 .AND. DIF2.GT.0.0001) THEN
169
IF (FRCT.GT.1.0) THEN
173
CMAG(I) = CMAG(I) + FRCT*SPIU(J)*NPXL(J)
174
CRAD(I) = J - 1 + FRCT
178
CMAG(I) = 2.5*LOG10(CMAG(I)/CMAG(100))
179
CRAD(I) = CRAD(99) - CRAD(I)
182
CMAG(0) = 3.0*CMAG(1) - 2.0*CMAG(2)
183
CRAD(0) = 3.0*CRAD(1) - 2.0*CRAD(2)
184
CTRS = (SPIU(0)+8.0*SPIU(1))* (TRSH/9)
186
IF (PMTR(2,I).GT.TRSH) THEN
187
TEMP = (1.0-CTRS/PMTR(2,I))*100.0
190
CM = CMAG(IT)* (1.0-FRCT) + CMAG(IT+1)*FRCT
195
CR = CRAD(IT)* (1.0-FRCT) + CRAD(IT+1)*FRCT
203
PCLA(3,I) = PMTR(5,I) + CM
204
PCLA(9,I) = PMTR(15,I) + CR