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(ds_index[, index_sort])

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

get_sort_order(ds_spec)

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

get_unit_values(ds_inds, ds_vals[, …])

Gets the unit arrays of values that describe the spectroscopic dimensions

map_grid_to_cartesian(h5_main, grid_shape[, …])

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(data_n_dim[, h5_pos, …])

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

reshape_to_n_dims(h5_main[, h5_pos, …])

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

write_main_dataset(h5_parent_group, …[, …])

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