Created
August 26, 2016 15:24
-
-
Save YaronBlinder/a029df5c84f39a892f01dfd97b1258d5 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
class CalcSCPlugin(BasePlugin): # REQUIRED | |
consumes_cols = ['filenames'] # REQUIRED | |
provides_cols = ['SpatialCorrelation'] # REQUIRED | |
def __init__(self, df): | |
super(CalcSCPlugin, self).__init__(df) # REQUIRED | |
def process(self, window_size): # TYPICAL | |
def _helper(filenames): | |
SC = calculateSC(filenames,spatial_correlation=True,window_size=window_size) | |
return {'SpatialCorrelation': SC} | |
new_df = self._df.apply(_helper) # Do some computation | |
self.result = new_df # REQUIRED |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment