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. 


__eis_auto_fit.pro __    :   {{{
;   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).
}}}


__eis_data~__getwindata.pro__  : {{{
;       Returns EIS data from a detector window.
; EXAMPLE:
;       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)
}}}

__eis_data~__getwinheader.pro__: {{{
;       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)
}}}

__eis_debias.pro__: {{{
;       Removes the CCD bias from an EIS data window.
}}}

__eis_despike.pro__: {{{
;       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.
}}}

__eis_exposure_times.pro__ : {{{
;     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.
}}}

__eis_find_window.pro__: {{{
;     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.
}}}

__eis_get_hdr_struc.pro__: {{{
;    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.
}}}

__eis_get_iwin.pro__: {{{
;          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
}}}

__eis_get_wininfo.pro__ : {{{
;          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.pro__: {{{
;       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]
}}}

__eis_getlambda.pro__ : {{{
;       get the wavelength range of the CCDs
}}}

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

__eis_getwindata.pro__: {{{
;       Returns EIS data from one spectral window.
; CALLING SEQUENCE:
;       d = eis_getwindata(file, [iwin ,keywords])
}}}

__eis_orbit_correction.pro__: {{{
;    Calculates the wavelength vector for each exposure in the EIS data-set,
;    corrected for the orbital variation.
}}}

__eis_orbit_spline_quick.pro__: {{{
;    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.
}}}

__eis_prep.pro__: {{{
;    carries out standard EIS calibration
}}}

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

__eis_spike_viewer.pro__: {{{
;     This tool is for browsing EIS data arrays that have been cleaned of
;     cosmic ray hits.
; EXAMPLE
;     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
}}}

__fig_tsmean.pro__: {{{
;            plots temporal mean of spectrum
}}}

__line_centroid.pro__: {{{
;     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.
; USE
;
;     IDL> line_centroid, wvl, flx, [1030,1035]
}}}

__eis_getfilename.pro__: {{{
;       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.
; EXAMPLE:
;       IDL> file=eis_getfilename('eis_l0_20061202_140632')
;       IDL> print,file
;       .../eis/mission/2006/12/02/eis_l0_20061202_140632.fits.gz
}}}

__eis_help.pro__: {{{
;       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.
}}}

__photons_to_energy.pro__: {{{
;       Convert intensity from photons [ph m-2 s-1 sr-1] to energy in SI units
;       [W m-2 sr-1]
}}}

__eis_get_compression_factor__: {{{
; PURPOSE: Returns the reciprocal of the latest EIS compression factor
}}}