User Tools

Site Tools


data:data_analysis_manual

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
data:data_analysis_manual [2024/11/11 20:28]
Peter Young [Line fitting]
data:data_analysis_manual [2026/03/28 18:46] (current)
eric buchlin Fix link
Line 236: Line 236:
  
 Links: Links:
 +  * Python quicklook tool: [[https://​pypi.org/​project/​spiceitup/​|SPICE-IT-UP]].
   * Example with [[:​data:​data_analysis_manual:​sunraster|with sunraster]].   * Example with [[:​data:​data_analysis_manual:​sunraster|with sunraster]].
   * Tutorial about [[https://​git.ias.u-psud.fr/​spice/​data-analysis-club/​-/​blob/​main/​20230516-coordinates/​coordinates.ipynb|plotting and coordinates transforms]]   * Tutorial about [[https://​git.ias.u-psud.fr/​spice/​data-analysis-club/​-/​blob/​main/​20230516-coordinates/​coordinates.ipynb|plotting and coordinates transforms]]
Line 263: Line 264:
 ==== Line fitting ==== ==== Line fitting ====
  
 +For IDL Gaussian fitting software, please check: **[[data:​line_fitting_idl|IDL software for emission line fitting]]**.
  
-=== Fitting ​a Gaussian at each spatial pixel in a raster (IDL) === +Fitting in Python ​can be done with any fitting libraryincluding ​[[https://docs.astropy.org/en/stable/modeling/|astropy.modelling]]. From astropy 7.0there is a user-friendly way of doing the fitting in parallel ([[https://github.com/aperiosoftware/parallel-modeling-examples/blob/main/spice/Final_Tutorial.ipynb|tutorial]] by Stuart Mumford).
- +
-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 [[https://doi.org/10.5281/zenodo.6339584 +
-|EIS Software Note 15]]. +
- +
- +
-The EIS software enable a number of operations to be performed on windata structures, as described in [[https://sohoftp.nascom.nasa.gov/​solarsoft/​hinode/​eis/​doc/​eis_notes/​21_WINDATA/​eis_swnote_21.pdf|EIS Software Note 21]]. For exampleeis\_bin\_windata allows spatial binning ​of the rasters. +
- +
-If you have problems running the EIS software on SPICE data, please contact ​[[https://science.gsfc.nasa.gov/sed/bio/​peter.r.young|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 [[https://doi.org/10.5281/​zenodo.6339584 +
-|EIS Software Note 15]].+
  
 +This is used by the [[https://​pypi.org/​project/​pycfit/​|PyCFIT]] library, which provides a GUI for fitting the different components.
  
 === Line window width and spectral tilt === === Line window width and spectral tilt ===
data/data_analysis_manual.1731353283.txt.gz · Last modified: 2024/11/11 20:28 by Peter Young