Personal IDL library for M. Galloy

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


includes main-level program


top mg_getdata

result = mg_getdata(filename, variable [, bounds=lonarr(3, ndims) or string] [, error=long])

Pulls out a section of a variable in a file.

Return value

data array


filename in required type=string

filename of the file

variable in required type=string

variable name (with path if inside a group)


bounds in optional type=lonarr(3, ndims) or string

gives start value, end value, and stride for each dimension of the variable

error out optional type=long

error value


Try the main-level example program at the end of this file:

IDL> .run mg_getdata
It retrieves data from several different data formats via MG_GETDATA:
nc_filename = file_which('') im = mg_getdata(nc_filename, '/image') title = mg_getdata(nc_filename, '/image.TITLE') line = mg_getdata(nc_filename, '/image[*, 256]') h5_filename = filepath('hdf5_test.h5', subdir=['examples', 'data']) arr3d = mg_getdata(h5_filename, '/arrays/3D int array[3, 5:*:2, 0:49:3]')

File attributes

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