[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ASSOC



hello people this is not clear to me but i figure some of the IDL GURU's
can help me out i have an bsq file with the dimensions of 554*521*42 and
tried to use the ASSOC function since i knew the dimensions and so
created a structure :
2 variables of x=FLTARR(554) and y=FLTARR(521) and REPLICATED the
structure 42 times into a third variable and then tried the ASSOC
function with it and it ran fine except for when i tried to access any
data it would give me the error of
"File expression not allowed in this context: RESULT."
and if i peaked into it using the variable watch it would crash IDL
every time.  Kinda makes me wish that anything in IDL work as it's
designed to.
I'm using IDL 5.2
PRO Profiles
  ;dealing with a 3D array of sorts.
  z= 42						;depth of the array
  data={mo,x:FLTARR(554),y:FLTARR(521)}
  data_cube=REPLICATE(data,z)			;this is to hold the bsq 							;file
  help,data_cube
  help,data

  filepath=DIALOG_PICKFILE(/MUST_EXIST,TITLE='SELECT DATA FILE')
  GET_LUN,unit
  OPENR,unit,filepath
    result=ASSOC(unit,data_cube)
    ;READU,unit,data_cube,TRANSFER_COUNT=count
  CLOSE,unit
  FREE_LUN,unit

  a=result(0).y[0:6]
  print,a
  print,result.(0).x[*]




END



Sent via Deja.com http://www.deja.com/
Before you buy.