These are a list of routines that are usful for EIS analysis. If you find others useful let us know and they can be added to the SSW tree.

routines marked with red-color are in common use.

;   This routine takes the output from eis_getwindata and performs a fit
;   over the intensity array, returning values for the intensity, line width
;   and centroid.
;   The quality of the spectrum is checked to ensure that a good fit can be
;   obtained (for bad data, the routine can hang while it tries to find a
;   solution). :

;       Returns EIS data from a detector window.
;       Create an object:
;           IDL> eisfile = 'eis_l1_20070202_104212.fits'
;           IDL> eisfile = 'eis_er_20070202_104212.fits'
;           IDL> obj = obj_new('eis_data',eisfile)
;           IDL> obj_er = obj_new('eis_data',errfile)
;       And extract data from window 0.
;           IDL> data = obj -> getwindata(0, data_er=obj_er)

;       Returns the FITS header for a spectral window
; Example:
;       IDL> data = obj_new('eis_data')
;       IDL> eisfile = '$HINODE/eis/mission/2007/02/02/eis_l0_20070202_104212.fits.gz'
;       IDL> header=data->getwinheader(eisfile,0)

;       Removes the CCD bias from an EIS data window.

;       EIS_DESPIKE is part of the SOLAR-B EIS analysis software . It is used
;       for de-spiking, i.e. to remove cosmic ray spikes from the pixel
;       data. :

;     This routine extracts the start times of each exposure in an EIS data
;     object. The times are given in seconds relative to the first exposure.

;     Given the a header structure for an EIS data-set, this routine checks
;     if the specified wavelength, WVL, is found in the data-set's wavelength
;     windows. If yes, then the index of the wavelength window is returned.

;    This routine extracts selected information from an EIS data header
;    into a structure. The particular fields taken from the header are
;    defined in the file $SSW/hinode/eis/idl/atest/pyoung/headcat_tags.txt.

;          PURPOSE : To find the data window given the line id or the
;                    wavelength.
;          EXAMPLE : IDL> iwin = eis_get_iwin('eis_l0_20061214_192012',195)
;                    IDL> print,iwin
;                         4 :

;          PURPOSE : To return information on the windows contained in
;                    an eis fits file.
;          EXAMPLE : IDL> file = 'eis_l0_20061214_192012'
;                    IDL> wininfo = eis_get_winfo(file,/list,nwin=nwin)
;                    iwin             line_id   wvl_min   wvl_max
;                       0        FE X 184.540    184.29    184.80
;                       1     FE VIII 185.210    184.96    185.47
;                       2       FE XI 188.230    187.97    188.48
;                       3     CA XVII 192.820    192.56    193.07
;                       4      FE XII 195.120    194.85    195.37
;                       5     FE XIII 202.040    201.78    202.30
;                       6       HE II 256.320    256.06    256.58
;                       7      FE XIV 274.200    273.96    274.47
;                       8       FE XV 284.160    283.92    284.43
;                    IDL> print,nwin
;                         9

;       EIS_GETDATA is a script to extract data (one, sevceral or all
;       line windows) from a (FITS or CCSDS) data file.
;       example 1: Get line window 0 and hdr from CCSDS file1= 'file1.dat':
;                  IDL> eis_getdata, file1, wd, hdr=hdr, /ccsds
;                  If e.g 32 pixel wide line window *wavelength,
;                  512 slit pos. and 100 raster pos, the dimension of
;                  wd will now be: wd = uint[32, 512, 100]
;       example 2: Get line windows 2 and 3 from fitsfile file2='file2.fits':
;                  IDL> eis_getdata, file2, wd, iwin=[2,3]
;                  If same dimensions as above, wd will now be:
;                   wd = uintarr[32, 512, 100, 2], i.e.
;                   wd[nlam, nslit, nraster, nwin]
;       example 3: Get all 25 line windows and hdr from FITS file 'file2.fits'
;                  IDL>eis_getdata, file2, hdr=hdr, /all
;                  wd is now uintarr[32, 512, 100, 25] :

;       get the wavelength range of the CCDs

;       EIS_GETMOMENTS is a script to calculate moments from one,
;       several or all spectral line windows from a (fits or CCSDS) data file.

;       Returns EIS data from one spectral window.
;       d = eis_getwindata(file, [iwin ,keywords])

;    Calculates the wavelength vector for each exposure in the EIS data-set,
;    corrected for the orbital variation.

;    Represents the orbital variation of EIS line centroids by a spline
;    function with nodes spaced at 5 minute intervals. Returns the value
;    of the centroid at the input times.

;    carries out standard EIS calibration

;     This routine is used to browse 3D EIS data-cubes. It is based on
;     software available in the SOHO/CDS software.

;     This tool is for browsing EIS data arrays that have been cleaned of
;     cosmic ray hits.
;     IDL> data=obj_new('eis_data',filename)
;     IDL> wd=data->getvar(iwin)
;     IDL> eis_debias,wd
;     IDL> eis_despike,wd,wd_clean,swtch=spikes
;     IDL> EIS_SPIKE_VIEWER,wd,wd_clean,spikes

;            plots temporal mean of spectrum

;     Finds the centroid of an emission or absorption line by minmizing the
;     function SUM( (wavel_i-ref) * flux_i ), for the centroid wavelength,
;     ref. Note that the accuracy of the derived wavelength is improved by
;     having the input wavelength vector (str.wavel) on a fine scale.
;     IDL> line_centroid, wvl, flx, [1030,1035]

;       A simple routine for turning a file name into an absolute file
;       name.  The routine looks in three places for the file: the present
;       directory, the mission archive and the quick look directory. If
;       nothing is passed a widget comes up, but this isn't very useful.
;       IDL> file=eis_getfilename('eis_l0_20061202_140632')
;       IDL> print,file
;       .../eis/mission/2006/12/02/eis_l0_20061202_140632.fits.gz

;       Instatiates the hw_help object and calls the display_all method to give a
;       first introduction to the object help documentation for the eis/hw software.

;       Convert intensity from photons [ph m-2 s-1 sr-1] to energy in SI units
;       [W m-2 sr-1]


; PURPOSE: Returns the reciprocal of the latest EIS compression factor

;       set eis colortable for velocity & width maps display

;          PURPOSE : to calculate information about the field of view
;                    for an EIS raster
;          EXAMPLE : IDL> d = eis_getwindata('eis_l0_20071221_001727')
;                    IDL> eis_raster_fov,d,scale,origin,fovx,fovy
;                    IDL> print,scale
;                          1.00000      1.00000
;                    IDL> print,origin
;                         -32.9291     -79.1299
;                    IDL> print,fovx,fovy
;                          128.000      184.000

; Returns the mass (in grams or kilograms) of an element.
; IDL> Fe_mass = element2mass('Fe')
; IDL> print,Fe_mass
;   9.27339e-23

;          PURPOSE : Calculates the slit tilt as a function position
;                    along the CCD.
;          EXAMPLE : dw  = eis_slit_tilt(256,512,/short,locations=y)
;                    wvl = wvl - dw
;                    plot,y,dw
;                    ALTERNATIVE USAGE:
;                    d  = eis_getwindata(file,wave)
;                    dw = eis_slit_tilt(d,locations=y)

;          PURPOSE : PRELIMINARY EIS wavelength corrections for
;                    orbital variations and slit tilt using moments.
;          EXAMPLE : IDL> eis_wave_corr,file,wvl_corr,dw_tilt,dw_t,/show
;                    IDL> d.wvl = d.wvl - wvl_corr[i,j]

;          Compute thermal and nonthermal velocities.
;          EXAMPLE:
; Some example thermal widths:
; v_t = eis_width2velocity('C','II',1335,/thermal,ti_max=t,therm_fwhm=fwhm)
;   ion      wave A   temp K fwhm A
;  C   II   1335.00  2.2e+04  0.041
;  C   IV   1548.00  1.1e+05  0.105
;  N    V   1238.00  1.8e+05  0.101
;  O    I   1355.00  1.0e+04  0.024
;  O   IV   1401.00  1.7e+05  0.102
;  Si  II   1304.00  1.4e+04  0.021
;  Si III   1206.00  3.0e+04  0.028
;  Si  IV   1393.00  6.3e+04  0.047
;  S    I   1472.00  1.0e+04  0.019
; Compare with Feldman, Doschek, and Patterson, ApJ, 209:270-281, 1976
; An example nonthermal velocity:
; v_nt = eis_width2velocity('S','I',1900.29,0.04,ti_max=t)
; v_nt = 3.0 km/sec
; t    = 10,000 K
; Compare with Mariska, Feldman, and Doschek, ApJ, 226:698-705, 1978

;     This routine takes an EIS spectrum structure and fills in the
;     intensity, error and quality tags using the input eis_getwindata
;     structure and a pixel mask.

;     Because of the grating tilt and CCD offset in the EIS
;     instrument, the same pixel position in an EIS image formed from
;     one wavelength will not directly correspond to the same pixel
;     position in an image from a different wavelength. For this
;     reason a pixel mask generated with EIS_PIXEL_MASK needs to be
;     adjusted when being used for another wavelength.
;     This routine performs the adjustment using information from the
;     routine EIS_CCD_OFFSET.

;     Evaluates the spatial offset of the specified wavelength relative
;     to He II 256. 
;     IDL> offset=eis_ccd_offset(195.12)
;     IDL> l=findgen(120)+170
;     IDL> plot,l,eis_ccd_offset(l)

;     Creates an optimised cubic spline fit to the orbital variation of EIS
;     emission line centroids. The spline is used by eis_orbit_spline to
;     perform the orbital variation correction to the output of eis_auto_fit.

;     Widget-based routine for studying the Gaussian fits produced by

;     Takes the fit structure from eis_auto_fit and estimates which
;     data-columns fall into orbital night. Any columns identified are set
;     to missing data in the fitdata data arrays, and the new structure is
;     returned.

;    This routine extracts selected information from an EIS data header
;    into a structure. The particular fields taken from the header are
;    defined in the file $SSW/hinode/eis/idl/atest/pyoung/headcat_tags.txt.

;     Given a level-1 FITS file name and a wavelength, this routine
;     creates an image at the specified wavelength by summing 7 pixels
;     across the line profile.

;    Takes the centroid tag from the output of the EIS_AUTO_FIT
;    routine and computes a fit to the orbital variation. The velocity array
;    is averaged in the Y-direction (see the keyword YRANGE=), and a cubic
;    spline is fit to the averaged function (see the routine
;    EIS_CUBIC_SPLINE). The spline fit is then subtracted from the centroid
;    array to give the corrected centroid array. The velocity array is also
;    corrected by converting the centroid to km/s.

;       This is a mouse-based routine that requires for input an image
;       array. The image is displayed and a `menu' will appear in the
;       IDL window. The options are:
;       LEFT:   Go into `polygon' mode
;       MIDDLE: Go into `painting' mode
;       RIGHT:  Exit

;     Using a pixel mask created with EIS_PIXEL_MASK, this routine
;     averages the EIS spectra over the specified spatial pixels to
;     create an averaged spectrum. The error bars on the intensities
;     are correctly calculated.
;     IDL> eis_mask_spectrum, l1name, mask, swspec=swspec, lwspec=lwspec'

;    Corrects the eis_auto_fit fit structure for the tilt of the EIS slit.
;    Both the 1" and 2" slits are accounted for.

;     For the specifed wavelength window in an EIS data object, this routine
;     returns the wavelength vector for the window.

;     Given two line intensities/fluxes and their 1-sigma errors,
;     calculates the ratio and the 1-sigma error on the ratio.

;     Takes the Fe XII 195 and 186 fit structures produced by eis_auto_fit,
;     and creates a density structure containing a density map. The densities
;     are derived used the CHIANTI atomic database.

;    This routine is a 'wrapper' for calling the general purpose
;    line fitting routine SPEC_GAUSS_WIDGET. For creating the input
;    spectrum in the correct format, try using the routine

;       Searches if a specific wavelength is within the wavelength
;       range of observation of the rasters in the EIS database.
; Example:
;       Look for 195.33:
;       IDL> acronyms=eis_find_lineraster(195.33,summary=summary,rasters=rasters,lines=lines)

Quicklook tools#

;       XFILES is used to select data files from data bases. It reads
;       data from many data sources. The user can also specify own
;       data sources, in which case data-read procedures must be
;       provided. XFILES defines the data objects, header objects and
;       auxiliary objects and sends them to XDISPLAY. The XDISPLAY
;       window is opened when the user selects a data file in XFILES. calling by only

;       XMAP is used to display 2-D (or higher) data. It is a
;       widget based program with several options and functions that
;       allows data to be displayed in a nukmber of modes. calling by only

;       XCONTROL is the main QL control window. After selecting a file (CCSDS or
;       FITS) this windows opens with information about the data, and control
;       buttons etc. for the various display methods and data processing
;       options available for a particular set of data. calling by only

;       XDETECTOR is used to display 2-D (or higher) data. It is a
;       widget based program with several options and functions that
;       allows data to be displayed in a nukmber of modes. calling by only

;       XRASTER is used to display 3-D spectroscopic data in the form
;       of a raster (i.e. intensity[lambda, slit pos, raster pos.].
;       One line is displayed as I[lambda, slit pos] with one display window
;       for each raster (using !p.multi). If more than one line, these
;       are added as extra rows of display windows. calling by only

;       xwhisker is used to display 2-D spectroscopic data as whisker plots
;       (images). I.e. Intensity[wavelength, y].
;       Typically y will be solar_x (for a raster) or
;       for sit-and-stare observations it will be time. calling by only

;       XMOMENT plots mean line profile, and has interactive mouse
;       functions to mark where the line is (start/stop pixels) and
;       where the continuum is. This information is used by the
;       eis_moment__moment program to calulate moments of the line
;       profile. calling by only

;       XIMOVIE provides a widget interface to run and control
;       images displayed as a movie. The images must be written
;       as an assoc file.

Other useful routines#

; Purpose     : widget interface to EIS AS-RUN catalog
; Syntax      : IDL> eis_cat

;          PURPOSE : To search the EIS raster database
;          EXAMPLE : eis_search_rasters

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-16) was last changed on 07-Dec-2016 14:14 by JianSun