# Photometry templates -- what are the templates of?

Redshift measurements from photometric data can be determined using template-fitting (Cosmos website, SDSS photo-z).

What does it mean to fit a template to determine redshift? What is the template of?

The electromagnetic spectrum is a continuous distribution of frequencies/wavelengths. Photometry is the science of light as perceived by the human eye, so it is very relevant for observing astronomical objects with telescopes, etc... In astrophotometry, one cuts the electromagnetic spectrum into bins, called "magnitudes." The specific ranges of frequency/wavelength covered by each bin, i.e. by each magnitude, depends on the specific instrument being considered, so it can be confusing trying to compare between different instruments. There do exist some known transformations between certain sets of magnitudes that can be found online. Some photometric frameworks work better than others for certain astrophysical settings.

In (modern) photometric devices, some kind of light harvesting device is utilized to capture the incident light (for example, a CCD system absorbs the light and converts the energy to a digital signal, but that's a great oversimplification of the amazing physics involved).

Redshift measurements from photometric data can be determined using template-fitting (Cosmos website, SDSS photo-z).

The templates are basically just a model for how the spectra of a given astromonical object is expected to look from known spectroscopic measurements of such a type of object. The templates are used to try to deduce information about the object as a function of the observed magnitudes.

What does it mean to fit a template to determine redshift? What is the template of?

The templates are generally composed from spectroscopic data, so that the deductions made from the templates can be reasonably reliable (see below for more details). Complicated code pipelines are developed for handling such calculations.

From the SDSS website about template fitting of photo-z measurements, just as an example: "After the photometric redshift of each galaxy is determined, template fitting is used to estimate the galaxy’s k-correction, distance modulus, absolute magnitudes, rest frame colors, and spectral type."

So, as state above, they make the photometric measurements, and then have to have a model (using the template) to deduce source parameters. They specifically use the empirically derived spectral templates of Dobos $$et~al.$$, wherein section 1.3 they state:

One of the keys to the success of template-based photometric red- shift estimators is the good set of spectral templates used to fit the broad-band spectral energy distributions of observed galaxies. Spec- tral templates from models are often used, but they can miss some important features of real spectra. Also, models have to be highly consistent with the observations in terms of integrated colours. As an alternative to models, individual empirical spectra are used, but it is not easy to get a high S/N set of spectra that represents all types of galaxies. Our composites can provide a high S/N, reliable and representative template set for photo-z applications

An alternative method to template fitting is using machine learning algorithms to learn the relationship between the photometric magnitudes (which are observed/measured) and the photometric redshift estimate: you train the ML algorithm on a set of photometric magnitudes as "inputs" with a corresponding set of known spectroscopic "outputs" so it learns the relationship (which is highly nonlinear, multivariate, and nontrivial) between the photometric magnitudes and the spectroscopic redshift. Then you give the trained ML algorithm a new dataset of photometric measurements to output a photometric redshift estimate. The competitiveness of such ML algorithms has greatly improved over recent decades, and now many groups use some kind of mixture of template fitting and ML approaches.

Either approach, the template catalogues or the ML algorithms, involve using known spectroscopic spectra or redshifts to deduce photometric information from photometric magnitudes.