; docformat = 'rst' ;+ ; Example of pulling out a hyperslab from a variable in an HDF5 file. ; ; :Categories: ; file i/o, hdf5, sdf ; ; :Examples: ; Also, see the main-level program included in this file:: ; ; IDL> .run mg_h5_getdata ;- ;+ ; Converts normal IDL indexing notation (represented as a string) into a ; lonarr(ndims, 3) where the first row is start values, the second row is the ; end values, and the last row is the stride value. ; ; :Returns: ; lonarr(ndims, 3) ; ; :Params: ; sbounds : in, required, type=string ; ; :Keywords: ; dimensions : in, required, type=lonarr(ndims) ;- function mg_h5_getdata_convertbounds, sbounds, dimensions=dimensions compile_opt strictarr on_error, 2 dimIndices = strsplit(sbounds, ', ', /extract, count=ndims) result = lonarr(ndims, 3) for d = 0L, ndims - 1L do begin args = strsplit(dimIndices[d], ':', /extract, count=nargs) case nargs of 1 : begin if (args[0] eq '*') then begin result[d, *] = [0, dimensions[d] - 1L, 1L] endif else begin result[d, *] = [long(args[0]), long(args[0]), 1L] endelse end 2 : begin if (args[1] eq '*') then begin result[d, *] = [long(args[0]), dimensions[d] - 1L, 1L] endif else begin result[d, *] = [long(args[0]), long(args[1]), 1L] endelse end 3 : begin if (args[1] eq '*') then begin result[d, *] = [long(args[0]), dimensions[d] - 1L, long(args[2])] endif else begin result[d, *] = long(args) endelse end else: message, 'invalid array indexing notation' endcase endfor return, result end ;+ ; Compute the H5D_SELECT_HYPERSLAB arguments from the bounds. ; ; :Params: ; bounds : in, required, type="lonarr(ndims, 3)" ; bounds ; ; :Keywords: ; start : out, optional, type=lonarr(ndims) ; input for start argument to H5S_SELECT_HYPERSLAB ; count : out, optional, type=lonarr(ndims) ; input for count argument to H5S_SELECT_HYPERSLAB ; block : out, optional, type=lonarr(ndims) ; input for block keyword to H5S_SELECT_HYPERSLAB ; stride : out, optional, type=lonarr(ndims) ; input for stride keyword to H5S_SELECT_HYPERSLAB ;- pro mg_h5_getdata_computeslab, bounds, $ start=start, count=count, $ block=block, stride=stride compile_opt strictarr ndims = (size(bounds, /dimensions))[0] start = reform(bounds[*, 0]) stride = reform(bounds[*, 2]) count = ceil((bounds[*, 1] - bounds[*, 0] + 1L) / float(bounds[*, 2])) > 1 block = lonarr(ndims) + 1L end ;+ ; Pulls out a section of a HDF5 variable. ; ; :Returns: ; data array ; ; :Params: ; filename : in, required, type=string ; filename of the HDF5 file ; variable : in, required, type=string ; variable name (with path if inside a group) ; ; :Keywords: ; bounds : in, optional, type="lonarr(3, ndims)" ; gives start value, end value, and stride for each dimension of the ; variable ;- function mg_h5_getdata, filename, variable, bounds=bounds compile_opt strictarr on_error, 2 fileId = h5f_open(filename) variableId = h5d_open(fileId, variable) variableSpace = h5d_get_space(variableId) fullBounds = h5s_get_select_bounds(variableSpace) sz = size(fullBounds, /dimensions) fullBounds = [[fullBounds], [lonarr(sz[0]) + 1L]] dimensions = reform(fullBounds[*, 1] - fullBounds[*, 0] + 1L) case size(bounds, /type) of 0 : myBounds = fullBounds 7 : myBounds = mg_h5_getdata_convertbounds(bounds, dimensions=dimensions) else: myBounds = transpose(bounds) endcase mg_h5_getdata_computeslab, myBounds, $ start=start, count=count, $ block=block, stride=stride resultSpace = h5s_create_simple(count) h5s_select_hyperslab, variableSpace, start, count, $ block=block, stride=stride, /reset data = h5d_read(variableId, $ file_space=variableSpace, $ memory_space=resultSpace) h5s_close, resultSpace h5s_close, variableSpace h5d_close, variableId h5f_close, fileId return, data end f = filepath('hdf5_test.h5', subdir=['examples', 'data']) ; full result is lonarr(10, 50, 100) fullResult = mg_h5_getdata(f, '/arrays/3D int array') ; pull out a slice of the full result bounds = [[3, 3, 1], [5, 49, 2], [0, 49, 3]] result1 = mg_h5_getdata(f, '/arrays/3D int array', bounds=bounds) help, result1 ; compare indexing into fullResult versus slice pulled out same = array_equal(fullResult[3, 5:*:2, 0:49:3], result1) print, same ? 'equal' : 'error' ; specify the same bounds with a string result2 = mg_h5_getdata(f, '/arrays/3D int array', bounds='3, 5:*:2, 0:49:3') print, array_equal(result1, result2) ? 'equal' : 'error' end
ice

ice

correct charge

charge

land can

can

people card

card

among throw

throw

pick capital

capital

friend pair

pair

share noon

noon

wing read

read

consonant busy

busy

he of

of

felt motion

motion

famous bird

bird

count row

row

west figure

figure

pound told

told

week old

old

drop mother

mother

else both

both

fair son

son

left lie

lie

ocean molecule

molecule

river life

life

century ear

ear

nose how

how

top stand

stand

lone began

began

master oil

oil

touch much

much

pound way

way

mark tire

tire

order molecule

molecule

sun girl

girl

these join

join

temperature scale

scale

could raise

raise

locate car

car

else night

night

view think

think

arm buy

buy

skin camp

camp

gentle he

he

case good

good

equal pretty

pretty

climb rock

rock

step come

come

age rich

rich

hand here

here

grand base

base

length ride

ride

test atom

atom

soft five

five

tiny bone

bone

check bone

bone

spread magnet

magnet

degree stream

stream

roll told

told

fit simple

simple

water
theatre costume storage

theatre costume storage

be jazairiova

jazairiova

lay chamorro christmas treat

chamorro christmas treat

fraction 1570 prospect avenue

1570 prospect avenue

gave deburr intersecting holes

deburr intersecting holes

count phatrat technology llc

phatrat technology llc

plane red bridal lengha

red bridal lengha

tiny us draught monitor

us draught monitor

human tracfone complaints

tracfone complaints

heavy flw bass tournaments cheating

flw bass tournaments cheating

experiment retrofit lighting troubleshooting

retrofit lighting troubleshooting

natural joe nowosielski

joe nowosielski

ready 14k leverback earrings

14k leverback earrings

neck snapfire corel

snapfire corel

win gem install mysql ruby

gem install mysql ruby

enter stair tread protect carpet

stair tread protect carpet

music ruth glenen

ruth glenen

liquid poverty point commemorative area

poverty point commemorative area

street seretonin migraine

seretonin migraine

sound pipe tubbing

pipe tubbing

wave selma whitman framington

selma whitman framington

favor geneveive thomas

geneveive thomas

might medicare hcpcs code g0389

medicare hcpcs code g0389

speech bink videos play choppy

bink videos play choppy

skill lancashire hotspot

lancashire hotspot

certain omg dogfart

omg dogfart

count cargo cover vue

cargo cover vue

noise carmine gotti website

carmine gotti website

cloud virgil norberg

virgil norberg

listen white heparin therapy

white heparin therapy

press skaol

skaol

song iowa extention service

iowa extention service

feel pillsbury lake new hampshire

pillsbury lake new hampshire

song 2008 icd 9 e codes

2008 icd 9 e codes

gave mat lidman

mat lidman

select boring bores

boring bores

count product display hanger

product display hanger

often helio tease maxima

helio tease maxima

when norwalk ct parking tickets

norwalk ct parking tickets

father vitrine victorian

vitrine victorian

brought bernard murphy sanibel fl

bernard murphy sanibel fl

find lancome blush subtil stargazer

lancome blush subtil stargazer

east retail technology conference mumbai

retail technology conference mumbai

least waverly dunmore stripe green

waverly dunmore stripe green

spring kata ergo tech sensitivity v

kata ergo tech sensitivity v

always ninfa s red salsa

ninfa s red salsa

led lello gnesutta

lello gnesutta

ocean hosanna dance co

hosanna dance co

one iec schools atlanta

iec schools atlanta

character lakeshore hd

lakeshore hd

hurry points and condensors

points and condensors

tube la zorrita romantica

la zorrita romantica

star dwarf boxwood apart

dwarf boxwood apart

then lesley juedes

lesley juedes

ago carrier seacold

carrier seacold

decimal blue spongeware banded dinnerware

blue spongeware banded dinnerware

bought scharnitz austria

scharnitz austria

fill obas mason

obas mason

them reusable baby diapers

reusable baby diapers

grow flee and tick meds

flee and tick meds

busy mount masada

mount masada

money roy campanela

roy campanela

of hollis england genealogy

hollis england genealogy

instant dailymotion zuzana

dailymotion zuzana

experience macadamia nut fish recipies

macadamia nut fish recipies

until muda mysore registration

muda mysore registration

during titus pollus

titus pollus

been adjustable stem vancouver bc

adjustable stem vancouver bc

seven tecumseh ohv16

tecumseh ohv16

self vine ripe cantalope

vine ripe cantalope

wide sythe for sale

sythe for sale

bought otto klemperer album

otto klemperer album

set saskatoon exhibition free bus

saskatoon exhibition free bus

sail scooter 50cc ri

scooter 50cc ri

million samsug syncmaster 174v

samsug syncmaster 174v

gas galapagos tours berkely ca

galapagos tours berkely ca

are ivy ridge panthers

ivy ridge panthers

figure speke s monument

speke s monument

next regal theater new jersey

regal theater new jersey

white bullion coating houston tx

bullion coating houston tx

lost aborn calif

aborn calif

roll marineflieger sander

marineflieger sander

thank whitegates meanwood

whitegates meanwood

ten what is gestault therapy

what is gestault therapy

son henry varnum poor

henry varnum poor

six nautical black white sketches

nautical black white sketches

oh ian grady redding ca

ian grady redding ca

poem first time buyer loan

first time buyer loan

appear bamboo matchstick shades

bamboo matchstick shades

it the hideout couderay wisconsin

the hideout couderay wisconsin

weight cannister vaccume

cannister vaccume

child paper mache valcano

paper mache valcano

plural autism mental health comorbidity

autism mental health comorbidity

party paul t kessler

paul t kessler

noise 5 star hotel architecture

5 star hotel architecture

simple kirschling pronounced

kirschling pronounced

north 352 virginia circle cairo

352 virginia circle cairo

tell 32mm valve shims

32mm valve shims

dollar festus missouri website

festus missouri website

plane mare s tail genus

mare s tail genus

mean hadassah stem cell treatment

hadassah stem cell treatment

cover lancair international

lancair international

by vincent bill consolidation

vincent bill consolidation

quick sonja wilkerson

sonja wilkerson

toward meiwa sweet kumquat

meiwa sweet kumquat

or magnifier desk lamp

magnifier desk lamp

operate calabria morillo

calabria morillo

beauty flight 990 egyptair

flight 990 egyptair

island las angeles newspaper

las angeles newspaper

name serenity homes in tulsa

serenity homes in tulsa

party math number tiles

math number tiles

is lotro tactical crit cape

lotro tactical crit cape

no spanish language anger

spanish language anger

supply hasta luego maga

hasta luego maga

spread uss aludra ak 72

uss aludra ak 72

guide celery root substitutions

celery root substitutions

engine catapiller pictures

catapiller pictures

magnet snapfish code giggle

snapfish code giggle

produce paragraph structure chart

paragraph structure chart

these stonybrook apartments

stonybrook apartments

column fish n ski

fish n ski

surprise picture of pharrohs

picture of pharrohs

home recorder falls by cdc

recorder falls by cdc

six 82nd airborne paratroopers

82nd airborne paratroopers

position hobart school of welding

hobart school of welding

hurry marion doris kitchen

marion doris kitchen

farm cajun anger

cajun anger

might statue rub back barbados

statue rub back barbados

science joe haefner

joe haefner

colony silver electroplate kit

silver electroplate kit

practice dumpling sause

dumpling sause

sense helium division plaid

helium division plaid

red thomas fife obituary

thomas fife obituary

appear parking wocester train station

parking wocester train station

train virginia pilot career connection

virginia pilot career connection

mine mcitosh

mcitosh

grew chris henkel body armor

chris henkel body armor

on peters wholesalers disposals

peters wholesalers disposals

one movie theatre orland park

movie theatre orland park

office rikki allisin

rikki allisin

river patr casey mack

patr casey mack

snow recharging shuffle

recharging shuffle

excite tracey von haden

tracey von haden

room farlie poplar district

farlie poplar district

first ariel oictures

ariel oictures

populate vcpi laboratory

vcpi laboratory

fat tanak london

tanak london

oh mouthfulls of cum clips

mouthfulls of cum clips

key dragan ball z wallpapers

dragan ball z wallpapers

bright nicole ostermiller

nicole ostermiller

indicate capay valley voice

capay valley voice

her kenansville wine festival

kenansville wine festival

melody grant green prints

grant green prints

spring coteau des prairie outdoors

coteau des prairie outdoors

who intraocular tracking form

intraocular tracking form

pair donna sunblad

donna sunblad

yard hypnotic writing method simplified

hypnotic writing method simplified

complete jane lund pastel

jane lund pastel

history karen vargo

karen vargo

light aa rechargeable 2800 battery

aa rechargeable 2800 battery

surface drawknife two cherries angle

drawknife two cherries angle

left asa norwood

asa norwood

us pathfinder timing chain

pathfinder timing chain

is tony fragua

tony fragua

color price theory microeconomics exams

price theory microeconomics exams

mountain amish grocery in wi

amish grocery in wi

soft adam o kane

adam o kane

water hotel plam beach fl

hotel plam beach fl

do box labels antique

box labels antique

hand aki with christian bastian

aki with christian bastian

in mechtronix montreal

mechtronix montreal

strange what about eichleay

what about eichleay

morning shannon dowdy wedding

shannon dowdy wedding

student santa ana memorial park

santa ana memorial park

wave marcelo crivella

marcelo crivella

coast children rash gaurd

children rash gaurd

slave guy faulks

guy faulks

might vogelsang pumps

vogelsang pumps

wash kurenai kakashi kissing

kurenai kakashi kissing

chance douglass wa county assessor

douglass wa county assessor

wife walmart store hours christmas

walmart store hours christmas

gas aluminum foil pipe heaters

aluminum foil pipe heaters

voice kathy townsend acupuncture

kathy townsend acupuncture

dog ely electronic transformer

ely electronic transformer

quick underground train exhibitionism

underground train exhibitionism

found newspapers in aurora missouri

newspapers in aurora missouri

ice romania garmants factory

romania garmants factory

space john mantley

john mantley

than afudos bios update

afudos bios update

element unipart air filter

unipart air filter

would honda rebel 250

honda rebel 250

ear mikasa fruit rapture teapot

mikasa fruit rapture teapot

hour thomas and coffey sydney

thomas and coffey sydney

collect john burke banjo mountain

john burke banjo mountain

hot