[GRASS-SVN] r71321 - grass-addons/grass7/raster/r.futures/r.futures.calib

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Jul 31 10:51:01 PDT 2017


Author: annakrat
Date: 2017-07-31 10:51:01 -0700 (Mon, 31 Jul 2017)
New Revision: 71321

Modified:
   grass-addons/grass7/raster/r.futures/r.futures.calib/r.futures.calib.html
   grass-addons/grass7/raster/r.futures/r.futures.calib/r.futures.calib.py
Log:
r.futures.calib: export CSV with commas, not space as delimiter

Modified: grass-addons/grass7/raster/r.futures/r.futures.calib/r.futures.calib.html
===================================================================
--- grass-addons/grass7/raster/r.futures/r.futures.calib/r.futures.calib.html	2017-07-30 21:04:34 UTC (rev 71320)
+++ grass-addons/grass7/raster/r.futures/r.futures.calib/r.futures.calib.html	2017-07-31 17:51:01 UTC (rev 71321)
@@ -58,17 +58,17 @@
 Calibration results are saved in a CSV file specified in <b>calibration_results</b>:
 
 <pre>
-input_discount_factor area_distance input_compactness_mean input_compactness_range compactness_distance
-0.1 1.01541178435 0.1 0.02 3.00000005937
-0.2 1.26578803108 0.1 0.02 4.12442780529
-0.3 1.17631210026 0.1 0.02 3.86904462396
-0.4 2.31700278644 0.1 0.02 15.0569602795
-0.5 1.08655152036 0.1 0.02 3.72484862687
-0.6 2.97628078734 0.1 0.02 21.6358616001
-0.7 3.61632549044 0.1 0.02 25.4492265706
-0.8 2.72789958233 0.1 0.02 18.1083820007
-0.9 2.45915297845 0.1 0.02 18.4500322711
-0.1 1.05473877995 0.1 0.04 3.09321560218
+input_discount_factor,area_distance,input_compactness_mean,input_compactness_range,compactness_distance
+0.1,1.01541178435,0.1,0.02,3.00000005937
+0.2,1.26578803108,0.1,0.02,4.12442780529
+0.3,1.17631210026,0.1,0.02,3.86904462396
+0.4,2.31700278644,0.1,0.02,15.0569602795
+0.5,1.08655152036,0.1,0.02,3.72484862687
+0.6,2.97628078734,0.1,0.02,21.6358616001
+0.7,3.61632549044,0.1,0.02,25.4492265706
+0.8,2.72789958233,0.1,0.02,18.1083820007
+0.9,2.45915297845,0.1,0.02,18.4500322711
+0.1,1.05473877995,0.1,0.04,3.09321560218
 ...
 </pre>
 

Modified: grass-addons/grass7/raster/r.futures/r.futures.calib/r.futures.calib.py
===================================================================
--- grass-addons/grass7/raster/r.futures/r.futures.calib/r.futures.calib.py	2017-07-30 21:04:34 UTC (rev 71320)
+++ grass-addons/grass7/raster/r.futures/r.futures.calib/r.futures.calib.py	2017-07-31 17:51:01 UTC (rev 71321)
@@ -471,7 +471,7 @@
     proc_list = []
     num_all = len(compactness_means) * len(compactness_ranges) * len(discount_factors)
     with open(options['calibration_results'], 'a') as f:
-        f.write(' '.join(['input_discount_factor', 'area_distance',
+        f.write(','.join(['input_discount_factor', 'area_distance',
                           'input_compactness_mean', 'input_compactness_range',
                           'compactness_distance']))
         f.write('\n')
@@ -496,7 +496,7 @@
                             data = queue_list[i].get()
                             if not data:
                                 continue
-                            f.write(' '.join([str(data['input_discount_factor']), str(data['area_distance']),
+                            f.write(','.join([str(data['input_discount_factor']), str(data['area_distance']),
                                               str(data['input_compactness_mean']), str(data['input_compactness_range']),
                                               str(data['compactness_distance'])]))
                             f.write('\n')



More information about the grass-commit mailing list