Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

IRSA Tutorials

Euclid Q1 Merged Objects HATS Catalog: Magnitudes

This tutorial explores Euclid photometry measurements. It assumes you are familiar with the first tutorial in this series, which covers the Euclid Q1 Merged Objects HATS Catalog content, format, and basic access.

Learning Goals

By the end of this tutorial, you will be able to:

1. Introduction

The Euclid Q1 data release contains photometry from Euclid as well as from external surveys. There are several flux measurements per band. The measurements are described in Euclid Collaboration: Romelli et al., 2025 (hereafter, Romelli), especially sections 6 and 8.

In this tutorial, we will look at aperture and template-fit photometry measurements in the four Euclid bands: I (from the VIS instrument), Y, J, and H (from the NISP instrument). Aperture fluxes are generally more accurate for point-like sources, especially bright stars in the NIR bands, likely due to better handling of PSF-related effects. Template-fit fluxes are expected to be more accurate for extended sources because the templates do a better job of excluding contamination from nearby sources. Additional photometry measurements that we won’t cover here include: Sérsic-fit fluxes (computed for parametric morphology), PSF-fit fluxes (VIS only), and class-corrected fluxes that were corrected based on the PHZ (photometric) classifications.

The best-estimate flux in the detection band is given by the column mer_flux_detection_total. This can also be used to color-correct flux measurements in non-detection bands, as we will demonstrate. The object detection process is described in Romelli. The MER Photometry Cookbook describes the color corrections and how to convert from flux to magnitude. In this tutorial, we will restrict to objects detected in VIS (I band) because it simplifies the calculations.

2. Imports and Paths

3. Load Template-fit and Aperture Magnitudes

The following columns will be important. Descriptions come from Romelli.

We’ll convert the catalog fluxes to magnitudes following the MER Photometry Cookbook. PyArrow can do the conversion during the read operation and return only the magnitudes. To do this, we’ll use the following function to define the magnitudes as pyarrow.compute (pc) functions, which are described at Compute Functions.

Define the columns we want to load. This needs to be a dictionary (rather than a simple list of column names) because we’re asking PyArrow to compute the magnitudes dynamically from the catalog fluxes. The dictionary keys will be the column names in the resultant table. The values must be pyarrow.compute expressions (described above).

<pyarrow.compute.Expression add(multiply(-2.5, log10(multiply(mer_flux_y_2fwhm_aper, divide(mer_flux_detection_total, mer_flux_vis_2fwhm_aper)))), 23.9)>

We’ll restrict to the Euclid Deep Field - Fornax (EDF-F) to reduce the amount of data loaded. Compute the HEALPix order 9 pixel indexes, following the introductory tutorial.

Construct the row filter.

Load the data.

Loading...

4. Magnitude Distributions of Galaxies, Stars, and QSOs

Let’s visualize the template-fit magnitude distributions as a function of PHZ classification. Since the template-fit photometry is recommended for extended objects, we’ll separate the point-like objects. Euclid Collaboration: Tucci et al., 2025 defines point-like objects as having MUMAX_MINUS_MAG < -2.5.

Source
<Figure size 1800x1200 with 12 Axes>

The Euclid instruments are tuned to detect galaxies for cosmology studies, so it’s no surprise that there are many more galaxies than other object types.

The green lines (top row) show the magnitude distributions of objects classified as galaxy only (solid) and those classified as galaxy plus possibly other types (dot and dash-dot). The dash-dot line highlights the population of point-like “galaxies”, which are likely misclassified stars or QSOs and mostly appear at faint magnitudes.

The star distributions (middle row, blue) are broader and peak at brighter magnitudes than the galaxy distributions, as expected. Adding objects classified as both star and galaxy (dotted line) adds significant numbers, especially near the peak and toward the faint end where confusion is more likely. Restricting these to point-like objects (dash-dot line) shows that many bright objects surpassing both probability thresholds are likely to be stars, not galaxies. However, this doesn’t hold at the faint end where even some star-only classified objects fail the point-like cut.

The bottom row (orange) is the same as the middle row but for QSOs instead of stars. There are very few point-like QSOs, reminding us that most QSO classifications in Q1 should be treated with skepticism (as discussed in the Classifications tutorial). By default, this figure only includes objects in the EDF-F region. High-confidence QSOs are more concentrated in the EDF-N region where advantageous external photometry (particularly u-band from UNIONS) was available.

5. Template-fit vs. Aperture Magnitudes

Now let’s compare template-fit and aperture magnitudes by plotting their differences. This comparison reveals systematic offsets that depend on factors including morphology (extended vs. point-like) and brightness.

This figure is inspired by Romelli Fig. 6 (top panel).

Source
<Figure size 1800x900 with 12 Axes>

The panel annotations give the fraction of objects with magnitude differences that are positive (top number) and negative (bottom number). The magnitude difference is fairly tightly clustered around 0 for extended objects (top row), but with asymmetric outliers. There is a positive offset, indicating fainter template-fit magnitudes, as expected: templates better exclude contaminating light from nearby sources. The offset is more pronounced for point-like objects (bottom row), likely due to the PSF handling mentioned above, and we are reminded that aperture magnitudes are more reliable here.

About this notebook

Updated: 2025-12-23

Contact: IRSA Helpdesk