cngi.image.spec_fit
¶
-
spec_fit
(xds, dv='IMAGE', pixel=(0.5, 0.5), pol=0, sigma=2000, name='FIT')[source]¶ Perform gaussian spectral line fits in the image cube
Adapted from https://github.com/emilyripka/BlogRepo/blob/master/181119_PeakFitting.ipynb Dave Mehringer 2021mar01
- Parameters
xds (xarray.core.dataset.Dataset) – input Image Dataset
dv (str) – name of data_var in xds to smooth. Default is ‘IMAGE’
pixel (tuple of int or float) – tuple of integer or float coordinates of pixel to fit. If int, pixel index is used. If float, nearest pixel at that fractional location is used. Default is (0.5,0.5) corresponding to center pixel
pol (int) – polarization index to use. Default is 0
sigma (float) – sigma of gaussian fit. Default is 1000
name (str) – dataset variable name fit, overwrites if already present
- Returns
output Image with name added fit results in attributes
- Return type
xarray.core.dataset.Dataset