;+ ; ; NAME: ; HXISLIMB ; ; PURPOSE: ; Plot solar limb and heliographic coordinate system on the plots of the ; CPLOT display ; ; CATEGORY: ; HXIS display ; ; CALLING SEQUENCE: ; HXISLIMB, FIELD, IMAGE_NO=IMAGE_NO ; ; CALLED BY: ; HXISCLOT ; ; CALLS TO: ; HXISNINT, RESPOND_WIDG, HELIOG, HXISSOLRAD ; ; INPUTS: ; FIELD 0 for fine field of view, 1 for coarse field of view ; IMAGE_NO a loop counter from calling routine ; COLOR the index of the color to draw grid ; and through common blocks ; ; OPTIONAL INPUTS: ; none ; ; OUTPUTS: ; none explicit, only through commons ; ; OPTIONAL OUTPUTS: ; none ; ; SIDE EFFECTS: ; none ; ; RETRICTIONS: ; none ; ; PROCEDURE: ; The solar radius is calculated by the SOLRAD procedure. ; The data units in the CPLOT images are CFOV pixels, i.e. one data unit ; is 32 arcsec, with the origin (the point (0,0) in data units) at the ; center of the image. ; The HELIO procedure assumes data units of arcsec, i.e. one data unit ; is 1 arcsec, with the origin at the center of the solar disk. ; The necessary conversion is done explicitly by redefining the system ; variables !X.S and !Y.S, then HELIO is used to draw the limb and ; coordinate system. ; The old scaling is reestablished before returning to caller. ; ; MODIFICATION HISTORY: ; FEB-91, Paul Hick (ARC) ; FEB-93, Elaine Einfali (HSTX) - Conveted to widgets ;- pro HXISLIMB, FIELD, image_no=image_no, color=color @hxisdata_info.common @hxisgrid.common @hxispass.common @hxiswidget.common @hxiswindow.common if n_elements(image_no) eq 0 then image_no = 0 ; Save present scaling ; Don't know whether this is necessary; just to be on the safe side XS = !X.S & YS = !Y.S & PC = !P.CLIP XR = !X.RANGE & YR = !Y.RANGE & XCR = !X.CRANGE & YCR = !Y.CRANGE ; Half width fov in cfov pixels 32" if FIELD eq 0 then WID = 2.5 else WID = 6. A = hxisnint(!D.X_VSIZE*[!X.S(0)-WID*!X.S(1),!X.S(0)+WID*!X.S(1)]) B = hxisnint(!D.Y_VSIZE*[!Y.S(0)-WID*!Y.S(1),!Y.S(0)+WID*!Y.S(1)]) ; ; Get clipping window in device coord ; !P.CLIP = [A(0),B(0),A(1),B(1)] ; ; The new data units are in arcsec with the origin at the center of ; the solar disk ; XP = -INFO.XP & YP = -INFO.YP ; negative pitch and yaw because it ; is opposite to plotting coordinates ; ; Clipping window converted to units of arcseconds ~(-900,+900) ; A = WID*32 !X.RANGE = [XP-A,XP+A] & !Y.RANGE = [YP-A,YP+A] !X.CRANGE = !X.RANGE & !Y.CRANGE = !Y.RANGE ; normal units/arsec !X.S(1) = !X.S(1)/32. & !Y.S(1) = !Y.S(1)/32. ; disk center in normal units !X.S(0) = !X.S(0)-!X.S(1)* XP & !Y.S(0) = !Y.S(0)-!Y.S(1)* YP ; Mark HXIS center field of view if info.offset then oplot, [XP,XP],[YP,YP], psym=1, color=7 ; Mark s/c boresight oplot, -[INFO.YAW,INFO.YAW],-[INFO.PITCH,INFO.PITCH], psym=2, color=7 ; Mark HXIS center field of view if image_no eq 0 then begin if info.offset then mess = 'HXIS boresight marked with "+", ' $ else mess = '' widget_control, comment, set_value=mess + 'SMM boresight marked ' + $ 'with "*".', /append endif ; seconds since 1-JAN-1979 00:00:00 UT T = 31536000 + long((INFO.TIME-1)*86400) ; get disk radius, tilt angle RADIUS = hxissolrad(T,BANGLE) BANGLE = BANGLE*!radeg ROLL = INFO.ROLL if info.grid then begin ; ; If the current grid condition is set to ON, then draw the solar grid. ; if not(info.hard) and not(info.silent) and (image_no eq 0) then begin wait,1 ; let xmanger catch up grid = respond_widg(message=['Select the spacing of the solar', $ 'latitude and longitude lines to', $ 'be overlayed onto the image'], $ buttons=grid_butts, /column) wait,1 ; let xmanger catch up oldgrid = grid ; index number of GRID_BUTTS widget_control, pass_grid, set_value=grid_type(oldgrid) wshow, current_window widget_control, comment, set_value='Solar radius is '+ $ strtrim(radius,2) +' arcseconds ' + $ 'and B-angle is ' + strtrim(bangle,2) + $ ' degrees.', /append endif ; ; Plot limb and heliographic coordinate system ; heliog, RADIUS, BANGLE,ROLL, grid=grid_deg(OLDGRID), $ color=color, /glabel, /noeras endif !X.S = XS & !Y.S = YS & !P.CLIP = PC ; Restore system variables !X.RANGE = XR & !Y.RANGE = YR & !X.CRANGE = XCR & !Y.CRANGE = YCR return & end