diff --git a/pykat/ifo/aligo/__init__.py b/pykat/ifo/aligo/__init__.py index b607369b397f1bf6700a75fd3274fd94c143dc76..994ae4b77ece882b56acba85d7e4e1290ddd9243 100644 --- a/pykat/ifo/aligo/__init__.py +++ b/pykat/ifo/aligo/__init__.py @@ -819,19 +819,10 @@ def make_kat(name="design", katfile=None, verbose = False, debug=False, use_RF_D kat.IFO.POP_f2 = Output(kat.IFO, "POP_f2", "nPOP", "f2", phase=13) kat.IFO.REFL_f1 = Output(kat.IFO, "REFL_f1", "nREFL", "f1", phase=101) kat.IFO.REFL_f2 = Output(kat.IFO, "REFL_f2", "nREFL", "f2", phase=14) - - # If we don't have an OMC then we need to attach - # directly to the AS node. Otherwise use OMC refl - if "OMC" in kat.getBlocks(): - alt_nAS = "nAS" - nAS_RF = "nOMC_ICb" - else: - alt_nAS = None - nAS_RF = "nAS" - kat.IFO.AS_f1 = Output(kat.IFO, "AS_f1", nAS_RF, "f1", phase=101, alternate_node_name=alt_nAS) - kat.IFO.AS_f2 = Output(kat.IFO, "AS_f2", nAS_RF, "f2", phase=14, alternate_node_name=alt_nAS) - kat.IFO.AS_f36 = Output(kat.IFO, "AS_f36", nAS_RF, "f36M", phase=14, alternate_node_name=alt_nAS) + kat.IFO.AS_f1 = Output(kat.IFO, "AS_f1", "nSRM2", "f1", phase=101) + kat.IFO.AS_f2 = Output(kat.IFO, "AS_f2", "nSRM2", "f2", phase=14) + kat.IFO.AS_f36 = Output(kat.IFO, "AS_f36", "nSRM2", "f36M", phase=14) kat.IFO.AS_DC = Output(kat.IFO, "AS_DC", "nAS") kat.IFO.POW_BS = Output(kat.IFO, "PowBS", "nPRBS*") diff --git a/pykat/ifo/aligo/plot.py b/pykat/ifo/aligo/plot.py index f6237e103cdc6107eb313c285ece5e0da23d6c55..c901b125a7d8f1d6cfdf0ac60cb5194bd370649f 100644 --- a/pykat/ifo/aligo/plot.py +++ b/pykat/ifo/aligo/plot.py @@ -79,7 +79,8 @@ def pretuning_powers(self, _kat, xlimits=[-10,10]): plt.show(block=0) def error_signals(_kat, xlimits=[-1,1], DOFs=None, plotDOFs=None, - replaceDOFSignals=False, block=True, fig=None, label=None, steps=100): + replaceDOFSignals=False, block=True, fig=None, label=None, steps=100, + verbose=False): """ Displays error signals for a given kat file. Can also be used to plot multiple DOF's error signals against each other for visualising any cross coupling. @@ -92,7 +93,8 @@ def error_signals(_kat, xlimits=[-1,1], DOFs=None, plotDOFs=None, replaceDOFSignals: Bool, replaces already present signals for any DOF if already defined in kat. Regardless of this value, it will add default signals if none found. fig: figure, uses predefined figure, when defined it won't be shown automatically label: string, if no plotDOFs is defined this legend is shown - + verbose: prints more output about what's happening, e.g. what commands are getting added + Example: import pykat from pykat.gw_detectors import ifo @@ -119,7 +121,9 @@ def error_signals(_kat, xlimits=[-1,1], DOFs=None, plotDOFs=None, # add in signals for those DOF to plot for _ in dofs: - if replaceDOFSignals and not hasattr(kat, _.signal_name()): + if replaceDOFSignals: + if verbose: + print(_.name, "PD COMMAND", _.signal()) kat.parse(_.signal()) toShow = None @@ -161,7 +165,8 @@ def error_signals(_kat, xlimits=[-1,1], DOFs=None, plotDOFs=None, scan_cmd = scan_optics_string(d.optics, d.factors, "scan", linlog="lin", xlimits=np.multiply(d.scale, xlimits), steps=steps, axis=1, relative=True) - + if verbose: + print(d.name, "SCAN COMMAND", scan_cmd) kat.parse(scan_cmd, addToBlock="SCAN") out = kat.run(cmd_args=['-cr=on']) @@ -187,7 +192,7 @@ def error_signals(_kat, xlimits=[-1,1], DOFs=None, plotDOFs=None, ax.set_xlabel("{} [deg]".format(d.name)) if plotDOFs is None: - ax.set_ylabel('{} [W] '.format(d.port.name)) + ax.set_ylabel('{} {} [W] '.format(d.port.name, d.quad)) else: ax.set_ylabel('Error signal [W]') diff --git a/pykat/style/default.mplstyle b/pykat/style/default.mplstyle index ed5dc6cdf515f85f8409179fe88c2054dff559bb..b06e9a7071d3fac38f5d3bcb534c15665650a484 100644 --- a/pykat/style/default.mplstyle +++ b/pykat/style/default.mplstyle @@ -12,7 +12,7 @@ text.usetex : False axes.grid : True axes.formatter.useoffset : False axes.formatter.use_locale : False -axes.prop_cycle : cycler('color', ['0000FF', 'FF0000', '000000', '00FF00', 'FF00FF']) +axes.prop_cycle : cycler('color', ['b', 'r', 'k', 'g', 'c', 'm', 'y']) axes.axisbelow : True axes.xmargin : 0