function gt_sxt_axis, modind, rel_xray=rel_xray ;+ ; NAME : ; GT_SXT_AXIS.PRO ; PURPOSE : ; This function returns a one or two dimensional array that contains ; the axis (or axes) of the maximum effective area of SXT. ; CALLING SEQUENCE : ; axis_coord = gt_sxt_axis() ; axis_coord = gt_sxt_axis(index) ; axis_coord = gt_sxt_axis(MODE) ; OPTIONAL INPUT : ; INDEX - Allows the calling program to deliver the SXT "index" ; variable which will be used to determine the filter ; configuration: X-Ray, Narrow Band or Wide Band. ; MODE - Allows the calling program to specify the SXT X-Ray/Optical ; that is used in the image. The modes are as follows : ; ; SXT MODE MODE Value ; X-Ray 0 ; Narrow Band (NaBan) 1 ; Wide Band (WdBan) 2 ; ; The mode may either be a scalar or a vector. If mode is a ; vector then the same number of elements of mode will be ; returned. ; OPTIONAL KEYWORD INPUT: ; REL_XRAY - If set, then return the offset relative to the x-ray ; boresight. This option is used to figure the correction ; needed for wide band and narrow band images. ; (0,*) - negative number means move the image west ; to align it with x-rays (the image is the ; the east of x-ray boresight) ; (1,*) - negative numbers means move the image north ; to align it with x-rays (the image is south ; of the x-ray boresight) ; NB = (-0.36, 1.47) NB image is NE of X-ray image. ; WB = (+0.24, 1.26) WB image is NW of X-ray image. ; according to the final calibration in 2008, the values are changed to ... ; NB = (-0.90, 1.36) NB image is NE of X-ray image. ; WB = (-0.25, 1.08) WB image is also NE of X-ray image. ; OUTPUT : ; If there are no arguements to this routine a 2 element ; array is returned with the X and Y location in Full Resolution ; IDL pixels of the maximum effective area axis for x-rays. ; ; If either MODE or INDEX is specified then the routine will ; return a two-dimensional array which has an X,Y pair for each ; element in MODE or INDEX. ; HISTORY : ; Written; RAF, Stanford, Sep 22, 1993 ; The relative offset between the X-ray optical axis and the ; optical axis in the Wide band or Narrow band filters was ; determined by Jean-Pierre Wuelser (22-Oct-92). ; ; 21-Dec-93 (MDM) - Modified the header some ; - Added /REL_XRAY keyword option ; 5-Jan-94 (MDM) - Updated header ; 25-Mar-2014 (A. Takeda) - Updated offset values with L. Acton's ; recalibration in 2008. ; ;- ; sz = size(modind); typ = sz(1+sz(0)); ; if (typ EQ 8) then begin index = modind; md0 = where(gt_filta(index) EQ 1) ; Open (X-Ray) md1 = where(gt_filta(index) EQ 2) ; Narrow Band md2 = where(gt_filta(index) EQ 5) ; Wide Band ; ; If the filter wheel "A" is set to another filter other than the ; Open, Narrow Band or Wide Band setting (i.e. NuDen), the default of ; the "Open" filter is assumed. ; n = N_ELEMENTS(index); mode = intarr(n); if (md1(0) NE -1) then mode(md1) = 1; if (md2(0) NE -1) then mode(md2) = 2; endif else if (N_ELEMENTS(modind) EQ 0) then mode = 0 else mode = modind; nn = N_ELEMENTS(mode); result = fltarr(2,nn); if (not keyword_set(rel_xray)) then begin result(0,*) = 515.0 result(1,*) = 633.0 end ii = where(mode EQ 1); if (ii(0) NE -1) then begin result(0,ii) = result(0,ii) - 0.90 ; per final cal. 2008. result(1,ii) = result(1,ii) + 1.36 ; per final cal. 2008. ; result(0,ii) = result(0,ii) - 0.36; ; result(1,ii) = result(1,ii) + 1.47; endif jj = where(mode EQ 2); if (jj(0) NE -1) then begin result(0,jj) = result(0,jj) - 0.25 ; per final cal. in 2008. result(1,jj) = result(1,jj) + 1.08 ; per final cal. in 2008. ; result(0,jj) = result(0,jj) + 0.24; ; result(1,jj) = result(1,jj) + 1.26; endif return, result; end;