Here I want to calculate some photometric points from spectra for comparison with published values for a bunch of known brown dwarfs.

In order to get the true magnitude $$m$$ for an object, I first need to calculate the instrumental magnitude $$m_\text{inst}$$ and then correct for a number of effects. That is, I calculate the apparent magnitude from a particular place on the Earth and then add corrections to determine what it would be if we measured from space.

After all our corrections are made, the magnitude is given by:

$$!m=m_\text{inst}-ZP_m-k_m\cdot X$$

### Instrumental Magnitude

The first term on the right in the equation above is the magnitude measured by the instrument on the ground, given by:

$$!m_\text{inst}=-2.5\log\left(\int f_\lambda (\lambda)\left(\frac{\lambda}{hc}\right)S_m(\lambda)d\lambda\right)$$

Where $$f_\lambda (\lambda)$$ is the energy flux density of the source in units of [erg s-1 cm-2 A-1] and $$S_m(\lambda)$$ is the scalar filter throughput for the band of interest.

Since I will be comparing my calculated magnitudes to photometry taken with photon counting devices, the factor of $$\frac{\lambda}{hc}$$ converts $$f_\lambda (\lambda)$$ to a photon flux density in units [photons s-1 cm-2 A-1].

### Zero Point Correction

The second term in our magnitude equation is a first order correction to compare $$m_\text{inst}$$ to some standard we define as zero. I will use a flux calibrated spectrum of the A0 star Vega to calculate the **zero point** magnitude for the band:

$$!ZP_m=-2.5\log\left(\int f_{\lambda\text{ Vega}}(\lambda)\left(\frac{\lambda}{hc}\right)S_m(\lambda)d\lambda\right)$$

Just as we obtained our instrumental magnitude above.

### Extinction Correction

The third term is to correct for the extinction of the source flux due to atmospheric absorption. We can get closer to the true apparent magnitude (above the atmosphere) by adding an extinction term:

$$!k_m\cdot\sec (z)=k_m\cdot X$$

Where $$k_m$$ is the extinction coefficient for the band of interest and $$\sec(z)=X$$ is the airmass.

The **airmass** is the optical path length of the atmosphere, which attenuates the source flux depending on its angle from the zenith $$z$$. Approximating the truly spherical atmosphere as plane-parallel, the airmass goes from $$X=1$$ at $$z=0^\circ$$ to $$X=2$$ at $$z=60^\circ$$. At zenith angles greater than that, the plane-parallel approximation falls apart and the airmass term gets complicated.

Where the airmass is the amount of atmosphere in the line of sight, the **extinction coefficient** is the amount by which the incident light is attenuated as it travels through the airmass. The extinction coefficient is related to the optical depth $$\tau$$ of the atmosphere as:

$$!m-m_0=-2.5\log\left(\frac{I}{I_0}\right)=-2.5\log (e^{-\tau X})=1.086\cdot\tau\cdot X=k_m\cdot X$$

Where $$m$$ and $$m_0$$ are the magnitudes below and above the atmosphere respectively.

### Example: J21512543-2441000

As an example, I’d like to calculate the 2MASS J-band magnitude of the brown dwarf at 21h51m25.43s -24d41m00s given a low resolution NIR energy flux density from the SpeX Prism instrument on the 3m NASA Infrared Telescope Facility.

Interpolating the filter throughput to the object spectrum and then integrating as in the equation above, I get $$J_\text{inst}=10.046$$ as my instrumental magnitude in the J-band.

Performing the same procedure on the flux calibrated spectrum of Vega, I get $$ZP_J=-5.721$$ for my J-band zero point magnitude.

Checking the FITS file header, I will use $$X=1.444625$$ for the airmass. The mean extinction coefficient for the MKO system J-band is given as $$k_J=0.0153$$ in Tokunaga & Vacca (2007), making the atmospheric correction term $$k_J\cdot X=0.0221$$.

The corrected magnitude is then:

$$!J=J_\text{inst}-ZP_J-k_J\cdot X=10.046-(-5.721)-0.0221=15.745$$

Which is only 0.007 magnitudes off from the value of $$J=15.752$$ from the 2MASS catalog.

### Remaining Problems

As shown in the example above, this works… but not for every object.

I whittled down my sample of 875 to only those objects with flux units and airmass values taken at Mauna Kea so that I could use the same extinction coefficient and make sure they are all in the same units of [erg s-1 cm-2 A-1].

Then I pulled the 2MASS catalog J and H magnitudes with uncertainties for these remaining objects and plotted them against my calculated values with uncertainties.

To the left are the plots of the 67 objects that fit the selection criteria in J-band (above) and H-band (below).

Though it’s not the biggest sample, the deviation of the best fit line from unity suggests I’m off by a factor of 0.9 from the 2MASS catalog value across the board.

But more worrisome is the fact that most of the calculated magnitudes are not within the errors of the 2MASS magnitudes. This deviation ranges from very good agreement of a few thousandths of a magnitude up to the worst offenders of about 0.8 mags.