EIT Software Listings

 

anal
obsolete
response
util

 

Previous Routine
Next Routine

 

Listing of $SSW/soho/eit/idl/util/read_eits.pro

 


pro read_eits, eitfiles, odata, rebin=rebin
;+
;   Name: read_eits
;
;   Purpose: read of one or multiple EIT files
;
;   Input: 
;      eitfiles - input file array
;
;   Output Parameters:
;      odata   - data array - 2D or 3D
;
;   Calling Sequence:
;      read_eits, eitfiles
;
;   History:
;      15-Jan-1996 (SLF) - orig LPARL access of EIT quicklook data
;      17-jan-1996 (SLF) - allow multiple reads (cube returned)
;      29-jan-1996 (SLF) - use index file for summary information
;      18-feb-1996 (SLF) - broke the info part out
;-

summary=1
if n_params() eq 0 then begin
   message,/info,"IDL> read_eit, files, info, data [,rebin=rebin]
   return
endif

nim=n_elements(eitfiles)
ss=lindgen(nim)

multi=nim gt 1

if ss(0) ge 0 then begin
   im=0
   eitfile=eitfiles(ss(im))
   message,/info,"Reading: " + eitfile + "..."
   data=readfits(eitfile,head)
   simg=(size(data))(1:2)
   case n_elements(rebin) of
      1: reb=replicate(rebin,2)
      2: reb=rebin
      else: reb=simg
   endcase

   if multi then begin
      odata=make_array(reb(0),reb(1),nim,type=data_chk(data,/type))
      if total(abs(reb - simg)) gt 0 then data=congrid(data,reb(0),reb(1))
      odata(0,0,im)=data        
      while im lt (nim-1) do begin
	 im=im+1      
         eitfile=eitfiles(ss(im))
         message,/info,"Reading: " + eitfile + "..."
         data=readfits(eitfile,head)
         simg=(size(data))(1:2)
         if total(abs(reb - simg)) gt 0 then data=congrid(data,reb(0),reb(1))
         odata(0,0,im)=data        
      endwhile
    endif else begin
        if total(abs(reb - simg)) gt 0 then odata=congrid(data,reb(0),reb(1)) else $
          odata=temporary(data)
   endelse
endif else  message,/info,"Nothing selected, exiting..."

return
end


Web curator: Frédéric Auchère
Responsible NASA official: Joseph B. Gurman, Facility Scientist, Solar Data Analysis Center
joseph.b.gurman@gsfc.nasa.gov
+1 301 286-4767
NASA Goddard Space Flight Center
Solar Physics Branch / Code 682

Last revised: - Wed May 9 21:45:23 2007- F. Auchère