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 33 of file cbcBayesCombinePosteriors.py.
| cbcBayesCombinePosteriors.parser = argparse.ArgumentParser(description="Combine some posterior samples.") |
Definition at line 39 of file cbcBayesCombinePosteriors.py.
| cbcBayesCombinePosteriors.dest |
Definition at line 40 of file cbcBayesCombinePosteriors.py.
| cbcBayesCombinePosteriors.default |
Definition at line 40 of file cbcBayesCombinePosteriors.py.
| cbcBayesCombinePosteriors.help |
Definition at line 41 of file cbcBayesCombinePosteriors.py.
| cbcBayesCombinePosteriors.metavar |
Definition at line 41 of file cbcBayesCombinePosteriors.py.
| cbcBayesCombinePosteriors.action |
Definition at line 42 of file cbcBayesCombinePosteriors.py.
| cbcBayesCombinePosteriors.required |
Definition at line 43 of file cbcBayesCombinePosteriors.py.
| cbcBayesCombinePosteriors.type |
Definition at line 48 of file cbcBayesCombinePosteriors.py.
| cbcBayesCombinePosteriors.shuffleGroup = parser.add_mutually_exclusive_group() |
Definition at line 49 of file cbcBayesCombinePosteriors.py.
| cbcBayesCombinePosteriors.fileGroup = parser.add_mutually_exclusive_group() |
Definition at line 59 of file cbcBayesCombinePosteriors.py.
| cbcBayesCombinePosteriors.args = parser.parse_args() |
Definition at line 68 of file cbcBayesCombinePosteriors.py.
| cbcBayesCombinePosteriors.nPos = np.size(args.infilename) |
Definition at line 71 of file cbcBayesCombinePosteriors.py.
| cbcBayesCombinePosteriors.nWeight = np.size(args.weightings) |
Definition at line 72 of file cbcBayesCombinePosteriors.py.
| cbcBayesCombinePosteriors.weightings |
Definition at line 86 of file cbcBayesCombinePosteriors.py.
| string cbcBayesCombinePosteriors.combineID = "combined" |
Definition at line 89 of file cbcBayesCombinePosteriors.py.
| list cbcBayesCombinePosteriors.samples = [] |
Definition at line 106 of file cbcBayesCombinePosteriors.py.
| list cbcBayesCombinePosteriors.paramsList = [] |
Definition at line 107 of file cbcBayesCombinePosteriors.py.
| list cbcBayesCombinePosteriors.sizeList = [] |
Definition at line 108 of file cbcBayesCombinePosteriors.py.
| dictionary cbcBayesCombinePosteriors.metadata |
Definition at line 109 of file cbcBayesCombinePosteriors.py.
| cbcBayesCombinePosteriors.group = inFile["lalinference"] |
Definition at line 119 of file cbcBayesCombinePosteriors.py.
| cbcBayesCombinePosteriors.run_id = list(group.keys())[0] |
Definition at line 123 of file cbcBayesCombinePosteriors.py.
| list cbcBayesCombinePosteriors.posDtype = [] |
Definition at line 146 of file cbcBayesCombinePosteriors.py.
Definition at line 149 of file cbcBayesCombinePosteriors.py.
Definition at line 151 of file cbcBayesCombinePosteriors.py.
| cbcBayesCombinePosteriors.paramsOut = list(set.intersection(*paramsList)) |
Definition at line 169 of file cbcBayesCombinePosteriors.py.
Definition at line 171 of file cbcBayesCombinePosteriors.py.
Definition at line 176 of file cbcBayesCombinePosteriors.py.
Definition at line 177 of file cbcBayesCombinePosteriors.py.
| cbcBayesCombinePosteriors.indexSize = sizeList |
Definition at line 179 of file cbcBayesCombinePosteriors.py.
| cbcBayesCombinePosteriors.fracWeight = np.asarray(args.weightings) / float(sum(args.weightings)) |
Definition at line 183 of file cbcBayesCombinePosteriors.py.
| cbcBayesCombinePosteriors.testNum = fracWeight * float(sum(sizeList)) |
Definition at line 185 of file cbcBayesCombinePosteriors.py.
Definition at line 186 of file cbcBayesCombinePosteriors.py.
| list cbcBayesCombinePosteriors.testSize = sizeList[minIndex] / fracWeight[minIndex] |
Definition at line 188 of file cbcBayesCombinePosteriors.py.
| cbcBayesCombinePosteriors.weightNum = np.around(fracWeight * testSize).astype(int) |
Definition at line 190 of file cbcBayesCombinePosteriors.py.
| int cbcBayesCombinePosteriors.startIndex = 0 |
Definition at line 200 of file cbcBayesCombinePosteriors.py.
| int cbcBayesCombinePosteriors.stopIndex = startIndex + indexSize[posIndex] |
Definition at line 202 of file cbcBayesCombinePosteriors.py.
| cbcBayesCombinePosteriors.key |
Definition at line 223 of file cbcBayesCombinePosteriors.py.
| cbcBayesCombinePosteriors.data |
Definition at line 223 of file cbcBayesCombinePosteriors.py.
| cbcBayesCombinePosteriors.shuffle |
Definition at line 223 of file cbcBayesCombinePosteriors.py.
| cbcBayesCombinePosteriors.True |
Definition at line 223 of file cbcBayesCombinePosteriors.py.
| cbcBayesCombinePosteriors.compression |
Definition at line 223 of file cbcBayesCombinePosteriors.py.
| cbcBayesCombinePosteriors.paramHeader = "\t".join(paramsOut) |
Definition at line 231 of file cbcBayesCombinePosteriors.py.
| cbcBayesCombinePosteriors.T |
Definition at line 232 of file cbcBayesCombinePosteriors.py.
| cbcBayesCombinePosteriors.delimiter |
Definition at line 232 of file cbcBayesCombinePosteriors.py.
| cbcBayesCombinePosteriors.header |
Definition at line 232 of file cbcBayesCombinePosteriors.py.
| cbcBayesCombinePosteriors.comments |
Definition at line 232 of file cbcBayesCombinePosteriors.py.