; ; CALLING SEQUENCE: radius=it_getrad(header) ; ; PARAMETERS: radius is the containment variable for the number found ; in the header, header is the fits header. ; ; NOTES: I wrote this function because it seems every dataset had a ; different keyword for the solar radius in their header, so I ; wrote a function that will look in the header and find the ; radius no matter what dataset I'm using. This way, I only ; have to keep updating this function for each new dataset ; encountered. ; ; (Gives solar radius in pixels.) ; ; RETURN TYPE: float ; ; CALLS: FXPAR.PRO ; ; HISTORY: Drafted by Tony Darnell, 27-MAR-97 ; 4-APR-97: Added MLSO/ACOS dataset test to calculate ; solar radius from RSUN and CDELT1 parameters. ; ; 2007-7-9 sitongia: added STEREO SECCHI ; FUNCTION it_getrad,header ;---STEREO SECCHI Dataset temp=fxpar(header,'OBSRVTRY') temp_err=!err IF (temp_err NE -1) THEN BEGIN rsun=fxpar(header,'RSUN') div=fxpar(header,'CDELT1') radius=rsun/div RETURN,radius ENDIF ;---MLSO MKIII dataset temp=fxpar(header,'CRRADIUS') rad_err=!err IF (rad_err NE -1) THEN BEGIN radius=temp RETURN,radius ENDIF ;---MLSO/ACOS Dataset test=fxpar(header,'OBJECT') test_err=!err IF (test_err NE -1) THEN BEGIN ;{ IF (test EQ 'DPM SOLAR LIMB IMAGE: H-ALPHA') THEN BEGIN temp=fxpar(header,'RSUN') rad_err=!err IF (rad_err NE -1) THEN BEGIN div=fxpar(header,'CDELT1') radius=temp/div RETURN,radius ENDIF ENDIF $ ELSE IF (test EQ 'DPM SOLAR DISC IMAGE: H-ALPHA') THEN BEGIN temp=fxpar(header,'RSUN') rad_err=!err IF (rad_err NE -1) THEN BEGIN div=fxpar(header,'CDELT1') radius=temp/div RETURN,radius ENDIF ENDIF ENDIF ;} ;---LASCO Dataset temp=fxpar(header,'INSTRUME') temp_err=!err IF (temp_err NE -1) THEN $ IF (fxpar(header,'INSTRUME') EQ 'LASCO ') THEN BEGIN date=fxpar(header,'DATE-OBS') time=fxpar(header,'TIME-OBS') pltscl=fxpar(header,'PLATESCL') angle=pb0r(date+' '+time,/arcsec) radius=angle(2)/pltscl RETURN,radius ENDIF ;---YOHKOH dataset temp=fxpar(header,'RADIUS') rad_err=!err IF (rad_err NE -1) THEN BEGIN radius=temp RETURN,radius ENDIF $ ELSE $ ;---EIT dataset temp=fxpar(header,'SOLAR_R') rad_err=!err IF (rad_err NE -1) THEN BEGIN radius=temp RETURN,radius ENDIF $ ELSE $ ;---Radio dataset temp=fxpar(header,'SOLR') rad_err=!ERR IF (rad_err NE -1) THEN BEGIN cdelt=fxpar(header,'CDELT1') radius=temp/cdelt RETURN,radius ENDIF $ ELSE $ ;---BBSO Dataset temp=fxpar(header,'WIDT') rad_err=!ERR IF (rad_err NE -1) THEN BEGIN width=fxpar(header,'WIDT') radius=width/2 RETURN, radius ENDIF $ ELSE $ radius=-999999.00 RETURN,radius END