FUNCTION eae_bnd_hrma_area, det_name_str, det_ap_str, src_name_str ; This function returns the equivalent geometric area in cm^2 ; of the given detector-source combination when referenced ; to the entrance aperture of the HRMA. ; Parameter defaults... if n_elements(det_ap_str) EQ 0 then det_ap_str = 'ON?' ; no src_name_str defaults to EIPS effect ; Use the EIPS as nominal distances - if src_name_str is supplied ; then change these values... dist5 = 123.625 * 12.0 * 25.4 ; mm to BND 500 baffle distH = 1721.4063 * 12.0 * 25.4 ; mm to BND-H aperture plate dist_H_to_node = 878.6 ; mm, guess by dd dist_hrma = 1732.0521 * 12.0 * 25.4 - dist_H_to_node if n_elements(src_name_str) GT 0 then begin ; Corrections for other sources if STRPOS(src_name_str,'HIREF') GE 0 then begin ; HIREFS delta = (123.30 * 12. * 25.4) - dist5 dist5 = dist5 + delta distH = distH + delta dist_hrma = dist_hrma + delta end if STRPOS(src_name_str,'DCM') GE 0 then begin ; DCM delta = (123.8 * 12. * 25.4) - dist5 dist5 = dist5 + delta distH = distH + delta dist_hrma = dist_hrma + delta end if STRPOS(src_name_str,'PENNING') GE 0 then begin ; PENNING delta = (125.4323 * 12. * 25.4) - dist5 dist5 = dist5 + delta distH = distH + delta dist_hrma = dist_hrma + delta end end ; Catch detectors that are OFF: if STRPOS(det_ap_str,'OFF') LT 0 then begin ; Now include the effect of apertures and distance... ; Calculate solid angle: area = det_area(mm^2) / dist_in_mm^2 det_up = STRUPCASE(det_name_str) CASE det_up OF 'FPC_HN': begin ; Valid non-OFF apertures are 36, ALL if STRPOS(det_ap_str,'ALL') GE 0 then begin area = 32.26*100.0/(distH^2) end else begin area = 9.2*100.0/(distH^2) end end 'FPC_HS': begin area = 32.26*100.0/(distH^2) end 'FPC_HT': begin area = 32.26*100.0/(distH^2) end 'FPC_HB': begin area = 32.26*100.0/(distH^2) end 'FPC_5': begin ; Valid non-OFF apertures are 1,4,12,36 CASE det_ap_str OF '1': diameter = 1.0 '4': diameter = 4.0 '12': diameter = 12.0 '36': diameter = 36.0 ELSE : begin print, '*eae_bnd_hrma_area: unrecognized FPC_5 aperture: '+det_ap_str area = -1 RETURN, area end ENDCASE area = !PI*(diameter/2.0)^2/(dist5^2) end 'SSD_5': begin ; Valid non-OFF apertures are 0.5, 2, 5 CASE det_ap_str OF '0.5': diameter = 0.5 '2': diameter = 2.0 '2.0': diameter = 2.0 '5': diameter = 5.0 '5.0': diameter = 5.0 ELSE : begin print, '*eae_bnd_hrma_area: unrecognized SSD_5 aperture: '+det_ap_str area = -1.0 RETURN, area end ENDCASE area = !PI*(diameter/2.0)^2/(dist5^2) end ELSE: begin ; Oops, detector name not recognized print, '* eae_bnd_hmra_area: not recognizing detector: '+det_name_str area = -1.0 RETURN, area end ENDCASE end else begin ; aperture is OFF so flag this area = -1.0 RETURN, area end ; Convert to cm^2 at HRMA by multiplying by the hrma distance in cm^2 area = area*(dist_hrma/10.0)^2 RETURN, area END