Skip to content

Commit 05986d2

Browse files
[BC] Commenting plot method as it produce a conflict with PyQt5
1 parent aa151c0 commit 05986d2

File tree

1 file changed

+136
-136
lines changed

1 file changed

+136
-136
lines changed

swat_em/datamodel.py

Lines changed: 136 additions & 136 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from swat_em import report as rep
1616
from swat_em import wdggenerator
1717
from swat_em.config import config, get_phase_color
18-
from swat_em import plots
18+
# from swat_em import plots
1919

2020

2121
class datamodel:
@@ -945,147 +945,147 @@ def _calc_MMK(self):
945945
self.results["MMK"]["nu"] = nu
946946
self.results["MMK"]["HA"] = HA
947947

948-
def plot_layout(self, filename, res=None, show=False):
949-
"""
950-
Generates a figure of the winding layout
948+
# def plot_layout(self, filename, res=None, show=False):
949+
# """
950+
# Generates a figure of the winding layout
951951

952-
Parameters
953-
-------
954-
filename: string
955-
file-name with extension to save the figure
956-
res: list
957-
Resolution for the figure in pixes for x and y direction
958-
example: res = [800, 600]
959-
show: Bool
960-
If true the window pops up for interactive usage
961-
"""
962-
if res == None:
963-
res = config["plt"]["res"]
964-
plt = plots._slot_plot(None, None, self)
965-
plt.plot_slots(self.get_num_slots())
966-
plt.plot(self, show=show)
967-
plt.save(fname=filename, res=res)
968-
969-
def plot_overhang(self, filename, res=None, show=False, optimize_overhang=False):
970-
"""
971-
Generates a figure of the winding layout
952+
# Parameters
953+
# -------
954+
# filename: string
955+
# file-name with extension to save the figure
956+
# res: list
957+
# Resolution for the figure in pixes for x and y direction
958+
# example: res = [800, 600]
959+
# show: Bool
960+
# If true the window pops up for interactive usage
961+
# """
962+
# if res == None:
963+
# res = config["plt"]["res"]
964+
# plt = plots._slot_plot(None, None, self)
965+
# plt.plot_slots(self.get_num_slots())
966+
# plt.plot(self, show=show)
967+
# plt.save(fname=filename, res=res)
968+
969+
# def plot_overhang(self, filename, res=None, show=False, optimize_overhang=False):
970+
# """
971+
# Generates a figure of the winding layout
972972

973-
Parameters
974-
-------
975-
filename: string
976-
file-name with extension to save the figure
977-
res: list
978-
Resolution for the figure in pixes for x and y direction
979-
example: res = [800, 600]
980-
show: Bool
981-
If true the window pops up for interactive usage
982-
optimize_overhang: Bool
983-
If true swat-em tries to identify shorter winding overhangs
984-
"""
985-
if res == None:
986-
res = config["plt"]["res"]
987-
plt = plots._overhang_plot(None, None, self)
988-
plt.plot(show=show, optimize_overhang=optimize_overhang)
989-
plt.save(fname=filename, res=res)
990-
991-
def plot_star(self, filename, res=None, ForceX=True, show=False):
992-
"""
993-
Generates a figure of the star voltage phasors
973+
# Parameters
974+
# -------
975+
# filename: string
976+
# file-name with extension to save the figure
977+
# res: list
978+
# Resolution for the figure in pixes for x and y direction
979+
# example: res = [800, 600]
980+
# show: Bool
981+
# If true the window pops up for interactive usage
982+
# optimize_overhang: Bool
983+
# If true swat-em tries to identify shorter winding overhangs
984+
# """
985+
# if res == None:
986+
# res = config["plt"]["res"]
987+
# plt = plots._overhang_plot(None, None, self)
988+
# plt.plot(show=show, optimize_overhang=optimize_overhang)
989+
# plt.save(fname=filename, res=res)
990+
991+
# def plot_star(self, filename, res=None, ForceX=True, show=False):
992+
# """
993+
# Generates a figure of the star voltage phasors
994994

995-
Parameters
996-
-------
997-
filename: string
998-
file-name with extension to save the figure
999-
res: list
1000-
Resolution for the figure in pixes for x and y direction
1001-
example: res = [800, 600]
1002-
ForceX: Bool
1003-
If true the voltage phasors are rotated in such way, that
1004-
the resulting phasor of the first phase matches the
1005-
x-axis
1006-
show: Bool
1007-
If true the window pops up for interactive usage
1008-
"""
1009-
if res == None:
1010-
res = config["plt"]["res"]
1011-
plt = plots._slot_star(None, None, self, None)
1012-
plt.plot(self, harmonic_idx=0, ForceX=ForceX, show=show)
1013-
plt.save(fname=filename, res=res)
1014-
1015-
def plot_windingfactor(self, filename, res=None, mechanical=True, show=False):
1016-
"""
1017-
Generates a figure of the winding layout
995+
# Parameters
996+
# -------
997+
# filename: string
998+
# file-name with extension to save the figure
999+
# res: list
1000+
# Resolution for the figure in pixes for x and y direction
1001+
# example: res = [800, 600]
1002+
# ForceX: Bool
1003+
# If true the voltage phasors are rotated in such way, that
1004+
# the resulting phasor of the first phase matches the
1005+
# x-axis
1006+
# show: Bool
1007+
# If true the window pops up for interactive usage
1008+
# """
1009+
# if res == None:
1010+
# res = config["plt"]["res"]
1011+
# plt = plots._slot_star(None, None, self, None)
1012+
# plt.plot(self, harmonic_idx=0, ForceX=ForceX, show=show)
1013+
# plt.save(fname=filename, res=res)
1014+
1015+
# def plot_windingfactor(self, filename, res=None, mechanical=True, show=False):
1016+
# """
1017+
# Generates a figure of the winding layout
10181018

1019-
Parameters
1020-
-------
1021-
filename: string
1022-
file-name with extension to save the figure
1023-
m: list
1024-
Resolution for the figure in pixes for x and y direction
1025-
example: res = [800, 600]
1026-
mechanical: Bool
1027-
If true the winding factor is plotted with respect to the
1028-
mechanical ordinal numbers. If false the electrical
1029-
ordinal numbers are used
1030-
show: Bool
1031-
If true the window pops up for interactive usage
1032-
"""
1033-
if res == None:
1034-
res = config["plt"]["res"]
1035-
plt = plots._windingfactor(None, None, self, None)
1036-
plt.plot(self, mechanical=mechanical, show=show)
1037-
plt.save(fname=filename, res=res)
1038-
1039-
def plot_MMK(self, filename, res=None, phase=0, show=False):
1040-
"""
1041-
Generates a figure of the winding layout
1019+
# Parameters
1020+
# -------
1021+
# filename: string
1022+
# file-name with extension to save the figure
1023+
# m: list
1024+
# Resolution for the figure in pixes for x and y direction
1025+
# example: res = [800, 600]
1026+
# mechanical: Bool
1027+
# If true the winding factor is plotted with respect to the
1028+
# mechanical ordinal numbers. If false the electrical
1029+
# ordinal numbers are used
1030+
# show: Bool
1031+
# If true the window pops up for interactive usage
1032+
# """
1033+
# if res == None:
1034+
# res = config["plt"]["res"]
1035+
# plt = plots._windingfactor(None, None, self, None)
1036+
# plt.plot(self, mechanical=mechanical, show=show)
1037+
# plt.save(fname=filename, res=res)
1038+
1039+
# def plot_MMK(self, filename, res=None, phase=0, show=False):
1040+
# """
1041+
# Generates a figure of the winding layout
10421042

1043-
Parameters
1044-
-------
1045-
filename: string
1046-
file-name with extension to save the figure
1047-
res: list
1048-
Resolution for the figure in pixes for x and y direction
1049-
example: res = [800, 600]
1050-
phase: float
1051-
phase angle for the current system in electical degree
1052-
in the range 0..360°
1053-
show: Bool
1054-
If true the window pops up for interactive usage
1055-
"""
1056-
if res == None:
1057-
res = config["plt"]["res"]
1058-
plt = plots._mmk(None, None, self, None)
1059-
plt.plot(self, phase=phase, show=show)
1060-
plt.save(fname=filename, res=res)
1061-
1062-
def plot_polar_layout(
1063-
self, filename, res=None, optimize_overhang=False, draw_poles=False, show=False
1064-
):
1065-
"""
1066-
Generates a figure of the winding layout
1043+
# Parameters
1044+
# -------
1045+
# filename: string
1046+
# file-name with extension to save the figure
1047+
# res: list
1048+
# Resolution for the figure in pixes for x and y direction
1049+
# example: res = [800, 600]
1050+
# phase: float
1051+
# phase angle for the current system in electical degree
1052+
# in the range 0..360°
1053+
# show: Bool
1054+
# If true the window pops up for interactive usage
1055+
# """
1056+
# if res == None:
1057+
# res = config["plt"]["res"]
1058+
# plt = plots._mmk(None, None, self, None)
1059+
# plt.plot(self, phase=phase, show=show)
1060+
# plt.save(fname=filename, res=res)
1061+
1062+
# def plot_polar_layout(
1063+
# self, filename, res=None, optimize_overhang=False, draw_poles=False, show=False
1064+
# ):
1065+
# """
1066+
# Generates a figure of the winding layout
10671067

1068-
Parameters
1069-
-------
1070-
filename: string
1071-
file-name with extension to save the figure
1072-
res: list
1073-
Resolution for the figure in pixes for x and y direction
1074-
example: res = [800, 600]
1075-
optimize_overhang: Bool
1076-
If true swat-em tries to identify shorter winding overhangs
1077-
draw_poles: Bool
1078-
If true the poles of the rotor are drawn
1079-
show: Bool
1080-
If true the window pops up for interactive usage
1081-
"""
1082-
if res == None:
1083-
res = config["plt"]["res"]
1084-
plt = plots._polar_layout_plot(None, None, self)
1085-
plt.plot(
1086-
self, show=show, optimize_overhang=optimize_overhang, draw_poles=draw_poles
1087-
)
1088-
plt.save(fname=filename, res=res)
1068+
# Parameters
1069+
# -------
1070+
# filename: string
1071+
# file-name with extension to save the figure
1072+
# res: list
1073+
# Resolution for the figure in pixes for x and y direction
1074+
# example: res = [800, 600]
1075+
# optimize_overhang: Bool
1076+
# If true swat-em tries to identify shorter winding overhangs
1077+
# draw_poles: Bool
1078+
# If true the poles of the rotor are drawn
1079+
# show: Bool
1080+
# If true the window pops up for interactive usage
1081+
# """
1082+
# if res == None:
1083+
# res = config["plt"]["res"]
1084+
# plt = plots._polar_layout_plot(None, None, self)
1085+
# plt.plot(
1086+
# self, show=show, optimize_overhang=optimize_overhang, draw_poles=draw_poles
1087+
# )
1088+
# plt.save(fname=filename, res=res)
10891089

10901090
def save_to_file(self, fname):
10911091
"""

0 commit comments

Comments
 (0)