EIT Software Listings

 

anal
obsolete
response
util

 

Previous Routine
Next Routine

 

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

 


function eitoversxt, eitfits, sxtfits, cmdgrid=cmdgrid, fitlimb=fitlimb, $
	gcolor=gcolor, ccolor=ccolor, inverse=inverse
;+
;   Name: eitoversxt
;
;   Purpose: draw EIT contours on SXT image; optionally overlay EIT 32x32 grid
;
;   Calling Sequence: 
;      
;   History: proto-version, 23-jan-1996
;
;   Restrictions:
;      only full sun EIT and SXT , simple FITS for now
;      TODO - rotate SXT image to input time
;-
if not data_chk(eitfits,/string) or not data_chk(sxtfits,/string) then $
   message,"Must supply EIT and SXT FITs file names

if not file_exist(eitfits) then message,"can't find: " + eitfits
if not file_exist(sxtfits) then message,"can't find: " + sxtfits

sxtimg=readfits(sxtfits,shead)
eitimg=readfits(eitfits,ehead)

;---- todo - fits header summary - extract time, size, pointing info ---
stime=fmt_tim(fxpar(shead,'date-obs') + ' ' + fxpar(shead,'time-obs'))
etime=fmt_tim(fxpar(ehead,'date-obs') + ' ' + fxpar(ehead,'time-obs'))
; assume SXT sun-center in FITS file (otherwise, call sxt_cen)
spoint=[fxpar(shead,'crpix1'),fxpar(shead,'crpix2'),fxpar(shead,'crota')]
ssize =[fxpar(shead,'naxis1'),fxpar(shead,'naxis2')]
spoint=spoint * (1024./ssize(0))
esize =[fxpar(ehead,'naxis1'),fxpar(ehead,'naxis2')]

;*********** 
; kludges for full EIT only
if esize(0) ne 1024 or esize(1) ne 1024 then begin
   message,/info,"Sorry - only full frame EIT images for now...
   return,eitimg
endif
sxtimg=congrid(sxtimg,1024,1024)		; zoom to EIT
ssize=ssize*2
;*********** 

; --------------------------------------------------------------------
; get EIT (SOHO) pointing info
; att_info=get_sc_att(etime)
; temporary - use fit_limb for EIT limb determination
pb0r,gt_day(etime),r=rad			; solar radius (arcsec)
; ** assuming full res = 1024x1024
;fit_limb, eitimg, ex, ey, er,init=[esize(0)/2,esize(1)/2 + 65,rad], $ 
;   pixel=2.6,kill=4
message,/info,"Locating UV limb... (please be patient)
find_limb,eitimg, ex, ey, er

; embed grid on request
if keyword_set(cmdgrid) then begin
  gsize=32			; 32x32 row blocks
  eitimg(lindgen(esize(0)/gsize)*gsize,*)=max(eitimg)
  eitimg(*,lindgen(esize(0)/gsize)*gsize)=max(eitimg)
endif

inverse=keyword_set(inverse)

if inverse then begin
   iimg=coal_image(sxtimg,[ex, ey, er],spoint,ssize)	; shift SXt
   overimg=congrid(eitimg,ssize(0),ssize(1))
endif else begin
   overimg=coal_image(eitimg,spoint,[ex, ey, er],esize)	; shift EIT
   iimg=congrid(sxtimg,esize(0),esize(1))
endelse

;  -------- optional - do overlay and return overlayed image ----------
   temp=!d.name
   wdef,xx,(size(overimg))(1),(size(overimg))(2),/zbuffer
   set_plot,'z'
   tvscl,iimg
   ocontour,overimg
   overimg=tvrd()
   set_plot,temp
;  ------------------------------------------------------------------


return, overimg

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:13 2007- F. Auchère