;+ ; Name: eit_lzsort ; ; Purpose: get index of subimages from a level zero FITS file which ; match selected wavelength ; ; Input Parameters: ; filename - EIT level zero FITS file ; wave - specified wavelength of subimages ; ; Output Parameters: ; Function return indices of subimages matching specified wavelength ; make_array - set if want to return data ; img - if make_array specified returns subimage data ; ; Keyword Parameters: none ; ; Calling Sequence: ; indices=eit_lzsort(filename,wave [,img=img, /make_array]) ; ; Method: ; Check if FITS file, call eit_fxpar to read in subimage info ; returns data cube if asked for via: ; IDL> img=readfits(file) ; IDL> img=img(index) ; ; History: ; 18-July-1996 - J. Newmark - created ;- FUNCTION eit_lzsort,filename,wave,img=img,make_array=make_array stat=is_fits(filename) IF stat NE 1 THEN BEGIN PRINT,'The file ',strtrim(filename,2),' is not a FITS file.' RETURN,-1 ENDIF hdr=headfits(filename) waves=eit_fxpar(hdr,'WAV',image_no='all') index=WHERE(strtrim(waves,2) EQ strtrim(wave,2)) IF KEYWORD_SET(make_array) THEN BEGIN img=readfits(filename) img=img(index) ENDIF RETURN,index END
Last revised: - Wed May 9 21:45:19 2007- F. Auchère