changeset 973:4f3f88a27dae

minor
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Thu, 21 Dec 2017 23:26:00 -0500
parents b50145235f9e
children 4a262dc896c2
files python/utils.py
diffstat 1 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/python/utils.py	Wed Dec 13 14:48:48 2017 -0500
+++ b/python/utils.py	Thu Dec 21 23:26:00 2017 -0500
@@ -80,10 +80,9 @@
 def confidenceInterval(mean, stdev, nSamples, percentConfidence, trueStd = True, printLatex = False):
     '''if trueStd, use normal distribution, otherwise, Student
 
-    Use otherwise t.interval or norm.interval
-    ex: norm.interval(0.95, loc = 0., scale = 2.3/sqrt(11))
-    t.interval(0.95, 10, loc=1.2, scale = 2.3/sqrt(nSamples))
-    loc is mean, scale is sigma/sqrt(n) (for Student, 10 is df)'''
+    Use otherwise t.interval or norm.interval for the boundaries
+    ex: norm.interval(0.95)
+    t.interval(0.95, nSamples-1)'''
     from scipy.stats.distributions import norm, t
     if trueStd:
         k = round(norm.ppf(0.5+percentConfidence/200., 0, 1), 2)
@@ -914,7 +913,11 @@
     see ftp://client_climate@ftp.tor.ec.gc.ca/Pub/Get_More_Data_Plus_de_donnees/Station%20Inventory%20EN.csv
 
     To get daily data for 2010 and 2011, downloadECWeather(10761, [2010,2011], [], '/tmp')
-    To get hourly data for 2009 and 2012, January, March and October, downloadECWeather(10761, [2009,2012], [1,3,10], '/tmp')'''
+    To get hourly data for 2009 and 2012, January, March and October, downloadECWeather(10761, [2009,2012], [1,3,10], '/tmp')
+
+    for annee in `seq 2016 2017`;do wget --content-disposition "http://climat.meteo.gc.ca/climate_data/bulk_data_f.html?format=csv&stationID=10761&Year=${annee}&timeframe=2&submit=++T%C3%A9l%C3%A9charger+%0D%0Ades+donn%C3%A9es" ;done
+    for annee in `seq 2016 2017`;do for mois in `seq 1 12`;do wget --content-disposition "http://climat.meteo.gc.ca/climate_data/bulk_data_f.html?format=csv&stationID=10761&Year=${annee}&Month=${mois}&timeframe=1&submit=++T%C3%A9l%C3%A9charger+%0D%0Ades+donn%C3%A9es" ;done;done
+    '''
     import urllib2
     if english:
         language = 'e'