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

« back to all changes in this revision

Viewing changes to applic/proc/diffima.prg

  • 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
! @(#)diffima.prg       19.1 (ESO-DMD) 02/25/03 13:20:08
 
2
! +++++++++++++++++++++++++++++++++++++++++++++++++
 
3
!
 
4
! MIDAS procedure diffima.prg to compare the pixels of two Midas images
 
5
! K. Banse      970718
 
6
!
 
7
! execute as @a diffima ima_a ima_b epsilon
 
8
!
 
9
! with ima_a, ima_b - Midas images
 
10
!      epsilon = max. allowd diff-value (defaulted to 0.0004)
 
11
 
12
! if the image data are not equal, keyword OUTPUTI(10) = -1
 
13
!                                  else    OUTPUTI(10) = 0
 
14
 
15
! the difference image is stored in middummd.bdf 
 
16
! even if we work in the FITS work environment!
 
17
 
18
! 011113        last modif
 
19
 
20
! +++++++++++++++++++++++++++++++++++++++++++++++++
 
21
!
 
22
define/param p1 ? ima "Enter frame1: "
 
23
define/param p2 ? ima "Enter frame2: "
 
24
define/param p3 0.0004 N "Enter epsilon: "
 
25
define/local rk/r/1/3 0.,0.,{p3}
 
26
!
 
27
! force creation of Midas format image file
 
28
compute/pixel &d.bdf = {p1}-{p2}
 
29
 
30
statist/image &d.bdf >temp.data
 
31
rk(1) = m$abs(outputr(1))               !abs(minimum)
 
32
rk(2) = m$abs(outputr(2))               !abs(maximum)
 
33
if rk(1) .gt. rk(3) .or. rk(2) .gt. rk(3) then
 
34
   outputi(10) = -1
 
35
   $more temp.data
 
36
else
 
37
   outputi(10) = 0
 
38
endif
 
39