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 for an object, I first need to calculate the instrumental magnitude 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:

### Instrumental Magnitude

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

Where is the energy flux density of the source in units of [erg s-1 cm-2 A-1] and 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 converts 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 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:

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:

Where is the extinction coefficient for the band of interest and 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 . Approximating the truly spherical atmosphere as plane-parallel, the airmass goes from at to at . 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 of the atmosphere as:

Where and 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 as my instrumental magnitude in the J-band.

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

Checking the FITS file header, I will use for the airmass. The mean extinction coefficient for the MKO system J-band is given as in Tokunaga & Vacca (2007), making the atmospheric correction term .

The corrected magnitude is then:

Which is only 0.007 magnitudes off from the value of 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.