1
! ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3
! MIDAS procedure checkFITSkw.prg to check FITS header keywords
6
! use as @a checkFITSkw FITSfile option
8
! values of DATAMIN,DATAMAX are stored in keyword outputr(1), (2)
10
! value of BITPIX is stored in keyword outputr(3)
13
! ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15
define/param p1 ? c "Enter name of FITS file:"
16
define/param p2 0 n "Enter option (1 for DATAMIN,DATAMAX):"
18
define/local fca/i/1/2 0 all
19
define/local count/i/1/1 0
20
define/local option/i/1/1 {p2}
25
if option .lt. 1 .or. option .gt. 2 return
27
intape/fits 1 midd {p1} fnn >middumm.dat
28
open/file middumm.dat read fca
29
if fca(1) .lt. 0 return
35
read/file {fca(1)} inputc 32
36
if fca(2) .eq. -1 goto eof
39
! if inputc(1:1) .eq. " " then
42
! write/out {count}: {inputc(1:8)}
45
if option .eq. 2 goto bitpix
47
if inputc(1:8) .eq. "DATAMIN " then
48
outputr(1) = {inputc(10:32)}
50
if inputc(1:8) .eq. "DATAMAX " outputr(2) = {inputc(10:32)}
55
if inputc(1:8) .eq. "BITPIX " then
56
outputr(3) = {inputc(10:32)}