Skip to content
Snippets Groups Projects

API change: Budget/Noise calculations return BudgetTrace object

Merged Jameson Rollins requested to merge jameson.rollins/pygwinc:trace-obj into master
All threads resolved!
10 files
+ 499
302
Compare changes
  • Side-by-side
  • Inline
Files
10
  • This new object holds the PSD and frequency arrays, as well as the
    list of all budget sub-noises, accessible via a dictionary interface
    and attribute access.
    
    All interfaces and tests are updated to process the new BudgetTrace
    object.
    
    A new HDF5 schemata (version 2) is also introduced that stores trace
    data in a way that mirrors the BudgetTrace.  The io functions
    (save_hdf5/load_hdf5) are updated to write/read this format.  The
    load_hdf5 functions continues to support the version 1 SCHEMA.
    
    Closes #59
+ 3
3
@@ -35,11 +35,11 @@ def main():
range_pad = max(len(name), range_pad)
for name, budget in budgets.items():
data = budget.calc()
trace = budget.run()
try:
import inspiral_range
label_range = ' {:>6.0f} Mpc'.format(
inspiral_range.range(freq, data),
inspiral_range.range(freq, trace.psd),
)
except ModuleNotFoundError:
label_range = ''
@@ -49,7 +49,7 @@ def main():
pad=range_pad,
range=label_range,
)
ax.loglog(freq, np.sqrt(data), label=label, lw=2)
ax.loglog(freq, trace.asd, label=label, lw=2)
ax.grid(
True,
Loading