This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import shelve | |
import string | |
import time | |
class MeasurementDB(object): | |
r"""Database for storing measurements, with export to LaTeX macros. | |
Example usage: |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def pdf_probabilities(xs, dependents, yields, pdfs): | |
"""Return an array of normalised PDF probabilities. | |
For a list of N yields, each y_i, and a list of N PDFs f_i, the probability | |
for the ith PDF at the (possibly vector) point x is defined as | |
p_{i} = \frac{N_{i}f_{i}}{\sum_{i}^{N} N_{i}f_{i}} | |
Keyword arguments: | |
xs -- List of values at which to evaluate the PDFs |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Name of the delta mass variable in the workspace | |
dmass_var = 'Dst_delta_M' | |
# Species of the PDF we're about to build | |
species = 'sig' | |
workspace.factory('mu_dm_{0}[141, 146]'.format(species)) | |
workspace.factory('sigma_one_dm_{0}[1, 0, 5]'.format(species)) | |
workspace.factory('nsigma_two_dm_{0}[1.5, 1, 3]'.format(species)) | |
workspace.factory('nsigma_three_dm_{0}[1.5, 1, 3]'.format(species)) | |
workspace.factory(( | |
'expr::sigma_two_dm_{0}(' |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.