mirror of
https://github.com/Cian-H/Melter.git
synced 2026-06-02 12:52:05 +01:00
Ficed bugs introduced by previous changes and added Scikit-Learn dpndncy
This commit is contained in:
+17
-1
@@ -3,6 +3,8 @@ class CalCurve():
|
||||
def __init__(self):
|
||||
self.name = "None"
|
||||
self.formula = "y=x"
|
||||
self.response = ""
|
||||
self.units = ""
|
||||
|
||||
def __call__(self, x):
|
||||
return x
|
||||
@@ -16,6 +18,8 @@ class AlSi7Mg(CalCurve):
|
||||
def __init__(self):
|
||||
self.name = "AlSi7Mg"
|
||||
self.formula = "N/A"
|
||||
self.response = "Temperature"
|
||||
self.units = "°C"
|
||||
|
||||
def __call__(self, x):
|
||||
return x
|
||||
@@ -26,16 +30,20 @@ class Al6061(CalCurve):
|
||||
def __init__(self):
|
||||
self.name = "Al6061"
|
||||
self.formula = "T=(V+84.66)/1.45"
|
||||
self.response = "Temperature"
|
||||
self.units = "°C"
|
||||
|
||||
def __call__(self, x):
|
||||
return (x + 84.661) / 1.4516
|
||||
|
||||
|
||||
class _15_5PH(CalCurve):
|
||||
class SS15_5PH(CalCurve):
|
||||
|
||||
def __init__(self):
|
||||
self.name = "15-5PH Stainless Steel"
|
||||
self.formula = "N/A"
|
||||
self.response = "Temperature"
|
||||
self.units = "°C"
|
||||
|
||||
def __call__(self, x):
|
||||
return x
|
||||
@@ -46,6 +54,8 @@ class H13(CalCurve):
|
||||
def __init__(self):
|
||||
self.name = "H13 Tool Steel"
|
||||
self.formula = "N/A"
|
||||
self.response = "Temperature"
|
||||
self.units = "°C"
|
||||
|
||||
def __call__(self, x):
|
||||
return x
|
||||
@@ -56,6 +66,8 @@ class Inconel625(CalCurve):
|
||||
def __init__(self):
|
||||
self.name = "Inconel 625"
|
||||
self.formula = "N/A"
|
||||
self.response = "Temperature"
|
||||
self.units = "°C"
|
||||
|
||||
def __call__(self, x):
|
||||
return x
|
||||
@@ -66,6 +78,8 @@ class Inconel718(CalCurve):
|
||||
def __init__(self):
|
||||
self.name = "Inconel 718"
|
||||
self.formula = "N/A"
|
||||
self.response = "Temperature"
|
||||
self.units = "°C"
|
||||
|
||||
def __call__(self, x):
|
||||
return x
|
||||
@@ -76,6 +90,8 @@ class Custom(CalCurve):
|
||||
def __init__(self):
|
||||
self.name = "Custom"
|
||||
self.formula = "y=mx+c"
|
||||
self.response = "Response"
|
||||
self.units = "U"
|
||||
|
||||
def __call__(self, x):
|
||||
return x
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import operator as __op
|
||||
import operator as _op
|
||||
|
||||
|
||||
class __Base():
|
||||
@@ -16,7 +16,7 @@ class Greater(__Base):
|
||||
self.name = ">"
|
||||
|
||||
def __call__(self, *args):
|
||||
return __op.gt(*args)
|
||||
return _op.gt(*args)
|
||||
|
||||
|
||||
class GreaterOrEqual(__Base):
|
||||
@@ -25,7 +25,7 @@ class GreaterOrEqual(__Base):
|
||||
self.name = "≥"
|
||||
|
||||
def __call__(self, *args):
|
||||
return __op.ge(*args)
|
||||
return _op.ge(*args)
|
||||
|
||||
|
||||
class Equal(__Base):
|
||||
@@ -34,7 +34,7 @@ class Equal(__Base):
|
||||
self.name = "="
|
||||
|
||||
def __call__(self, *args):
|
||||
return __op.eq(*args)
|
||||
return _op.eq(*args)
|
||||
|
||||
|
||||
class NotEqual(__Base):
|
||||
@@ -43,7 +43,7 @@ class NotEqual(__Base):
|
||||
self.name = "≠"
|
||||
|
||||
def __call__(self, *args):
|
||||
return __op.ne(*args)
|
||||
return _op.ne(*args)
|
||||
|
||||
|
||||
class LessOrEqual(__Base):
|
||||
@@ -52,7 +52,7 @@ class LessOrEqual(__Base):
|
||||
self.name = "≤"
|
||||
|
||||
def __call__(self, *args):
|
||||
return __op.le(*args)
|
||||
return _op.le(*args)
|
||||
|
||||
|
||||
class Less(__Base):
|
||||
@@ -61,4 +61,4 @@ class Less(__Base):
|
||||
self.name = "<"
|
||||
|
||||
def __call__(self, *args):
|
||||
return __op.lt(*args)
|
||||
return _op.lt(*args)
|
||||
|
||||
Reference in New Issue
Block a user