photod.bayes#

Attributes#

cc

Functions#

set_column_mapping(variable_mapping)

Set the column mapping used for this module. Updates the module-global 'cc'

makeBayesEstimates3d(starsData, priorGrid, globalParams)

Compute the bayes statistics for all the stars in a catalog partition.

makeBayesPosteriors3d(starsData, mapCatalog, globalParams)

Compute the bayes posteriors for all the stars in a DataFrame.

getColorsAndPriorIndices(catalog, params)

loopOverEachStar(starData, priorGrid, globalParams, ...)

Internal method with the logic to be run for each star.

calculateChi2(colors, colorsErr, locusColors)

Compute chi-squared map using provided 3D model locus.

likeAndPrior(Ar1d, FeH1d, Mr1d, chi2map, priorGrid, ...)

Compute the likelihood map, the 3D (Mr, FeH, Ar) prior from 2D (Mr, FeH) prior

getMargPosteriors(priorCube, likeCube, postCube, dMr, ...)

Get posterior information

postProcess(Ar1d, FeH1d, Mr1d, postCube, QrGrid, ...)

Get expectation values and uncertainties marginalize and get statistics.

getEstimatesMeta()

Creates an empty pd.DataFrame with the meta for the results

Module Contents#

cc = None[source]#
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.

getColorsAndPriorIndices(catalog, params)[source]#
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.

getMargPosteriors(priorCube, likeCube, postCube, dMr, dFeH, dAr)[source]#

Get posterior information

postProcess(Ar1d, FeH1d, Mr1d, postCube, QrGrid, QrIndices, margpostMr, margpostFeH, margpostAr)[source]#

Get expectation values and uncertainties marginalize and get statistics.

getEstimatesMeta()[source]#

Creates an empty pd.DataFrame with the meta for the results