5. Modeling a Black Body

The blackbody_with_atm module provides functions for modeling the effects of PWV absorption on a black body. We suggest importing this module as bb_atm.

5.1. Generating an SED

For a given array of wavelengths in Angstroms, the sed function returns the corresponding spectral energy distribution (SED) of a black body as seen through the atmosphere.

pwv_kpno.blackbody_with_atm.sed(temp, wavelengths, pwv, bins=None)[source]

Return the flux of a black body under the influence of pwv absorption

Flux is returned in units of ergs / (angstrom * cm2 * s).

Parameters:
  • temp (float) – The temperature of the black body in Kelvin
  • wavelengths (array) – The SED’s wavelengths in Angstroms
  • pwv (float) – The PWV concentration along line of sight in mm
  • bins (int or list) – Integer number of bins or sequence of bin edges used to smooth atmospheric transmission
Returns:

An array of flux values in units of ergs / (angstrom * cm2 * s * sr)

Here we find the SED of a black body between 7,000 and 10,000 Angstroms:

1
2
3
4
5
6
7
8
>>> import numpy as np
>>> from pwv_kpno import blackbody_with_atm as bb_atm
>>>
>>> bb_temp = 8000
>>> wavelengths = np.arange(7000, 10000, 100)
>>> pwv = 15
>>>
>>> sed = bb_atm.sed(bb_temp, wavelengths, pwv)

5.2. Magnitude

The magnitude function returns the absolute magnitude of a black body in a given band as seen under the effects of PWV absorption.

pwv_kpno.blackbody_with_atm.magnitude(temp, band, pwv)[source]

Return the AB magnitude of a black body in a given band

Magnitudes are calculated relative to a zero point of 3631 Jy. If the band argument is a 1d array of wavelengths, then the photometric band is treated as a top-hat function ranging from the first value in the array to the last. If it is two dimensional then the first dimension is treated as wavelength values and the second as the response function for the given band. All wavelengths values are expected in Angstroms.

Parameters:
  • temp (float) – The temperature of the black body in Kelvin
  • band (tuple) – An array specifying a photometric bandpass
  • pwv (float) – The PWV concentration along line of sight in mm
Returns:

The magnitude of the desired black body as effected by H2O absorption

If we want to treat the i band as a top hat function from 7,000 to 8,500 Angstroms, the magnitude of a black body is found by running

1
2
3
4
5
6
7
>>> from pwv_kpno import blackbody_with_atm as bb_atm
>>>
>>> bb_temp = 8000
>>> i_band = (7000, 8500)
>>> pwv = 15
>>>
>>> bb_mag = bb_atm.magnitude(bb_temp, i_band, pwv)

We can also determine the magnitude for a real-world filter by specifying band as a two dimensional array.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
>>> from pwv_kpno import blackbody_with_atm as bb_atm
>>>
>>> bb_temp = 8000
>>> i_band = np.array([
>>>     bandpass_wavelengths,       # Array of values in Angstroms
>>>     bandpass_response_function  # Array of transmission for each wavelength
>>> ])
>>>
>>> pwv = 15
>>>
>>> bb_mag = bb_atm.magnitude(bb_temp, i_band, pwv)

5.3. Estimating Zero Point Error

Correcting photometric observations using tabulated values of a standard star introduces residual error in the magnitudes of other stars with different spectral types. The error in photometric zero point introduced by not considering absorption by precipitable water vapor can be found using the zp_bias function.

pwv_kpno.blackbody_with_atm.zp_bias(ref_temp, cal_temp, band, pwv)[source]

Calculate the residual error in the photometric zero point due to PWV

Using a black body approximation, calculate the residual error in the zero point of a photometric image cause by not considering the PWV transmission function. Returned values are in units of magnitude relative to a zero point of 3631 Jy.

Parameters:
  • ref_temp (float) – The temperature of the star used to calibrate the image in Kelvin
  • cal_temp (float) – The temperature of another star in the same image
  • band (tuple) – An array specifying a photometric bandpass
  • pwv (float) – The PWV concentration along line of sight in mm
Returns:

The error in magnitudes for the photometric zero point of the given band

The error introduced (in AB magnitudes) when calibrating a 10,000 Kelvin black body with a 4,000 Kelvin black body is given by:

1
2
3
4
5
>>> from pwv_kpno import blackbody_with_atm as bb_atm
>>>
>>> reference_star_temp = 4000
>>> other_star_temp = 10000
>>> bias = bb_atm.zp_bias(reference_star_temp, other_star_temp, i_band, pwv)