nxtomo.io#

some io utils to handle nexus and hdf5 with h5py

Functions

check_virtual_sources_exist(fname, data_path)

Check that a virtual dataset points to actual data.

contextmanager(func)

@contextmanager decorator.

cwd_context([new_cwd])

create a context with 'new_cwd'.

from_data_url_to_virtual_source(url, target_path)

convert a DataUrl to a set (as tuple) of h5py.VirtualSource

from_virtual_source_to_data_url(vs)

convert a h5py.VirtualSource to a DataUrl

get_swmr_mode()

Return True if the swmr should be used in the tomoools scope

hdf5_open(filename)

Open a file as an h5py-like object.

to_target_rel_path(file_path, target_path)

cast file_path to a relative path according to target_path.

Classes

DataUrl([path, file_path, data_path, ...])

Non-mutable object to parse a string representing a resource data locator.

HDF5File

alias of File