Open a file as an h5py-like object.
Format supported: - h5 files, if h5py module is installed - SPEC files exposed as a NeXus layout - raster files exposed as a NeXus layout (if fabio is installed) - Numpy files (‘npy’ and ‘npz’ files)
The filename can be trailled an HDF5 path using the separator ::. In this case the object returned is a proxy to the target node, implementing the close function and supporting with context.
The file is opened in read-only mode.
Parameters: | filename (str) – A filename which can containt an HDF5 path by using :: separator. |
---|---|
Raises: | IOError if the file can’t be loaded or path can’t be found |
Return type: | h5py-like node |
Saves any number of curves to various formats: Specfile, CSV, txt or npy. All curves must have the same number of points and share the same x values.
Parameters: |
|
---|
When saving to Specfile format, each curve is saved as a separate scan with two data columns (x and y).
CSV and txt formats are similar, except that the txt format allows user defined header and footer text blocks, whereas the CSV format has only a single header line with columns labels separated by field delimiters and no footer. The txt format also allows defining a record separator different from a line break.
The npy format is written with numpy.save and can be read back with numpy.load. If xlabel and ylabels are undefined, data is saved as a regular 2D numpy.ndarray (contatenation of x and y). If both xlabel and ylabels are defined, the data is saved as a numpy.recarray after being transposed and having labels assigned to columns.
True if the object is a h5py.Dataset-like object.
Parameters: | obj – An object |
---|
True if the object is a h5py.Group-like object.
Parameters: | obj – An object |
---|
True is the object is an h5py.File-like object.
Parameters: | obj – An object |
---|
True if the object is a h5py.SoftLink-like object.
Parameters: | obj – An object |
---|