source: nappy/trunk/test/testReadAllFFIs.py @ 345

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/nappy/trunk/test/testReadAllFFIs.py@345
Revision 345, 772 bytes checked in by selatham, 15 years ago (diff)

updated by selatham for bug fixes and new write methods

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1#!/usr/bin/env python
2
3"""
4testReadAllFFIs.py
5==================
6
7Tests all read routines for nappy package.
8
9"""
10
11import os
12import sys
13sys.path.append(os.path.join("..", ".."))
14import nappy ; reload(nappy)
15
16
17FFIs=(1001, 1010, 1020, 2010, 2110, 2160, 2310, 3010, 4010)
18
19for ffi in FFIs:
20    print "\n\nTesting FFI: ", ffi
21    file=os.path.join("..", "data_files", "%s.na" % ffi)
22    # if file named after ffi doesn't exist, use an 'a' version.
23    if not os.path.exists(file): file=os.path.join("..", "data_files", "%sa.na" % ffi)
24    f=nappy.openNAFile(file)
25    f.readData()
26
27    print "NVPM:", f.NVPM
28    print "DX:",f.DX
29    print "VNAME", f.VNAME
30    print "V:",f.V[0]
31
32    if f.NAUXV>1:
33        print "AUX:"
34        print f.ANAME[0], f.ASCAL[0]
35        print f.A[0]
Note: See TracBrowser for help on using the repository browser.