Hi, I'm brand new to IDL but I've been banging my head off this all day: I'm reading in a set of 55 structures from fits files and I'd like to consolidate them into a single structure that I can call without having to redo the read in every time. Unfortunately IDL's need to define everything prior to use has made it rather more difficult than other programs to do this.
The code below is roughly what I would like to do. (Although obviously it doesn't work like this)
for i=2,55 do begin
Spiredata[1,i]=mrdfits('/home/path/to/file.fits',i)
Spiredata[2,i]='textstring'
endfor
I notice that entries in a structure can be named so having the textstring as a name for the corresponding entry would be even better.
Sorry if I've not explained it very well and thanks for any help. :)
|