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

inputFile

catalog source file

Type:

str

filters

list of filter names (internal standards)

Type:

list

filter_aliases

alias of filter names between internal and external names

Type:

dict

desc

description of the observations

Type:

str

badvalue

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

Type:

float

Parameters:
  • inputFile (str) – observation file

  • filters (list) – interal filter names of the data

  • obs_colnames (list, optional) – filter names in the observed catalog

  • vega_fname (str, optional) – name of the file with the vega model spectrum

  • desc (str, 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:
  • num (int) – index of the star in the catalog to get measurement from

  • units (bool) – if set returns the fluxes with units

Returns:

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

Return type:

ndarray[dtype=float, ndim=1]

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:
  • filters (list) – list of filters using the internally normalized namings

  • vega_fname (str, optional) – name of the file with the vega model spectrum