mglib

Personal IDL library for M. Galloy

single page | use frames     summary     class     fields     routine details     file attributes

hdf5/

mgffh5dataset__define.pro

file i/o, hdf5, sdf


This class represents a variable in an HDF5 file.

Examples

Try:

IDL> h = mg_h5(file_which('hdf5_test.h5')) IDL> g1 = h.images IDL> e = g1.eskimo IDL> help, e E H5BYTE = Array[600, 649] IDL> help, size(e, /structure), /structures ** Structure IDL_SIZE, 8 tags, length=80, data length=80: TYPE_NAME STRING 'OBJREF' STRUCTURE_NAME STRING '' TYPE INT 11 FILE_LUN INT 0 FILE_OFFSET LONG 0 N_ELEMENTS LONG 389400 N_DIMENSIONS LONG 2 DIMENSIONS LONG Array[8] IDL> plot, e[*, 400], xstyle=9, ystyle=8 IDL> print, e.image_colormodel, format='(%"IMAGE_COLORMODEL attribute = %s")' IMAGE_COLORMODEL attribute = RGB IDL> print, e['IMAGE_COLORMODEL'], format='(%"IMAGE_COLORMODEL attribute = %s")' IMAGE_COLORMODEL attribute = RGB

Author information

Author

Michael Galloy

Other file information

Requires:

IDL 8.0

Class description for mgffh5dataset

Inheritance

All ancestor classes: mgffh5base idl_object

Properties

Properties in mgffh5dataset

_extra init
_ref_extra get
error init

Routines

Methods inherited from idl_object

Methods inherited from mgffh5base

Routines from mgffh5dataset__define.pro

mgffh5dataset::getProperty, _ref_extra=_ref_extra

Get properties

result = mgffh5dataset::_overloadSize()

Operator overloading method for returning information from SIZE.

result = mgffh5dataset::_overloadHelp(varname)

Overload method for HELP routine output.

result = mgffh5dataset::_overloadPrint()

Overload method for PRINT routine output.

mgffh5dataset::_computeslab, bounds [, start=lonarr(ndims)] [, count=lonarr(ndims)] [, block=lonarr(ndims)] [, stride=lonarr(ndims)]

Convert the parameters needed by H5S_SELECT_HYPERSLAB.

result = mgffh5dataset::_convertbounds(isRange, bounds, dimensions=dimensions)

Helper method to convert information about a dimension's range into a three element vector: [start, stop, stride].

result = mgffh5dataset::readAttribute(name)

Get value of attribute.

result = mgffh5dataset::_overloadBracketsRightSide(isRange, ss1 [, ss2] [, ss3] [, ss4] [, ss5] [, ss6] [, ss7] [, ss8])

Operator overloading methods for retrieving subsets of the dataset.

mgffh5dataset::cleanup

Free resources.

result = mgffh5dataset::init( [error=long], _extra=_extra)

Create an HDF5 dataset.

mgffh5dataset__define

Define instance variables and class inheritance.

Routine details

top mgffh5dataset::getProperty

mgffh5dataset::getProperty, _ref_extra=_ref_extra

Get properties

Keywords

_ref_extra

top mgffh5dataset::_overloadSize

result = mgffh5dataset::_overloadSize()

Operator overloading method for returning information from SIZE.

Return value

lonarr

Examples

Try:

IDL> h = mg_h5(file_which('hdf5_test.h5')) IDL> g = h.images IDL> print, size(g.eskimo) 2 600 649 11 389400

top mgffh5dataset::_overloadHelp

result = mgffh5dataset::_overloadHelp(varname)

Overload method for HELP routine output. Returns information about data as a normal array, but tacks on 'H5' to the data type.

Return value

string

Parameters

varname in required type=string

variable's name so that it can be placed into the output

top mgffh5dataset::_overloadPrint

result = mgffh5dataset::_overloadPrint()

Overload method for PRINT routine output. Returns entire data array.

Return value

numeric array

top mgffh5dataset::_computeslab

mgffh5dataset::_computeslab, bounds [, start=lonarr(ndims)] [, count=lonarr(ndims)] [, block=lonarr(ndims)] [, stride=lonarr(ndims)]

Convert the parameters needed by H5S_SELECT_HYPERSLAB.

Parameters

bounds in required type=lonarr(ndims, 3)

bounds in the form of [start, stop, stride] indices

Keywords

start out optional type=lonarr(ndims)
count out optional type=lonarr(ndims)
block out optional type=lonarr(ndims)
stride out optional type=lonarr(ndims)

top mgffh5dataset::_convertbounds

result = mgffh5dataset::_convertbounds(isRange, bounds, dimensions=dimensions)

Helper method to convert information about a dimension's range into a three element vector: [start, stop, stride].

Parameters

isRange in required type=boolean

boolean indicating whether the dimension is a range or a single index

bounds in required type=long/lonarr(3)

if isRange is set then bounds will be a lonarr(3) specifying [start, stop, stride] (with -1 in the stop position indicating to to continue to the end of the dimension); if isRange is not set then bounds will be a single index

Keywords

dimensions

top mgffh5dataset::readAttribute

result = mgffh5dataset::readAttribute(name)

Get value of attribute.

Return value

attribute value

Parameters

name in required type=string

name of attribute

top mgffh5dataset::_overloadBracketsRightSide

result = mgffh5dataset::_overloadBracketsRightSide(isRange, ss1 [, ss2] [, ss3] [, ss4] [, ss5] [, ss6] [, ss7] [, ss8])

Operator overloading methods for retrieving subsets of the dataset. Also will retrieve an attribute if indexed by the attribute name as a string (useful to specifiy an attribute name case-sensitively).

Return value

numeric array

Parameters

isRange in required type=lonarr

lonarr with 1-8 elements, 1 for each dimension specified in the indexing operation, indicating whether the corresponding dimension is a range or single value

ss1 in required type=long/lonarr(3)

subscripts for 1st dimension

ss2 in optional type=long/lonarr(3)

subscripts for 2nd dimension

ss3 in optional type=long/lonarr(3)

subscripts for 3rd dimension

ss4 in optional type=long/lonarr(3)

subscripts for 4th dimension

ss5 in optional type=long/lonarr(3)

subscripts for 5th dimension

ss6 in optional type=long/lonarr(3)

subscripts for 6th dimension

ss7 in optional type=long/lonarr(3)

subscripts for 7th dimension

ss8 in optional type=long/lonarr(3)

subscripts for 8th dimension

Examples

Try:

IDL> h = mg_h5(file_which('hdf5_test.h5')) IDL> g = h.images IDL> e = g.eskimo IDL> plot, e[*, 400], xstyle=9, ystyle=8

top mgffh5dataset::cleanup

mgffh5dataset::cleanup

Free resources.

top mgffh5dataset::init

result = mgffh5dataset::init( [error=long], _extra=_extra)

Create an HDF5 dataset.

Return value

1 for success, 0 for failure

Keywords

error out optional type=long

error code, 0 indicates no error

_extra

top mgffh5dataset__define

mgffh5dataset__define

Define instance variables and class inheritance.

File attributes

Modification date: Wed May 14 15:07:14 2014
Lines: 176
Docformat: rst rst
Personal library of Michael Galloy
Contact me if you have enhancement requests or bug fixes.