1
C @(#)rdcrin.for 19.1 (ES0-DMD) 02/25/03 13:25:38
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 RDCRIN version 1.1 831011
32
C A. Kruszewski ESO Garching
34
C reads descriptor "STARS" containing physical coordinates of
35
C stars which are suitable for determining standard
36
C point spread function, converts physical coordinates into
37
C pixel coordinates and identifies these stars with detected
41
C NCAT integer*4 array array holding integer data on
42
C objects, NCAT(1,*) is equal to
44
C N(2,*) is Y-pixel coordinate
45
C M integer*4 number of objects
47
C NKK integer*4 array array holding identification numbers
48
C of identified objects
49
C NSTS integer*4 number of standard stars which are
50
C identified with objects
51
C-----------------------------------------------------------------------
52
SUBROUTINE RDCRIN(IMF, NCAT, M, NKK, NSTS)
55
INCLUDE 'MID_REL_INCL:INVENT.INC/NOLIST'
65
INTEGER IDX, IDY, IDIS
70
INTEGER NN, NSTR1, NSTR2
74
DOUBLE PRECISION START(2) , STEP(2)
76
C ****** Read descriptor STARS containing
77
C ****** coordinates of standard stars.
79
CALL STDRDR( IMF , 'STARS' , 1 , 3*MPSF , IACT , STST , KUN ,
82
C ****** Find number of standard stars.
86
C ****** Read descriptors START and STEP.
88
CALL STDRDD( IMF , 'START' , 1 , 2 , IACT , START , KUN ,
90
CALL STDRDD( IMF , 'STEP' , 1 , 2 , IACT , STEP , KUN ,
93
C ****** Perform identification of standard stars
94
C ****** with objects listed in array NCAT.
99
NSTR1 = NINT( (DBLE(STST(K*3-2))-START(1)) / STEP(1) ) + 1
100
NSTR2 = NINT( (DBLE(STST(K*3-1))-START(2)) / STEP(2) ) + 1
102
IDX = NSTR1 - NCAT(1,L)
103
IDY = NSTR2 - NCAT(2,L)
104
IDIS = IDX*IDX + IDY*IDY
112
C ****** Check if each standard star has been
113
C ****** identified with one and only one object.
124
C ****** NSTS is a number of succesfully identified objects.
128
CALL STTPUT(' No standard stars identified',ISTAT)