Skip to content
Snippets Groups Projects

Interface simplifications

Merged Jameson Rollins requested to merge jameson.rollins/pygwinc:interface-simplify into master
3 files
+ 33
35
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 4
4
import os
import logging
from ..struct import load_struct, STRUCT_EXT
from ..struct import Struct
from ..util import load_module
@@ -42,9 +42,9 @@ def load_ifo(name_or_path):
path = name_or_path.rstrip('/')
bname, ext = os.path.splitext(os.path.basename(path))
if ext in STRUCT_EXT:
if ext in Struct.STRUCT_EXT:
logging.info("loading struct {}...".format(path))
ifo = load_struct(path)
ifo = Struct.from_file(path)
bname = 'aLIGO'
modname = 'gwinc.ifo.aLIGO'
logging.info("loading budget {}...".format(modname))
@@ -69,7 +69,7 @@ def load_ifo(name_or_path):
ifo = getattr(mod, 'IFO', ifo)
ifopath = os.path.join(modpath, 'ifo.yaml')
if not ifo and ifopath:
ifo = load_struct(ifopath)
ifo = Struct.from_file(ifopath)
freq = getattr(mod, 'FREQ', None)
plot_style = getattr(mod, 'PLOT_STYLE', PLOT_STYLE)
Loading