Skip to content

Commit

Permalink
fixes due to library updates
Browse files Browse the repository at this point in the history
  • Loading branch information
FUEL4EP committed Oct 28, 2022
1 parent 6cf120e commit 47f9d3d
Show file tree
Hide file tree
Showing 13 changed files with 651 additions and 580 deletions.
6 changes: 6 additions & 0 deletions .directory
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[Dolphin]
SortOrder=1
SortRole=modificationtime
Timestamp=2022,10,28,12,15,38
Version=4
ViewMode=1
Binary file modified Images/365_days_moving_average.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Images/average_of_consumption.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Images/delta_to_consumption_one_year_ago.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Images/linear_regression_analysis.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Images/moving_average_of_electrical_power_consumption.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ optparse, sys, os, numpy, scipy, time, datetime, pylab, matplotlib, re, string,

** Tested operating systems: **

Kubuntu 14.04, Kubuntu 16.04, Kubuntu 18.04
Kubuntu 14.04, Kubuntu 16.04, Kubuntu 18.04, Kubuntu 22.04

# Supported statistical analyses:

Expand Down Expand Up @@ -144,7 +144,8 @@ Options:

# Update history:

- 13th June 2021: Migration to python3
- 13th June 2021: Migration to python3
- 28th October 2022: Fixes due to library updates, update of images



Expand Down
13 changes: 8 additions & 5 deletions consal.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@

desc="""consal.py is doing a statistical analysis of electrical power, water, and oil consumptions"""

# $Rev: 70 $:
# $Rev: 75 $:
# $Author: ewald $:
# $Date: 2021-06-13 13:35:02 +0200 (So, 13. Jun 2021) $:
# $Id: consal.py 70 2021-06-13 11:35:02Z ewald $
# $Date: 2022-10-28 12:14:14 +0200 (Fr, 28. Okt 2022) $:
# $Id: consal.py 75 2022-10-28 10:14:14Z ewald $

__my_version__ = "$Revision: 70 $"
__my_version__ = "$Revision: 75 $"

ELECTRICAL_POWER_CONSUMPTION_FILE="electrical_power_consumption.caf"
WATER_CONSUMPTION_FILE="water_consumption.caf"
Expand Down Expand Up @@ -232,7 +232,10 @@ def write_table(self):
def xmgrace_time_to_AD_time (self, xmgrace_time_table):
#please notice the offset of one of matplotlib.dates !
#see e.g. http://matplotlib.org/api/dates_api.html
offset_1970=datetime.datetime(1970, 1, 1, 1, 0, 0)-datetime.datetime(1, 1, 1, 1, 0, 0)
#offset_1970=datetime.datetime(1970, 1, 1, 1, 0, 0) - datetime.datetime(1, 1, 1, 1, 0, 0)
#chamge for matplotlib >= 3.3
offset_1970=datetime.datetime(1, 1, 1, 1, 0, 0) - datetime.datetime(1, 1, 1, 1, 0, 0)

AD_time_table=xmgrace_time_table+offset_1970.days+1
return AD_time_table

Expand Down
20 changes: 20 additions & 0 deletions electrical_power_consumption.caf
Original file line number Diff line number Diff line change
Expand Up @@ -580,3 +580,23 @@
18672.4259722 102446.5
18764.6940741 103611.1
18791.53508101852 103958.2
18847.672349537035 104648.6
18868.351574074077 104903.3
18915.393194444445 105521.5
18936.382789351854 105787.7
19019.61517361111 106848.0
19043.707928240743 107138.0
19095.43834490741 107702.5
19102.328194444446 107788.6
19159.433912037035 108406.7
19182.403171296297 108655.6
19191.34039351852 108751.4
19193.43857638889 108772.6
19204.496400462966 108887.6
19223.689166666667 109071.1
19232.73505787037 109165.6
19245.409803240742 109291.9
19248.414965277778 109320.3
19264.809525462966 109450.3
19282.4340625 109679.2
19291.40403935185 109790.4
10 changes: 5 additions & 5 deletions messaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
#source:
#http://code.activestate.com/recipes/144838-include-function-name-and-line-number-automaticall/

# $Rev: 71 $:
# $Rev: 76 $:
# $Author: ewald $:
# $Date: 2021-06-13 13:36:31 +0200 (So, 13. Jun 2021) $:
# $Id: messaging.py 71 2021-06-13 11:36:31Z ewald $
# $Date: 2022-10-28 12:14:34 +0200 (Fr, 28. Okt 2022) $:
# $Id: messaging.py 76 2022-10-28 10:14:34Z ewald $

__version__ = "$Revision: 71 $"
__version__ = "$Revision: 76 $"


import sys, string, builtins
Expand Down Expand Up @@ -83,7 +83,7 @@ def getCallString(level):
#ways starting in 2.1
try:
raise FakeException("this is fake")
except Exception( e ):
except Exception as e :
#get the current execution frame
f = sys.exc_info()[2].tb_frame
#go back as many call-frames as was specified
Expand Down
Binary file not shown.
20 changes: 20 additions & 0 deletions oil_consumption.caf
Original file line number Diff line number Diff line change
Expand Up @@ -605,3 +605,23 @@
18672.4269213 24140.95
18764.6953819 24451.3
18791.53787037037 24492.72
18847.67349537037 24525.11
18868.352708333332 24537.38
18915.394583333335 24616.46
18936.383993055555 24682.86
19019.616134259257 25025.79
19043.709166666667 25117.11
19095.438923611113 25282.31
19102.329398148147 25293.46
19159.43519675926 25342.74
19182.40486111111 25353.7
19191.341458333332 25357.76
19193.43994212963 25358.6
19204.498113425925 25363.55
19223.690289351853 25371.05
19232.73658564815 25375.29
19245.411064814813 25381.29
19248.41638888889 25382.79
19264.81105324074 25392.72
19282.4353125 25429.51
19291.405011574076 25443.19
Loading

0 comments on commit 47f9d3d

Please sign in to comment.