BandData

class measure_extinction.stardata.BandData(type)[source]

Bases: object

Photometric band data (used by StarData)

Attributes:

typestring

descriptive string of type of data (currently always BAND)

wavesarray of floats

wavelengths

fluxesarray of floats

fluxes

uncsarray of floats

uncertainties on the fluxes

nptsarray of floats

number of measurements contributing to the flux points

n_bandsint

number of bands

bandsdict of band_name:measurement

measurement is a tuple of (value, uncertainty)

band_unitsdict of band_name:strings

band units (‘mag’ or ‘mJy’)

band_wavesdict of band_name:floats

band wavelengths in micron

band_fluxesdict of band_name:floats

band fluxes in ergs/(cm^2 s A)

Parameters:
type: string

descriptive string of type of data (currently always BAND)

Methods Summary

get_band_flux(band_name)

Compute the flux for the input band

get_band_fluxes()

Compute the fluxes and uncertainties in each band

get_band_mag(band_name)

Get the magnitude and uncertainties for a band based on measurements colors and V band or direct measurements in the band

get_band_mags_from_fluxes()

Compute the magnitudes from fluxes in each band Useful for generating "observed data" from models

get_band_names()

Get the names of the bands in the data

get_poss_bands()

Provides the possible bands and bands wavelengths and zeromag fluxes

read_bands(lines)

Read the photometric band data from a DAT file and upate class variables.

Methods Documentation

get_band_flux(band_name)[source]

Compute the flux for the input band

Parameters:
band_namestr

name of the band

Returns:
info: tuple

(flux, unc)

get_band_fluxes()[source]

Compute the fluxes and uncertainties in each band

Returns:
Updates self.band_fluxes and self.band_waves
Also sets self.(n_waves, waves, fluxes, npts)
get_band_mag(band_name)[source]

Get the magnitude and uncertainties for a band based on measurements colors and V band or direct measurements in the band

Parameters:
band_namestr

name of the band

Returns:
info: tuple

(mag, unc, unit)

get_band_mags_from_fluxes()[source]

Compute the magnitudes from fluxes in each band Useful for generating “observed data” from models

Returns:
Updates self.bands and self.band_units
get_band_names()[source]

Get the names of the bands in the data

Returns:
namesstring array

names of the bands in the data

static get_poss_bands()[source]

Provides the possible bands and bands wavelengths and zeromag fluxes

Returns:
band_infodict of band_name: value

value is tuple of ( zeromag_flux, wavelength [micron] ) The zeromag_flux is the flux in erg/cm2/s/A for a star of (Vega) mag=0. It gives the conversion factor from Vega magnitudes to erg/cm2/s/A.

read_bands(lines)[source]

Read the photometric band data from a DAT file and upate class variables. Bands are filled in wavelength order to make life easier in subsequent calcuations (interpolations!)

Parameters:
lineslist of string

lines from a DAT formatted file

Returns:
Updates self.bands, self.band_units, and self.n_bands