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

« back to all changes in this revision

Viewing changes to contrib/template/examples/exa16.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
!+ 
 
2
! Example 16, MIDAS procedure exa16.prg 
 
3
!+ 
 
4
DEFINE/PARAM P1 ? ? "Enter FITS file name:" 
 
5
!  
 
6
DEFINE/LOCAL INA/C/1/80 " " all ! that fills all elements of INA with blanks
 
7
DEFINE/LOCAL K/I/1/2 0,0
 
8
!  
 
9
K = M$INDEX(P1,".mt")           ! test, if type of FITS file entered
 
10
IF K .LT. 2 THEN 
 
11
  WRITE/KEYW INA {P1}.mt        ! if not, append type
 
12
ELSE 
 
13
  WRITE/KEYW INA {P1}           ! if yes, no need to append type
 
14
ENDIF
 
15
INTAPE/FITS 1 midd {ina} fnn | $more
 
16
                  !   but if we want to save the no. of axes of the FITS file
 
17
                  !   we do not use the keyword name INA but it's contents
 
18
K = M$VALUE({ina},naxis) 
 
19
WRITE/OUT we have {K} axes