Model, residual and prepared images¶
Besides the profile, elliprof can write three images:
| Option | Image | Definition |
|---|---|---|
-m FILE |
model | the galaxy rebuilt from the fitted isophotes |
--residual FILE |
residual | mask × (science − sky − model) |
--prepared FILE |
prepared | mask × (science − sky): exactly what ELLIPROF fits |
elliprof n1234j.fits --mask n1234_mask.fits --sky 1234.5 \
X0=514 Y0=514 R0=10 R1=450 NR=25 \
-o n1234.dat \
-m n1234.prf \
--residual n1234_residual.fits \
--prepared n1234_prepared.fits
-m FILE alone computes the model and writes it; no MODEL keyword is
needed (since 0.1.4). The traditional ELLIPROF name for the model image is
n1234.prf (and n1234.dat for the text profile), but any name works:
the file is FITS whatever it is called. --residual uses the same model
as -m, and -m is only needed if you also want the model itself.
The model¶
- The model follows the fitted intensity, centre, ellipticity and position angle with radius, plus the chosen harmonic terms.
- It is relative to the subtracted sky: add the sky back to compare with the raw image.
- It covers the whole image, masked pixels included. It is never masked.
- Inside R0 and beyond R1 it is extrapolated, not fitted.
The residual¶
On good pixels it is science − sky − model. On masked pixels it is exactly 0.
The residual shows the light that the smooth isophotal model does not describe:
- dust lanes and patches (negative, absorbing light);
- embedded disks, bars and rings;
- shells, ripples and tidal features;
- globular clusters and background galaxies (positive point-like sources);
- fitting problems: a wrong sky, a poor centre, an isophote that did not converge, a region inside R0 or beyond R1.
Interpret with care
The residual depends on the fit, the mask and the model settings. A
feature that changes when you change the model harmonics, the radial
sampling or the mask is not a property of the galaxy. Compare the
residuals from --model-harmonics none and the default before
interpreting 4-fold patterns.
The residual is also the starting point of a surface brightness fluctuation analysis. See ELLIPROF's role in SBF.
The prepared image¶
--prepared writes mask × (science − sky), the image exactly as
ELLIPROF fits it. Masked pixels are 0. It is the quickest way to check
the sky and the mask. See Sky and masks.
Headers and WCS¶
All three images are floating-point FITS: 32-bit from the single
backend, 64-bit from the double one (see Precision).
They carry the header of the science image, including its WCS (CTYPE, CRPIX, CRVAL,
CD/PC/CDELT, distortion terms), BUNIT and the other keywords. Only
the cards that describe how the science data were stored are left out,
such as BITPIX, BSCALE, BZERO and BLANK.
In DS9, load the images in separate frames and use Frame → Lock → Frame → WCS. Images are never resized, cropped, shifted or reprojected, so pixel (i, j) of every product is pixel (i, j) of the science image.
Images in FITS extensions¶
Many archives store the science image in an extension (for example SCI
in HST files). Select it with CFITSIO syntax, quoted for the shell:
elliprof 'galaxy.fits[SCI]' X0=500 Y0=500 R0=5 R1=200 NR=30 \
-m galaxy.prf
elliprof 'galaxy.fits[1]' X0=500 Y0=500 R0=5 R1=200 NR=30
- Only the selected HDU is fitted, and its header and WCS go into the products.
- elliprof never falls back to another HDU. If the selected one is not a 2-D image, it stops with an error.
--maskand--sky-imagetake the same syntax:--mask 'galaxy.fits[MASK]'.- Tile-compressed FITS images (as written by
fpackor astropy'sCompImageHDU) are read like any other extension.