Skip to content
Snippets Groups Projects
Commit 343ebd88 authored by Jameson Graef Rollins's avatar Jameson Graef Rollins
Browse files

fix gwinc() to use Noise style labels in noises dictionary

This fixes a regression in the move to the new Budget structured. The keys
in the gwinc() noises output changed to be the name of the Noise class,
instead of the label, causing the matgwinc comparison test to fail.

This fixes the keys in the gwinc noises output to be the labels to maintain
consistency.
parent 4b7a7e85
No related branches found
No related tags found
No related merge requests found
......@@ -32,12 +32,15 @@ def gwinc(freq, ifoin, source=None, plot=False, PRfixed=True):
Budget, ifo_, freq_, plot_style = load_ifo('aLIGO')
# add some precomputed info to the ifo struct
#this implicitly deepcopies and the return value is the copy
# this implicitly deepcopies and the return value is the copy
ifo = precompIFO(freq, ifoin, PRfixed)
traces = Budget(freq, ifo=ifo).calc_trace()
noises = {n:d[0] for n, d in traces.items()}
# construct matgwinc-compatible noises structure
noises = {}
for name, (data, style) in traces.items():
noises[style.get('label', name)] = data
noises['Freq'] = freq
pbs = ifo.gwinc.pbs
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment