files=findfile('tauh2n21*') nf=n_elements(files) length=70000l-11000l for i=0,nf-1 do begin openr,1,files(i),/compress a=assoc(1,dblarr(length)) tempstru={lam:a(0),tj0:a(1),tj1:a(2),tj2:a(3),tj3:a(4),tj4:a(5),tj5:a(6),tj6:a(7),tj7:a(8),tj8:a(9),tj9:a(10),tj10:a(11),tj11:a(12),tj12:a(13),tj13:a(14),tj15:a(16)} apos=strpos(files(i),'.') aname=strmid(files(i),0,apos) mwrfits,tempstru,'f'+aname+'.fits' close,1 endfor s=mrdfits('f'+aname+'.fits',1) end