; Time range for your image of interest... trange = '23-jul-02 00:31:'+['20','40'] ; Energy ranges - number of intervals needs to be equal to number of ; thermal components, and the fractional count contribution of each ; component should be very different in each range... erange = [[6.3,7.3], [17.,18.]] ; Fractional count contribution of ONE of the components (e.g. super-hot) ; for each of the specified energy ranges above. This needs to be ; determined from your spectral fit (e.g. from OSPEX). Fractional ; contribution is based on COUNTS, not photons. htpct = [0.604375, 0.948072] ; Determinant of the fractional contribution matrix (a square matrix ; with dimensions equal to the number of thermal components, but which ; is uniquely determined by only (N-1) x (N) numbers [since all rows ; must sum to 1]. dn = htpct[1] - htpct[0] ; Set up the visibility object - you MUST turn off conjugation! o = hsi_visibility(im_time_int=trange, im_energy_binning=erange[*,0], $ xyoff=[-885,-230], det_index_mask=[0,0,1,1,1,1,0,1,1], vis_conj=0) ; Obtain visibilities for each energy range v1 = o->getdata(energy_band=erange[*,0]) v2 = o->getdata(energy_band=erange[*,1]) ; Normalize the visibilities to obtain "relative" visibilities v1.obsvis /= v1.totflux v2.obsvis /= v2.totflux ; Linearly combine raw (energy-space) visibilities using the inverse of ; the fractional contribution matrix as weighting factors, to obtain ; processed (temperature-space) visibilities for each thermal component. vlo = hsi_vis_combine([hsi_vis_scale(v1,htpct[1]/dn), $ hsi_vis_scale(v2,-htpct[0]/dn)], /add,viscount=2) vhi = hsi_vis_combine([hsi_vis_scale(v1,(htpct[1]-1)/dn), $ hsi_vis_scale(v2,(1-htpct[0])/dn)], /add,viscount=2) ; Plot the raw images and the processed images: !p.multi=[0,2,1] linecolors uv_smooth, v1, m1 & uv_smooth, v2, m2 uv_smooth, vlo, mlo & uv_smooth, vhi, mhi plot_map, m1, /no_data, title='Raw Vis. [energy]' plot_map, m1, /over, /percent, levels=[50,75,95] plot_map, m2, /over, /percent, levels=[50,75,95], c_color=2 plot_map, mlo, /no_data, title='Thermal Vis. [temperature]' plot_map, mlo, /over, /percent, levels=[50,75,95] plot_map, mhi, /over, /percent, levels=[50,75,95], c_color=2 ; END