1
C @(#)ifstar.for 19.1 (ES0-DMD) 02/25/03 13:25:34
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+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
33
C-----------------------------------------------------------------------
34
SUBROUTINE IFSTAR(IBUFS, SCA, LPXL, LSBP, IS ,
35
& JS, MPRF, IPSF, FPSF, IOFF0,
49
INTEGER IOFFI ! OUT: Corrections offset
51
INTEGER I , ICSP , IOF0 , ITMP , NADR , NOSP
55
C *** Check if standard star.
56
IF ( (-LPXL) .GE. IBUFS(1)
57
& .AND. (-LPXL) .GE. IBUFS(2)
58
& .AND. LPXL .LE. IBUFS(3)
59
& .AND. LPXL .LE. IBUFS(4) ) THEN
68
C *** NOSP - maximum number of standard stars.
72
C *** Find offset to adresses of standard stars intensities.
74
IOF0 = (5+NOSP) * IOFF +
75
& ( (LSBP+JS) * MSBP + LSBP + IS ) * NOSP
77
C *** Calculate current number of this standard object.
79
NADR = (LSBP+JS) * MSBP + LSBP + IS + 1 + NOSP
81
IF ( ICSP .GT. NOSP ) THEN
83
C *** Look if present object is brighter than any
84
C *** of previously recorded standard objects.
86
TEMP = FPSF(IOF0+1) + 1.0
90
IF ( SCA .GT. TEMP1 ) THEN
91
IF ( TEMP1 .LT. TEMP ) THEN
97
IF ( ITMP .GT. 0 .AND. ITMP .LE. NOSP ) THEN
99
C *** Replace fainter object.
102
FPSF(IOF0+ICSP) = SCA
112
C *** Add new standard star.
115
FPSF(IOF0+ICSP) = SCA
118
IOFFI = IOFF0 + (4+ICSP) * IOFF