Created
July 29, 2016 18:30
-
-
Save CJ-Wright/1752e5cd5034614e30cea529dedd46af to your computer and use it in GitHub Desktop.
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
from magic import integrate | |
functions_dict = {integrate:[(args),{kwargs}} # ask people about more elegant way to do this | |
def __init__(self, functions_dict): | |
self.functions_dict = functions_dict | |
def run_analysis(self): | |
for data in self.data: | |
for func, v in self.functions_dict.items(): | |
ret = func(img, *v[0], *v[1]) | |
if isinstance(ret, tuple): # Then it is a 1D plot | |
plot(ret[0], ret[1] | |
else: # It is a 2D Plot | |
imshow(ret) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment