GNU Astronomy Utilities



7.4.2 Brightness, Flux, Magnitude and Surface brightness

After taking an image with your camera (or a large telescope), the value in each pixel of the output file is a proxy for the amount of energy that accumulated in it (while it was exposed to light). In astrophysics, the centimeter–gram–second (cgs) units are commonly used so energy is commonly reported in units of \(erg\). In an image, the energy of a galaxy for example will be distributed over many pixels. Therefore, the collected energy of an object in the image is the total sum of the values in the pixels associated to the object.

To be able to compare our scientific data with other data, optical astronomers have a unique terminology based on the concept of “Magnitude”s. But before getting to those, let’s review the following basic physical concepts first:

Energy (\(erg\); also in counts or ADUs)

Within the electromagnetic regime, we measure the received energy of astronomical source by counting the number of photons that have been converted to electrons (electric potential) in our detectors.

When counting/measuring the electric potential changes, the optical (but also near ultra-violet and near infra-red) detectors do not actually count individual electrons but bundles/packages of electrons known as the analog-to-digital unit (ADU). The number of electrons in each ADU is known as the gain of the instrument and is measured as part of its calibration.

Power (\(erg/s\))

The amount of energy in a fixed interval of time (1 second) is known as power. Power is used in two contexts within astronomy which are listed below. Both have the same units of energy per time, but their difference is very important to understand in physical interpretation:

Brightness

The received power from a source (the thing we measure). To be able to compare data taken with different exposure times, we define the received power of the source in a detector as the brightness.

Luminosity

The total emitted power of a source in all directions.

Unlike brightness (a measured property), luminosity is an inherent property of the object that is calculated from the combination of multiple measurements (flux and distance; see below).

Flux (\(erg/s/cm^2\))

To be able to compare with data from different telescopes (with different collecting areas), we define the flux which is defined by dividing the brightness by the exposed aperture of our telescope. Because we are using the cgs units, the collecting area is reported in \(cm^2\). Knowing the flux (\(f\)) and distance to the object (\(r\)), we can derive its luminosity: \(L=4{\pi}r^2f\).

Spectral flux density (\(erg/s/cm^2/Hz\) or \(erg/s/cm^2/Å\))

To take into account the different spectral coverage of filters and detectors, we define the spectral flux density, which is defined in either of these units (based on context): \(erg/s/cm^2/Hz\) (frequency-based) \(erg/s/cm^2/Å\) (wavelength-based).

As in other objects in nature, astronomical objects do not emit or reflect the same flux at all wavelengths. On the other hand, our detector technologies are different for different wavelength ranges. Therefore, even if we wanted to, there is no way to measure the “total” (at all wavelengths; also known as “bolometric”) luminosity of an object with a single tool. To be able to analyze objects with different spectral features (compare measurements of the same object taken in different spectral regimes), it is therefore important to account for the wavelength (or frequency) range of the photons that we measured through the spectral flux density.

Jansky (\(10^{-23}erg/s/cm^2/Hz\))

A “Jansky” is a predefined/nominal level of frequency flux density that is commonly used in radio astronomy. The AB magnitude system (see below; used in optical astronomy) is also in frequency-based so there is a simple conversion between the two.

Janskys can be converted to wavelength flux density using the jy-to-wavelength-flux-density operator of Gnuastro’s Arithmetic program, see the derivation under this operator’s description in Unit conversion operators.

Having summarized the relevant basic physical concepts above, let’s review the terminology that is used in optical astronomy. The reason optical astronomers don’t use modern physical terminology is that optical astronomy precedes modern physical concepts by thousands of years!

Once the modern physical concepts where mature enough, optical astronomers found the correct conversion factors to better define their own terminology (and easily use previous results) instead of abandoning them. Other fields of astronomy (for example X-ray or radio) were discovered in the last century when modern physical concepts had already matured and were being extensively used, so for those fields, the concepts above are enough.

Magnitude

The observed spectral flux density of astronomical objects span over a very large range: the Sun (as the brightest object) is roughly \(10^{24}\) times brighter than the fainter galaxies we can currently detect in our deepest images. Therefore the scale that was originally used from the ancient times to measure the incoming light (used by Hipparchus of Nicaea; 190-120 BC) can be parameterized as a logarithmic function of the spectral flux density.

But the logarithm can only be usable with a value which is always positive and has no units. Fortunately brightness is always positive. To remove the units, we divide the spectral flux density of the object (\(F\)) by a reference spectral flux density (\(F_r\)). We then define a logarithmic scale through the relation below and call it the magnitude. The \(-2.5\) factor is also a legacy of our ancient origins: was necessary to approximately match the used magnitude system of Hipparchus.

$$m-m_r=-2.5\log_{10} \left( F \over F_r \right)$$

In the equation above, \(m\) is the magnitude of the object and \(m_r\) is the pre-defined magnitude of the reference spectral flux density. For estimating the error in measuring a magnitude, see Metameasurements on full input. The equation above is ultimately a relative relation. To tie it to physical units, astronomers use the concept of a zero point which is discussed in the next item.

See the mag-to-luminosity operator of Arithmetic in Unit conversion operators for more on the conversion of the observed magnitudes (described below) of an object to luminosity. The received brightness of two object with the same luminosity but at different distances is going to be different (the closer one will be brighter). Therefore, astronomers have defined the following terminology to help avoid confusing distant-dependent and distance-independent magnitudes.

Apparent magnitude

The apparent magnitude is directly related (through the equation above) to the received spectral flux density (that we measure in our detectors). Therefore, it depends on the distance to the object (and any absorption that may occur in the light path).

Absolute magnitude

Knowing the distance of an object and absorptions in the light path, we can obtain the luminosity. From the luminosity, we can measure the apparent magnitude if the object was a point at a nominal (or fixed, or standard, or absolute) distance. The magnitude at this absolute distance is known as the absolute magnitude. The standard (or abstract: just to help in comparisons) distance is historically defined as 10 parsecs. By reporting the magnitude at a fixed distance for all objects, the absolute magnitude therefore helps to compare the intrinsic (independent of distance) magnitude of astronomical objects.

Zero point

A unique situation in the magnitude equation above occurs when the reference spectral flux density is unity (\(F_r=1\)). In other words, the increase in spectral flux density that produces an increment in the detector’s native measurement units (ADUs).

The word “increment” above is used intentionally: because ADUs are discrete and measured as integers. In other words, an increase in spectral flux density that is below \(F_r\) will not be measured by the device. The reference magnitude (\(m_r\)) that corresponds to \(F_r\) is known as the Zero point magnitude of that detector + filter + atmosphere (for on-ground observations).

Therefore, the increase in spectral flux density (from an astrophysical source) that produces an increment in ADUs depends on all hardware and observational parameters that the image was taken in. These include the quantum efficiency of the detector, the detector’s coating, the filter transmission curve, the transmission of the optical path and the atmospheric absorption (for ground-based images; for example observations at different altitudes from the horizon where the thickness of the atmosphere is different).

The rest of the absorptions (for example due to the interstellar medium, or ISM) are not considered in the zero point definition because for most purposes, they are not related to our observing conditions, but position on the sky. In other words, while ISM absorption should be taken into account when measuring the luminosity of the source for example, ISM absorption is not in the zero point. If we can later observe the universe from outside the Milky Way, the ISM absorption should also be included (it would become like the atmosphere). But the farthest we have got so far for scientific observations beyond the Solar system is the L2 orbit of Earth (for instruments like Euclid, Gaia or JWST).

The zero point therefore allows us to summarize all these “observational” (non-astrophysical) factors into a single number and compare different observations from different instruments at different observing conditions (which are critical to do science). Defining the zero point magnitude as \(m_r=Z\) in the magnitude equation, we can write it in simpler format (recall that \(F_r=1\)):

$$m = -2.5\log_{10}(F) + Z$$

The zero point is found through comparison of measurements with pre-defined standards (in other words, it is a calibration of the pixel values). Gnuastro has an installed script with a complete tutorial to estimate the zero point of any image, see Zero point estimation.

Historically, the reference was defined to be measurements of the star Vega, producing the vega magnitude system. In this system, the star Vega had a magnitude of zero (similar to the catalog of Hipparchus of Nicaea). However, this caused many problems because Vega itself has its unique spectral features which are not in other stars and it is a variable star when measured precisely.

Therefore, based on previous efforts, in 1983 Oke & Gunn proposed the AB (absolute) magnitude system from accurate spectroscopy of Vega. To avoid confusion with the “absolute magnitude” of a source (at a fixed distance), this magnitude system is always written as AB magnitude. The AB magnitude zero point (when the input is frequency flux density; \(F_\nu\) with units of \(erg/s/cm^2/Hz\)) was defined such that a star with a flat spectra around \(5480Å\) have a similar magnitude in the AB and Vega-based systems:

$$m_{AB} = -2.5\log_{10}(F_\nu) + 48.60$$

Reversing this equation and using Janskys, an object with a magnitude of zero (\(m_{AB}=0\)) has a spectral flux density of \(3631Jy\). Once the AB magnitude zero point of an image is found, you can directly convert any measurement on it from instrument ADUs to Janskys. In Gnuastro, the Arithmetic program has an operator called counts-to-jy which will do this though a given AB Magnitude-based zero point like below (SDSS data have a fixed zero point of 22.5 in the AB magnitude system):

$ astarithmetic sdss.fits 22.5 counts-to-jy

Verify the zero point definition on new databases: observational factors like the exposure time, the gain, telescope aperture, filter transmission curve and other factors are usually taken into account in the reduction pipeline that produces high-level science products. But some reduction pipelines may not account for some of these for special reasons: for example not accounting for the gain or exposure time. To avoid annoyingly strange results, when using a new database, verify (in the documentation of the database) that the zero points they provide directly converts pixel values to Janskys (is an AB magnitude zero point), or not. If they not, you need to apply corrections your self.

Let’s look at one example where the given zero point has not accounted for the exposure time (in other words it is only for a fixed exposure time: \(Z_E\)), but the pixel values (\(p\)) have been corrected for the exposure time. One solution would be to first multiply the pixels by the exposure time, use that zero point to get your desired measurement and delete the temporary file. But a more optimal way (in terms of storage, execution and clean code) would be to correct the zero point. Let’s take \(t\) to show time in units of seconds and \(p_E\) to be the pixel value that would be measured after the fixed exposure time (in other words \(p_E=p\times t\)). We then have the following:

$$m = -2.5\log_{10}(p_E) + Z_E = -2.5\log_{10}(p\times t) + Z_E$$

From the properties of logarithms, we can then derive the correct zero point (\(Z\)) to use directly (without touching the original pixels):

$$m = -2.5\log_{10}(p) + Z \quad\rm{where}\quad Z = Z_E - 2.5\log_{10}(t)$$

Surface brightness

The definition of magnitude above was for the total spectral flux density coming from an object (recall how we mentioned at the start of this section that the total energy of an object is calculated by summing all its pixels). The total flux is (mostly!) independent of the angular size of your pixels, so we didn’t need to account for the pixel area. But when you want to study extended structures where the total magnitude is not desired (for example the sub-structure of a galaxy, or the brightness of the background sky), you need to report values that are independent of the area that total spectral flux density was measured on.

For this, we define the surface brightness to be the magnitude of an object’s brightness divided by its solid angle over the celestial sphere (or coverage in the sky, commonly in units of arcsec\(^2\)). The solid angle is expressed in units of arcsec\(^2\) because astronomical targets are usually much smaller than one steradian. Recall that the steradian is the dimension-less SI unit of a solid angle and 1 steradian covers \(1/4\pi\) (almost \(8\%\)) of the full celestial sphere.

Surface brightness is therefore most commonly expressed in units of mag/arcsec\(^2\). For example, when the spectral flux density is measured over an area of A arcsec\(^2\), the surface brightness is calculated by:

$$S = -2.5\log_{10}(F/A) + Z = -2.5\log_{10}(F) + 2.5\log_{10}(A) + Z$$

In other words, the surface brightness (in units of mag/arcsec\(^2\)) is related to the object’s magnitude (\(m\)) and area (\(A\), in units of arcsec\(^2\)) through this equation:

$$S = m + 2.5\log_{10}(A)$$

A common mistake is to follow the mag/arcsec\(^2\) unit literally, and divide the object’s magnitude by its area. But this is wrong because magnitude is a logarithmic scale while area is linear. It is the spectral flux density that should be divided by the solid angle because both have linear scales. The magnitude of that ratio is then defined to be the surface brightness.

Besides applications in catalogs and the resulting scientific analysis, converting pixels to surface brightness is usually a good way to display a FITS file in a publication! See FITS images in a publication for a fully working tutorial on how to do this.

Do not warp or convolve magnitude or surface brightness images: Warping an image involves calculating new pixel values (of the new pixel grid) from the input grid’s pixel values. Convolution is also a process of finding the weighted mean of pixel values. During these processes, many arithmetic operations are done on the original pixel values, for example, addition or multiplication. However, \(log_{10}(a+b)\ne log_{10}(a)+log_{10}(b)\). Therefore if you generate color, magnitude or surface brightness images (where pixels are in units of magnitudes), do not apply any such operations on them! If you need to warp or convolve the image, do it before the conversion to magnitude-based units.