User Tools

Site Tools


data:line_fitting_idl

**This is an old revision of the document!**

IDL Software for Emission Line Fitting

Fitting a Gaussian at each spatial pixel in a raster (IDL)

Spectra at each spatial pixel in a raster can be fit with Gaussians using the eis_auto_fit IDL routine developed for the Hinode/EIS mission (you must have the EIS branch in your Solarsoft distribution). The key step is to format a SPICE wavelength window into a “windata” structure using the routine spice_getwindata. An example call is:

IDL> wd=spice_getwindata(file) ; choose a wavelength window
IDL> eis_fit_template,wd,template ; create a template for the fit
IDL> eis_auto_fit,wd,fit,template=template
IDL> eis_fit_viewer,wd,fit

The routine eis_fit_viewer is a GUI-based routine for browsing the fit results. More details on the eis_auto_fit suite of routines are available in EIS Software Note 15.

The EIS software enable a number of operations to be performed on windata structures, as described in EIS Software Note 21. For example, eis_bin_windata allows spatial binning of the rasters.

If you have problems running the EIS software on SPICE data, please contact Dr. Peter Young.

Fitting a Gaussian to a spatially-averaged spectrum (IDL)

In this scenario, a spatial region is selected in the raster, perhaps a bright point or a loop, and the spectra are averaged over this region to produce a single, 1D spectrum. Gaussians are then fit to this spectrum. The procedure is as follows:

IDL> map=spice_make_image(file,770.4) ; for Ne VIII 770.4
IDL> mask=pixel_mask_gui(map) ; GUI routine for selecting pixel mask
IDL> spec=spice_mask_spectrum(file,mask) ; create averaged spectrum
IDL> spec_gauss_spice, spec ; GUI routine for fitting Gaussians

These routines are modified from routines originally written for Hinode/EIS. Further details can be found in EIS Software Note 15.

data/line_fitting_idl.1731372449.txt.gz · Last modified: 2024/11/12 01:47 by Peter Young