Color-Excitation (CEx) Diagram

Galaxies can host star formation, active galactic nuclei (AGN), or both. It is often difficult to distinguish between these two processes. We developed the Mass-Excitation (MEx) diagram in Juneau et al (2011) to identify AGNs in galaxies using [OIII]5007/Hb and stellar mass. Similarly, Yan et al (2011) developed a diagram based on [OIII]5007/Hb and rest-frame U-B color (described on this page). Both of these new diagnostics allow us to classify galaxies out to z~1 with optical spectra, beyond what was possible for traditional nebular line diagnostics such as the BPT diagrams, which are limited to z<0.4.

This page contains IDL code to calculate, given their position on the CEx diagram, the probability that galaxies belong to the following spectral classes:

  • purely star-forming (‘SF’)

  • composite (mixed star-formation and AGN; ‘comp’)

  • LINER

  • Seyfert 2 (‘Sy2’)

The probabilities are defined such that PSF + Pcomp + PLINER + PSy2 = 1. When only interested in distinguishing between purely star-forming galaxies and galaxies hosting ‘any’ category of AGN, one can simply calculate PSF = PSF and PAGN = Pcomp + PLINER + PSy2 (or, equivalently, PAGN = 1 - PSF).

Go here to download the code (note that the savefiles must be located in the same directory as the routines unless specified otherwise by the user in the code).

Conditions of Use

Please read the documentation provided on this page and cite Juneau et al (2011) [as well as Yan et al (2011) for developing the original version of the diagram] if you make use of any of the code and/or savefiles in your work. Email me to register on the user list if you wish to receive updates. This code comes with no warranty or whatsoever. It is meant to be a useful tool and provided as is (although comments and suggestions are accepted).

How to use the code

The following description can also be found as the header of the code.

; function CEx_prob

;

; PURPOSE:

; Calculation of galaxy/AGN classification probabilities based on

; the Color-Excitation (CEx) diagnostic diagram (Yan et al. 2011)

; and the prior classsification of SDSS galaxies at 0.05<z<0.1.

; The code ignores redshift evolution along the rest-frame (U-B)

; color or the [OIII]/Hbeta line ratio but evolution can be

; implemented by the user by shifting the input values by the

; expected offset, if any.

;

; SYNTAX:

; result = CEx_prob(x,y,dx,dy)

;

; INPUT:

; x = (U-B)_0 ; rest-frame U-B color in AB mags

; y = log([OIII]5007/Hbeta) ; log of flux ratio

; dx = error on (U-B)_0 - must be >0.04 dex

; dy = error on log([OIII]/Hbeta) - must be >0.025 dex

;

; OUTPUT:

; Array of 4 columns by N rows, where N is the number of elements of

; the input vectors (greater or equal to 1); the four columns give

; SDSS-based probabilities of having the following BPT classes:

; result[0,*] = P(SF) ; purely star-forming

; result[1,*] = P(comp) ; composite (SF/AGN)

; result[2,*] = P(LINER) ; LINER

; result[3,*] = P(Sy2) ; Seyfert 2

; Each number varies from 0 to 1, and the sum each row is 1. The

; values are set to -99 when the data points and errors are

; completely out-of-bound of the parameter space covered by the SDSS

; prior sample (e.g., at U-B < 0.1)

;

Illustration of CEx AGN Probability

The CEx diagnostic diagram has been first calibrated using a sample of SDSS prior galaxies at 0.05<z<0.1 from the DR4 release. The galaxies were chosen to have valid emission line flux measurements (S/N>3) for all the required emission lines: Hbeta, [OIII]5007, Halpha, [NII]6584 and [SII]6717,6731 in order to establish their classification on BPT & VO87 diagrams, yielding four mutually exclusive classes (see Section 3.3 of Juneau et al. (2011)):

  • purely star-forming (‘SF’)

  • composite (mixed star-formation and AGN; ‘comp’)

  • LINER

  • Seyfert 2 (‘Sy2’)

The location of these galaxies on the CEx diagram is illustrated in Figure 1.

For a given rest-frame (U-B) color and [OIII]5007/Hbeta flux ratio, the IDL code calculates how many SDSS galaxies of each class are within the rectangle defined by the 1-sigma uncertainties. Each class is assigned a probability based on the fraction of galaxies that belong to that class. For example, if a galaxy has (U-B)0 = 0.85 +/- 0.15 and log([OIII]/Hb) = 0.4 +/- 0.1, the code will find:

IDL> print, CEx_prob(0.85, 0.4, 0.15, 0.1)

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Calculating probabilities: P(SF) + P(comp) + P(LINER) + P(Sy2) = 1

*** Output will have 4 columns and one row per galaxy ***

*** Calculations for N(galaxies)= 1 ***

*** ***

*** P(SF) P(comp) P(LINER) P(Sy2) ***

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

0.286783 0.0773067 0.0423940 0.593516

So this particular galaxy would be assigned PSF=29% and PAGN=71% (which can be broken down into Pcomp=8%, PLINER=4% and PSy2=59%). This example illustrates a case in a region where there is overlap between the star-forming (SF) and Sy2 classes. The spectral classes are more uncertain in the regions where various classes overlap. This may sometimes be a limitation when studying individual galaxies but this information should be useable nonetheless as a system of statistical weights to study global properties of statistical galaxy samples.

Figure 1. Bivariate distributions of SDSS galaxies on the CEx diagram. The different classes are labeled on each panel, and the empirical dividing lines illustrate approximative boundaries between the galaxies with and without AGN. The bottom curve delineates the regions where PAGN<30% (below) and PAGN>30% (above). Adapted from Fig. 13 in Juneau et al. (2011).

Rest-frame U-B color

This code assumes that rest-frame U-B colors are in AB magnitudes. In the case of the SDSS prior sample, they were calculated using the Kcorrect code (version v4_1_4) from Blanton & Roweis (2007). Also see the Kcorrect wiki site here.

CEx Download

Go here to download the code (note that the savefiles must be located in the same directory as the routines unless specified otherwise by the user in the code). Alternatively, you can retrieve the tar file from the Attachments below.