Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1488 |
|
Package | general | |
Module | images | |
Tool | image |
values | out | Output fitted or estimated profile | |
Allowed: | Numeric Glish array | ||
Default: | None | ||
resid | out | Output residual profile | |
Allowed: | Numeric Glish array | ||
region | in | The region of interest | |
Allowed: | Region tool | ||
Default: | Whole image | ||
axis | in | The profile axis | |
Allowed: | Integer or unset | ||
Default: | Spectral | ||
mask | in | OTF mask | |
Allowed: | Boolean LEL expression or mask region | ||
Default: | None | ||
estimate | in | Initial estimate | |
Allowed: | Record | ||
Default: | Unset | ||
ngauss | in | Number of Gaussian elements | |
Allowed: | Int | ||
Default: | 1 | ||
poly | in | Order of polynomial element | |
Allowed: | Int | ||
Default: | Unset | ||
fit | in | Do fit or get estimate | |
Allowed: | T or F | ||
Default: | T | ||
sigma | in | Weights image | |
Allowed: | String or unset | ||
Default: | unset |
The behaviour is primarily controlled by argument fit.
If fit==T then you need an estimate. If estimate is unset, then that estimate is automatically provided by fitting ngauss gaussians. If estimate is set then it is used to provide the initial estimate.
The functional form that is actually fit for will be any polynomial specified by the poly argument, plus the number of gaussians present in the estimate.
If fit==F then an estimate is created and returned. If estimate is empty, than an estimate for ngauss gaussians is made. If estimate is not empty, then it is just evaluated.
After calling this function, argument values holds the fitted or estimated profile values, and argument resid holds the fitted or estimated residual profile values.
The output mask is a copy of the default input pixel mask (if any); the OTF mask does not contribute. Any other input pixel masks will not be copied. Use function maskhandler if you need to copy other masks too. Use function calcmask if you need to apply the OTF mask to the output.
- myim := image('gc.small') - local values, resid - fit := myim.fitprofile(values, resid, axis=3, fit=T) # Auto-est and fit