Variables | |
string | posterior_grp_name = "posterior_samples" |
parser = argparse.ArgumentParser(description="Combine some posterior samples.") | |
dest | |
default | |
help | |
metavar | |
action | |
required | |
type | |
shuffleGroup = parser.add_mutually_exclusive_group() | |
fileGroup = parser.add_mutually_exclusive_group() | |
args = parser.parse_args() | |
nPos = np.size(args.infilename) | |
nWeight = np.size(args.weightings) | |
weightings | |
string | combineID = "combined" |
list | samples = [] |
list | paramsList = [] |
list | sizeList = [] |
dictionary | metadata |
group = inFile["lalinference"] | |
run_id = list(group.keys())[0] | |
list | posDtype = [] |
shape = group[key].shape | |
posData = np.empty(shape, dtype=posDtype) | |
paramsOut = list(set.intersection(*paramsList)) | |
list | datatypes = samples[0][paramsOut].dtype |
sizeOut = sum(sizeList) | |
samplesOut = np.empty(sizeOut, dtype=datatypes) | |
list | indexSize = sizeList |
fracWeight = np.asarray(args.weightings) / float(sum(args.weightings)) | |
testNum = fracWeight * float(sum(sizeList)) | |
minIndex = np.argmin(np.asarray(sizeList) / np.asarray(testNum)) | |
list | testSize = sizeList[minIndex] / fracWeight[minIndex] |
weightNum = np.around(fracWeight * testSize).astype(int) | |
int | startIndex = 0 |
int | stopIndex = startIndex + indexSize[posIndex] |
key | |
data | |
shuffle | |
True | |
compression | |
string | paramHeader = "\t".join(paramsOut) |
T | |
delimiter | |
header | |
comments | |
string cbcBayesCombinePosteriors.posterior_grp_name = "posterior_samples" |
Definition at line 32 of file cbcBayesCombinePosteriors.py.
cbcBayesCombinePosteriors.parser = argparse.ArgumentParser(description="Combine some posterior samples.") |
Definition at line 38 of file cbcBayesCombinePosteriors.py.
cbcBayesCombinePosteriors.dest |
Definition at line 39 of file cbcBayesCombinePosteriors.py.
cbcBayesCombinePosteriors.default |
Definition at line 39 of file cbcBayesCombinePosteriors.py.
cbcBayesCombinePosteriors.help |
Definition at line 40 of file cbcBayesCombinePosteriors.py.
cbcBayesCombinePosteriors.metavar |
Definition at line 40 of file cbcBayesCombinePosteriors.py.
cbcBayesCombinePosteriors.action |
Definition at line 41 of file cbcBayesCombinePosteriors.py.
cbcBayesCombinePosteriors.required |
Definition at line 42 of file cbcBayesCombinePosteriors.py.
cbcBayesCombinePosteriors.type |
Definition at line 47 of file cbcBayesCombinePosteriors.py.
cbcBayesCombinePosteriors.shuffleGroup = parser.add_mutually_exclusive_group() |
Definition at line 48 of file cbcBayesCombinePosteriors.py.
cbcBayesCombinePosteriors.fileGroup = parser.add_mutually_exclusive_group() |
Definition at line 58 of file cbcBayesCombinePosteriors.py.
cbcBayesCombinePosteriors.args = parser.parse_args() |
Definition at line 67 of file cbcBayesCombinePosteriors.py.
cbcBayesCombinePosteriors.nPos = np.size(args.infilename) |
Definition at line 70 of file cbcBayesCombinePosteriors.py.
cbcBayesCombinePosteriors.nWeight = np.size(args.weightings) |
Definition at line 71 of file cbcBayesCombinePosteriors.py.
cbcBayesCombinePosteriors.weightings |
Definition at line 85 of file cbcBayesCombinePosteriors.py.
string cbcBayesCombinePosteriors.combineID = "combined" |
Definition at line 88 of file cbcBayesCombinePosteriors.py.
list cbcBayesCombinePosteriors.samples = [] |
Definition at line 105 of file cbcBayesCombinePosteriors.py.
list cbcBayesCombinePosteriors.paramsList = [] |
Definition at line 106 of file cbcBayesCombinePosteriors.py.
list cbcBayesCombinePosteriors.sizeList = [] |
Definition at line 107 of file cbcBayesCombinePosteriors.py.
dictionary cbcBayesCombinePosteriors.metadata |
Definition at line 108 of file cbcBayesCombinePosteriors.py.
cbcBayesCombinePosteriors.group = inFile["lalinference"] |
Definition at line 118 of file cbcBayesCombinePosteriors.py.
cbcBayesCombinePosteriors.run_id = list(group.keys())[0] |
Definition at line 122 of file cbcBayesCombinePosteriors.py.
list cbcBayesCombinePosteriors.posDtype = [] |
Definition at line 145 of file cbcBayesCombinePosteriors.py.
Definition at line 148 of file cbcBayesCombinePosteriors.py.
Definition at line 150 of file cbcBayesCombinePosteriors.py.
cbcBayesCombinePosteriors.paramsOut = list(set.intersection(*paramsList)) |
Definition at line 168 of file cbcBayesCombinePosteriors.py.
Definition at line 170 of file cbcBayesCombinePosteriors.py.
Definition at line 175 of file cbcBayesCombinePosteriors.py.
Definition at line 176 of file cbcBayesCombinePosteriors.py.
cbcBayesCombinePosteriors.indexSize = sizeList |
Definition at line 178 of file cbcBayesCombinePosteriors.py.
cbcBayesCombinePosteriors.fracWeight = np.asarray(args.weightings) / float(sum(args.weightings)) |
Definition at line 182 of file cbcBayesCombinePosteriors.py.
cbcBayesCombinePosteriors.testNum = fracWeight * float(sum(sizeList)) |
Definition at line 184 of file cbcBayesCombinePosteriors.py.
Definition at line 185 of file cbcBayesCombinePosteriors.py.
list cbcBayesCombinePosteriors.testSize = sizeList[minIndex] / fracWeight[minIndex] |
Definition at line 187 of file cbcBayesCombinePosteriors.py.
cbcBayesCombinePosteriors.weightNum = np.around(fracWeight * testSize).astype(int) |
Definition at line 189 of file cbcBayesCombinePosteriors.py.
int cbcBayesCombinePosteriors.startIndex = 0 |
Definition at line 199 of file cbcBayesCombinePosteriors.py.
int cbcBayesCombinePosteriors.stopIndex = startIndex + indexSize[posIndex] |
Definition at line 201 of file cbcBayesCombinePosteriors.py.
cbcBayesCombinePosteriors.key |
Definition at line 222 of file cbcBayesCombinePosteriors.py.
cbcBayesCombinePosteriors.data |
Definition at line 222 of file cbcBayesCombinePosteriors.py.
cbcBayesCombinePosteriors.shuffle |
Definition at line 222 of file cbcBayesCombinePosteriors.py.
cbcBayesCombinePosteriors.True |
Definition at line 222 of file cbcBayesCombinePosteriors.py.
cbcBayesCombinePosteriors.compression |
Definition at line 222 of file cbcBayesCombinePosteriors.py.
cbcBayesCombinePosteriors.paramHeader = "\t".join(paramsOut) |
Definition at line 230 of file cbcBayesCombinePosteriors.py.
cbcBayesCombinePosteriors.T |
Definition at line 231 of file cbcBayesCombinePosteriors.py.
cbcBayesCombinePosteriors.delimiter |
Definition at line 231 of file cbcBayesCombinePosteriors.py.
cbcBayesCombinePosteriors.header |
Definition at line 231 of file cbcBayesCombinePosteriors.py.
cbcBayesCombinePosteriors.comments |
Definition at line 231 of file cbcBayesCombinePosteriors.py.