Changeset 1131 for trunk/bindings/python/nxs/__init__.py
- Timestamp:
- 02/12/08 18:34:40 (3 years ago)
- File:
-
- 1 edited
-
trunk/bindings/python/nxs/__init__.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bindings/python/nxs/__init__.py
r1124 r1131 13 13 platforms from the NeXus site. Details of where the nxs package 14 14 searches for the libraries are recorded in `nxs.napi`. 15 16 Example17 =======18 19 First we need to load the file structure::20 21 import nxs22 f = nxs.load('file.nxs')23 24 We can examine the file structure using a number of commands::25 26 f.nxattrs # Shows file name, date, user, and NeXus version27 f.NXentry # Shows the list of datasets in the file28 f.NXentry[0].nxdir() # Lists the fields in the first entry29 30 Some files can even be plotted automatically::31 32 f.NXentry[0].data.nxplot()33 34 We can create a copy of the file using write::35 36 nxs.save('copy.nxs', tree)37 38 For a complete description of the features available in this tree view39 of the NeXus data file, see `nxs.tree`.40 41 NeXus API42 =========43 44 When converting code to python from other languages you do not45 necessarily want to rewrite the file handling code using the46 tree view. The `nxs.napi` module provides an interface which47 more closely follows the NeXus application programming48 interface (NAPI_).49 50 .. _Nexus: http://www.nexusformat.org/Introduction51 .. _NAPI: http://www.nexusformat.org/Application_Program_Interface52 .. _HDF: http://www.hdfgroup.org53 15 """ 54 16 55 17 from nxs.napi import * 56 from nxs.tree import *
Note: See TracChangeset
for help on using the changeset viewer.
