~ubuntu-branches/debian/jessie/eso-midas/jessie

« back to all changes in this revision

Viewing changes to prim/general/libsrc/ystvals-2.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===========================================================================
 
2
C Copyright (C) 1995-2006 European Southern Observatory (ESO)
 
3
C
 
4
C This program is free software; you can redistribute it and/or 
 
5
C modify it under the terms of the GNU General Public License as 
 
6
C published by the Free Software Foundation; either version 2 of 
 
7
C the License, or (at your option) any later version.
 
8
C
 
9
C This program is distributed in the hope that it will be useful,
 
10
C but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
C GNU General Public License for more details.
 
13
C
 
14
C You should have received a copy of the GNU General Public 
 
15
C License along with this program; if not, write to the Free 
 
16
C Software Foundation, Inc., 675 Massachusetts Ave, Cambridge, 
 
17
C MA 02139, USA.
 
18
C
 
19
C Correspondence concerning ESO-MIDAS should be addressed as follows:
 
20
C       Internet e-mail: midas@eso.org
 
21
C       Postal address: European Southern Observatory
 
22
C                       Data Management Division 
 
23
C                       Karl-Schwarzschild-Strasse 2
 
24
C                       D 85748 Garching bei Muenchen 
 
25
C                       GERMANY
 
26
C===========================================================================
 
27
 
 
28
C ++++++++++++++++++++++++  YSTVALS.FOR +++++++++++++++++++++++++++++++++++++++
 
29
C .LANGUAGE Fortran 77
 
30
C .IDENTIFICATION Module YSTVALS.FOR
 
31
C .COMMENTS
 
32
C Module contains layer between the keyword related FORTRAN STxxxx interfaces
 
33
C and the SC_interfaces written in (hopefully independent) C
 
34
C .AUTHOR         K. Banse        ESO - Garching
 
35
C .KEYWORDS       standard interfaces.
 
36
C .ENVIRONMENT    FORTRAN and C standards
 
37
C .VERSION  [1.00] 871207:  created from SXFTOC.C
 
38
C
 
39
C 060330        last modif
 
40
C ......................................................
 
41
C
 
42
C
 
43
C  call as
 
44
C  STVALS(ACTION,A,NAXIS,NPIX,SUBLO,SUBHI,CUTVLS,RSULTS,RESPIX,NOPIX,STAT)
 
45
C
 
46
C  input par:
 
47
C  ACTION:      char. exp.  = MIN for min, max calculation
 
48
C                           = MEAN for above + mean values, std deviation
 
49
C                           = ALL for above + moments of 2. + 3. order
 
50
C  A:           R*4 array   array to work on
 
51
C  NAXIS:       I*4         no. of axis of A (maxium of 3, currently)
 
52
C  NPIX:        I*4 array   no. of pixels per axis in A
 
53
C  SUBLO:       I*4 array   start pixels of subframe
 
54
C  SUBHI:       I*4 array   end pixels of subframe
 
55
C  CUTVLS:      R*4 array   user supplied cutvalues for subframe
 
56
C
 
57
C  output par:
 
58
C  RSULTS:      R*4 array   depending on ACTION, this array contains
 
59
C                           min, max, mean, sigma, 2-moment, 3-moment,
 
60
C                           total intensity
 
61
C  RESPIX:      I*4 array   holds pixel no. of min + max of array
 
62
C  NOPIX:       I*4         total no. of pixels inside subframe
 
63
C                           with value in [CUTVLS(1),CUTVLS(2)]
 
64
C  STAT:        I*4         return status
 
65
C                           = 0 o.k., otherwise error
 
66
C
 
67
C -------------------------------------------------- 
 
68
 
69
C
 
70
      SUBROUTINE STVALS(ACTION,A,NAXIS,NPIX,SUBLO,SUBHI,CUTVLS,
 
71
     +            RSULTS,RESPIX,NOPIX,STAT)
 
72
C
 
73
      IMPLICIT NONE
 
74
C
 
75
      CHARACTER*(*)  ACTION
 
76
      REAL      A(*), CUTVLS(*), RSULTS(*)
 
77
      INTEGER     NAXIS, NPIX(*), SUBLO(*), SUBHI(*)
 
78
      INTEGER     RESPIX(*), NOPIX, STAT
 
79
C
 
80
      CALL STSTR(1,ACTION)
 
81
      CALL YST1(A,NAXIS,NPIX,SUBLO,SUBHI,CUTVLS,
 
82
     +          RSULTS,RESPIX,NOPIX,STAT)
 
83
C
 
84
      RETURN
 
85
      END
 
86
C
 
87
      SUBROUTINE ZMSTAT(IMNO,AREA,NAXPIX,START,STEP,RBINS,
 
88
     +                  FORMSTR,DEFAUL)
 
89
 
90
      IMPLICIT NONE
 
91
C
 
92
      CHARACTER*(*)  AREA, FORMSTR, DEFAUL
 
93
      REAL      RBINS(*)
 
94
      DOUBLE PRECISION START(*), STEP(*)
 
95
      INTEGER     IMNO, NAXPIX(*)
 
96
C
 
97
      CALL STSTR(1,AREA)
 
98
      CALL STSTR(2,FORMSTR)
 
99
      CALL STSTR(3,DEFAUL)
 
100
      CALL ZST1(IMNO,NAXPIX,START,STEP,RBINS)
 
101
C
 
102
      RETURN
 
103
      END
 
104
C
 
105
 
 
106