Skip to content

UGC 12517, step by step

This tutorial fits the elliptical galaxy UGC 12517 in detail. It uses the HST WFC3/IR F110W image in the repository's examples/u12517 folder. Every figure on this page was made from real elliprof 0.1.3 output, by the scripts in docs/scripts/.

Before you start

Install elliprof (Install) and download u12517j.fits and u12517j.dmask as in the quick start. DS9 is useful but not required.

1. Look at the data

Image u12517j.fits: 1025 × 1022 pixels, HST WFC3/IR, F110W filter
Pixel scale 0.128″ / pixel
Mask u12517j.dmask: 0 = masked, 1 = good; 103,402 pixels (9.9%) masked
Sky 3246 (image units; from the original analysis)
Galaxy centre near pixel (567, 562) in ELLIPROF coordinates

Open the image in DS9 with a log or asinh scale. You will see a smooth, slightly elongated elliptical galaxy, many compact background galaxies and a few bright stars with diffraction spikes. The mask covers these, the nucleus and the image edges. See the preparation chain.

2. Choose the parameters

  • Centre X0=567 Y0=562: the peak of the galaxy. Remember that ELLIPROF coordinates are DS9 pixel numbers minus 0.5.
  • Radii R0=9 R1=347: from the edge of the masked nucleus out to a large ellipse that still lies inside the image. The major axis is nearly vertical, and 562 ± 347 stays within the 1022 rows.
  • Number NR=23, spaced in \(r^{1/4}\) (the default RLAW=2).
  • Iterations NITER=10: more than the default 5, to be sure that the parameters settle.
  • RMSTAR, to reject faint stars and knots the mask missed.

3. Run

elliprof u12517j.fits \
    --mask u12517j.dmask --sky 3246 \
    X0=567 Y0=562 R0=9 R1=347 NR=23 NITER=10 RMSTAR \
    -o u12517.dat --csv u12517.csv --reg u12517.reg \
    -m u12517.prf \
    --prepared u12517_prepared.fits --residual u12517_residual.fits

It takes well under a second. The note about "too few usable samples" refers to the innermost isophote, which lies inside the masked nucleus (see the quick start).

4. Check the fit on the image

ds9 u12517j.fits -scale asinh -regions u12517.reg
UGC 12517 with every second fitted isophote drawn in orange: nested
  ellipses, slightly elongated vertically, around the galaxy
  centre.
The fit (second panel): the ellipses follow the galaxy's isophotes.

Things to check:

  • the ellipses are nested and do not cross;
  • they follow the galaxy's light, not a star or a background galaxy;
  • the outer ones stay on the image.

5. Read the profile

Six panels showing the UGC 12517 profile against semi-major axis:
  intensity, ellipticity, position angle, logarithmic slope, a4/a and
  centre offsets.
The UGC 12517 profile (real fit).

The interpretation is on The profile. In short: a smooth profile, ellipticity 0.21 falling to 0.175 outside, no isophote twist, nearly pure ellipses (|a4/a| < 0.5%), and stable centres. The harmonic columns (I3, A3, I4, A4) of this fit are plotted and discussed in Harmonic analysis.

6. Surface brightness

The profile above is in the image's units, I0 per pixel. Converting it to mag/arcsec² takes a photometric zeropoint and the pixel scale; see Galaxy surface photometry for the formula.

7. Test the sky

Re-run with the sky changed by its uncertainty, and compare:

for SKY in 3196 3246 3296; do
    elliprof u12517j.fits --mask u12517j.dmask --sky $SKY \
        X0=567 Y0=562 R0=9 R1=347 NR=23 NITER=10 RMSTAR -o sky_$SKY.dat
done
Two plots against semi-major axis for several sky levels. Left: the
  isophote intensity, identical in the centre and spreading apart at
  large radii. Right: the percentage change in intensity relative to the
  adopted sky, zero in the centre and growing to about plus or minus 10
  percent at the outermost isophote.
Changing the sky changes only the outer profile (measured intensities, no calibration).

8. Look at the model and the residual

Open u12517.prf and u12517_residual.fits in DS9 next to the image, locked by WCS.

The UGC 12517 residual over the whole image and enlarged at the
  centre.
The residual (grey = masked). It shows pixel noise, faint unmasked sources and a small pattern at the very centre.

At this display stretch, the residual is mostly noise and faint point sources. No obvious dust lane, shell or disk stands out, which is consistent with the nearly pure elliptical isophotes. A deeper look needs smoothing and a harder stretch. The small pattern at the centre is where the galaxy is brightest and its profile steepest, so small model errors are largest there.

9. In Python

from elliprof import run_elliprof

r = run_elliprof("u12517j.fits", x0=567, y0=562, r0=9, r1=347, nr=23,
                 niter=10, rmstar=True, mask="u12517j.dmask", sky=3246,
                 model_path="u12517.prf", prepared="u12517_prepared.fits",
                 residual_path="u12517_residual.fits", output_dir=".")
p = r.profile.iloc[1:]           # the r = 9 isophote was not fitted

The full set of plots on this page is made by docs/scripts/make_all.py in the repository.

Next