pyUSID.io.hdf_utils.modelΒΆ

Utilities for reading and writing USID datasets that are highly model-dependent (with or without N-dimensional form)

Created on Tue Nov 3 21:14:25 2015

@author: Suhas Somnath, Chris Smith

Functions

get_dimensionality

Get the size of each index dimension in a specified sort order

get_sort_order

Find how quickly the spectroscopic values are changing in each row and the order of rows from fastest changing to slowest.

get_unit_values

Gets the unit arrays of values that describe the spectroscopic dimensions

map_grid_to_cartesian

Map an incomplete measurement, such as a spiral scan, to a cartesian grid. :param h5_main: Dataset containing the sparse measurement :type h5_main: pyUSID.USIDataset :param grid_shape: Shape of the output numpy.ndarray. :type grid_shape: int or [int, int] :param mode: Method used for building a cartesian grid. Available methods = 'histogram', 'linear', 'nearest', 'cubic' Use kwargs to pass onto each of the techniques :type mode: str, optional. Default = 'histogram'.

reshape_from_n_dims

Reshape the input 2D matrix to be N-dimensions based on the position and spectroscopic datasets.

reshape_to_n_dims

Reshape the input 2D matrix to be N-dimensions based on the position and spectroscopic datasets.

write_main_dataset

Writes the provided data as a 'Main' dataset with all appropriate linking.

write_sidpy_dataset

Writes a sidpy.Dataset as a USID dataset in the provided HDF5 Group.