Commit 2df4c4f6 authored by mikelovskij's avatar mikelovskij
Browse files

Added the _strToDOFs method to the ADV_IFO class too, since it was required by a plotting function.

parent 2bde09ab
......@@ -1119,6 +1119,24 @@ class ADV_IFO(IFO):
for k,v in DCoffset.items():
self.set_DC_offset(DCoffset=v, offset_type=k, verbose=False)
def _strToDOFs(self, DOFs):
dofs = []
for _ in DOFs:
if isinstance(_, six.string_types):
if _ in self.DOFs:
raise pkex.BasePyKatException(
"Could not find DOF called `%s`. Possible DOF options: %s" % (
_, str(list(self.DOFs.keys()))))
raise pkex.BasePyKatException(
"'%s' not possible DOF options: %s" % (
_, str(list(self.DOFs.keys()))))
return dofs
def assert_adv_ifo_kat(kat):
if not isinstance(kat.IFO, ADV_IFO):
......@@ -125,7 +125,7 @@ def error_signals(_kat, xlimits=[-1,1], DOFs=None, plotDOFs=None, replaceDOFSign
toShow = None
if plotDOFs is not None:
toShow = self._strToDOFs(plotDOFs)
toShow = kat.IFO._strToDOFs(plotDOFs)
# Check if other DOF signals we need to include for plotting
for _ in toShow:
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