You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sdap.apache.org by GitBox <gi...@apache.org> on 2018/09/19 19:12:18 UTC

[GitHub] fgreg closed pull request #37: SDAP-148 HofMoellerSpark Deseason Broken

fgreg closed pull request #37: SDAP-148 HofMoellerSpark Deseason Broken
URL: https://github.com/apache/incubator-sdap-nexus/pull/37
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/analysis/webservice/algorithms_spark/HofMoellerSpark.py b/analysis/webservice/algorithms_spark/HofMoellerSpark.py
index ea4a37d..96e9f6a 100644
--- a/analysis/webservice/algorithms_spark/HofMoellerSpark.py
+++ b/analysis/webservice/algorithms_spark/HofMoellerSpark.py
@@ -198,7 +198,7 @@ def parse_arguments(self, request):
         return ds, bounding_polygon, start_seconds_from_epoch, end_seconds_from_epoch, \
                spark_master, spark_nexecs, spark_nparts
 
-    def applyDeseasonToHofMoellerByField(self, results, pivot="lats", field="avg", append=True):
+    def applyDeseasonToHofMoellerByField(self, results, pivot="lats", field="mean", append=True):
         shape = (len(results), len(results[0][pivot]))
         if shape[0] <= 12:
             return results
@@ -215,7 +215,7 @@ def applyDeseasonToHofMoellerByField(self, results, pivot="lats", field="avg", a
         return results
 
     def applyDeseasonToHofMoeller(self, results, pivot="lats", append=True):
-        results = self.applyDeseasonToHofMoellerByField(results, pivot, field="avg", append=append)
+        results = self.applyDeseasonToHofMoellerByField(results, pivot, field="mean", append=append)
         results = self.applyDeseasonToHofMoellerByField(results, pivot, field="min", append=append)
         results = self.applyDeseasonToHofMoellerByField(results, pivot, field="max", append=append)
         return results
@@ -355,7 +355,9 @@ def calc(self, compute_options, **args):
         for i in range(len(results)):
             results[i]['lats'] = sorted(results[i]['lats'],
                                         key=lambda entry: entry['latitude'])
-        results = self.applyDeseasonToHofMoeller(results)
+
+        # Deseason disabled. See SDAP-148
+        # results = self.applyDeseasonToHofMoeller(results)
 
         result = HoffMoellerResults(results=results, compute_options=None, type=HoffMoellerResults.LATITUDE,
                                     minLat=min_lat, maxLat=max_lat, minLon=min_lon,
@@ -397,7 +399,8 @@ def calc(self, compute_options, **args):
             results[i]['lons'] = sorted(results[i]['lons'],
                                         key=lambda entry: entry['longitude'])
 
-        results = self.applyDeseasonToHofMoeller(results, pivot="lons")
+        # Deseason disabled. See SDAP-148
+        # results = self.applyDeseasonToHofMoeller(results, pivot="lons")
 
         result = HoffMoellerResults(results=results, compute_options=None, type=HoffMoellerResults.LONGITUDE,
                                     minLat=min_lat, maxLat=max_lat, minLon=min_lon,


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services