# Observation Model¶

## Basics¶

### beast.observationmodel.observations Module¶

Defines a generic interface to observation catalog

#### Functions¶

`gen_SimObs_from_sedgrid` (sedgrid, …[, …]) |
Generate simulated observations using the physics and observation grids. |

#### Classes¶

`Observations` (inputFile[, desc]) |
A generic class that interfaces observation catalog in a standardized way |

#### Class Inheritance Diagram¶

### beast.observationmodel.phot Module¶

#### Photometric package¶

Defines a Filter class and associated functions to extract photometry.

This also include functions to keep libraries up to date

Note

integrations are done using `trapz()`

Why not Simpsons? Simpsons principle is to take sequence of 3 points to
make a quadratic interpolation. Which in the end, when filters have sharp
edges, the error due to this “interpolation” are extremely large in
comparison to the uncertainties induced by trapeze integration.

#### Functions¶

`load_all_filters` ([interp, lamb, filterLib]) |
load all filters from the library |

`load_filters` (names[, interp, lamb, filterLib]) |
load a limited set of filters |

`load_Integrationfilters` (flist[, interp, lamb]) |
load a limited set of filters |

`extractPhotometry` (lamb, spec, flist[, absFlux]) |
Extract seds from a one single spectrum |

`extractSEDs` (g0, flist[, absFlux]) |
Extract seds from a grid |

`STmag_to_flux` (v) |
Convert an ST magnitude to erg/s/cm2/AA (Flambda) |

`STmag_from_flux` (v) |
Convert to ST magnitude from erg/s/cm2/AA (Flambda) |

`fluxToMag` (flux) |
Return the magnitudes from flux values |

`fluxErrTomag` (flux, fluxerr) |
Return the magnitudes and associated errors from fluxes and flux error values |

`magToFlux` (mag) |
Return the flux from magnitude values |

`magErrToFlux` (mag, err) |
Return the flux and associated errors from magnitude and mag error values |

`append_filter` (lamb, flux, tablename, …[, …]) |
Edit the filter catalog and append a new one given by its transfer function |

`appendVegaFilter` (filtInst[, VegaLib]) |
Add filter properties to the Vega library |

#### Classes¶

`Filter` (wavelength, transmit[, name]) |
Class filter Define a filter by its name, wavelength and transmission |

`IntegrationFilter` (wavelength, transmit[, name]) |
Class filter |

#### Class Inheritance Diagram¶

### beast.observationmodel.vega Module¶

Handle vega spec/mags/fluxes manipulations

#### Functions¶

`from_Vegamag_to_Flux` (lamb, vega_mag) |
function decorator that transforms vega magnitudes to fluxes (without vega reference) |

#### Class Inheritance Diagram¶

## Noise Model¶

### beast.observationmodel.noisemodel.noisemodel Module¶

#### Classes¶

`NoiseModel` (astfile, *args, **kwargs) |
Initial class of noise models |

#### Class Inheritance Diagram¶

### beast.observationmodel.noisemodel.splinter Module¶

splinter noise model assumes that every photometric band is independent from the others and has a fractional flux uncertainty and no bias.

#### Method¶

Create a noise model that has sigmas that are frac_unc times sed_flux and zeros for the bias terms.

#### Functions¶

`make_splinter_noise_model` (outname, sedgrid) |
Splinter noise model assumes that every filter is independent with any other. |

### beast.observationmodel.noisemodel.toothpick Module¶

Toothpick noise model assumes that every photometric band is independent from the others.

The `MultiFilterASTs`

assumes that all AST information is compiled
into on single table, in which one entry corresponds to one artificial star
and recovered values

#### Method¶

The noise model is computed in equally spaced bins in log flux space to avoid injecting noise when the ASTs grossly oversample the model space. This is the case for single band ASTs - this is always the case for the BEAST toothpick noise model.

#### Classes¶

`MultiFilterASTs` (astfile, filters[, vega_fname]) |
A noise model for which input information of ASTs are provided as one single table |

#### Class Inheritance Diagram¶

### beast.observationmodel.noisemodel.trunchen Module¶

Trunchen version of noisemodel Goal is to compute the full n-band covariance matrix for each model

#### Classes¶

`MultiFilterASTs` (astfile, filters, *args, …) |
Implement a noise model where the ASTs are provided as a single table |

#### Class Inheritance Diagram¶

### beast.observationmodel.noisemodel.generic_noisemodel Module¶

Generates a generic noise model from artifical star tests (ASTs) results
using the toothpick method. Using ASTs results in a noise model that
includes contributions from measurement (photon) noise *and* crowding
noise.

Toothpick assumes that all bands are independent - no covariance. This is a conservative assumption. If there is true covariance more accurate results with smaller uncertainties on fit parameters can be achieved using the trunchen method. The trunchen method requires significantly more complicated ASTs and many more of them.

#### Functions¶

`make_toothpick_noise_model` (outname, astfile, …) |
toothpick noise model assumes that every filter is independent with any other. |

`get_noisemodelcat` (filename) |
returns the noise model |

#### Classes¶

`Generic_ToothPick_Noisemodel` (astfile, filters) |