Skip to content

Commit 29e9dae

Browse files
committed
Merge branch 'master' of github.com:rdemaria/pytimber
2 parents 057951c + 2ea7bfa commit 29e9dae

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

examples/PyTimber_Tutorial.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,8 @@
184184
"### Scaling algorithms\n",
185185
"\n",
186186
"getScaled can be used to exploit the time scaling functionality of Timber. Specify \n",
187-
"- the scale Interval (an integer) \n",
188-
"- the scaleSize (one of ['SECOND', 'MINUTE', 'HOUR', 'DAY', 'WEEK', 'MONTH', 'YEAR']) \n",
187+
"- the scaleSize (an integer) \n",
188+
"- the scaleInterval (one of ['SECOND', 'MINUTE', 'HOUR', 'DAY', 'WEEK', 'MONTH', 'YEAR']) \n",
189189
"- the scaling algorithm (one of ['MAX','MIN','AVG','COUNT','SUM','REPEAT','INTERPOLATE'])"
190190
]
191191
},
@@ -266,7 +266,7 @@
266266
],
267267
"source": [
268268
"db.getScaled('MSC01.ZT8.107:COUNTS','2016-08-03 16:30:00.000','2016-08-03 18:30:00.000',\n",
269-
" timescaleAlgorithm='SUM', scaleSize='MINUTE', timescaleInterval='1')"
269+
" scaleAlgorithm='SUM', scaleSize='1', scaleInterval='MINUTE')"
270270
]
271271
},
272272
{

pytimber/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
from .pagestore import PageStore
1212

13-
__version__ = "2.4.3"
13+
__version__ = "2.5.0"
1414

1515
__cmmnbuild_deps__ = [
1616
"accsoft-cals-extr-client",

pytimber/pytimber.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ def get(self, pattern_or_list, t1, t2=None,
487487
return out
488488

489489
def getScaled(self, pattern_or_list, t1, t2,unixtime=True,
490-
scaleAlgorithm='SUM', scaleSize='MINUTE', scaleInterval='1'):
490+
scaleAlgorithm='SUM', scaleInterval='MINUTE', scaleSize='1'):
491491
"""Query the database for a list of variables or for variables whose
492492
name matches a pattern (string) in a time window from t1 to t2.
493493
@@ -496,11 +496,11 @@ def getScaled(self, pattern_or_list, t1, t2,unixtime=True,
496496
If a fundamental pattern is provided, the end of the time window as to
497497
be explicitely provided.
498498
499-
Applies the scaling with supplied timescaleAlgorithm, scaleSize, timescaleInterval
499+
Applies the scaling with supplied scaleAlgorithm, scaleSize, scaleInterval
500500
"""
501501
ts1 = self.toTimestamp(t1)
502502
ts2 = self.toTimestamp(t2)
503-
timescaling=self.toTimescale([scaleInterval,scaleSize,scaleAlgorithm])
503+
timescaling=self.toTimescale([scaleSize,scaleInterval,scaleAlgorithm])
504504

505505
out = {}
506506
# Build variable list
@@ -523,8 +523,8 @@ def getScaled(self, pattern_or_list, t1, t2,unixtime=True,
523523
except jpype.JavaException as e:
524524
print(e.message())
525525
print('''
526-
timescaleAlgorithm should be one of:{},
527-
timescaleInterval one of:{},
526+
scaleAlgorithm should be one of:{},
527+
scaleInterval one of:{},
528528
scaleSize an integer'''.format(['MAX','MIN','AVG','COUNT','SUM','REPEAT','INTERPOLATE']
529529
,['SECOND', 'MINUTE','HOUR', 'DAY','WEEK','MONTH','YEAR']))
530530
return

tests/test_ldb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

4545
t1 = '2015-05-15 12:00:00.000'
4646
t2 = '2015-05-15 15:00:00.000'
47-
d = ldb.getScaled('MSC01.ZT8.107:COUNTS',t1,t2,scaleSize='HOUR')
47+
d = ldb.getScaled('MSC01.ZT8.107:COUNTS',t1,t2,scaleInterval='HOUR')
4848
print(d)
4949

5050
print('------------------------------------------------------------------------')

0 commit comments

Comments
 (0)