# Spectral Indices

The spectral indices to be measured by the DAP are divided into two groups: (1) absorption-line indices that measure the equivalent width of an absorption feature and (2) bandhead or color indices that measure the ratio of fluxes is in two passbands. Both sets of indices are measured using SpectralIndices; see Spectral-Index Measurements.

## Absorption-line Indices

### Calculation

The absorption-line index calculations are performed as defined/used by Worthey (1994) and Trager et al. (1998) ($${\mathcal I}_{\rm WT}$$), as well as defined/used by Burstein et al. (1984) and Faber et al. (1985) ($${\mathcal I}_{\rm BF}$$).

Specifically, let

$S(y) \equiv \int_{\lambda_1}^{\lambda_2} y\ d\lambda \approx \sum_i y_i\ {\rm d}p_i\ {\rm d}\lambda_i,$

where $${\rm d}p_i$$ is the fraction of pixel $$i$$ (with width $${\rm d}\lambda_i$$) in the passband defined by $$\lambda_1 < \lambda < \lambda_2$$; the discrete sum is performed by passband_integral(). Also, let $$f$$ be the spectrum flux density and define a linear continuum using two sidebands (“blue” and “red”):

$C(\lambda) = (\langle f\rangle_{\rm red} - \langle f\rangle_{\rm blue})\ \frac{\lambda - \lambda_{\rm blue}}{\lambda_{\rm red}-\lambda_{\rm blue}} + \langle f\rangle_{\rm blue},$

where $$\lambda_{\rm blue}$$ and $$\lambda_{\rm red}$$ are the wavelengths at the center of the two sidebands — e.g., $$\lambda_{\rm red} = (\lambda_{1,{\rm red}} + \lambda_{2,{\rm red}})/2$$ — and

$\langle y\rangle = S(y)/S(1).$

When no pixels are masked in the spectrum, $$S(1) = (\lambda_2 - \lambda_1) \equiv \Delta\lambda$$.

Following the Worthey (1994) definition, we can then calculate the absorption-line spectral indices as follows:

$\begin{split}{\mathcal I}_{\rm WT} = \left\{ \begin{array}{ll} S(1 - f/C), & \mbox{for angstrom units} \\[3pt] -2.5\log\left[\langle f/C\rangle\right], & \mbox{for magnitude units} \end{array}\right..\end{split}$

The difficulty with the Worthey et al. definitions is that it makes it difficult to construct an aggregate index measurement based on individual index measurements from multiple spectra; however, this is straight-forward under definitions closer to those provided by Burstein et al. (1984) and Faber et al. (1985).

Let:

$\begin{split}{\mathcal I}_{\rm BF} = \left\{ \begin{array}{ll} S(1) - S(f)/C_0, & \mbox{for angstrom units} \\[3pt] -2.5\log\left[\langle f\rangle/C_0\right], & \mbox{for magnitude units} \end{array}\right.,\end{split}$

where $$C_0$$ is the value of the linear (not necessarily “flat”) continuum at the center of the main passband. Given that the continuum is a linear function, $$S(C) = C_0 \Delta\lambda$$; i.e., the integral of the continuum over the passband is mathematically identical to the continuum sampled at the center of the bandpass times the bandpass width.

Now, we can calculate a weighted sum of indices using the value of $$C_0$$ for each index as the weight and assume that no pixels are masked such that we can replace $$S(1)$$ with $$\Delta\lambda$$ to find:

$\begin{split}\begin{eqnarray} \frac{\sum_i C_{0,i} {\mathcal I}_{\rm BF}}{\sum_i C_{0,i}} & = & \frac{\sum_i C_{0,i} (\Delta\lambda - S(f)_i / C_{0,i})}{\sum_i C_{0,i}} \\ & = & \Delta\lambda - \frac{\sum_i S(f)_i}{\sum_i C_{0,i}} \end{eqnarray}.\end{split}$

That is, this weighted sum of the individual indices is mathematically identical (to within the limits of how error affects the construction of the linear continuum) to the index measured for the sum (or mean) of the individual spectra. Similarly for the indices in magnitude units:

$\begin{split}\begin{eqnarray} -2.5\log\left[\frac{\sum_i C_{0,i} 10^{-0.4 {\mathcal I}_{\rm BF}}}{\sum_i C_{0,i}}\right] & = & -2.5\log\left[\frac{\sum_i C_{0,i} (S(f)_i / C_{0,i})} {\Delta\lambda \sum_i C_{0,i}}\right] \\ & = & -2.5\log\left[\frac{\sum_i S(f)_i}{\Delta\lambda \sum_i C_{0,i}}\right] \end{eqnarray}.\end{split}$

Given the ease with which one can combine indices in the latter definition, the DAP calculates both $${\mathcal I}_{\rm WT}$$ and $${\mathcal I}_{\rm BF}$$.

### Index Parameters

The table below provides a compilation of absorption-line indices. Recent survey-level runs of the DAP have included all of these measurements.

Name

Main Passband (Å)

Blue Sideband (Å)

Red Sideband (Å)

Frame

Units

Ref

CN1

4142.125 – 4177.125

4080.125 – 4117.625

4244.125 – 4284.125

air

mag

[1]

CN2

4142.125 – 4177.125

4083.875 – 4096.375

4244.125 – 4284.125

air

mag

[1]

Ca4227

4222.250 – 4234.750

4211.000 – 4219.750

4241.000 – 4251.000

air

[1]

G4300

4281.375 – 4316.375

4266.375 – 4282.625

4318.875 – 4335.125

air

[1]

Fe4383

4369.125 – 4420.375

4359.125 – 4370.375

4442.875 – 4455.375

air

[1]

Ca4455

4452.125 – 4474.625

4445.875 – 4454.625

4477.125 – 4492.125

air

[1]

Fe4531

4514.250 – 4559.250

4504.250 – 4514.250

4560.500 – 4579.250

air

[1]

C24668

4634.000 – 4720.250

4611.500 – 4630.250

4742.750 – 4756.500

air

[1]

Hb

4847.875 – 4876.625

4827.875 – 4847.875

4876.625 – 4891.625

air

[1]

Fe5015

4977.750 – 5054.000

4946.500 – 4977.750

5054.000 – 5065.250

air

[1]

Mg1

5069.125 – 5134.125

4895.125 – 4957.625

5301.125 – 5366.125

air

mag

[1]

Mg2

5154.125 – 5196.625

4895.125 – 4957.625

5301.125 – 5366.125

air

mag

[1]

Mgb

5160.125 – 5192.625

5142.625 – 5161.375

5191.375 – 5206.375

air

[1]

Fe5270

5245.650 – 5285.650

5233.150 – 5248.150

5285.650 – 5318.150

air

[1]

Fe5335

5312.125 – 5352.125

5304.625 – 5315.875

5353.375 – 5363.375

air

[1]

Fe5406

5387.500 – 5415.000

5376.250 – 5387.500

5415.000 – 5425.000

air

[1]

Fe5709

5696.625 – 5720.375

5672.875 – 5696.625

5722.875 – 5736.625

air

[1]

Fe5782

5776.625 – 5796.625

5765.375 – 5775.375

5797.875 – 5811.625

air

[1]

5876.875 – 5909.375

5860.625 – 5875.625

5922.125 – 5948.125

air

[1]

TiO1

5936.625 – 5994.125

5816.625 – 5849.125

6038.625 – 6103.625

air

mag

[1]

TiO2

6189.625 – 6272.125

6066.625 – 6141.625

6372.625 – 6415.125

air

mag

[1]

HDeltaA

4083.500 – 4122.250

4041.600 – 4079.750

4128.500 – 4161.000

air

[2]

HGammaA

4319.750 – 4363.500

4283.500 – 4319.750

4367.250 – 4419.750

air

[2]

HDeltaF

4091.000 – 4112.250

4057.250 – 4088.500

4114.750 – 4137.250

air

[2]

HGammaF

4331.250 – 4352.250

4283.500 – 4319.750

4354.750 – 4384.750

air

[2]

CaHK

3899.5 – 4003.5

3806.5 – 3833.8

4020.7 – 4052.4

air

[3]

CaII1

8484.0 – 8513.0

8474.0 – 8484.0

8563.0 – 8577.0

air

[4]

CaII2

8522.0 – 8562.0

8474.0 – 8484.0

8563.0 – 8577.0

air

[4]

CaII3

8642.0 – 8682.0

8619.0 – 8642.0

8700.0 – 8725.0

air

[4]

Pa17

8461.0 – 8474.0

8474.0 – 8484.0

8563.0 – 8577.0

air

[4]

Pa14

8577.0 – 8619.0

8563.0 – 8577.0

8619.0 – 8642.0

air

[4]

Pa12

8730.0 – 8772.0

8700.0 – 8725.0

8776.0 – 8792.0

air

[4]

MgICvD

5165.0 – 5220.0

5125.0 – 5165.0

5220.0 – 5260.0

vac

[5]

NaICvD

8177.0 – 8205.0

8170.0 – 8177.0

8205.0 – 8215.0

vac

[5]

MgIIR

8801.9 – 8816.9

8777.4 – 8789.4

8847.4 – 8857.4

vac

[5]

FeHCvD

9905.0 – 9935.0

9855.0 – 9880.0

9940.0 – 9970.0

vac

[5]

NaI

8168.500 – 8234.125

8150.000 – 8168.400

8235.250 – 8250.000

air

[6]

bTiO

4758.500 – 4800.000

4742.750 – 4756.500

4827.875 – 4847.875

air

mag

[7]

aTiO

5445.000 – 5600.000

5420.000 – 5442.000

5630.000 – 5655.000

air

mag

[7]

CaH1

6357.500 – 6401.750

6342.125 – 6356.500

6408.500 – 6429.750

air

mag

[7]

CaH2

6775.000 – 6900.000

6510.000 – 6539.250

7017.000 – 7064.000

air

mag

[7]

NaISDSS

8180.0 – 8200.0

8143.0 – 8153.0

8233.0 – 8244.0

air

[8]

TiO2SDSS

6189.625 – 6272.125

6066.625 – 6141.625

6422.0 – 6455.0

air

mag

[8]

### Input Data Format

The parameters that define the absorption-line-index calculations are provided via the AbsorptionIndexDB object, which is built using an SDSS-style parameter file. The core level class that calculates the raw absorption-line indices is AbsorptionLineIndices.

The columns of the parameter file are:

Parameter

Format

Description

index

int

Unique integer identifier of the absorption-line index. Must be unique.

name

str

Name of the index. Must be unique.

primary

float[2]

A two-element vector with the starting and ending wavelength for the primary passband surrounding the absorption feature(s).

blueside

float[2]

A two-element vector with the starting and ending wavelength for a passband to the blue of the primary band.

redside

float[2]

A two-element vector with the starting and ending wavelength for a passband to the red of the primary band.

waveref

str

The reference frame of the wavelengths; must be either ‘air’ for air or ‘vac’ for vacuum.

units

str

Units for the absorption index, which must be either ‘ang’ or ‘mag’.

component

int

Never used: Binary flag (0-false,1-true) that the index is a component of a composite index. If true (1), all components with the same NAME are added together to form the composite index.

and an example file might look like this:

typedef struct {
int index;
char name[9];
double primary[2];
double blueside[2];
double redside[2];
char waveref[3];
char units[3];
int component;
} DAPABI;

DAPABI  1  CN1        { 4142.125  4177.125 }  { 4080.125  4117.625 }  { 4244.125  4284.125 }  air  mag  0
DAPABI  2  CN2        { 4142.125  4177.125 }  { 4083.875  4096.375 }  { 4244.125  4284.125 }  air  mag  0


Note that the functionality implied by the component parameter has been a notional future development for the module, but has never been implemented. However, unfortunately, it’s still a required element of the database file.

The absorption-line indices are measured by SpectralIndices; see Spectral-Index Measurements. A set of parameter files that define a list of absorption-line index sets are provided with the DAP source distribution and located at $MANGADAP_DIR/mangadap/data/absorption_indices. The database you wish to use is selected by the absindex parameter in the relevant parameter block of the Analysis Plans file. The keyword is simply the capitalized name of the file without the “.par” extension. For example, to use the extindx.par database, the plan file would include [default.indices] absindex = 'EXTINDX'  To provide a user-defined database, simply replace the absindex keyword with the name of the local file defining the database (in the format given above). For example, [default.indices] absindex = '/path/to/my/local/file/my_abs_database.par'  ## Bandhead or Color Indices ### Calculation Bandhead, or color, indices simply measure the ratio of fluxes in two sidebands. Following the nomenclature defined for the Absorption-line Indices, a color index is: ${\mathcal I} = \frac{\langle f\rangle_0}{\langle f\rangle_1},$ where $$\langle y\rangle = S(y)/S(1)$$ and the two sidebands are denoted with subscripts 0 and 1. The “order” of the index selects if the index is calculated as the red-to-blue flux ratio or the blue-to-red flux ratio (e.g., D4000 is defined as a red-to-blue index, whereas TiOCvD is defined as a blue-to-red index). Given the simple definition of color indices, a combined index for the sum (or mean) of multiple spectra can be calculated by constructing the weighted-mean index, where the continuum in the denominator is used as the weight: $\frac{\sum_i \langle f_i\rangle_1 {\mathcal I}_i}{\sum_i \langle f_i\rangle_1} = \frac{\sum_i \langle f_i\rangle_0} {\sum_i \langle f_i\rangle_1} = \frac{\langle\sum_i f_i\rangle_0} {\langle\sum_i f_i\rangle_1}$ ### Index Parameters The table below provides a compilation of bandhead and color indices. Recent survey-level runs of the DAP have included all of these measurements. Name Blue Sideband (Å) Red Sideband (Å) Frame Integrand Order Ref D4000 3750 – 3950 4050 – 4250 air $$F_\nu$$ R/B [9] Dn4000 3850 – 3950 4000 – 4100 air $$F_\nu$$ R/B [10] TiOCvD 8835 – 8855 8870 – 8890 vac $$F_\lambda$$ B/R [5] ### Input Data Format The parameters that define the bandhead index calculations are provided via the BandheadIndexDB object, which is built using an SDSS-style parameter file. The core level class that calculates the raw bandhead indices is BandheadIndices. The columns of the parameter file are: Parameter Format Description index int Unique integer identifier of the absorption-line index. Must be unique. name str Name of the index. Must be unique. blueside float[2] A two-element vector with the starting and ending wavelength for a passband to the blue of the primary band. redside float[2] A two-element vector with the starting and ending wavelength for a passband to the red of the primary band. waveref str The reference frame of the wavelengths; must be either ‘air’ for air or ‘vac’ for vacuum. integrand str Integrand within the passband for the construction of the index, which must be either ‘fnu’ or ‘flambda’. order str Define the order to use when constructing the index. The options are either a ratio of red-to-blue or blue-to-red, which are respectively selected using ‘r_b’ or ‘b_r’. and an example file might look like this: typedef struct { int index; char name[9]; double blueside[2]; double redside[2]; char waveref[3]; char integrand[7]; char order[3]; } DAPBHI; DAPBHI 1 D4000 { 3750.000 3950.000 } { 4050.000 4250.000 } air fnu r_b DAPBHI 2 Dn4000 { 3850.000 3950.000 } { 4000.000 4100.000 } air fnu r_b DAPBHI 3 TiOCvD { 8835.000 8855.000 } { 8870.000 8890.000 } vac flambda b_r  ### Changing the bandhead index parameters The bandhead and color indices are measured by SpectralIndices; see Spectral-Index Measurements. A set of parameter files that define a list of bandhead index sets are provided with the DAP source distribution and located at $MANGADAP_DIR/mangadap/data/bandhead_indices. The database you wish to use is selected by the bandhead parameter in the relevant parameter block of the Analysis Plans file. The keyword is simply the capitalized name of the file without the “.par” extension. For example, to use the bhbasic.par database, the plan file would include

[default.indices]

To provide a user-defined database, simply replace the bandhead keyword with the name of the local file defining the database (in the format given above). For example,
[default.indices]