photod.bayes#
Attributes#
Functions#
|
Set the column mapping used for this module. Updates the module-global 'cc' |
|
Compute the bayes statistics for all the stars in a catalog partition. |
|
Compute the bayes posteriors for all the stars in a DataFrame. |
|
|
|
Internal method with the logic to be run for each star. |
|
Compute chi-squared map using provided 3D model locus. |
|
Compute the likelihood map, the 3D (Mr, FeH, Ar) prior from 2D (Mr, FeH) prior |
|
Get posterior information |
|
Get expectation values and uncertainties marginalize and get statistics. |
Creates an empty pd.DataFrame with the meta for the results |
Module Contents#
- set_column_mapping(variable_mapping: pathlib.Path)[source]#
Set the column mapping used for this module. Updates the module-global ‘cc’ ColumnMap object.
- makeBayesEstimates3d(starsData: nested_pandas.NestedFrame, priorGrid: numpy.ndarray, globalParams: photod.parameters.GlobalParams, batchSize: int = 100, returnPosteriors: bool = False)[source]#
Compute the bayes statistics for all the stars in a catalog partition.
Used for fast, large-scale processing. It leverages parallelization with JAX.
- makeBayesPosteriors3d(starsData: nested_pandas.NestedFrame, mapCatalog: lsdb.catalog.map_catalog.MapCatalog, globalParams: photod.parameters.GlobalParams)[source]#
Compute the bayes posteriors for all the stars in a DataFrame.
The posterior arrays are extremely large in memory and, therefore, this method should only be used with a handful set of stars.
It does not use JAX for parallelization.
- loopOverEachStar(starData, priorGrid, globalParams, returnPosteriors)[source]#
Internal method with the logic to be run for each star.
- calculateChi2(colors, colorsErr, locusColors)[source]#
Compute chi-squared map using provided 3D model locus.
- likeAndPrior(Ar1d, FeH1d, Mr1d, chi2map, priorGrid, priorIndices)[source]#
Compute the likelihood map, the 3D (Mr, FeH, Ar) prior from 2D (Mr, FeH) prior using uniform prior for Ar, and the chi_sq_min.