1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
"""@package nxs
Python NeXus interface.
NeXus_ is a common data format for neutron, Xray and muon science.
The files contain multidimensional data elements grouped into a
hierarchical structure. The data sets are self-describing, with
a description of the instrument configuration including the units
used as well as the data measured.
The NeXus file interface requires compiled libraries to read the
underlying HDF_ files. Binary packages are available for some
platforms from the NeXus site. Details of where the nxs package
searches for the libraries are recorded in `nxs.napi`.
"""
import unittest
import nxs.napi as napi
import os
class test_file_creation(unittest.TestCase):
@unittest.skipIf('SKIP_NXS_TESTS_HDF5' in os.environ,
"HDF5 tests disabled in environment")
def test_hdf5(self):
f = napi.open("test_hdf5.nxs","w5")
os.remove("test_hdf5.nxs")
@unittest.skipIf('SKIP_NXS_TESTS_HDF4' in os.environ,
"HDF4 tests disabled in environment")
def test_hdf4(self):
f = napi.open("test_hdf4.nxs","w4")
os.remove("test_hdf4.nxs")
@unittest.skipIf('SKIP_NXS_TESTS_MXML' in os.environ,
"MXML tests disabled in environment")
def test_mxml(self):
f = napi.open("test_mxml.nxs","wx")
|