![]() |
| home | graph lib | utility lib | custom lib | auxiliary lib | tutorials | |
|
zeHDFUse .new("hdf") to create the object. It reads data from and write data to a file in HDF format. The binding support only simple array types of char, short, usiggned short, int, unsigned in, flaot, and double for HDF dataset and attribute. Functions include open, dataset, group, getcmm, putcmm, getvar, putvar, getatt, putatt, list, rename, version. file - a string for file name.mode - a string for input/output mode ("w" for writing). Opens the file for read or write. Open the root group opon success. In write mode, variables and attributes will be replaced by new values without warning. name - a string for dataset name.spec - a zeArray object of unsigned integer to specify dataset dimensions. type - a number for the dataset type. Opens the dataset if only one argument is provided. Tries to create the datset if the other two arguments are provided and the file is in writing mode. name - a string for group name. Tries to open the group. If the file is opened for writing, tries to create a new group if opening the group fail. name - a string for comment name. Returns the named comment of the currently opened group. name - a string for comment name.comm - a string for comment content. Writes the comment to the name in the currently opend group. spec - a zeArray object of unsigned integer type.arr -- a zeArray object to hold data. Reads data to arr from the currently opened dataset according to spec. The data type of arr must be the same as the dataset. The dimension of spec must be m by 2 with m equal to the number of dimensions of the dataset. The first vector of spec specifies the start in each dimension and the second vector the number of data to read from the start. :getvar(arr) arr -- a zeArray object to hold data.Reads all data of the opened dataset to arr. The function will resize arr. spec - a zeArray object of unsigned integer type.arr -- a zeArray object to hold data. Writes data of arr to the currently opened dataset according to spec. The data type of arr must be the same as the dataset. The dimension of spec must be m by 2 with m equal to the number of dimensions of the dataset. The first vector of spec specifies the start in each dimension and the second vector the number of data to read from the start. :putvar(arr) arr -- a zeArray object to hold data.Writes data of arr to the currently opened dataset. The array must have the same size as the dataset. target - a string to indicate group or dataset.name - a string for attribute name. Reads the attribute from the opened group or dataset. Returns a string or numbers depending on attribute content. :putatt(target, name, att1[, att2, ...]) target - a string to indicate group or dataset.name - a string for attribute name. att1 - a string or number as attribute content. att2 - a number as attribute content. Writes the attribute values to the opened group or dataset. If att1 is string, arguments after it will be ignored; otherwise all arguments will be treadted as numbers. target - a string indicating group or dataset. Lists contents of the opened group or attributes of opended dataset. name1 - a string for dataset or group.name2 - a string for dataset or group. In writing mode, tries to rename or move name1 group or dataset to name2 dataset or group. Returns the version number of HDF library as string.
|