This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| data:line_fitting_idl [2024/11/11 19:30] – created Peter Young | data:line_fitting_idl [2024/11/12 17:02] (current) – [IDL Software for Emission Line Fitting] Peter Young | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Emission | + | ====== |
| + | |||
| + | |||
| + | ===== Fitting a Gaussian at each spatial pixel in a raster ===== | ||
| + | |||
| + | Spectra at each spatial pixel in a raster can be fit with Gaussians | ||
| + | |||
| + | '' | ||
| + | IDL> wd=spice\_getwindata(file) | ||
| + | IDL> eis\_fit\_template, | ||
| + | IDL> eis\_auto\_fit, | ||
| + | IDL> eis\_fit\_viewer, | ||
| + | '' | ||
| + | |||
| + | 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 [[https:// | ||
| + | |EIS Software Note 15]]. | ||
| + | |||
| + | |||
| + | The EIS software | ||
| + | |||
| + | If you have problems running the EIS software on SPICE data, please contact [[https:// | ||
| + | |||
| + | ===== Fitting a Gaussian to a spatially-averaged spectrum ===== | ||
| + | |||
| + | 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, | ||
| + | IDL> mask=pixel\_mask\_gui(map) | ||
| + | IDL> spec=spice\_mask\_spectrum(file, | ||
| + | IDL> spec\_gauss\_spice, | ||
| + | '' | ||
| + | |||
| + | These routines are modified from routines originally written for Hinode/EIS. Further details can be found in [[https:// | ||
| + | |EIS Software Note 15]]. | ||
| + | |||
| + | ===== Using an auto_fit template for mask spectra ===== | ||
| + | |||
| + | The fitting templates created for eis\_auto\_fit can be useful for fitting mask spectra as well. First create the template for the window you are interested in: | ||
| + | |||
| + | '' | ||
| + | IDL> wd=spice\_getwindata(file)\\ | ||
| + | IDL> eis\_fit\_template, | ||
| + | '' | ||
| + | |||
| + | Now create the mask spectrum using the procedure described above. You can then apply the template to the mask spectrum by doing: | ||
| + | |||
| + | '' | ||
| + | IDL> fit=spice\_mask\_auto\_fit(wd, | ||
| + | '' | ||
| + | |||
| + | The output structure '' | ||
| + | |||
| + | '' | ||
| + | IDL> p=spice\_plot\_mask\_auto\_fit(spec, | ||
| + | '' | ||