;; This tutorial illustrates how to use the XRT SolarSoft ;; analysis software inside the IDL environment. ;; Assume that the XRT ssw/ and sswdb/ trees have been ;; installed locally through SolarSoft. ;; Every XRT program header includes documentation explaining its ;; usage. ;;================================================================ ls /usr/local/archive/hinode/xrt/level0/2007/05/13/ /usr/local/ssw/... /usr/local/sswdb/... ;; Assume that you have downloaded some XRT data files from a data center, ;; and that you have put them in a directory. ;; (See the VSO tutorial.) ;; There are two possibilities for how you store your data: ;; (A) If you put the data into an XRT-style archive tree, ;; then you can use to find data. (RECOMMENDED) ;; (B) If you put the data into an arbitrary directory (eg, "mydata/"), ;; then use to make a data-list. ;; .......................................................... ;; (A) Here's how to use to read in a fileset: ;; Select a time range: IDL> t0 = '2007-May-13 15:00' IDL> t1 = '2007-May-13 20:00' ;; Read the XRT catalog IDL> xrt_cat, t0, t1, cat, files IDL> help, cat, files IDL> help, cat, /st ;; Select only the data you want. ;; I am looking for 2048x2048 images that aren't darks or Gbands. IDL> ss = where((cat.naxis1 eq 2048) and (cat.naxis2 eq 2048) $ IDL> and (cat.ec_imty_ ne 'dark')) ;; Look to see what images you have selected: IDL> print, xrt_title(cat[ss]) IDL> print, xrt_title(cat[ss[3:4]]) ;; Get some of the data. ;; (We are using a partial set so that the doesn't ;; run long for demonstration purposes.) IDL> read_xrt, files[ss[3:4]], index0, data0 ;; .......................................................... ;; (B) Here's how to use to read in a fileset: ;; In case (B), we assume that you just have some files in a ;; directory named ;; /Users/xrtlocal/xrt/level0/2007/05/13/H1100/ ;; First, make a list of all the files in the directory. IDL> files = find_files('*.fits', $ IDL> '/Users/xrtlocal/xrt/level0/2007/05/13/H1100/') ;; Now read in just the index for all of those files. IDL> read_xrt, files, index0 ;; Now you can select which data you want. ;; I am looking for 2048x2048 images that aren't darks or Gbands. IDL> ss = where((index0.naxis1 eq 2048) and (index0.naxis2 eq 2048) $ IDL> and (index0.ec_imty_ ne 'dark')) ;; Look to see what images you have selected: IDL> print, xrt_title(index0[ss]) ;; Get the data. read_xrt, files[ss[0:1]], index0, data0 ;; .......................................................... ;; So now you have read the Level-0 data into IDL. ;; Look to see what you have. IDL> help, index0, data0 IDL> help, index0, /st ;; The history of your data processing is saved into index0. IDL> hprint, index0[0].history ;; Next you must calibrate it to Level-1. ;; This may take 30 sec or longer for full-frame images. ;; If you would like to see more info about the ;; processing, then include the "/verbose" switch. IDL> xrt_prep, index0, data0, index1, data1, /float, /norm IDL> help, index1, data1 IDL> help, index1, /st ;; Maybe you want to remove high-energy particle hits from the image, ;; because you want to make pretty pictures. Then use this keyword. IDL> xrt_prep, index0, data0, index1, data1, /float, /norm, /despike ;; or even stronger... IDL> xrt_prep, index0, data0, index1, data1, /float, /norm, despike=2 ;; Take a look at how the index history has been updated. IDL> hprint, index1[0].history ;; And now you want to see the data. ;; First, you may need to rebin it to fit it onto your computer screen. ;; Second, the scientific data should be logarithmically ;; rescaled when you want to display it. There is a routine xrt_disp that ;; takes care of details to make a nicely scaled image of XRT data. IDL> wdef, 0, 1024 IDL> ii = 1 ;; image element = 1 IDL> tvscl, rebin(xrtdisp(data1[*,*,ii], /log), 1024, 1024) ;; Hey, there is some saturation. Let's make a composite ;; with a long/short pair. Review our two unprepped images again. IDL> print, xrt_title(index0) ;; The exposure times make a nice pair. ;; Make a composite WITH THE LEVEL-0 DATA. IDL> mk_xrt_composite, index0[1], data0[*,*,1], index0[0], data0[*,*,0],$ IDL> index2, data2, /verbose IDL> help, index2, data2 ;; And view the results. IDL> tvscl, rebin(xrtdisp(data2, /log), 1024, 1024)