Commit 8aa7ae70 authored by Daniel Brown's avatar Daniel Brown

Merge branch 'master' into 'master'

Master

See merge request finesse/pykat!3
parents 28f1eaff 4ea68bda
......@@ -49,9 +49,19 @@ from pykat.style import use as set_plot_style
from .SIfloat import SIfloat
kat = finesse.kat()
v = kat.finesse_version()
try:
kat = finesse.kat()
v = kat.finesse_version()
except pkex.MissingFinesse:
from warnings import warn
msg = "Could not find the finesse executable 'kat'" \
"or you do not have the permissions to run it."
warn(msg)
class nokat(object):
def __getattribute__(self, attr):
warn(msg)
kat = nokat()
v = str(__min_req_finesse__)
if float(v.split('-')[0]) < __min_req_finesse__:
raise pkex.BasePyKatException("Pykat %s requires Finesse version %s or higher. You have have %s" % (__version__ ,
str(__min_req_finesse__),
......
......@@ -35,7 +35,7 @@ class BeamParam(object):
"""
def __init__(self, wavelength=1064e-9, nr=1, *args, **kwargs):
if self.__class__ != BeamParam:
if self.__class__ == gauss_param or self.__class__ == beam_param:
warnings.warn("Name changed. Use BeamParam instead of gauss_param or beam_param.")
self.__q = None
......@@ -743,4 +743,4 @@ class gauss_param(BeamParam):
pass
class beam_param(BeamParam):
pass
\ No newline at end of file
pass
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment