Skip to content
Snippets Groups Projects

precomp decorator support

Merged Jameson Rollins requested to merge jameson.rollins/pygwinc:precomp into master
3 unresolved threads
Files
2
+ 9
2
@@ -111,9 +111,16 @@ def gwinc(freq, ifo, source=None, plot=False, PRfixed=True):
# FIXME: how do we allow adding arbitrary addtional noise sources
# from just ifo description, without having to specify full budget
budget = load_budget('aLIGO', freq)
noises = budget.run()
traces = budget.run()
plot_style = getattr(budget, 'plot_style', {})
# construct matgwinc-compatible noises structure
noises = {}
for name, trace in traces.items():
noises[name] = trace.psd
noises['Total'] = traces.psd
noises['Freq'] = traces.freq
pbs = ifo.gwinc.pbs
parm = ifo.gwinc.parm
finesse = ifo.gwinc.finesse
@@ -159,6 +166,6 @@ def gwinc(freq, ifo, source=None, plot=False, PRfixed=True):
logger.info('BBH Inspiral Range: ' + str(score.effr0bh) + ' Mpc/ z = ' + str(score.zHorizonBH))
logger.info('Stochastic Omega: %4.1g Universes' % score.Omega)
plot_budget(noises, **plot_style)
plot_budget(traces, **plot_style)
return score, noises, ifo
Loading