This file contains hidden or 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
""" | |
Load functions from a dynmaic library via the header file | |
========================================================= | |
""" | |
import ctypes | |
import numpy as np | |
import json | |
import sys | |
from collections import OrderedDict as odict |
This file contains hidden or 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
""" | |
Merge two pickled plots | |
======================= | |
This is rather crude. The pickled plots should have identical sizes, axes etc. | |
""" | |
from pickle import load | |
from matplotlib.pyplot import figure |
This file contains hidden or 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
""" | |
Make a numpy array | |
>>> np_array = np.random.random((30, 30)) | |
Write it in h5 format | |
>>> h5_name = 'np_array.h5' | |
>>> write_dh5_np(h5_name, np_array) |
This file contains hidden or 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
""" | |
Relativistic Breit-Wigner. | |
""" | |
import numpy as np | |
from numpy import pi | |
from scipy.stats import rv_continuous | |
class breit_wigner_gen(rv_continuous): | |
""" |
NewerOlder