Observations

class beast.observationmodel.observations.Observations(inputFile, filters, obs_colnames=None, vega_fname=None, desc=None)[source]

Bases: object

A generic class that interfaces observation catalog in a standardized way

Attributes
inputFilestr

catalog source file

filterslist

list of filter names (internal standards)

filter_aliasesdict

alias of filter names between internal and external names

descstr

description of the observations

badvaluefloat

value that tags a bad measurement that should not be used in the fitting

nObsint

number of observations in the catalog

Parameters
inputFilestr

observation file

filterslist

interal filter names of the data

obs_colnameslist, optional

filter names in the observed catalog

vega_fnamestr, optional

name of the file with the vega model spectrum

descstr, optional

description of the observations

Attributes Summary

nObs

Methods Summary

__call__()

Calling the object will show info

enumobs()

getFilters()

getFlux(num[, units])

Flux of an observation computed from normalized vega fluxes

getFluxerr(num)

returns the error on the flux of an observation from the number of counts (not used in the analysis)

getObs([num])

returns the flux

info()

Prints some information about the catalog

iterobs()

yield getObs

keys()

Returns dataset content names

readData()

read the dataset from the original source file

setBadValue(val)

setDescription(txt)

setFilters(filters)

setVegaFluxes(filters[, vega_fname])

Set vega reference fluxes for conversions

Attributes Documentation

nObs

Methods Documentation

__call__()[source]

Calling the object will show info

enumobs()[source]
getFilters()[source]
getFlux(num, units=False)[source]

Flux of an observation computed from normalized vega fluxes

Parameters
numint

index of the star in the catalog to get measurement from

unitsbool

if set returns the fluxes with units

Returns
fluxndarray[dtype=float, ndim=1]

Measured integrated flux values throughout the filters in erg/s/cm^2/A

getFluxerr(num)[source]

returns the error on the flux of an observation from the number of counts (not used in the analysis)

getObs(num=0)[source]

returns the flux

info()[source]

Prints some information about the catalog

iterobs()[source]

yield getObs

keys()[source]

Returns dataset content names

readData()[source]

read the dataset from the original source file

setBadValue(val)[source]
setDescription(txt)[source]
setFilters(filters)[source]
setVegaFluxes(filters, vega_fname=None)[source]

Set vega reference fluxes for conversions

Parameters
filterslist

list of filters using the internally normalized namings

vega_fnamestr, optional

name of the file with the vega model spectrum