Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1488 |
|
Package | general | |
Module | images | |
Tool | image |
residfile | in | Output fitted residuals image file name | |
Allowed: | String or unset | ||
Default: | unset | ||
fitfile | in | Output fitted image file name | |
Allowed: | String or unset | ||
Default: | unset | ||
sigmafile | in | Input weights image for fitting | |
Allowed: | String or unset | ||
Default: | unset | ||
axis | in | The profile axis to fit | |
Allowed: | Integer or unset | ||
Default: | Spectral axis if exists else last | ||
order | in | The order of the polynomial | |
Allowed: | Integer or unset | ||
Default: | 0 | ||
region | in | The region of interest | |
Allowed: | Region tool | ||
Default: | Whole image | ||
mask | in | OTF mask | |
Allowed: | Boolean LEL expression or mask region | ||
Default: | None | ||
overwrite | in | Overwrite (unprompted) pre-existing output files ? | |
Allowed: | T or F | ||
Default: | F |
This function fits 1-dimensional polynomials to profiles and subtracts the fits. You specify the order of the polynomial via the order argument. The returned Image tool holds the residual image. You can optionally also write out the fitted image.
The output mask is a copy of the default input pixel mask (if any); the OTF mask does not contribute to the output mask. 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('hcn') - myim2 := myim.fitpolynomial(order=2, axis=3) # Image tool is virtual
- myim := image('hcn') - mask := 'indexin(3, [1:20, 30, 35, 50:60, 90:128])' # Specify pixels to fit via mask on - myim2 := myim.fitpolynomial(order=2, mask=mask, axis=3) # axis 3
This example could be thought of, for example, as an image-based continuum substraction. You specify the axis and the pixels where the spectrum is line free (continuum), do the fit and write out the residual (continuum subtracted) image.